« first day (747 days earlier)      last day (4199 days later) » 

@tereško - you have any idea about what I just asked?
 
"close vote, please" ... you do not have enough reputation to have that functionality unlocked
 
There doesn't seem to be a variable called d in the returned object.
 
I got it , Ticket is an Array , I need Ticket[0].EventID
 
12:21 AM
if I want to use visual web developer 2010 and want to feed it a url to try to load in IE, do I need to put a function in my code?
 
Aaaaand the code is done. F. yes.
It took me a whole week to write a spaghetti code that actually works from zero previous JS knowledge. (Okay, and you guys helped me a lot.)
 
12:44 AM
@FlorianMargaine actually there as even a simpler notation: pastie.org/5146864 (that's from the original : pastie.org/5144611) .. bottom line: tnx, gonna go and find some good posts of yours to upvote
 
@nicooga hi mate
 
haha we meet again
 
@nicooga :D I think there is bracket problems in my code I get illegal token when I run it on chrome debugger
 
mm
 
@nicooga

<script type="text/javascript">
$(document).ready(function () {
$('.quantity').keypress(function() {
price = $(this).parent().find('.price').html()
quantity = $(this).parent().find('.quantity').val()
result = price * quantity
$(this).parent().find('.price2').html(result)n
});
});
</script>
 
12:50 AM
let me try it
 
@nicooga try this one instead

<script type="text/javascript">
$(document).ready(function () {
$('.quantity').keypress(function() {
price = $(this).parent().find('.price').html()
quantity = $(this).parent().find('.quantity').val()
result = price * quantity
$(this).parent().find('.price2').html(result)
});
});
</script>
 
@AlianaRose stop using documentReady event
instead place you code before closing </body> , then it gets executed as soon as DOM tree has been built
 
oops
i have the feeling you are puching those lines right into the js console
in that case ommit the script tag
 
@AlianaRose also , notice the button for multiline input in this chat : it's for formating the code
 
yeah, i noticed the js console doesnt have multiline support
so do that
 
12:53 AM
@nicooga pastebin.com/8ZxBwpmd I have it there
@tereško thanks for the tips
 
oh .. and since you are reusing $(this).parent() all the time, you should cache it in local variable
 
yep, my bad, im used to ommit the var declarations on coffee
$('.quantity').keypress(function() {
var price = $(this).parent().find('.price').html()
var quantity = $(this).parent().find('.quantity').val()
var result = price * quantity
$(this).parent().find('.price2').html(result)
 
yeah .. too high blood content circulating in your caffeine solution is a possible risk
 
Hey I need some CSS help.
On a form how can I get the labels to have equal margin from input forms
 
lol
 
12:57 AM
If you cache something, say a set of jQuery objects, then pass one to a function like:
$(someObject[3]).on('click', function() {
$(this).....
});
The `$(this)` isn't resampling the DOM, right?
 
for example
Username: input here
Password: input here
Email: input here
 
$('.quantity').keypress(function() {
    var parent    = $(this).parent() ,
        price     = parent.find('.price').html() ,
        quantity  = parent.find('.quantity').val() ,
        result    = price * quantity;
    parent.find('.price2').html(result);
}
 
Nicoo you have skype?
 
@Query Put the labels in <li> or <p> and position them either absolutely relative to the container, or float them
 
@nicooga , this is how it should have looked like;
 
1:00 AM
I cant get it it work
 
"does not work" is not really a valid error message
 
do I need documentready?
 
Foo
hello is there any java json gurus in here?
 
    <script>
        $('.quantity').keypress(function() {
            ....
        });
    </script>
</body>
 
try { 1/0 }
catch(undefined) {
console.log('does not work');
 
1:02 AM
@AlianaRose , this is where the code should be located
 
@Query You try the fix I mentioned?
 
@monners I'm working out a jsfiddle
incase I need help
 
Ah, k
Good call
 
its odd the script tag as @teresko wrote should work
did you see this jsfiddle.net/qU7ZG?
 
@AlianaRose , do you get any error messages in console ?
also , this should use onkeyup event instead, otherwise you get a delay
 
1:07 AM
Okey I tried this before </body>
<script>
$('.quantity').keypress(function() {
result = $(this).parent().find('.price').html() * $(this).parent().find('.quantity').val()
$(this).parent().find('.price2').html(result)
});​
Uncaught SyntaxError: Unexpected token ILLEGAL
</script>
thats the error i got
 
10 mins ago, by tereško
$('.quantity').keypress(function() {
    var parent    = $(this).parent() ,
        price     = parent.find('.price').html() ,
        quantity  = parent.find('.quantity').val() ,
        result    = price * quantity;
    parent.find('.price2').html(result);
}
 
okey I will try that one
 
thats what fixs it in the jsfiddle
 
or you could start use those pesky semicolons
as a sane person
 
hmm
 
1:11 AM
ignore the last one
im an idiot
 
<script type="text/javascript">
$('.quantity').keypress(function() {
var parent = $(this).parent() ,
price = parent.find('.price').html() ,
quantity = parent.find('.quantity').val() ,
result = price * quantity;
parent.find('.price2').html(result);
}
</script>
didnt trigger anything :S
also saying expected ',' or ')'
 
expected where ?
 
you are missing the last ')'
 
errors usually come with line numbers
 
it should be });
instead of imply a cracket
 
1:12 AM
oh , fak .. i thought i edited it
 
I'm stuck and feeling stupid right now
http://jsfiddle.net/8RYzm/
I want the inputs to be adjacent to the and have them all the same margin away.
 
@AlianaRose , also , you might invest some time in actually learning javascript ... i would recommend starting with eloquentjavascript.net supplemented with yuiblog.com/crockford lectures
 
cool thanks
hmmm the result is null weird :S
 
1:19 AM
@tereško Thanks!
 
that one looks better haha well
 
@AlianaRose null what ?
and where ?
 
@nicooga I appreciate the effort though
 
quantity and price
 
15 mins ago, by tereško
also , this should use onkeyup event instead, otherwise you get a delay
 
1:21 AM
"" and null
 
jsfiddle or it did not happen
 
It ain't pretty, but it works...
 
hmm so strange its not working
 
There, much better
@Query You get that?
 
1:37 AM
hmmm
@tereško did you check it out?
maby its not working beacuse my html structure is different from nicoogas?
there?
 
i dont quite get whats the price2 for
dont you need price, qttyand total?
 
price2 is total
<span class="total">total: </span>
 
oh, its some kind of subtotal
 
total: <price2>
 
(?)
anyway
 
1:50 AM
         <span class="price2">699</span>
         <span class="total">Total:</span
 
i think the thinkg thats messing up is having th input inside the span
 
hmm will span.quantity work perhaps?
 
perhaps
im having a look at it
 
What're you trying to do Aliana?
 
take a look at jsfiddle.net/pFzgf/1
 
1:52 AM
I am
 
when a number gets typed in the textbox the value should get value * price and then the result should get in to price2
 
i put the input outside the span
 
oh so thats the problem
 
@ScottSelby don't just ping random users
man is that ever annoying
 
1:56 AM
but your the jon skeet of jquery
lol
sorry man, i thought you were here
 
@AlianaRose I can't even get the keypress() method to fire...
 
use keyup
 
As in the'up' key?
 
huh?
 
I am trying jsfiddle.net/pFzgf/6 in my code but I am keep getting NaN as result :S
 
1:59 AM
keyup()
 
its beacuse the price is "232,40"
',' is giving my NaN?
 
Ah, gotcha
 
its highly possible you are missing a "."
on top of this all
have you put a link to jquery on the head?¡
 
yeah
 
ok and yes, use "."
 
2:00 AM
you probably want blur() too, you really want it to calculate everytime you press something
 
Holdup, isn't the parent of $(this) .price?
 
yup it was, but i put the input outside the span
 
2340,40 + 3 = NaN
 
so all the elements we are quering for have the same parent
2340.40
use dots not commas
 
@AlianaRose How are you getting NaN?
"2340,60" + 3
> "2340,603"
2340,60 + 3
> 63
2340.60 + 3
> 2343.6
Chrome, Linux
 
2:03 AM
I am getting at result = price * quantity;
price has 2340,40 and quantity has 3
 
oh. jQuery.
 
you can do( .val() * 1) * 3
the value that came from textbox *1 , then multiply , even if there is a comma in it (i think)
 
I found this total += !isNaN(c = +$(this).text())?c:0;
 
better comment that crap
 
heads up
we are not parsing those string into numbers
since js does it automatically for multiplication
 
2:07 AM
if you multiply the string by one , it becomes a number, then multiply by qty
 
In another jquery im using i use parseFloat
 
or use parseInt
 
if it was 2340.40 I would not have NaN but since I have 2340,40 it gives me Nan it seems
 
however
we need to multiplicate
so its pretty irrelevant
 
2:14 AM
I think I've got it
I suspected the problem might be that your <span> tags, which are in-line tags, aren't actually inline anything
As soon as I wrapped the first span, I got a number back
 
hmm could you show me on jsfiddle
 
That, plus you're trying to .find() the element you're already targeting with .parent()
Because the parent of the input IS the span
Oops, left an open call for a console.log in that last link....
My bad
@AlianaRose Working for ya?
 
hmmm I thought the problem was the ','
 
Nope. <span> tags are for, well, spanning ?:P
 
2:26 AM
lool
 
2:42 AM
need a word : end of movement where each step incurred a price
ideas ?
would "yield" fit ?
 
impact?
 
list( $segments, $currentNodeId ) = $this->yieldNode( $segments );
i need to "walk tree" and produce ID of found node , but the process should also pop elements out of the $segments array
.. i'm trying to refactor
 
I have a nav menu and when I click on one of the menutabs its suppose to swap image to a darker one like its active but I failed, I tried to do it with jquery sigh lol
<script type="text/javascript">
$(document).ready(function () {
$('.swap5').click(function () {
$(this).attr('src', '/Static/Images/Meny_clicked_01.png');


});
});
</script>
 
3:07 AM
rose, use css
a:link    {color:green;}
a:visited {color:green;}
a:hover   {color:red;}
a:active  {color:yellow;}
 
even if my nav structure look like this:
<a href="#"><img class="swap3" src="/Static/Images/Meny_normal_04.png" alt="" /></a>
<a href="#"><img class="swap4" src="/Static/Images/Meny_normal_05.png" alt="" /></a>
<a href="/Home/ShoppingCart"><img class="swap5" src="/Static/Images/Meny_normal_06.png" alt="" /></a>
I use images
and I got the highlighted image also
 
i think theres some css code for fading images
anyway im not so used to make styles
 
just givin a wild thought :|
 
nicooga how old are you?
No college and you have nice experience
 
3:11 AM
hehe 18
 
wow
at what age did you start coding?
 
2 years maybe more
 
nice!
what language did you start with
 
i actually saw my first piece of code on visual basic, but didnt feel very exited till i met ruby
 
I started with VB too! lol, 'LOGO'
 
3:17 AM
cool what was after ruby
 
you know the feeling then :P
 
YEah, VB is fuckin' boring
 
actually since then on IDEs makes me puke
 
I've actually only been coding for about 6 months, but college calculus, organic chem, and LSAT prep definitely lhelped kickstart the logic :P
 
and know its web developing, rails, sinatra/padrino, and any stuff related to it
 
3:19 AM
Do you use Ruby on Rails?
 
yep
 
I am almost done with my 3 years university taking my exam in computer science
 
note to self, read then type
 
and im not a big fan of jquery at all I hate it
 
You're a computer science major?
So stick with javascript
 
3:21 AM
try coffee
 
I'm a little partial to jquery and js. they're what I learnt on.
coffee? NOOOOO
Ewwww
 
my first language was Delphi lol :P
 
you learnt to program on a whale in sea world?
 
kinda
 
lol
 
3:22 AM
Sudoku's good debugging practice :P
 
3:54 AM
Hi, any suggestions about this question
0
Q: Suggestion for CSS solution to make a smaller preview div

Sharad Sharma As in image you can see I have a bigger div on left and smaller div on right. Smaller div is basically a preview div so whatever is added to bigger div on left should be re-sized and come in smaller div. Something similar to powerpoint currently I am doing this $('#slideContent0').css('-ms-tra...

 
 
2 hours later…
5:54 AM
0
Q: C parser in Javascript

Olivier LalondeI'd like to parse C header files in Javascript. Is there any such library available? Otherwise, any tips to help me get started?

 
 
1 hour later…
7:22 AM
@Abhishek You'd probably be interested in this
Also, where have you been?
 
7:41 AM
Someone that could explain to me some basic in css:
position: -webkit-sticky;
position: -moz-sticky;
position: -ms-sticky;
position: -o-sticky;
each of these "-xx-" is definition of a browser engine right? :-/
because this: jsfiddle.net/rlemon/rcMe9 doesn't work for me in firefox/IE9
 
8:00 AM
They're called browser prefixes
@AndersMetnik Works fine for me in Chrome
 
Guys, if any moderator there, please help me. http://stackoverflow.com/q/8203018/800639
I asked this question when I was new to SO
Now I'm getting downvotes nearly every day
Can't do anything. Question closed but I'm getting downvotes
Please delete this question
I don't want to get downvotes anymore
 
@TuralTeyyuboglu Don't you have a delete button?
That's what I have under my questions. Just delete it
 
@AmaanCheval works for me in chrome as well, thats kinda why i wrote FF/IE
0
Q: Crossbrowser position:fixed but still fails?

Anders MetnikThe following example of making a position : fixed does not work in my FF16.02 / IE9. But as far as I known, it should be crossbrowser compatible. Any Ideas? JSfiddle of the issue

 
@AmaanCheval can't.
 
@TuralTeyyuboglu You don't see the delete button?
@AndersMetnik I didn't know if you'd checked in Chrome. Is FF updated and all?
 
8:05 AM
version 16.. so pretty much :)
 
@AmaanCheval screencast.com/t/Y8XdjuyXkRL I flagged it too
 
Any errors in the console?
@ThiefMaster Help @TuralTeyyuboglu delete his question?
Or maybe protect it or something
 
@AmaanCheval Nope no errors :(
 
You're right. Doesn't work for me in FF either
 
8:08 AM
Got it
Use window.scrollY instead of document.body.scrollTop
 
Awesome, go answer the Q on SO as well please :)
and get your awesome reward ;)
 
I am trying to develop a mobile application using the mobile web, and I would like to make a page loading penant loads data from the database.

language using javascript
 
node js ?
 
someone has an idea?
 
8:12 AM
Too vague for us to have an idea
What's your server side language?
 
He said language using javascript. So nodejs for server I assume?
 
i'm using Javascript
 
Do you understand the words we are writing?
What do you use for server?
 
ah sorry. i use ASP for webservice
 
I can't help then, never touched ASP.
 
8:16 AM
not problem. you have a idea about javascript?
 
I have a little experience by now, what you wan't to know?
 
how can I run a background view and the view of another action.
 
That makes no sense
what is a "view" in your context?
 
HTML
 
What do you mean with background view?
and view of another action ?
Is it because you wan't to preload a html page?
 
8:20 AM
while loading the data I want to display to the user page "loading", and this page as soon as it closed my copy of the data is completed
 
How do you load data?
I'd say something like this maybe?
http://www.codeproject.com/Tips/170049/Pure-HTML-5-CSS-3-Modal-Dialog-Box-no-JavaScript
 
thks :)
 
:6044712
 
8:35 AM
4
Q: Display loading image while post with ajax

user301017I know there are thousands of examples on the internet, but I want for the script I already have to display a loading gif image while the data is retrievedd. My java knowledge are poor, therefore I'm asking how to change the following: <script type="text/javascript"> $(document).ready(fu...

 
classic question
 
yeah once again a question saying: "I don't want to learn, I just want it to work"....
 
8:54 AM
> My java knowledge are poor
@MedAmine wtf?
 
Think he meant javascript ;)
 
:)
is there anyone using sublime text?
 
I use sublime but not an expert in that :)
 
