I'm pretty weak when it comes to Java script, hopefully someone will
take mercy on my sole and explain this to me. How come on the following
HTML page, when I have my first script tag commented out, my button
calls my OnClick function. However if I uncomment the first script tag,
I get the following error: Button1_onclick is not defined
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Test Page</title>
<script
src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAPJi8eZfg6MuV 41P4Pp2gBhS3x1YvtzkSpxxqYWsb5fvYGd6L2BTQiQ9EkPuUXf JDw5lGzN8Oyx1qcg"
type="text/javascript"/>
<script language="javascript" type="text/javascript">
// <!CDATA[
function Button1_onclick()
{
alert("Girls are Pretty!!");
return false;
}
// ]]>
</script>
</head>
<body>
<input id="Button1" type="button" value="button"
onclick="return Button1_onclick()" />
</body>
</html>
Thanks
Josh