javascript window does not open when I click on link




16 years ago
16 years ago


(Reporter: rdingman, Assigned: harishd)



Firefox Tracking Flags

(Not tracked)




(2 attachments)



16 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312

In the page at
when I click on the "Part Location Availability" hyptertext, nothing happens.

The JavaScript console shows the following:
Error: createWindow is not defined

Reproducible: Always

Steps to Reproduce:
1.Go to web site
2.Click on "Part Location Availability" (right half of page, 1/4 way down)

Actual Results:  
Nothing happens

Expected Results:  
Window should pop up in upper left corner.

If I use Netscape 4.79 for Windows or Linux, the window opens. However, If I use
Mozilla 1.0.2 for Windows (Windows 2000), the window opens.

Not sure if this is actually a Mozilla bug or a problem with the site's
javascript. Any suggestions?

Comment 1

16 years ago
Sorry. When I use Mozilla 1.0.2 for Windows, the window does NOT open.

Comment 2

16 years ago
Sorry, but I can't find such "Part Location Availability" link.

Comment 3

16 years ago
Sorry again. Click on the part number, 3433-6202. That opens the frame in which
the "Part Location Availability" link exists.


go directly to this page (the same frame):


Comment 4

16 years ago
Right - let me summarize here:

1. Go to the URL in the original report above
2. Click on the part number hyperlink at the extreme left (3433-6002)
3. This brings us to a page with the "Part Location Availability" hyperlink
5. The link is in the following frame:

6. The source for that frame shows the createWindow() function:

<!-------------------- JAVASCRIPT SECTION BEGINS HERE ------------------->
<script language="JavaScript">
<!-- Hide script from old browsers

function createWindow(cUrl,cName,cFeatures) {
  var xWin =,cName,cFeatures)


// End hiding script from old browsers -->

<!-------------------- JAVASCRIPT SECTION ENDS HERE ------------------->

The problem is that in Mozilla, this section is showing up in View Source
as commented out. That is why we get the error that Bob reported above:

             Error: createWindow is not defined

IE6, on the other hand, does not treat this as a commented section, and
so the function is defined in IE6.
Ever confirmed: true

Comment 5

16 years ago
Reassigning to HTML Parser component. I know that it is illegal 
according to the W3C to have two consecutive dashes inside an
HTML comment, like the site does:

<!-------------------- JAVASCRIPT SECTION BEGINS HERE ------------------->

But IE6 seems to tolerate this -
Assignee: rogerl → harishd
Component: JavaScript Engine → Parser
QA Contact: pschwartau → dsirnapalli

Comment 6

16 years ago
Created attachment 119485 [details]
Reduced testcase #1: incorrect HTML comments

Comment 7

16 years ago
Created attachment 119486 [details]
Reduced testcase #2: correct HTML comments

Comment 8

16 years ago
A reference for HTML comments is given here:

Reduced testcase #1 uses incorrect HTML comments, the way the site does:
<!-------------------- JAVASCRIPT SECTION BEGINS HERE ------------------->

Reduced testcase #2 uses correct HTML comments, like this:
<!--                   JAVASCRIPT SECTION BEGINS HERE                  -->

Both testcases work in IE6. In Mozilla trunk binary 2003040404,
only the 2nd one works. The 1st gives an error in the JS Console.

Because of the site's mistake, we might assign this bug to Evangelism
and get the site to correct their HTML. On the other hand, IE6 tolerates
this mistake: can we or do we want to emulate that?
OS: Linux → All

Comment 9

16 years ago
Note: both the site and the testcases use this doctype:

If we remove this, Mozilla tolerates the incorrect HTML comments.
I would say this is a clear Evangelism bug - do others agree?

Comment 10

16 years ago
I haven't been following the threads of Evangelism, but for what it's worth,
Netscape 4.79 also accepted the bad HTML. That doesn't make it correct, but it
gives some other fairly weighty precedence, I would think.

In any case, thanks for your analysis!

Comment 11

16 years ago
I contacted the site webmaster and he has corrected the HTML code.
Last Resolved: 16 years ago
Resolution: --- → INVALID

Comment 12

16 years ago
Bob: thank you for contacting the webmaster, and for this report -
You need to log in before you can comment on or make changes to this bug.