Create Frame Page To Hide SurveyWriter URL

Q. How can I have the survey hosted on my own web site? How can I have the respondent go to the survey from my company web site? How will I also transfer the Hidden Questions or Password that is part of the URL?

A. It is not possible to actual host the survey from your company web site. The survey always needs to be on the SurveyWriter.com web site. You can make it appear that the survey is on your company Web site by doing the following.

  1. Put an HTML page on your web site that is called a Frame page. This page will reside on your company web site. A Frame page is a web page that allows you to display other web site pages inside of it. Using this method the URL in the address bar will always read as being from your web site even though the page's content (survey) is actually being served from the SurveyWriter.com web site. The frame page also contains a small piece of JavaScript code that checks to see if the original URL contains a querystring. If it does, it will append it onto the SurveyWriter.com URL.
  2. To create the frame page that will go on your web site, create a file with the following code and then upload the page to your server. Whatever file name you give this page is the file name your respondents would go to/click on to start the survey. This example assumes the name for your survey is "MySurvey.html."

(This is the frame code you would paste into your file)

<!------------------------------Frame Code below------------------------>

<html>
<head>
<title>SurveyFrame</title>

<!-- When the page loads the script below will load the SurveyWriter.com survey into the
Main Window (the only window). It will also grab any querystring from the original URL
and append it to the SurveyWriter.com URL-->

<script language="javascript">


function doload() {
parent.win1.location="http://www.surveywriter.com/in/survey/survey###/SurveyName.asp" + location.search ;
}


</script>


</head>

<frameset cols="100%,*" onload="doload()">
<frame name="win1" src="">
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>
<!------------------------------End Frame Code below------------------------>

  1. Edit the SurveyWriter URL that points to the survey. Looking at the example code below you would replace the URL with the URL that SurveyWriter displays when you created your survey URL (using Project Admin> Survey URL Options). For example, the file before editing would look like the following. 

<!------------------------------Frame Code below------------------------>

<html>
<head>
<title>SurveyFrame</title>

<!-- When the page loads the script below will load the SurveyWriter.com survey into the
Main Window (the only window). It will also grab any querystring from the original URL
and append it to the SurveyWriter.com URL-->

<script language="javascript">


function doload() {
parent.win1.location="http://www.surveywriter.com/in/survey/survey###/SurveyName.asp" + location.search ;
}


</script>


</head>

<frameset cols="100%,*" onload="doload()">
<frame name="win1" src="">
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>

<!------------------------------End Frame Code below------------------------>

  1. Replace the text "http://www.surveywriter.com/in/survey/survey###/SurveyName.asp" with the URL that SurveyWriter had displayed. We will assume that in SurveyWriter you had also given the name "MySurvey" to your survey.

    You would replace the text with "http://www.surveywriter.com/in/survey/survey999/MySurvey.asp"
    (in the above URL, the word "survey999" would actually be "survey" and the number SurveyWriter.com had assigned to you)

    The edited new file would look like the following:

<!------------------------------Frame Code below------------------------>

<html>
<head>
<title>SurveyFrame</title>

<!-- When the page loads the script below will load the SurveyWriter.com survey into the
Main Window (the only window). It will also grab any querystring from the original URL
and append it to the SurveyWriter.com URL-->

<script language="javascript">


function doload() {
parent.win1.location="http://www.surveywriter.com/in/survey/survey999/MySurvey.asp" + location.search ;
}


</script>


</head>

<frameset cols="100%,*" onload="doload()">
<frame name="win1" src="">
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>


<!------------------------------End Frame Code below------------------------>

  1. Save this file.
  2. Upload the file to your server. If you have not ever uploaded a file to your server either give us a call and we can help you do it (we do this for many of our clients) or call the people that are responsible for maintaining your web site. 
  3. If you had uploaded the frame page file to the root directory on your server, then the URL that you would give to your respondents would be:

    http://www.yourwebsite.com/MySurvey.html


    You might want to have a file folder called "survey" created on your web server. Then you could upload all of your survey frame pages to this file folder. If this was the case, the URL would be:

    http://www.yourwebsite.com/survey/MySurvey.html