[jQuery] Re: Return values

2009-12-14 Thread Jojje
Oh i looked for a built in function for that but i must have missed it haha, Thank you so much, worked like a charm and really easy to setup to :) Thanks again :) On 14 Dec, 19:11, Michael Geary wrote: > OK, so the real question here is a bit different from the question I've been > trying to answ

Re: [jQuery] Re: Return values

2009-12-14 Thread Michael Geary
OK, so the real question here is a bit different from the question I've been trying to answer. :-) In general JavaScript coding, what I've been saying is true: If you want to write code that uses data downloaded by a $.ajax call, you need to put that code in a function called from the $.ajax succe

[jQuery] Re: Return values

2009-12-14 Thread Jojje
Oh and you type "jojje" to see how it behaves with an existing username :) On 14 Dec, 18:33, Jojje wrote: > Ok, yes you can check it out > athttp://www.sonicconnection.se/se/index.php?site=_misc/register > > It´s in swedish but its the first field that uses the code to check if > the username al

[jQuery] Re: Return values

2009-12-14 Thread Jojje
Ok, yes you can check it out at http://www.sonicconnection.se/se/index.php?site=_misc/register It´s in swedish but its the first field that uses the code to check if the username already exists, it makes a call to a php script and the response is equal to the username if it exists in the database

Re: [jQuery] Re: Return values

2009-12-14 Thread Michael Geary
Looks like we have two threads going on the same topic. :-) To give you a real code example, I'd need to see the code that makes use of that 'result' variable you're setting. Where is that code and what does it look like? The bottom line is simple: whatever the code is that uses the 'result' vari

[jQuery] Re: Return values

2009-12-14 Thread Jojje
Hi! Yeah i got that tip before but i'm not sure i understand this. Could you perhaps give me an example with the code below :) regards George On 14 Dec, 14:27, Rick van Hoeij wrote: > because of the async of javascript I normally use callback functions > to do the value passing. So instead of r

[jQuery] Re: Return values

2009-12-14 Thread Rick van Hoeij
because of the async of javascript I normally use callback functions to do the value passing. So instead of return true or return false in a ajax function, it's better to call a function with the true or false as a parameter. Just my two cents ;) On 12 dec, 20:24, Jojje wrote: > How deep in the

[jQuery] Re: return values

2009-10-26 Thread rob
Awesome thanks... On Oct 23, 12:16 pm, James wrote: > $.each(data.feed.entry, function(i, entry){ > >      var postlink = [];  // empty array > >      $.each(entry.link, function(j, link){ >           if(link.rel == "self"){ >                // add to array >                postlink.push(link.hr

[jQuery] Re: return values

2009-10-23 Thread James
$.each(data.feed.entry, function(i, entry){ var postlink = []; // empty array $.each(entry.link, function(j, link){ if(link.rel == "self"){ // add to array postlink.push(link.href); } }); alert(postlink.join(', ')); }); On