Passing variables model to javascript |
[eluser]Nick Husher[/eluser]
Prototype's callback for when the Ajax function is complete is (IIRC) onComplete. If you have nothing tied to that event, you'll never know when the remote server request is completed. Try: Code: function callAmazon(artist, album) Also, wouldn't you kinda want to request a specific album? When you get around to returning album covers, I think you'd want to do something like this: Code: function callAmazon(artist, album) Note that I added dynamically changing 'artist' and 'album' fields in the URL string and inserted a reference to the response object that Prototype hands to event listeners when onComplete is fired. The response object is documented on this page. |
Messages In This Thread |
Passing variables model to javascript - by El Forum - 01-30-2008, 08:27 AM
Passing variables model to javascript - by El Forum - 01-30-2008, 08:47 AM
Passing variables model to javascript - by El Forum - 01-30-2008, 08:53 AM
Passing variables model to javascript - by El Forum - 01-30-2008, 09:01 AM
Passing variables model to javascript - by El Forum - 01-30-2008, 10:03 AM
Passing variables model to javascript - by El Forum - 01-30-2008, 12:47 PM
Passing variables model to javascript - by El Forum - 01-30-2008, 01:20 PM
|