uswitch.com - JS Button not working, JS warning: 'final is a reserved identifier', works on Opera 8.01

RESOLVED WORKSFORME

Status

Tech Evangelism Graveyard
English US
RESOLVED WORKSFORME
13 years ago
3 years ago

People

(Reporter: Michael Graubart, Unassigned)

Tracking

Details

(URL)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b4) Gecko/20050725 SeaMonkey/1.0a
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b4) Gecko/20050725 SeaMonkey/1.0a

If details on this webpage are filled in and 'Continue' is clicked, nothing
happens. It works, however, in Safari.

Reproducible: Always

Steps to Reproduce:
1. Go to given URL.
2. Fill in some details (giving a UK postcode (Zip code), e.g. <SW12 9QL>.
3. Click 'Continue'.

Actual Results:  
Nothing.

Expected Results:  
The next page should have appeared.

eMac G4, OSX 10.3.9, Classic theme.

Comment 1

13 years ago
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b4) Gecko/20050727 SeaMonkey/1.0a

JS console is showing some errors, may be because I don't know how a british
phone number must look like, I tried 123456.

Warning: final is a reserved identifier
Source File:
http://www.uswitch.com/aspnet_client/system_web/1_1_4322/WebUIValidation.js
Line: 341, Column: 24
Source Code:
                        final = "";
Warning: final is a reserved identifier
Source File:
http://www.uswitch.com/aspnet_client/system_web/1_1_4322/WebUIValidation.js
Line: 349, Column: 24
Source Code:
                        final = "</ul>";
Warning: final is a reserved identifier
Source File:
http://www.uswitch.com/aspnet_client/system_web/1_1_4322/WebUIValidation.js
Line: 356, Column: 24
Source Code:
                        final = "<br>";
Warning: final is a reserved identifier
Source File:
http://www.uswitch.com/aspnet_client/system_web/1_1_4322/WebUIValidation.js
Line: 369, Column: 21
Source Code:
                s += final;

and some more warnings produced by this and other lines of code:
var st_iu=st_rs=st_cd=st_rf=st_us=st_hn=st_qs=st_ce="";

Warning: assignment to undeclared variable st_rs
Source File: http://st.sageanalyst.net/tag-749.js
Line: 4
(Reporter)

Comment 2

13 years ago
If you want to try with a British 'phone number, the format varies from city to
city, but London ones, for instance, are 0207xxxxxxx or 0208xxxxxxx.

Comment 3

13 years ago
confirming on Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b4) Gecko/20050727
SeaMonkey/1.0a

changed Hardware&OS to All, as bug is seen on MacOSX and Windows.
Don´t know where this bug belongs to: DOM Level 0? Javascript? Invalid?

Steps to repeat:

1. open JS console, clear
2. load from URL:
http://www.uswitch.com/Broadband/index.aspx?ref=newsletter_27.07.05
3. see CSS errors and JS Warnings only in JS-Console.
4. Below the form, to the right, click on button '>> Continue'
5. see JS error:

After loading the page: 
There are 4 warnings  : final is a reserved identifier

Warning: final is a reserved identifier
Source File:
http://www.uswitch.com/aspnet_client/system_web/1_1_4322/WebUIValidation.js
Line: 371, Column: 21
Source Code:
                s += final;


After clicking the button:
Error: Page_Validators is not defined
Source File:
http://www.uswitch.com/aspnet_client/system_web/1_1_4322/WebUIValidation.js
Line: 117

function Page_ClientValidate() {
    var i;
    for (i = 0; i < Page_Validators.length; i++) {
....


The button:
<DIV class="us_button" id="searchbutton">
	<a id="lbContinue" onclick="JavaScript: return switchExternalValidators();"
href="javascript:{if (typeof(Page_ClientValidate) != 'function' || 
Page_ClientValidate()) __doPostBack('lbContinue','')} ">
		<p class="imagebutton" title="Continue">Continue</p>
		<div id="continue" class="continue" title="Continue with your broadband
comparison"><img src="../Images/s.gif" alt="" width="100%" height="100%"
border="0"></div>
	</a>
</DIV>


When I make a local copy as 'webpage complete' using Mozilla, the button is not
seen, but can be found by looking for the cursor/tooltip.
Clicking gives the same JS error in Opera and Seamonkey.

Making the local copy with opera, useragent masked as IE or Mozilla, the button
is seen in both browsers. Opera does't show warnings, Mozilla is showing the CSS
errors and JS Warnings, but not the warnings related to 'final is a reserved
identifier', and not the JS error when clicking the button.
 
Assignee: general → general
Status: UNCONFIRMED → NEW
Component: General → JavaScript Engine
Ever confirmed: true
OS: MacOS X → All
Product: Mozilla Application Suite → Core
QA Contact: general → general
Hardware: Macintosh → All
Summary: On this webpage, 'Continue' does not work → JS Button not working, JS warning: 'final is a reserved identifier', works on Opera 8.01
Version: unspecified → Trunk
The final warning is just a warning, and irrelevant to this bug.

Start with a higher level that the JS engine, please.  This is not a core
ECMA-262 issue as far as I can tell.

/be
Assignee: general → general
Component: JavaScript Engine → DOM: Level 0
As message says, final is a "Reserved word" defined by specifications.
See ECMAScript Language Specification(ECMA-262).
 http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
> 7.5.3 Future Reserved Words
>(snip)
>       final
See also "Appendix A - Reserved Words" section of JavaScript 1.5 reference(one
of recovered doc's from dead "Netscape DevEdge" site).
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Reserved_Words
(Reporter)

Comment 6

13 years ago
I said in my original report that the button does work in Safari. Interestingly,
I have now discovered that it also works in FireFox 1.0.6.So why not in SeaMonkey?

Comment 7

13 years ago
Looks like evangelism to me due to server side browser detection. I get 

Error: Page_Validators is not defined
Source File:
http://www.uswitch.com/aspnet_client/system_web/1_1_4322/WebUIValidation.js
Line: 117

In MSIE 

<!-- END NetRatings Measurement V5 --><!-- TRACKING CODES END -->
				
			
<script language="javascript" type="text/javascript">
<!--
	var Page_ValidationSummaries =  new
Array(document.all["boxValidationSummary_vsIndex"]);
	var Page_Validators =  new
Array(document.all["boxServiceQuestions_valPostCode"],
document.all["boxServiceQuestions_PhonenumberRequiredFieldValidator"],
document.all["boxServiceQuestions_ValidatePhone"],
document.all["boxServiceQuestions_revPhone"],
document.all["boxServiceQuestions_cuvAction"]);
		// -->
</script>

			<script language='javascript'>minFontSize();</script>

			
<script language="javascript" type="text/javascript">
<!--
var Page_ValidationActive = false;

In Deer Park

<!-- END NetRatings Measurement V5 --><!-- TRACKING CODES END -->
				
			<script language='javascript'>minFontSize();</script>

	
<script language="javascript" type="text/javascript">
<!--
var Page_ValidationActive = false;

Changing the UA to MSIE allows the form to work. Unless someone has another
cause, I say Tech Evangelism English Other.
Assignee: general → english-us
Component: DOM: Level 0 → English US
Product: Core → Tech Evangelism
QA Contact: general → english-us
Summary: JS Button not working, JS warning: 'final is a reserved identifier', works on Opera 8.01 → uswitch.com - JS Button not working, JS warning: 'final is a reserved identifier', works on Opera 8.01
Version: Trunk → unspecified

Comment 8

12 years ago
*** Bug 309797 has been marked as a duplicate of this bug. ***

Comment 9

4 years ago
Seems fixed / redesigned.
[closeme]
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WORKSFORME
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.