Prepopulate a field with Classic ASP Variable

  • Profile Image
    Asked on August 03, 2017 at 09:48 AM

    I have a form I want to add some data that is in an ASP Variable , specifically <%=referer%>.

    I test it just before the JavaScript call and it is populated.

    Yet it does not show on my form

    <script type="text/javascript" language="JavaScript">

        alert("<% =referer %>")


       <script type="text/javascript" language="JavaScript" src="'+"<% =referer %>+'" > </script>

    I followed the other posts on the support forum, but still no good. Any idea what I am doing wrong?

  • Profile Image
    Answered on August 03, 2017 at 12:52 PM

    Would you mind sharing the URL of the page you added the form to?  I am honestly not too familiar with VB so I am not sure if the variable can be used as a URL parameter as you are attempting to.  You can try using the source code of the form and populating the field directly instead of via the URL parameter:

  • Profile Image
    Answered on August 03, 2017 at 12:59 PM

    Realized the Field Content was a url with Ampersands. Ampersands in the the string was the issue.

    I broke up the content and concatenated it together without Ampersands. 

    BTW: The field was not the calling page.

    Problem fixed.