Help on session cookies please

E

Edwin Hannan

Hi All

using FP2003

I am trying to code some ID tracking from link referers, I have found some
javascript code that works when a referal opens my index.html and apparently
info is stored in a cookie and a hidden field in a form is used to take in
the referral ID.

ie http://kingstonfinance.com/index.html?referer=test will let you see the
ID at the bottom of the page

I cant seem to be able to work out how to get the referrer ID into a form on
another page on my site, ie once they have arrived they may make an
application so I would like to receive the form results including the ID (I
have created a hidden field on the form etcc...)

A little stuck, any help appreciated

Ta
 
T

Thomas A. Rowe

You have to learn JS on how to read the cookie on any page, that you need the value from the cookie.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
J

Jon Spivey

Hi,
The script you have is already sticking the referrer into a cookie. All
you'd need is to copy everything between
// Referer ID tracking Code functions - Begin, may be better to reference
this from a .js file
down to
// Referer ID tracking Code functions - END
into any page you want to grab the referrer ID and it will populate a form
field with this line
document.idform.id.value = id;
Change form name and/or field name if you needto

The script gives good advice in the comments to stick this into an external
..js file.
 
E

Edwin Hannan

Hi Thomas and Jon

Yes I am trying to learn javascript, and the form that I want to populate
with the ID is on the link to applyloan.htm (by clicking on the button Apply
Now)

I have put code on that page but it doe not work??

any further ideas??

cheers

Ed
 
T

Thomas A. Rowe

Ed,

You have to wait for Jon or someone else as I don't use JavaScript with cookies.

I work with ASP and Session Cookies, which are stored in memory on the server, and for the rare
times that I do need to actual read/write a cookie to a users HD, I use ASP/VBScript and the user
must select to have the cookie created.

Also many of the Anti Virus/Spyware/Privacy applications will block cookies written to a users HD,
as well as the user's ability to block them via browser settings.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
E

Edwin Hannan

Thomas

Thanks for your reply, It sounds as though I should be also looking at ASP
and session cookies

cheers

Ed
 
T

Thomas A. Rowe

If you can use ASP (or any server-side script), it would make the process much easier.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top