Tom,
JavaScript is a client side language, while PHP is server side.

This means that the PHP is parsed and evaluated before it ever reaches the 
surfers browser.  And since the JavaScript variable will not be available 
until it is created by the browser, there is no way to interact with it.


Peter


At 02:08 PM 9/23/2002 +0100, Tom wrote:
>Hi all,
>
>
>
>I hope this is the right place to pose my question, so here goes: -
>
>
>
>I have a javascript function called calcMonth() and given a number it will
>return a date i.e. month = calcMonth( 57 )   -  month will be 'sept 2002'
>
>
>
>The problem I`m having is at the beginning of my PHP file I`m calling this
>calcMonth() then doing a load of php stuff and then trying to use the
>javascript month variable, but to no avail: -
>
>
>
>print "<td><input type=text class=claimreadonly readonly name=POST_monthdisp
>value=javascript:month; size=10 tabindex=99></td>";
>
>
>
>The result is, the browser displays the words 'javascript:month;' - not a
>month number
>
>
>
>I`ve looked everywhere for an answer from persistent javascript data to
>using framesets to hold the variable but to no avail.
>
>
>
>I know its quite a bit of javascript, but its mixed in  with PHP too so I
>thought it`d be the right place.
>
>
>
>Anyways, I hope someone can provide the answer to my problem.
>
>
>
>Thanks in advance,
>
>Tom
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to