Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

#6346 closed defect (worksforme)

jscript error in mozilla

Reported by: vipaca@… Owned by: Christian Boos
Priority: normal Milestone:
Component: wiki system Version: devel
Severity: normal Keywords: javascript verify
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

Error from the opening page of the wiki:

$("#content").find("h1,h2,h3,h4,h5,h6").addAnchor is not a function
(no name)()wiki (line 26)
e()jquery.js (line 11)
e()jquery.js (line 11)
e([function(), function()], function(), undefined)jquery.js (line 11)
e()jquery.js (line 11)
[Break on this error] $("#content").find("h1,h2,h3,h4,h5,h6").addAnchor("Link to this section"...

Attachments (0)

Change History (8)

comment:1 by vipaca@…, 16 years ago

Component: generalwiki
Owner: changed from Jonas Borgström to Christian Boos
Version: devel

comment:2 by Christian Boos, 16 years ago

Keywords: needinfo added

Looks like that for some reason your browser wasn't able to download the "common/js/trac.js" file. You should use some tool (e.g. Firebug if that works within Mozilla) to look at what happened with that script file.

comment:3 by sid, 16 years ago

It is also useful to know what OS and browser (and versions of both) you are using.

in reply to:  3 comment:4 by anonymous, 16 years ago

Replying to sid:

It is also useful to know what OS and browser (and versions of both) you are using.

XP ver 2002 SP 2 & Firefox 2.0.0.9

in reply to:  2 comment:5 by anonymous, 16 years ago

Replying to cboos:

Looks like that for some reason your browser wasn't able to download the "common/js/trac.js" file. You should use some tool (e.g. Firebug if that works within Mozilla) to look at what happened with that script file.

I filed a bug because firebug told me there was a problem. Since which the problem has gone a way and the pages render with out complaint. So, for now the bug can not be reproduced.

comment:6 by Christian Boos, 16 years ago

Description: modified (diff)
Keywords: javascript verify added; needinfo removed
Milestone: 0.11.1

I wonder whether the $(document).ready takes into account all the secondary documents or not. It looks like this was not the case here, as if the ready callback was triggered before the trac.js was loaded (but after jquery.js was loaded).

in reply to:  6 comment:7 by Paul Irish <paul.irishEWWSPAM@…>, 16 years ago

Replying to cboos:

I wonder whether the $(document).ready takes into account all the secondary documents or not.

A browser will process any .js files included in the <head> before executing functions within the <body>. Given that fact, it's unlikely this would normally happen. Perhaps trac.js 404'd or 403'd. Either way, I'd consider this a one-time thing and recommend closing this as worksforme.

comment:8 by Christian Boos, 16 years ago

Milestone: 0.11.1
Resolution: worksforme
Status: newclosed

Assuming you meant "before executing functions within <script> elements inside the <head> element", as this is were the $("#content").find("h1,h2,h3,h4,h5,h6").addAnchor line was located.

Actually from what I've read (e.g. http://www.unix.org.ua/orelly/web/jscript/ch10_06.html), the order of execution of scripts within <head> is simply the order in which they are parsed, regardless of whether the scripts are loaded indirectly (through src=...) or inlined.

So it should have worked.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.