Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

javascript alert window is too small

  • 3 답장
  • 1 이 문제를 만남
  • 8 보기
  • 최종 답변자: cor-el

more options

This javascript:

function BadFormAlert(theErrorMessage) {
	var msg;
	msg  = "_____________________________________________________\n\n"
	msg += "The form was not submitted because of the following error(s).\n";
	msg += "_____________________________________________________\n"
	msg += theErrorMessage;
	msg += "\n\n_____________________________________________________\n\n"
	msg += "Please correct these error(s) and re-submit.\n";
	msg += "\n";
	alert(msg);
}

Produces a window that is 330 x 143 pixels in size. It is essentially unreadable. The variable "theErrorMessage" contains the text "- The guest account must not contain blank characters."

I'm using Mac OS X 10.6.8, Firefox 18.0.1, but I saw the same thing in Firefox on Windows XP. Don't know the Firefox version.

I've tried turning off all "Entensions" but that made no difference. This same Javascript has worked unchanged back to Firefox version 2 and as far as I can determine worked fine using Firefox 17

This javascript: <pre><nowiki>function BadFormAlert(theErrorMessage) { var msg; msg = "_____________________________________________________\n\n" msg += "The form was not submitted because of the following error(s).\n"; msg += "_____________________________________________________\n" msg += theErrorMessage; msg += "\n\n_____________________________________________________\n\n" msg += "Please correct these error(s) and re-submit.\n"; msg += "\n"; alert(msg); }</nowiki></pre> Produces a window that is 330 x 143 pixels in size. It is essentially unreadable. The variable "theErrorMessage" contains the text "- The guest account must not contain blank characters." I'm using Mac OS X 10.6.8, Firefox 18.0.1, but I saw the same thing in Firefox on Windows XP. Don't know the Firefox version. I've tried turning off all "Entensions" but that made no difference. This same Javascript has worked unchanged back to Firefox version 2 and as far as I can determine worked fine using Firefox 17

글쓴이 cor-el 수정일시

모든 댓글 (3)

more options

Seems to be working fine here testing in the web console.

What are the dimensions of the Firefox window?

Can you attach a screenshot?

Use a compressed image type like PNG or JPG to save the screenshot.


function BadFormAlert(theErrorMessage) {
 var msg;
 msg  = "_____________________________________________________\n\n"
 msg += "The form was not submitted because of the following error(s).\n";
 msg += "_____________________________________________________\n\n"
 msg += theErrorMessage;
 msg += "\n_____________________________________________________\n\n"
 msg += "Please correct these error(s) and re-submit.\n";
 msg += "\n";
 alert(msg);
}
BadFormAlert("The guest account must not contain blank characters.");
more options

Here is what my "Alert()" is creating.

more options

Try to check for problems with the localstore.rdf file.

Start Firefox in Safe Mode to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).

  • Do NOT click the Reset button on the Safe mode start window or otherwise make changes.

In Firefox Safe mode these changes are effective:

  • all extensions are disabled
  • the default theme is used (no persona)
  • userChrome.css and userContent.css are ignored
  • the default toolbar layout is used (localstore-safe.rdf)
  • the Javascript JIT compiler is disabled
  • hardware acceleration is disabled