PDA

View Full Version : Accordion Content JS error



query
04-20-2008, 10:17 PM
1) Script Title:
Accordion Content Script v 1.3

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm

3) Describe problem:
Using FF 2 on Linux -toggles don't work and items load expanded.
Loads with following error -

Error: uncaught exception: [Exception... "Object cannot be created in this context" code: "9" nsresult: "0x80530009 (NS_ERROR_DOM_NOT_SUPPORTED_ERR)" location: "file:///home/johnt/Pending/ddaccordion.js Line: 89"

I also use Konquer browser which does work and produces no errors.

I've disabled my add-ons and run out of thoughts.

Any ideas?
Thanks

Nile
04-20-2008, 10:19 PM
Can you please show use line 89? That'd help.
Thanks,
Nile

query
04-20-2008, 10:48 PM
Can you please show use line 89? That'd help.
Thanks,
Nile

Sure Nile-

88 init:function(config){
89 document.write('<style type="text/css">\n')

Thanks

Nile
04-21-2008, 03:40 AM
I'm thinking it has to do with your \n. Delete that.

ddadmin
04-21-2008, 07:23 AM
"\n" shouldn't affect anything actually. Please post a link to the page on your site that contains the problematic script so we can check it out, or does the problem occur on the DD demo as well?

query
04-21-2008, 08:05 PM
DDAMIN and NILE,

Thanks for your responses ( the "\n" didn't make any difference)

The demo is what I am working with.

The files downloaded work as expected in Konquer and do not work with FF 2, which has me completely baffled - same files.

When online using FF the demo works. I'm wondering if this could be a permissions/config setting issue.

Any other ideas?

ddadmin
04-22-2008, 06:29 AM
I'm wondering if this is a Linux specific issue, which I assume is the OS you're using? When viewing the DD online demo (http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm), does the same issue occur?

query
04-22-2008, 10:59 PM
DDADMIN -

This is what is so strange. Linux FF and Konqueror both work for the on-line demo - but the downloaded version works for Konqueror only.

I thought I found the answer here -

http://www.calavera.info/v1/blog/2008/03-31-10-54-analytics-ga-script-xhtml-problem.html

having to do with "document.write" not working in xhtml and tried loading the two JS scripts from the demo site. That didn't work either.

Still puzzled....and looking.

ddadmin
04-23-2008, 07:03 AM
Please post a link to the page on your site that contains the problematic script so we can check it out.

query
04-24-2008, 09:18 PM
DDADMIN,

Discovered the problem. Do not use XHTML as the extension.

Apparently FF in linux has a problem in this case related to "document.write" and XHTML.

Even if the DOCTYPE is XHTML, the file must have HTML as the extension in order to work.

(uncovered by fortunate blind experimentation)

Thanks for your help.