D
DrKen
I coded an onload call in the body tag of a page:
<body id="page-aboutme" onload="executeOmniture()">
In page A, I know this works, both from running it locally and running
it as part of an application. In page B, my function does not work
and I don't get why. I expect code to work the same from place to
place. I copied from A to B.
In page B, I have
<body id="page-aboutme" onload="executeOmniture()" >
Inside the FORM is
<INPUT TYPE="HIDDEN" NAME="Email$95Address" AnnType="Text Entry"
AnnRequired="false" AnnValidateEmail="false" VALUE="<pstag
rofile
value="Individuals.CS-Appl Biographic.Email_Address" poutput="Text" /
So the id of the item is defined. The function should be called upon
the onload event.
Just before the </body> tag:
<!-- Omniture SiteCatalyst code -->
<script type="text/javascript">
alert("Do alerts work?");
var omniIdentifier = null;
function executeOmniture()
{
omniIdentifier = document.getElementById("omniEmail").value;
//<![CDATA[
s.server="home.apu.edu";
s.channel="Admissions";
s.pageName="Applications: APS: Start";
s.hier1="applications,aps";
alert("omniIdentifier: " + omniIdentifier);
s.events="event8:APS"+ "TEST" + omniIdentifier;
var s_code=s.t();if(s_code)document.write(s_code)//-->
//]]>
}
</script>
<!-- End Omniture SiteCatalyst code -->
In the JavaScript block, the initial alert works, but I am getting an
error that the id, omniEmail is not defined. Since this works in
another page, I can't figure out what I did wrong when I added this.
Any suggestions how to find it? Thanks.
Ken
<body id="page-aboutme" onload="executeOmniture()">
In page A, I know this works, both from running it locally and running
it as part of an application. In page B, my function does not work
and I don't get why. I expect code to work the same from place to
place. I copied from A to B.
In page B, I have
<body id="page-aboutme" onload="executeOmniture()" >
Inside the FORM is
<INPUT TYPE="HIDDEN" NAME="Email$95Address" AnnType="Text Entry"
AnnRequired="false" AnnValidateEmail="false" VALUE="<pstag
value="Individuals.CS-Appl Biographic.Email_Address" poutput="Text" /
" SIZE=32 MAXLENGTH=70 id="omniEmail">
So the id of the item is defined. The function should be called upon
the onload event.
Just before the </body> tag:
<!-- Omniture SiteCatalyst code -->
<script type="text/javascript">
alert("Do alerts work?");
var omniIdentifier = null;
function executeOmniture()
{
omniIdentifier = document.getElementById("omniEmail").value;
//<![CDATA[
s.server="home.apu.edu";
s.channel="Admissions";
s.pageName="Applications: APS: Start";
s.hier1="applications,aps";
alert("omniIdentifier: " + omniIdentifier);
s.events="event8:APS"+ "TEST" + omniIdentifier;
var s_code=s.t();if(s_code)document.write(s_code)//-->
//]]>
}
</script>
<!-- End Omniture SiteCatalyst code -->
In the JavaScript block, the initial alert works, but I am getting an
error that the id, omniEmail is not defined. Since this works in
another page, I can't figure out what I did wrong when I added this.
Any suggestions how to find it? Thanks.
Ken