Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Dynamic URL in Text Display question

Dynamic URL in Text Display question 9 Monate 3 Wochen her #100181

  • lfortunato
  • lfortunatos Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 38
  • Dank erhalten: 1
  • Karma: 1
Hi everyone!

In the same LimeSurvey installation (version 1.92) I have two surveys:
SURVEY1 (SID = 001) and SURVEY2 (SID = 002).

I need to put in SURVEY1 a pointer to SURVEY2, but I need a dynamic URL, not carved.

So I put in SURVEY1 a question (with question type "Text Display") and placed a link
like this in source:

<a href="{$_SERVER}/index.php?sid=002" target="X">SURVEY2</ a>

But it does not solve the fragment {$_SERVER }

Could anyone kindly help me?

I posted this topic also in the italian LS forum

Thank you, Loredana
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Dynamic URL in Text Display question 9 Monate 3 Wochen her #100198

  • lfortunato
  • lfortunatos Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 38
  • Dank erhalten: 1
  • Karma: 1
Thank you to lfanfoni, he gave me a solution on the italian forum...and it works!
:)

Here is the script, I put it into a Text Display question (source):

<a href="www.miosito.it" id="url1" target="_blank">SURVEY2</a>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
document.getElementById("url1").href="http://"+location.hostname+"/index.php?sid=002";
});
</script>

Thank you again!!!
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.124 Sekunden
Donation Image