[thelist] Can I capture part of a link?

Martyn Haigh martyn.haigh at virgincosmetics.com
Wed Feb 26 08:51:02 CST 2003


You could always do something like this (excuses for pseudo-code I have a
raging flu and I'm just about to go home) :

<html>
...
..
...
..
<script...>
..
on page load get querystring and insert it into hidden field ("userRef")
..
</script>
..
..
HTML Code
<input type="hidden" name="userRef" />
..
..


this can then be processed when you process the form

OR

<html>
...
..
...
..
<script...>
..
on page load get querystring and change the form action to
somepage.html?userRef=AAA######
..
</script>
..
..
HTML Code
<form .....>
..
..

you can use this one if you have multiple pages on your forms and you can
use the same piece of javascript.

BUT

The easiest way to go about doing this is through PHP/perl I would say - how
were you going to process the form after it was submitted - surely if you
are going to add it to a DB then you will have to do some processing on it.

Anyway - I hope this helps a bit, I'm sure someone will be able to help you
out with exact Javascript coding.

M



DISCLAIMER: The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this email by
anyone else is unauthorised. If you are not the intended recipient, any
disclosure, copying, distribution or any action taken or omitted to be taken
in reliance on it, is prohibited and may be unlawful.





More information about the thelist mailing list