Dynamic Select of JS Includes with JS and ASP?

Results 1 to 3 of 3

Thread: Dynamic Select of JS Includes with JS and ASP?

  1. #1
    Troy Ackerman Guest

    Default Dynamic Select of JS Includes with JS and ASP?

    I am porting some dynamically generated text to external websites using javascript include files.<BR><BR>Example:<BR>&#060;script type="text/javascript" language="JavaScript1.2" src="http://www.mysite.com/request_information.asp?idnumber=1141&source=jsweb site"&#062;<BR><BR>BUT, I am trying to vary which include file is called based on the referring<BR>URL.<BR><BR>What I would like to do: (psuedocode that needs to be Javascript on the<BR>calling page)<BR>var strFromURL<BR>strFromURL = referringURL<BR>If strFromURL = "this" Then<BR>&#060;script type="text/javascript" language="JavaScript1.2"<BR>src="http://www.mysite.com/request_information.asp?djidnumber=1141&source=jsw ebsite"&#062;<BR>Else<BR>&#060;script type="text/javascript" language="JavaScript1.2"<BR>src="http://www.mysite.com/thankyou.asp?djidnumber=1141&source=jswebsite"&#06 2;<BR><BR>Why am I doing this? I want to put a form on an external page (external to my site and which does not support ASP) via a JS include file. Then when the user submits the info it will be directed to the processing page...then back to the external page....where a thank you for requesting information message will be displayed.<BR><BR>Any suggestions?

  2. #2
    Join Date
    Dec 1969

    Default if I understand the question...

    Do you have any control over the external page? If so, you can implement clientside querystring parsing, and after the asp page had done it&#039;s work, you can redirect back to the external page, which will parse the querystring and display the message. I don&#039;t think that you can include a ASP file as the source to a script tag. <BR><BR>Is that what you were looking for?

  3. #3
    Troy Ackerman Guest

    Default RE: if I understand the question...

    For js include files see the post by Bill Wilkinson at...<BR>http://www.aspmessageboard.com/forum/showMessage.asp?M=195863&F=20&P=1<BR><BR>RE: control of external page...<BR>I can control what HTML code is cut and pasted but beyond that I have no control.<BR><BR>URL&#039;s for parsing of querystring? Worried about the fact that the querysting would be messy...<BR>EX: www.notmysite.com/page.htm<BR>or<BR>EX: www.notmysite.com/page.asp?monkey=true<BR>etc.<BR><BR>Troy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts