I want to use a button with an onClick(), but I am missing something in the syntax. For testing, I am using the alert() function. Can you point out what I am missing?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Test</title>
</head>
<body>
<input name="btnOrder" type="button" value="Test" onClick="alert(\'Hello\'")>
</body>
</html>
That works! However, when I go to the next step, open a window, my code is not working.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Test</title>
<script language="javascript" type="text/javascript">
<!--
function openWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body>
<input name="btnOrder" type="button" value="Order"
onClick="openWindow('hawk_order.php','ordWindow','toolbar=no,status=yes,scrollbars=no,resizable=no'" />
</body>
</html>
Fang - First, thank you! Second, my apologies. I consider this site to be a valuable resource, so I kick myself when I take "bandwidth" with dumb mistakes.
Todd
Fang -
Could you check my new post where I took the code that you helped me get working and placed it into a php page. There it does not work. Baffled!!
Bookmarks