Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 General help me questions
 Setting a session variable
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ProductivePC
VP-CART New User

USA
199 Posts

Posted - May 26 2004 :  18:01:20  Show Profile  Visit ProductivePC's Homepage  Reply with Quote


Okay ASP gurus,
I have an extremely ASP newbie question. I am trying to set the session variable below in the shoppagetrailer.htm file.
This keeps throwing an error back to me. I do not know why. Can someone point me in the right direction? please

It just comes up and page does not exist when I put it in. You will notice I have everything in a response redirect.
If I do not do it this way then I get an error thrown up because of the comment tags in the JavaScript.

<%
If (Request.ServerVariables("HTTPS") = "off") Then
Response.redirect "<!-- Start of StatCounter Code -->"
Response.redirect "<script type='text/javascript' language='javascript'>"
Response.redirect "<!-- "
Response.redirect "var sc_project=290315; "
Response.redirect "var sc_partition=1; "
Response.redirect "var sc_invisible=1; "
Response.redirect "//-->"
Response.redirect "</script>"
Response.redirect "<script type='text/javascript' language='javascript' src='http://www.statcounter.com/counter/counter.js'>"
Response.redirect "</script><noscript><a href='http://www.statcounter.com' target='_blank'>"
Response.redirect "<img src='http://c2.statcounter.com/counter.php?sc_project=290315&java=0' alt='free ip address tracker' border='0'></a></noscript>"
Response.redirect "<!-- End of StatCounter Code -->"
End if
%>




Wayne
www.WorldFamousGiftBaskets.net

Edited by - ProductivePC on May 26 2004 18:04:32

jonmadrid
VP-CART New User

USA
192 Posts

Posted - May 28 2004 :  14:14:20  Show Profile  Visit jonmadrid's Homepage  Reply with Quote
Hi Wayne,

That code you posted below won't work because the Response.Redirect() method sends the user to another page. What that code is doing is trying to send the user to "<!-- Start of StatCounter Code -->", which is obviously not a page and not what you intended.

Change those Response.Redirect()s to Response.Write -- which writes a line to the page ouptut -- and that should solve the problem.

Your code would then look like this:

*******
<%
If (Request.ServerVariables("HTTPS") = "off") Then
Response.Write "<!-- Start of StatCounter Code -->"
Response.Write "<script type='text/javascript' language='javascript'>"
Response.Write "<!-- "

...etc, etc, etc.

*******

I know this is probably a little late but I thought I'd at least give you a heads up.


All the best,

Jon Madrid
--------------------
Madrid Communications
Web Design, Development, and Hosting
www.madridcom.com
Go to Top of Page

ProductivePC
VP-CART New User

USA
199 Posts

Posted - May 29 2004 :  22:22:49  Show Profile  Visit ProductivePC's Homepage  Reply with Quote


Thanks Jon,
Sometimes you cannot see the forest through the trees.... I cannot believe that I did not notice the response.redirect....

Thanks again.

Wayne

On a second and personal note. I decided to rewrite the PHP script so that statcounter will work with the vpasp cart and https.

I am almost finished with it. I will probably be contacting you tomorrow or Monday on a few of the javaScript commands that I cannot get turned into PHP. This is not a good thing... lol I have about 4 commands left that I am at a loss for such as math.random().

Have a great night.




Wayne
www.WorldFamousGiftBaskets.net
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00