473,746 Members | 2,727 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="Contin ueShopping('htt p://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 7010
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="Contin ueShopping('htt p://mysite/supertest.asp?Y esTheUserCameFr omThi
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_pri me@hotmail*remo vethis*.com> wrote in message
news:bp******** **@nntp-stjh-01-01.rogers.nf.ne t...
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="Contin ueShopping('htt p://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="Contin ueShopping('htt p://mysite/supertest.asp?I d=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******** ********@tk2msf tngp13.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="Contin ueShopping('htt p://mysite/supertest.asp?Y esTheUserCameFr omThi 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_pri me@hotmail*remo vethis*.com> wrote in message
news:bp******** **@nntp-stjh-01-01.rogers.nf.ne t...
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="Contin ueShopping('htt p://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_pri me@hotmail*remo vethis*.com> wrote in message
news:bp******** **@nntp-stjh-01-01.rogers.nf.ne t...
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="Contin ueShopping('htt p://mysite/supertest.asp?I d=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******** ********@tk2msf tngp13.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="Contin ueShopping('htt p://mysite/supertest.asp?Y esTheUserCameFr omThi
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_pri me@hotmail*remo vethis*.com> wrote in message
news:bp******** **@nntp-stjh-01-01.rogers.nf.ne t...
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="Contin ueShopping('htt p://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_pri me@hotmail*remo vethis*.com> wrote in message
news:bp******** **@nntp-stjh-01-01.rogers.nf.ne t...
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
6998
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 maybe even just declare an interface, with no methods implemented). Right now, you don't really have a way to do it. You can leave the methods with a "pass", or raise a NotImplementedError, but even in the best solution that I know of,
1
3013
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 inside a particular iframe is what really needs to be determined. So when the application starts up the next time, if the last page visited was admin.aspx inside frame IContent, then show admin.aspx in Icontent or else show home.aspx. A code...
3
1918
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 can I resolve this ? Note : NodeList is a List<Nodeand ArcSuccList is a List<Arc> Node findedNode = this.NodeList.Find(delegate(Node n) {
1
1920
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 client side. I've read something about LDAP being involved, but I'm not sure where to start. Any help? Thanks, Chris
8
13535
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" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
9
16930
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 last visit and or called day is greater than 30 days. Now it gets confusing, Suppose the client was visited more than 30 days ago but was called only 10 days ago, I really would like to have this
4
1814
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 post back? Are there new elemebts in 2.0 that allow for this, or does anyone have a solution? Thanks -- thanks (as always) some day i''m gona pay this forum back for all the help i''m getting
1
3197
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 follows: The code below is for the first page:session_start is in line 3 <link href="css/jobSheet.css" rel="stylesheet" type="text/css" /> session_start();
7
7849
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 user knowing anything about it by ensuring all the essential objects ( only a few ) are in place during session start. For performance, there are some parts of the application which use static
0
8974
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8800
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9500
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9285
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8227
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6772
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4575
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3292
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.