posted 23 years ago
Hi,
I just have started learning JavaScript, and I am getting an error with the following code.
<html>
<head><title>Problem</title></head>
<script language="javascript")
<!--
function hello() {
var fname = prompt("Enter you First name here.", "")
var lname = prompt("Enter you Last name here.", "")
var page = document.location;
var ttl = document.title;
alert("Hi " + fname + " " + lname + ". Welcome to " + ttl + ", " + page+".")
}
-->
</script>
<body onLoad="hello()">
</body>
</html>
I am getting the error at <body onLoad="hello()"> line asking
"Error: Object expected.
please let me out of it.
Thanks in advance
Anshul