Results 1 to 4 of 4

Thread: [RESOLVED]javascript variable inseide php script

Hybrid View

  1. #1
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: javascript variable inseide php script

    I think you are a little muddled.

    PHP has nothing to do with JavaScript.
    PHP is a purely server-side technology; JavaScript is purely client-side.

    No JavaScript variables are persisted after the user navigates away from the page.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Posts
    164

    Re: javascript variable inseide php script

    basically my homepage is html, just the extn is php and have some function used <?php></php> i can use the javascript variable, i feel strange why my homepage keep the variable value even i have change the variable or delete the variable.js , is it the server problem?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Posts
    164

    Resolved Re: javascript variable inseide php script

    i find the answer from internet and want to share with other.it is javascript cache problem.

    add ?new Date().getTime() at the end of script my problem solved!!
    example
    <SCRIPT SRC="../javascript/flyingobject.js?new Date().getTime()">
    Last edited by edwinho; Dec 8th, 2007 at 09:22 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width