Welcome, Guest
Username: Password: Remember me

TOPIC: Is it possible for me to use javascripte to read session in the start.pstpl

Is it possible for me to use javascripte to read session in the start.pstpl 3 months 1 week ago #107471

  • mrli999
  • mrli999's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 95
  • Thank you received: 1
  • Karma: 0
Is it possible for me to use javascripte to read session in the start.pstpl? if yes, how? thanks again.

In more details:

If there is a session variable exampleid. In some case it's value is 99999999, other 99999998.

In the startpage.pstpl, I would like to check the value is 99999999 or 99999998. If it is 999999, alert and jump to a customer page (such as www.example.com/example/login.php). If it is 99999998, go ahead and pass 9999998 to a question in the survey.

Is it possbile? And how?
The administrator has disabled public write access.

Is it possible for me to use javascripte to read session in the start.pstpl 3 months 1 week ago #107478

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6205
  • Thank you received: 787
  • Karma: 238
This need to be done in ajax, not in js only.

Or you can just use cookies :
- www.quirksmode.org/js/cookies.html
- developer.mozilla.org/en-US/docs/Web/API/document.cookie
The administrator has disabled public write access.
The following user(s) said Thank You: mrli999

Is it possible for me to use javascripte to read session in the start.pstpl 3 months 1 week ago #107481

  • mrli999
  • mrli999's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 95
  • Thank you received: 1
  • Karma: 0
Thank you very much, Densi!

Is ajax very diffculty? If possbile, would you please let me know how to read the session using ajax? thanks again!
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.143 seconds
Donation Image