|
Posted by Ike on 01/09/06 16:26
Do an HTTP POST (or GET) of a form, where you send the object from
Javascript, calling the same page to rerender. When the page loads, in php,
check if the value was sent. Suppose I have a js variable 'x'. I then put it
in a hidden text field say, on a form, and POST the form.
When the page reloads, it tests to see if x has been "set" in javascript
(i.e. POSTED):
$x = $_POST['x'];
if $x =="" then it is the first time the form was loaded and x has not been
set in js. (or, a subsequent time for loading the form after a POST and x
was never set in js). You may want to check too if x==null, not sure if it
is null or "". -Ike
Navigation:
[Reply to this message]
|