Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Learn More

Deze conversatie is gearchiveerd. Stel een nieuwe vraag als u hulp nodig hebt.

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

  • 1 antwoord
  • 48 hebben dit probleem
  • 10 weergaven
  • Laatste antwoord van 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.

Bewerkt door cor-el op

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

Bewerkt door mulapalliprasad op