SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    May 2001
    Location
    Missouri City, Texas
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    client side / server side

    Hello;

    I'd like to be able to compare a value generated by a server side script using PHP to a JavaScript value. For example, I'd like to show the time offset from the server to the client. Don't have a problem getting either script to work. Just need to have the client side script pickup the server side time. Any suggestions?

  2. #2
    SitePoint Zealot Paul_M's Avatar
    Join Date
    Mar 2001
    Location
    London
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    I have very little javascript experience but maybe this suggestion will help

    Output the php time into a text box something like:
    <input type="text" name="php_generated" value="<? echo $query?>" size="40">

    you could even have it in a type="hidden" field....

    Then ....i'm pretty sure javascript can read this value from the "php_generated" textbox

    Hope this helps...(it should ...in principle )


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •