Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Redirection of Html page to survey page

Hi All, i have designed a survey which needs to redirected to a html file which is placed in graphics path and then redirect  Html to the current survey again.The problem that am facing now is Survey to Html is done and HTML to survey is not working as there is a linkage between the unique links which needs to be asked for each respondent. Below is the code .Please help me with the solution. It should redirect to the current link which is running out.

<script type="text/javascript">
function mobil_detect()

if (screen.width <= 699)

    var str = document.URL;
    str = str.replace('index.html?name=','cgi-bin/ciwweb.pl?hid_studyname=HtmlRedirectionLive&username=');
    window.location = str;
<body onload="mobil_detect()">
asked Jun 16, 2016 by sandeepkapalawai Bronze (1,455 points)
retagged Jun 16, 2016 by Walter Williams

1 Answer

0 votes
Hi Sandeep,

It needs to modified based on your server link configuration. is your ciwweb.pl reside in common cgi-bin directory or upload separately  for each project? I assume you need to change path cgi-bin/ciwweb.pl here, rest seems fine in below code.

str = str.replace('index.html?name=','cgi-bin/ciwweb.pl?hid_studyname=HtmlRedirectionLive&username=');

Also can you confirm what is your studyname, SpeechHtmlLive1 or  HtmlRedirectionLive.
answered Jun 16, 2016 by Rajesh Rana Gold (24,740 points)