Hi
I was kindly gaven this code to use on my pages
<SCRIPT language=JavaScript type=text/JavaScript>
function
s(){location="demo.html?"+(document.referrer?document.referrer:"none")}
</SCRIPT>
<A onclick="s();return false"
href=" </A>
and
<script type="text/JavaScript">
onload=function(){
with(document.forms[0]){
jsenabled.value="Yes";
loc.value=String(location.search).substring(1);
ref.value = document.referrer?document.referrer:"No document referrer";
}
}
</script>
<form>
<p><input name="jsenabled" type="text" value="No" size="6">JSenabled?</p>
<p><input name="loc" type="text" value="" size="80">Referrer referrer</p>
<p><input name="ref" type="text" value="jsOff" size="80">Referrer</p>
</form>
I have added the code into these pages, -
(my web form)
but I need the onclick bit to work from a submit form button, which is
sending
the form data through a perl script in my cgi-bin.
I added the onclick="s();return false" to this button, but it stops the form
data
being sent by email?
This is what I have so far -
I'm very much a novice when it comes to JavaScript!
Anyone have any ideas what I need to add to the submit button
to make the whole thing come together?
Many thanks
Happy.
I was kindly gaven this code to use on my pages
<SCRIPT language=JavaScript type=text/JavaScript>
function
s(){location="demo.html?"+(document.referrer?document.referrer:"none")}
</SCRIPT>
<A onclick="s();return false"
href=" </A>
and
<script type="text/JavaScript">
onload=function(){
with(document.forms[0]){
jsenabled.value="Yes";
loc.value=String(location.search).substring(1);
ref.value = document.referrer?document.referrer:"No document referrer";
}
}
</script>
<form>
<p><input name="jsenabled" type="text" value="No" size="6">JSenabled?</p>
<p><input name="loc" type="text" value="" size="80">Referrer referrer</p>
<p><input name="ref" type="text" value="jsOff" size="80">Referrer</p>
</form>
I have added the code into these pages, -
(my web form)
but I need the onclick bit to work from a submit form button, which is
sending
the form data through a perl script in my cgi-bin.
I added the onclick="s();return false" to this button, but it stops the form
data
being sent by email?
This is what I have so far -
I'm very much a novice when it comes to JavaScript!
Anyone have any ideas what I need to add to the submit button
to make the whole thing come together?
Many thanks
Happy.