473,320 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Alternate Methods of getting last URL client visited? Help

Using HTTP_REFERER I cannot capture the URL when the link is made via a
button:

<input type="button" name="Continue" value="Continue Shopping"
onclick="ContinueShopping('http://mysite/supertest.asp');">

I do not control the script above, it is on an e-commerce site that is very
generic, meant for many users - and is generated by their server code. I
want to capture the URL and with an if/then redirect if the last place
visited was the checkout site.

I need an alternate method of URL capture, rather than HTTP_REFERER.

Thanks,

D
Jul 19 '05 #1
4 6987
You're saying that the previous page the visitor is coming from is not on
your site or on a site that you control? Can you specify the value in that
onclick event? If so, you can ask them to change the url to something like:

onclick="ContinueShopping('http://mysite/supertest.asp?YesTheUserCameFromThi
sSpecificPage');"

Now, that won't tell you where the user came from, but if this page you're
trying to check is the only one that puts the person at your site with that
querystring, you'd "know."

Ray at work

"Drifter" <loreseeker_prime@hotmail*removethis*.com> wrote in message
news:bp**********@nntp-stjh-01-01.rogers.nf.net...
Using HTTP_REFERER I cannot capture the URL when the link is made via a
button:

<input type="button" name="Continue" value="Continue Shopping"
onclick="ContinueShopping('http://mysite/supertest.asp');">

I do not control the script above, it is on an e-commerce site that is very generic, meant for many users - and is generated by their server code. I
want to capture the URL and with an if/then redirect if the last place
visited was the checkout site.

I need an alternate method of URL capture, rather than HTTP_REFERER.

Thanks,

D

Jul 19 '05 #2
Their (Aliant - e-commerc provider amongst other things) Server Side .asp is
quite old, and awkward. I am trying to update some things for a client who
had her site built 3 years ago - based on this old code which is still being
used. Here is a sequence of events...

1) Interested buyer goes to her site and follows link to her sale items.
(http://mysite/supertest.asp)
2) This page is an .asp generated page which checks database and returns
list. Alternately, if the purchaser clicks on an item from the list, then
this same .asp page loads, with a value ProductID being passed to it.
(http://mysite/supertest.asp?ID=439)
3) Once ProductID is passed - a single description is generated (if ID==""
then find the specific item).
4) If the person wants to buy, then they click a "Buy Me" button which
passes info onto the e-commerce site - an order confirmation page.

PROBLEM: This Confirmation page is very generic. It is meant to be passed
info like: Product ID, Description, Quantity and what Merchant sold it. This
means that Aliant - the e-commerce provider will not change any of the
script for a specific customer, since it works fundamentally for all
merchants who use it.

5) There is a <Continue Shopping> button which looks more like
<input type="button" name="Continue" value="Continue Shopping"
onclick="ContinueShopping('http://mysite/supertest.asp?Id=439');">
It has gathered the from, in the passed information.

PROBLEM: This brings the buyer back to the specific unit they were looking
at - rather than the list - since ID <> "". Now the confusing part really
begins. The common user will click <back> from here thinking they will get
back to the list. They do not, as <back> really leads them to the Order
confirmation screen again. To make things worse, there is actually a
redirecting site before the Order Confirmation screen, so if you hit <back>
again your info is thrown from the Meta refresh back at the Order Confirm
site, doubling it. You can stay in this very confusing loop all day.

My attempted solution: Use HTTP_REFERER to catch the URL once you click the
<Continue Shopping> button. I was then gonna write an if/then that said - if
it came from the e-commerce site, then redirect to the
(http://mysite/supertest.asp) site - no ID - so that list would show up
again. Unfortunately the REFERER does not catch the URL, it passes "", so
the redirect does not work.

Many customers have complained about this annoyance, and she figures she
loses 5-10 sales for every person who actually takes the time to complain.

Hey - wait a sec... think i just talked myself into solution. Will ahve to
test this. I am thinking that the only real way you would get to this site
with REFERER having a value of "" would be if you came back from the
e-commerce site... EUREAKA! This may be it.

Let you know,

D.

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
You're saying that the previous page the visitor is coming from is not on
your site or on a site that you control? Can you specify the value in that onclick event? If so, you can ask them to change the url to something like:
onclick="ContinueShopping('http://mysite/supertest.asp?YesTheUserCameFromThi sSpecificPage');"

Now, that won't tell you where the user came from, but if this page you're
trying to check is the only one that puts the person at your site with that querystring, you'd "know."

Ray at work

"Drifter" <loreseeker_prime@hotmail*removethis*.com> wrote in message
news:bp**********@nntp-stjh-01-01.rogers.nf.net...
Using HTTP_REFERER I cannot capture the URL when the link is made via a
button:

<input type="button" name="Continue" value="Continue Shopping"
onclick="ContinueShopping('http://mysite/supertest.asp');">

I do not control the script above, it is on an e-commerce site that is

very
generic, meant for many users - and is generated by their server code. I
want to capture the URL and with an if/then redirect if the last place
visited was the checkout site.

I need an alternate method of URL capture, rather than HTTP_REFERER.

Thanks,

D


Jul 19 '05 #3
Solution worked fine - thanks for the jam session - it helped a lot.

D
"Drifter" <loreseeker_prime@hotmail*removethis*.com> wrote in message
news:bp**********@nntp-stjh-01-01.rogers.nf.net...
Their (Aliant - e-commerc provider amongst other things) Server Side .asp is quite old, and awkward. I am trying to update some things for a client who
had her site built 3 years ago - based on this old code which is still being used. Here is a sequence of events...

1) Interested buyer goes to her site and follows link to her sale items.
(http://mysite/supertest.asp)
2) This page is an .asp generated page which checks database and returns
list. Alternately, if the purchaser clicks on an item from the list, then
this same .asp page loads, with a value ProductID being passed to it.
(http://mysite/supertest.asp?ID=439)
3) Once ProductID is passed - a single description is generated (if ID==""
then find the specific item).
4) If the person wants to buy, then they click a "Buy Me" button which
passes info onto the e-commerce site - an order confirmation page.

