Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

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

  • 1 trả lời
  • 48 gặp vấn đề này
  • 10 lượt xem
  • Trả lời mới nhất được viết bởi 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.

Được chỉnh sửa bởi cor-el vào

Tất cả các câu trả lời (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>

Được chỉnh sửa bởi mulapalliprasad vào