Hello everyone,
I have a button on a page that is created with the <input> statement - this statement also contains the event handler onClick. The button displays correctly on the page but the event handler is not working - I know this as I put a simple alert at the beginning of the function PrcsBtn1. I am very new to all of this - what have I missed?
<script type="text/javascript" language="javascript">
function PrcsBtn1()
{
var data2 = new Array();
data2[0] = "Cancel Appointment";
var packedS="";
for (i = 0; (i < data2.length); i++)
{
if (i > 0)
{
packedS += ",";
}
packedS += escape(data2[i]);
}
window.location = "mypage11 new.html?"+packedS;
window.open = "mypage11 new.html?"+packedS;
}
</script>
<input name="b1" type="button" value="CANCEL APPOINTMENT" document.apptcalendar.b1.onClick="javascript:PrcsBtn1();">