D
DrKen
I have this body tag:
<body id="page-aboutme" onload="executeOmniture();" >
I have this script block, which contains one function, at the bottom
of my HTML:
<script type="text/javascript">
// <!--Code to support Omniture -->
// Added for SSD-245
var loopCount = 1;
function executeOmniture()
{
omniIdentifier = document.getElementById("omniEmail").value;
//<![CDATA[
alert("loopCount:" + loopCount);
loopCount = loopCount + 1;
s.channel="Admissions";
s.pageName="Applications: Graduate: Start";
s.hier1="applications,graduate";
alert("omniIdentifier: " + omniIdentifier);
s.events="event8:GRAD"+ "TEST" + omniIdentifier;
//]]>
}
</script>
</body>
</html>
I put the counter in because I was seeing the last alert() statement
run twice. It appears to be run at page load and after the submit()
button is clicked! All this code is in a function and only called
once as specified in the body tag. It is only found in the entire
file in those two places. A function should only run when called,
right? There should be only one load event, right? Why/how could the
function be executed twice? That makes no sense to me at all.
Thanks.
Ken
<body id="page-aboutme" onload="executeOmniture();" >
I have this script block, which contains one function, at the bottom
of my HTML:
<script type="text/javascript">
// <!--Code to support Omniture -->
// Added for SSD-245
var loopCount = 1;
function executeOmniture()
{
omniIdentifier = document.getElementById("omniEmail").value;
//<![CDATA[
alert("loopCount:" + loopCount);
loopCount = loopCount + 1;
s.channel="Admissions";
s.pageName="Applications: Graduate: Start";
s.hier1="applications,graduate";
alert("omniIdentifier: " + omniIdentifier);
s.events="event8:GRAD"+ "TEST" + omniIdentifier;
//]]>
}
</script>
</body>
</html>
I put the counter in because I was seeing the last alert() statement
run twice. It appears to be run at page load and after the submit()
button is clicked! All this code is in a function and only called
once as specified in the body tag. It is only found in the entire
file in those two places. A function should only run when called,
right? There should be only one load event, right? Why/how could the
function be executed twice? That makes no sense to me at all.
Thanks.
Ken