me neither but i am wondering if it can be used for rather complex projects
I just started using it yesterday or the day before
 
Hehe doubt i'll be of any help since my answer would be: "What is sublime text" ;-P
 
8:59 AM
Just a fancy text editor actually
 
In office I use sublime and our project is pretty complex. I don't need autocomplete and just a simple an light editor - so sublime.
have integration with perforce and lot of other useful plugins which I use.
 
There is autocomplete
 
Thanks for the clarification :)
 
autocomplete is not like what we have in eclipse for java. it just shows you a list of words found in the file
 
netbeans :)
 
9:00 AM
> Dr. A. Bell has 20+ years of SW/EE experience, published 200+ tech articles and authored 37 inventions; Win/Web veteran, currently focused on: HTML5, CSS3, Javascript, jQuery, SQL, Windows 8, .NET, C#, WPF, Ultrabooks, Mobile.
 
compared to eclipse or netbeans, I love sublime, though
 
that's a lot of stuff to be focused on
 
@FlorianMargaine, where did you get that description? :D
 
well netbeans just kills my computer in half an hour
 
9:03 AM
I have 12GB RAM in my office computer but still eclipse seems to run slow :(
 
use vim ;)
 
in sublime you can use VIM shortcuts and similar command mode. using vintage mode: sublimetext.com/docs/2/vintage.html
 
