Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-12-27 21:19:26

maartenD
Member
From: Warnsveld, The Netherlands
Registered: 2007-12-08
Posts: 47
Website

Javascript error

Hi all,

I am new to Textpattern and i am trying to create a plugin. This plugin is based on the rss_thumbpop plugin. What i like to do is getting all images from a category and create a <ul> of it. This is working well. In combination with javascript and CSS i would create a gallary. What the javascript should do is on “mouseover” show the “bigger” picture.

When i try it with a local file everything works well in IE, FF and Opera. But when i implement it in Textpattern it only works in FF. The message i get back in the error console of Opera is:

JavaScript - http://localhost/ateliermirakel/schilderijen Event thread: mouseover Error: name: TypeError message: Statement on line 43: Could not convert undefined or null to object Backtrace: Line 43 of linked script http://localhost/ateliermirakel?js=default if (description.firstChild.nodeType == 3) Line 25 of linked script http://localhost/ateliermirakel?js=default return showPic(this); At unknown location [statement source code not available]

I placed the javascript using the plugin: stm_javascript.

I hope somebody has an idea??

Thanks in advance,

Maarten Duits


Kind regards,

Maarten

Offline

#2 2007-12-27 22:06:35

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: Javascript error

No need to develop bike again – you can use thickbox for example :)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#3 2007-12-27 22:38:03

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Javascript error

You’ve got a path problem: http://localhost/ateliermirakel/schilderijen refers to your development install, not your live site. Check the JavaScript path in your HTML.

Offline

#4 2007-12-28 19:08:01

maartenD
Member
From: Warnsveld, The Netherlands
Registered: 2007-12-08
Posts: 47
Website

Re: Javascript error

Hello Guys,

Thanks for the replies.

The_Ghost, thanks for your suggestion. I will take a look at Thickbox.

JM, i don’t think it’s a path error, because i am running this on my development environement. I do think it’s some kind of “loading” issue. All the javascript is loaded on the body onload event and i think there something is going wrong.

If somebody has more suggestions, pls let me know.

Thx in advance.

Kind regards,

Maarten.


Kind regards,

Maarten

Offline

#5 2007-12-28 22:09:31

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Javascript error

Maarten, could you post or email a URL?

Offline

Board footer

Powered by FluxBB