VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-Cart StoreFront Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Save Password
Forgot your Password?

 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  

VP-ASP New User

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


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

VP-ASP New User

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
Go to Top of Page

VP-ASP New User

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.


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.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000