Edgewall Software

Ticket #6346 (closed defect: worksforme)

Opened 13 months ago

Last modified 9 months ago

jscript error in mozilla

Reported by: vipaca@… Owned by: cboos
Priority: normal Milestone:
Component: wiki system Version: devel
Severity: normal Keywords: javascript verify
Cc:

Description (last modified by cboos) (diff)

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

Change History

  Changed 13 months ago by vipaca@…

  • owner changed from jonas to cboos
  • version set to devel
  • component changed from general to wiki

follow-up: ↓ 5   Changed 13 months ago by cboos

  • 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.

follow-up: ↓ 4   Changed 12 months ago by sid

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

in reply to: ↑ 3   Changed 12 months ago by anonymous

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   Changed 12 months ago by anonymous

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.

follow-up: ↓ 7   Changed 12 months ago by cboos

  • keywords javascript verify added; needinfo removed
  • description modified (diff)
  • milestone set to 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   Changed 9 months ago by Paul Irish <paul.irishEWWSPAM@…>

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.

  Changed 9 months ago by cboos

  • status changed from new to closed
  • resolution set to worksforme
  • milestone 0.11.1 deleted

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.

Add/Change #6346 (jscript error in mozilla)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cboos. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.