Best way to maintain state for offsite visitors us

Results 1 to 3 of 3

Thread: Best way to maintain state for offsite visitors us

  1. #1
    Troy Ackerman Guest

    Default Best way to maintain state for offsite visitors us

    Greetings. Please help on this one, I&#039;m looking for a better solution.<BR><BR>What I&#039;m doing: providing cut and paste HTML code for my members that they put on their (external to my) site. <BR><BR>SAMPLE CODE ON external.htm<BR>------------------------------<BR>&#060;script type=&#039;text/javascript&#039; language=&#039;JavaScript1.2&#039; src=&#039; site&#039;&#062;&#060;/script&#062;<BR><BR>The above code uses JS to print out a form on my members website. The form is submitted to request_information.asp and processed. Then I redirect back to external.htm.<BR><BR>CURRENT IMPLEMENTATION<BR>-------------------------<BR>So far I&#039;ve used a Session variable to keep track of the user. That is: if Session("formstatus") = "" then request_information.asp exports the request information form. Upon submission I set Session("formstatus") = "submitted". When request_information.asp page is called a 2nd time the session variable is found to be "submitted" and a thank you message is ported back.<BR><BR>MY QUESTION<BR>--------------------------<BR>Can I accomplish the same thing by appending the querystring of the external calling page? For example...the 1st time the page would be external.htm. Once the form was submitted it would then response.redirect to external.htm?status=submitted. Then when called, the request_information.asp JS include file would do a request of http_referer and parse the query string. I suppose I could also set a cookie to accomplish this, but appending the querysting seems like the most cross-browser setup compatable way to do this.<BR><BR>My concern with appending the querystring is how to implement it for non asp pages. I know I can do a Response.Redirect strFromURL & "?status=submitted" for asp pages.<BR><BR>Any suggestions?<BR>Better implementation suggestions?<BR>Does that make sense? :)<BR><BR>Troy Ackerman<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Best way to maintain state for offsite visitor

    Not sure I&#039;m 100% with you about what you want to do...<BR><BR>But you can read the querystring using JS if that&#039;s the problem. Can&#039;t remember the exact syntax, but it&#039;s in the document.location object someplace.<BR><BR>Hope that helps.<BR><BR>Craig

  3. #3
    Troy Ackerman Guest

    Default More help Please!!!!! (not answered)

    Craig:<BR><BR>Thanks for the response. I can get the querystring of the external page when the JS include file (it&#039;s an asp page) is called. (By using Request.ServerVariable("HTTP_REFERER") on the ASP page being called on my site).<BR><BR>My question involves syntax for appending the querystring to the calling pages URL.<BR><BR>For example:<BR>external.htm calls mypage.asp<BR>mypage.asp redirects to external.htm?status=submitted<BR><BR>Any other takers?<BR><BR>Troy Ackerman

Posting Permissions

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