PROBLEM: This Confirmation page is very generic. It is meant to be passed
info like: Product ID, Description, Quantity and what Merchant sold it. This means that Aliant - the e-commerce provider will not change any of the
script for a specific customer, since it works fundamentally for all
merchants who use it.

5) There is a <Continue Shopping> button which looks more like
<input type="button" name="Continue" value="Continue Shopping"
onclick="ContinueShopping('http://mysite/supertest.asp?Id=439');">
It has gathered the from, in the passed information.

PROBLEM: This brings the buyer back to the specific unit they were looking
at - rather than the list - since ID <> "". Now the confusing part really
begins. The common user will click <back> from here thinking they will get
back to the list. They do not, as <back> really leads them to the Order
confirmation screen again. To make things worse, there is actually a
redirecting site before the Order Confirmation screen, so if you hit <back> again your info is thrown from the Meta refresh back at the Order Confirm
site, doubling it. You can stay in this very confusing loop all day.

My attempted solution: Use HTTP_REFERER to catch the URL once you click the <Continue Shopping> button. I was then gonna write an if/then that said - if it came from the e-commerce site, then redirect to the
(http://mysite/supertest.asp) site - no ID - so that list would show up
again. Unfortunately the REFERER does not catch the URL, it passes "", so
the redirect does not work.

Many customers have complained about this annoyance, and she figures she
loses 5-10 sales for every person who actually takes the time to complain.

Hey - wait a sec... think i just talked myself into solution. Will ahve to
test this. I am thinking that the only real way you would get to this site
with REFERER having a value of "" would be if you came back from the
e-commerce site... EUREAKA! This may be it.

Let you know,

D.

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
You're saying that the previous page the visitor is coming from is not on your site or on a site that you control? Can you specify the value in

that
onclick event? If so, you can ask them to change the url to something

like:

onclick="ContinueShopping('http://mysite/supertest.asp?YesTheUserCameFromThi
sSpecificPage');"

Now, that won't tell you where the user came from, but if this page you're trying to check is the only one that puts the person at your site with

that
querystring, you'd "know."

Ray at work

"Drifter" <loreseeker_prime@hotmail*removethis*.com> wrote in message
news:bp**********@nntp-stjh-01-01.rogers.nf.net...
Using HTTP_REFERER I cannot capture the URL when the link is made via a button:

<input type="button" name="Continue" value="Continue Shopping"
onclick="ContinueShopping('http://mysite/supertest.asp');">

I do not control the script above, it is on an e-commerce site that is

very
generic, meant for many users - and is generated by their server code. I want to capture the URL and with an if/then redirect if the last place
visited was the checkout site.

I need an alternate method of URL capture, rather than HTTP_REFERER.

Thanks,

D



Jul 19 '05 #4
Cool! :]

Ray at work

"Drifter" <loreseeker_prime@hotmail*removethis*.com> wrote in message
news:bp**********@nntp-stjh-01-01.rogers.nf.net...
Solution worked fine - thanks for the jam session - it helped a lot.

D
"Drifte

Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

51
by: Noam Raphael | last post by:
Hello, I thought about a new Python feature. Please tell me what you think about it. Say you want to write a base class with some unimplemented methods, that subclasses must implement (or...
1
by: Anita C | last post by:
Hi, How cookies can be used to set and then determine the last page visited by a person browsing a particular website ? Also the page last visited is loaded in an iframe, so the page last visited...
3
by: Steeve | last post by:
Hi, I found a way to get result than I want with this anonymus method. But, it's a little weird to use a anonymus methods in another anonymus methods. Moreover, i have a performance issue. How...
1
by: cbielins | last post by:
So I've updated the alternate server on our db server. What do I have to do in order for a remote db catalog to pick up that remote server? DB2 won't allow me to update alternate server on the...
8
by: Amit | last post by:
I have a master page and a content page but the stylesheet isnt getting applied like how it looks in visual studio design view. The master page is defined like this: <%@ Master Language="VB"...
9
by: ice | last post by:
Hello, I have a couple of tables. The client tables and the contacted tables. I am not sure how to start on this, what I need is a way to query all my clients then show any client that the...
4
by: =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?= | last post by:
I need to post a form to an alternate technology. I have created pop up windows that on post back will open a new window, but this uses get. I need to encode variables and POST to a new window on...
1
by: simbarashe | last post by:
Hie could someone please help me with getting and using the current page url. I have a function that gets the url, I want to use it with header(location : XXX) but it wont work. The code is as...
7
by: Microsoft Newsserver | last post by:
Hi Folks. I have an issue I need some help with if thats OK. I am running Framework 2.0 using Windows Integrated Security. For most of the application we manage session timeouts without the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.