SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Aug 2004
    0 Post(s)
    0 Thread(s)

    what is the JS equivilant for the PHP $_SESSION['vars']?

    im building a php/JS app for my website.

    i can manage refreshing a data array from my db. (because the data changes all the time live).

    and i can manage adding stuff to a page with the Document.write without having to refresh the page and drive the user crazy.

    my problem is. how do i get the data from the update page to the display page?

    in the update page itself using: var= <?php echo $_SESSION['aray'][$id] ; ?> is rather comfrtable.

    but then how do i pass the var to the JS page so it would display the new vlue of var? refreshing the JS (the display) page is not an option cause as i said it will drive my users crazy.

    anny sujestions would be apreaceiated.
    thanks alot

  2. #2
    SitePoint Addict
    Join Date
    May 2000
    0 Post(s)
    0 Thread(s)
    Is the display page a popup (new window) that pops up from the update page or is it replacing the update page? There are a couple of different ways. One would be cookies and the other would be to pass the value(s) through the URL and then use javascript to grab the data from the URL. Here is a link to a tutorial on the subject:


Posting Permissions

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