Fungovanie tejto stránky je z dôvodu údržby dočasne obmedzené. Ak článok nevyrieši váš problém a chcete položiť otázku, napíšte našej komunite podpory na Twitter @FirefoxSupport alebo Reddit /r/firefox.

Vyhľadajte odpoveď

Vyhnite sa podvodom s podporou. Nikdy vás nebudeme žiadať, aby ste zavolali alebo poslali SMS na telefónne číslo alebo zdieľali osobné informácie. Nahláste prosím podozrivú aktivitu použitím voľby “Nahlásiť zneužitie”.

Ďalšie informácie

after upgrading form FF 5 -> FF 6, javascript don't work

  • 1 odpoveď
  • 48 má tento problém
  • 10 zobrazení
  • Posledná odpoveď od mulapalliprasad

more options

I have a site, using the next javascript:

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<HEAD>
	<!-- Generate table option menu : http://www.htmlbasix.com/dropmenu.shtml -->
	<SCRIPT LANGUAGE='JAVASCRIPT' TYPE='TEXT/JAVASCRIPT'>
		<!--
		var popupWindow=null;
		function popup(mypage;myname;w;h;pos;infocus){

		if (pos == 'random')
		{LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
		else
		{LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
		settings='width='+ w + ';height='+ h + ';top=' + TopPosition + ';left=' + LeftPosition + ';scrollbars=yes;location=no;directories=no;status=no;menubar=no;toolbar=yes;resizable=yes';popupWindow=window.open('';myname;settings);
		if(infocus=='front'){popupWindow.focus();popupWindow.location=mypage;}
		if(infocus=='back'){popupWindow.blur();popupWindow.location=mypage;popupWindow.blur();}

		}
		// -->
	</script>


and I used the next to call the javascript:

<a target="_blank" href="javascript:void(str=prompt(%22Enter Case Number: %22;%22%22));if(str){location.href=%22http://mysite.com/mysupport/index.jsf?CASE_NUMBER=%22+escape(str).split(%22%20%22).join(%22+%22);}">View Case</a>


Prior FF6 it worked as charm, but with FF, it doesn't work anymore.

Anyone, idea ?

BTW - Javascript is enabled in FF.

I have a site, using the next javascript:<br /> <br /> <pre><nowiki><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> <HEAD> <!-- Generate table option menu : http://www.htmlbasix.com/dropmenu.shtml --> <SCRIPT LANGUAGE='JAVASCRIPT' TYPE='TEXT/JAVASCRIPT'> <!-- var popupWindow=null; function popup(mypage;myname;w;h;pos;infocus){ if (pos == 'random') {LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;} else {LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;} settings='width='+ w + ';height='+ h + ';top=' + TopPosition + ';left=' + LeftPosition + ';scrollbars=yes;location=no;directories=no;status=no;menubar=no;toolbar=yes;resizable=yes';popupWindow=window.open('';myname;settings); if(infocus=='front'){popupWindow.focus();popupWindow.location=mypage;} if(infocus=='back'){popupWindow.blur();popupWindow.location=mypage;popupWindow.blur();} } // --> </script></nowiki></pre> <br /> and I used the next to call the javascript: <pre><nowiki><a target="_blank" href="javascript:void(str=prompt(%22Enter Case Number: %22;%22%22));if(str){location.href=%22http://mysite.com/mysupport/index.jsf?CASE_NUMBER=%22+escape(str).split(%22%20%22).join(%22+%22);}">View Case</a></nowiki></pre> <br /> Prior FF6 it worked as charm, but with FF, it doesn't work anymore. Anyone, idea ? BTW - Javascript is enabled in FF.

Upravil(a) cor-el dňa

Všetky odpovede (1)

more options

The Problem is with <a href> in FF6 version.

Replace

<a target="_blank" href="javascript:void(str=prompt(%22Enter Case Number: %22;%22%22));if(str){location.href=%22http://mysite.com/mysupport/index.jsf?CASE_NUMBER=%22+escape(str).split(%22%20%22).join(%22+%22);}">View Case</a>

With

<a href="#" onClick="javascript:void(str=prompt(%22Enter Case Number: %22;%22%22));if(str){location.href=%22http://mysite.com/mysupport/index.jsf?CASE_NUMBER=%22+escape(str).split(%22%20%22).join(%22+%22);}">View Case</a>

OR

<a target="_self" href="javascript:void(str=prompt(%22Enter Case Number: %22;%22%22));if(str){location.href=%22http://mysite.com/mysupport/index.jsf?CASE_NUMBER=%22+escape(str).split(%22%20%22).join(%22+%22);}">View Case</a>

Upravil(a) mulapalliprasad dňa