I have this, but as I said, I cant use this as there are millions of links
in the system and I cant change them all!
<HTML>
<HEAD>
<TITLE>TEST</TITLE>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
var Internal="";
function DoSomething() {
if (Internal!="yes") {
alert("Survey Launched");
window.open("survey.html");
}
}
</SCRIPT>
</HEAD>
<BODY onUnload="DoSomething()">
<A HREF="internal.html" onClick="Internal='yes'">Internal link in
here</A><BR>
<A HREF="http://www.msn.com">External link in here</A><BR>
</BODY>
</HTML>
-----Original Message-----
From: Robertson-Ravo, Neil (REC)
[mailto:[EMAIL PROTECTED]]
Sent: 04 October 2002 17:11
To: '[EMAIL PROTECTED]'
Subject: RE: [ cf-dev ] detecting for a variable?
that wont work either as I need it triggered once a user clicks on a link.
-----Original Message-----
From: Rich Wild [mailto:[EMAIL PROTECTED]]
Sent: 04 October 2002 16:50
To: '[EMAIL PROTECTED]'
Subject: RE: [ cf-dev ] detecting for a variable?
split the url and then look for the variable:
fooExists = 0;
urlvars = document.URL.split("?");
if(urlvars[1]){
urlPairs = urlvars[1].split("&");
for(i=0; i<urlPairs.length; i++){
if (urlPairs[i].indexOf('foo=')) {
fooExists = 1;
}
}
if (fooExists) {
doSomething();
}
> -----Original Message-----
> From: Robertson-Ravo, Neil (REC)
> [mailto:[EMAIL PROTECTED]]
> Sent: 04 October 2002 16:51
> To: '[EMAIL PROTECTED]'
> Subject: [ cf-dev ] detecting for a variable?
>
>
> is it possible to fire a function onUnload which checks if a parameter
> exists within the URL it is going to?
>
> For example : I have a link which is index.cfm?foo=foobar
>
> is it possible to check if foo is existing and therefore fire
> something off
> etc..
>
> Neil
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
>
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]