I know, but the mode sucks :)
compared to the real beast
trust me, I tried it.
 
just read about this from net.
 
:)
there is also a vi mode in emacs
same, it sucks
 
9:08 AM
I never tried vim. For me the route was notepad-> netbeans-> eclipse-> sublime :)
 
was the same for me
I tried vim several times before using it for real
like many people
and end up using it for serious forever :p
 
must be good then :)
 
the route was the same for me too
now I use Visual Studio also
 
9:41 AM
Mine was notepad -> gedit -> Sublime
 
Hey guys I have a problem, jquery.ready..
In chrome it triggers before my logo picture has taken it's space. In FF it does it after, consequential.. Any suggestions?
 
@tereško alright, glad I could help :)
 
Has taken it's space?
Are you changing it with JS?
 
@AndersMetnik for images, window.onload, not document.ready
 
ready only waits for the DOM to be loaded
Which basically means that the browser can render the entire markup, with or without resources.
 
9:48 AM
@FlorianMargaine Thanks mate :)
@FlorianMargaine a followup is window.onload always after $.ready ?
 
no... window.onload is a different event
well, it triggers after DOMContentLoaded, yes
 
What if I need both to be triggers?
 
onload is fired when page is ready. $.ready is executed when dom is created
 
triggered*
 
then add both listeners. you can nest them, yes
 
9:50 AM
@sv_in onload is fired when the DOM has been loaded and the resources have been too
 
okay, googling nest listeners
 
$(document).ready(function() {
    $(window).on('load', function() {
    });
});
 
What's the use?
 
@AndersMetnik
 
Ohh okay :)
 
9:51 AM
@AmaanCheval doing some stuff when dom is ready, and doing other stuff when images are loaded, all this while keeping some stuff in the closure
 
I meant onload is fired when page is completely ready (finished) with all resources. Wrong choice of words :D
 
Ooh, yeah
 
10:04 AM
0
Q: shorthand JS to jQuery

Sean MilburnIn my code I have some shorthand JS that a colleague at work helped me with. I do not entirely understand it and would be much happier changing it back to simple jQuery. I have tried to myself but it keeps breaking. Here is the shorthand if (target.length) { target.addClass("occupied"); ...

 
it's pretty cool
 
i agree :-)
 
10:27 AM
Yes it's cool
 
user1125394
10:42 AM
@Feeds shh
 
user1125394
10:54 AM
$(document).ready(function() {
    $(window).on('load', function() {
        $('*').on('load', function() {
            //ready
        });
    });
});
 
user1125394
sorry for that
 

« first day (747 days earlier)      last day (4199 days later) »