This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Firefox sometimes donnot load javascript alerts correctly

more options

I`m developing a website and sometimes when a javascript alert box is supposed to be showed, it is not displayed properly. It happens all the time, and the most common case is when the user try to log in with wrong username or password, in which case after a few tries the javascript alert box stop beeing shown.

I`m developing a website and sometimes when a javascript alert box is supposed to be showed, it is not displayed properly. It happens all the time, and the most common case is when the user try to log in with wrong username or password, in which case after a few tries the javascript alert box stop beeing shown.

All Replies (2)

more options

I do not know if this helps, but I had the same error. Alert worked in Chrome, Explorer and Safari, but not in Firefox.
In my fal was the error that I tried to send the value directly with the javascript call. Code that did not work in Firefox:

<input name="txtEmail" type="text" class="text" id="txtEmail" style="width:200px;" />
<input name="button" type="button" class="text" id="button" value="&gt;&gt;" onClick="javascript:sendMeNews(txtEmail.value);"/>


If, however, I get the value from inside the javascript function, it worked perfectly.

function sendMeNews(){
	var email = document.getElementById("txtEmail").value;
	var checkPos = email.indexOf("@")
	if (email.length==0 || checkPos=='-1'){
	alert("A valid e-mail address must be filled")
	}
	else
	{
	url="sendNews.asp?email=" + email;
	window.location.href=url;
	}
}


Hope that helps

WebGhost

Edeziri site na cor-el

more options

My error is similar but firebug reports the following error on any use of the javascript alert function:

code: alert("Please work...");

script error: Permission denied for <http://localhost> to call method Window.alert

However, if I load the same page at the same location on IE the alert function is called successfully?

Before you cry wolf on local permissions; executing the function on the following page, hosted on a public domain, returns nothing - with the exception that firebug reports no error.

http://www.w3schools.com/JS/tryit.asp?filename=tryjs_alert

I'm using Firefox 3.6.15 on Windows XP Pro SP3

Regards, Leigh