Check out the LimeSurvey source code on GitHub!

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

More
2 years 10 months ago #107471 by mrli999
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?

Please Log in to join the conversation.

More
2 years 10 months ago #107478 by DenisChenu
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

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
The following user(s) said Thank You: mrli999

Please Log in to join the conversation.

More
2 years 10 months ago #107481 by mrli999
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!

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form