Hello -
I'm having trouble with JavaScript alerts in an imagemap. The mapped
areas are cells in a table, and the alerts display info related to the
cell that is clicked. The problem is that, even though the source html
is correct, the alert messages that are displayed appear to be random,
i.e., the alert for row 10 appears when row 3 is clicked, etc. On some
long tables, the same alert message is displayed for (nearly) every row
even though the html contains the correct message for each row.
It looks like, among other things, perhaps the alert is not being
"cleared" consistently after after being invoked, and when the next row
is clicked the info from the preceding choice is displayed again.
I'm using
*************** *************** *************** **********
<script language="JavaS cript" type="text/javascript">
<!--
var alert_msg = "";
alert_msg +="Line 1";
alert_msg +="\nLine 2";
alert_msg +="\nLine 3";
// -->
</script>
<area SHAPE+"RECT" COORDS="0,62,28 7,92" HREF = "#"
OnClick="alert( alert_msg);retu rn false;"></a>
*************** *************** *************** ************
Can anybody point out the error of my ways?
Thanks
Dave
I'm having trouble with JavaScript alerts in an imagemap. The mapped
areas are cells in a table, and the alerts display info related to the
cell that is clicked. The problem is that, even though the source html
is correct, the alert messages that are displayed appear to be random,
i.e., the alert for row 10 appears when row 3 is clicked, etc. On some
long tables, the same alert message is displayed for (nearly) every row
even though the html contains the correct message for each row.
It looks like, among other things, perhaps the alert is not being
"cleared" consistently after after being invoked, and when the next row
is clicked the info from the preceding choice is displayed again.
I'm using
*************** *************** *************** **********
<script language="JavaS cript" type="text/javascript">
<!--
var alert_msg = "";
alert_msg +="Line 1";
alert_msg +="\nLine 2";
alert_msg +="\nLine 3";
// -->
</script>
<area SHAPE+"RECT" COORDS="0,62,28 7,92" HREF = "#"
OnClick="alert( alert_msg);retu rn false;"></a>
*************** *************** *************** ************
Can anybody point out the error of my ways?
Thanks
Dave
Comment