Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Learn More

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

  • 1 отговор
  • 48 имат този проблем
  • 14 изгледи
  • Последен отговор от 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