Bug 96743 - [testcase] javascript gives syntax error on variable named "goto"
Summary: [testcase] javascript gives syntax error on variable named "goto"
Status: RESOLVED DUPLICATE of bug 120925
Alias: None
Product: konqueror
Classification: Applications
Component: kjs (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-11 00:05 UTC by Roger Larsson
Modified: 2006-03-01 08:13 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roger Larsson 2005-01-11 00:05:10 UTC
Version:           3.3.91 (using KDE 3.3.91 (beta1), compiled sources)
Compiler:          gcc version 3.3.4 (pre 3.3.5 20040809)
OS:                Linux (i686) release 2.6.8-24.5-default

The java script parser does not like goto as a variable name.
Other browsers (read IE) does not have a problem with this (since it is found on a frequently used travel site - Appollo.se).

But the site does not work in Mozilla either - probably this problem since it complains in its Console:
"missing formal parameter"

--script-test.html--
<html>
<head>
<title>Variable name problem</title>
<script language="JavaScript" src="script2.js"></script>
<script language="JavaScript" src="script1.js"></script>
</head>
--script1.js--
function newWin(goto,bredd,hojd)
{
}
--script2.js--
function newWin(got,bredd,hojd)
{
}
Comment 1 Roger Larsson 2005-01-12 01:47:37 UTC
"goto" is a reserved word (as expected)

http://wp.netscape.com/eng/mozilla/3.0/handbook/javascript/keywords.htm#1002170

but as I understand it is not actually used.

Of cause IE allows it as a variable name - yet another quirk...
Comment 2 Roger Larsson 2005-04-13 20:43:48 UTC
_I wish_ that konqueror handles this as IE when in IE mode.
Comment 3 Harri Porten 2005-04-13 22:43:18 UTC
"final" is appearantly another example as can be seen on https://profile.microsoft.com:443/aspnet_client/system_web/1_1_4322/WebUIValidation.js
Comment 4 Maksim Orlovich 2006-03-01 05:48:00 UTC
Duping to a bug showing a broken webpage.

*** This bug has been marked as a duplicate of 120925 ***
Comment 5 Roger Larsson 2006-03-01 07:57:22 UTC
What is better?

* A linked webpage that can change.
* Code embedded in the report

I would take the embedded code any day!
Comment 6 Maksim Orlovich 2006-03-01 08:13:05 UTC
Yeah, but it has the comment saying it's the same bug -- except the page has package, too :-). I was going to change the title, but bugzilla was slow. Anyway, I'll try to fix this for 3.5.2