Sykje yn Support

Mij stipescams. Wy sille jo nea freegje in telefoannûmer te beljen, der in sms nei ta te stjoeren of persoanlike gegevens te dielen. Meld fertochte aktiviteit mei de opsje ‘Misbrûk melde’.

Mear ynfo

Dizze konversaasje is argivearre. Stel in nije fraach as jo help nedich hawwe.

Firefox sometimes donnot load javascript alerts correctly

  • 2 antwurd
  • 30 hawwe dit probleem
  • 459 werjeftes
  • Lêste antwurd fan 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.

Alle antwurden (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

Bewurke troch cor-el op

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