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

Lolu chungechunge lwabekwa kunqolobane. Uyacelwa ubuze umbuzo omusha uma udinga usizo.

Firefox sometimes donnot load javascript alerts correctly

  • 2 uphendule
  • 30 zinale nkinga
  • 459 views
  • Igcine ukuphendulwa ngu th3k3ymast3r

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

Okulungisiwe ngu 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