[nycphp-talk] $_SERVER['REQUEST_METHOD'] and Javascript historyobject
Phil Powell
soazine at erols.com
Mon Jul 14 16:48:56 EDT 2003
Will the previous page have any form elements? If so, within a form within pageA.php you can have this:
<input type=hidden name=refURL value=<?= $PHP_SELF ?>>
Calling this form variable in pageB.php would ensure that they came from pageA.php
You can also do this in a query string, however, a better solution would be some kind of unique key, such as
pageB.php?var1=blah&var2=foo&...&uniqueKey=ICameFromPageA.php&...
That way you look for some unique string that could only have come from pageA.php.
HTH
Phil
----- Original Message -----
From: betenoir at echonyc.com
To: itp-alumni at forums.nyu.edu ; talk at lists.nyphp.org
Sent: Monday, July 14, 2003 4:45 PM
Subject: [nycphp-talk] $_SERVER['REQUEST_METHOD'] and Javascript historyobject
I'm trying to determine whether the user is coming to a given page (call it pageB.php) from the previous page in the sequence (pageA.php) or off-site.
While I can access window.history.length, i cannot access a given key in that array:
"Error: uncaught exception: Permission denied to get property History.previous"
or
"Error: uncaught exception: Permission denied to call method History.item"
FWIW I'm using php and while I can determine the $_SERVER['REQUEST_METHOD'] this technique is not infallible. Apparently when you hit "back" (or select from the "Go" menu) some browsers use the cached version of page -- which means they return pageA.php and not pageX.html
Aaaaarrrrgggghhhh!!!!!
Suggestions?
Clyde
------------------------------------------------------------------------------
_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20030714/11a012e3/attachment.html>
More information about the talk
mailing list