prompt not working
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

prompt not working

From: joemac <j_mcarthur@usa.net>
Date: Wed Nov 30 2005 - 17:42:26 CET

I'm just starting out with javascript and the following is not working
as it should. The expected prompt dialog box never appears.

<head>
<script language="JavaScript"><!--
var name;
name=prompt("Please enter your name.","");
document.write("My name is: ", name);
// --></script>
</head>
<body>
<p>Did it work out ok?
</body>
</html>

I've tried replacing
<script language="JavaScript">
with
<script type="text/javascript">
but this makes no difference in the results, which are as follows:

My name is:

Did it work out ok?

What am I doing wrong?

Joe
Received on Sat Dec 3 04:33:42 2005