![]() |
Prototype Modal Window Redirection problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Prototype Modal Window Redirection problem (/showthread.php?tid=2947) |
Prototype Modal Window Redirection problem - El Forum - 09-01-2007 [eluser]millisami[/eluser] I'm using prototype window for the login form. This is the link that will create a model login window. Code: <a href="[removed]openModalDialog()">Click here to open a modal window</a> But the problem is, when the login is successful and in the function loginajax() if I put the code Code: redirect("/dashboard"); To overcome this, what I did is, I returned a responseText 'successfull' and compared it as follow Code: if (req.responseText == 'successfull') { So, is there any other way to redirect and load the dashboard page in the parent window from the controller function itself? Thanks Prototype Modal Window Redirection problem - El Forum - 09-01-2007 [eluser]jkevinburton[/eluser] have you tried parent.location.href="path/to?"; OR top.location.href="path/to?"; im just guessing at this point.. i have looked into the prototype window API Prototype Modal Window Redirection problem - El Forum - 09-02-2007 [eluser]millisami[/eluser] [quote author="[CoDeR]" date="1188677928"]have you tried parent.location.href="path/to?"; OR top.location.href="path/to?"; im just guessing at this point.. i have looked into the prototype window API[/quote] I think that you didn't understand the problem clearly. Yes, it works just with location.href="path/path2"; But my question is, when the modal dialog is open and if I use redirect("path/path2"); in the controller's action, this redirected file is loaded in the modal window itself. I don't want to use location.href="path/path2"; if there is any alternative, I want to do it via controller action. Thanks |