jquery - cgi.pm redirect does not print to Target _top -
i not sure how information need give here .. bear me please while try explain scenario. apologies if there "padding"
i have application in use cgi::session security. various pages pulled in combination of jquery, perl, ajax calls etc. when print 1 of password-protected pages check logged-in status of cgi::session record , redirect homepage if necessary following perl:
print $cgi->redirect( -url => $homepage);
this works expected.
however ...
there div in 1 of password-protected pages contains control panel ... pulled in via jquery , ajax call. decided add security saving of data when user clicks "ok" ... invokes ajax call perl (controlpanelsave.pl). in perl decided add same check cgi::session logged-in flag (the user may have been sitting long on control panel , when click save had timed out - or maybe bad person had found javascript). perl checks , redirects homepage if not logged in.
the problem have homepage printed inside control panel div frame.
i tried using method think of fix it:
print $cgi->redirect( -url => $homepage, -target => '_top' );
which doesn't make difference - still prints homepage inside control panel div.
what correct way redirect it?
you have edit javascript recognise didn't data expecting , set location
on client.
Comments
Post a Comment