I need ur help i know this is a silly question but am not able to solve it ...sorrry :(
I have one javascript file welcome.js in that i have
function alert()
{
return 10;
}
I have another html file welcome.html in which am invoking the welcome.js file
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script type="text/javascript src="welcome.js"></script>
<script>
function myFunction()
{
var x = alert();
return x;
}
</script>
</head>
<body>
<input type="button" onclick="myFunction();" value="Show alert box">
I keep on getting this error in mozilla console
Timestamp: 5/28/2013 9:56:47 PM Error: NS_ERROR_XPC_NOT_ENOUGH_ARGS: Not enough arguments [nsIDOMWindow.alert]