[thelist] clearing client side on refreshes

Dan McCullough dmccullough at garnethill.com
Tue Jul 27 12:24:25 CDT 2004


This is what I have.
However the document.write is pretty much taking control of the page and
is the only thing showing when the page comes back.

If I take the document write out of the function then the doNotRefresh
var has an issue and doesn't allow the document.write, now located at
the bottom of the page to load.  Since the refresh of the page has set
it to 0.

<script type="text/javascript">
var doNotRefresh='0';
function checkErrors(theForm){
	for(i=0; i < theForm.length; i++){
		if(theForm.elements[i].name == "email_address"){
			var x = theForm.elements[i].value;
			var filter  =
/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
			if (!filter.test(x)){
				alert('Please enter a valid email
address')
				theForm.elements[i].focus()
				return false
			}
		}
	}
	doNotRefresh='1';
	if (doNotRefresh=='1') {
		document.write('<img
src="http://www.somecontent.com/respondent?_ID_=9999&email_address='+x+'
" width="1" height="1" border="0">');
	}
	alert(doNotRefresh)
}
</script>

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Dan McCullough
Sent: Tuesday, July 27, 2004 11:52 AM
To: thelist at lists.evolt.org
Subject: [thelist] clearing client side on refreshes

I have an image tag that sends tracking information to a server, I need
to make sure that the page doesn't send more then once, even on a
refresh of the page, or hitting the back button.
 
-- 
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 


More information about the thelist mailing list