Ajax.Request returned html |
[eluser]millisami[/eluser]
The following code displays 'Login' link. When its clicked, the request is passed and the returned text is 'Hello'. Its confirmed using the Firebug's Inspect tab. Code: <a onclick="new Ajax.Request('/user/loginajax',{onComplete:function(request){showResponse}, Code: function showResponse(req) { Code: <div id="dologin">nothing</div> Thanks.
[eluser]obiron2[/eluser]
you have not assigned the req.responseText to the innerHTML property of the DIV. obiron
[eluser]deviant[/eluser]
Your onComplete should read like this: Code: onComplete: showResponse
[eluser]millisami[/eluser]
@ deviant Thanks. That was the culprit. @ obiron2 I'd put that but this forum's backend just made it [removed]
[eluser]Crafter[/eluser]
Whay don't you use the Ajax.Updater() function to acheive the same effect in one go?
[eluser]millisami[/eluser]
[quote author="Crafter" date="1188619936"]Whay don't you use the Ajax.Updater() function to acheive the same effect in one go?[/quote] Yup, sure I'm using it. But this one was just for the testing purpose. Can you please help me out with this one below: Prototype Modal Window Redirection problem Thanks. |
Welcome Guest, Not a member yet? Register Sign In |