Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Претражи подршку

Избегните преваре подршке. Никада од вас нећемо тражити да зовете или шаљете поруке на број или да делите личне податке. Пријавите сумњиве радње преко „Пријавите злоупотребу” опције.

Learn More

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

  • 1 одговор
  • 48 има овај проблем
  • 10 прегледа
  • Последњи одговор послао 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.

Измењено од стране cor-el

Сви одговори (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>

Измењено од стране mulapalliprasad