cforms II User Forum

Registration is currently disabled.
Guest

FAQs

Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
RESOLVED: JS Error in IE
October 19, 2007
7:37 am
Eric
Guest

I have a basic install of Version v5.5 running on 2.3

 http://www.erickochphoto.com/main

 A programming friend has stop on errors enabled in IE, and found a problem on my site.

There is JS error that comes up when ever you click on a link on any page or post in the blog. We traced it to the simplecalendar.js file, and the section of code under

/* SOURCE FILE: PopupWindow.js */

 

When I delete that section the error goes away and there are no other problems that I have (other than I can not use the simplecalendar to help my clients enter the date Cry).

If there is a way to fix this it would be greatly appreciated.  

Thanks for the great plugin.

October 19, 2007
7:43 am
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

Thanks for the heads-up, but I don't think it's a bug, since it runs fine on a standard WP install (both IE & FF) – hard to tell without the actual error message.

It seems more of an incompatibility with another plugin you're running (perhaps using a function with the same name?)

I noticed that disabling 'Popup Date Picker' on the Plugin Settings tab will not avoid including the respective javascript file (causing the issue on your WP deployment).

This will be fixed in v5.6 so the JS will not get loaded if it isn't required.

(For the time being you can completey remove that line in cforms.php/at the bottom

 

October 20, 2007
6:43 am
Eric
Guest

Here is the bug as described by my programming friend (the new update to 5.5.1 did not fix it, but it does make it easy to turn off).

 

function PopupWindow_hidePopup(){if(this.divName != null){if(this.use_gebi){document.getElementById(this.divName).style.visibility = "hidden";}else if(this.use_css){document.all[this.divName].style.visibility = "hidden";}else if(this.use_layers){document.layers[this.divName].visibility = "hidden";}}else{if(this.popupWindow && !this.popupWindow.closed){this.popupWindow.close();this.popupWindow = null;}}}

 

 

 document.getElementById(this.divName) is returning null, so the following code fails

October 20, 2007
8:09 am
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

Thanks for following up!

I can't seem to replicate the error in my test environment, but will try harder…. ;-)

October 21, 2007
11:15 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

It seems to be specific to the above deployment of WP, as I can't reproduce the effect. cforms works fine with jQuery.

October 23, 2007
9:36 pm
Martin
Guest

I can confirm the bug on WP 2.3 German edition with no other PlugIns activated and IE 7.

The reason is that the getElementById part of

document.getElementById(this.divName).style.visibility = "hidden";

is null for pages without a form.

Btw: You have to click on a page without a form to see the error.

Regards

Martin

October 23, 2007
9:40 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

Thanks for confirming, but can you share the URL ? It would help to trouble-shoot, since it did work fine in my test environment (WP2.3 – english , IE 6&7).

October 23, 2007
9:48 pm
Martin
Guest

http://heimatverein-hitdorf.de/

Go and see for yourself. But hurry because the site is useless since it throws an error when you click on it…

(And if javascript error notification is active.)

October 23, 2007
9:53 pm
Martin
Guest

There are a lot of these constructs in simplecalendar.js (or PopWindow.js).

Please let me know when you are finished since I'd like to disable the javascript popup.

Btw: This is a cross browser bug Wink

October 23, 2007
9:59 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

Thanks, you can turn the JS popup picker support off (which should fix the problem for the time being).

I agree, it is a cross browser issue as far as your blog and Eric's is concerned, but I can't for the life of it replicate in my environment…

Anything special you're running?

 

October 23, 2007
10:37 pm
Martin
Guest

Nothing I am aware of.
I also tried to disable all other PlugIns but the effect remains the same.

To be honest I do not understand why this should not happen in your environment since it is a very obvious bug.

But I'll try to fix it and let you know.

October 23, 2007
10:40 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

RESOLVED. And I stand corrected :-)

I will issue the patched v5.52 tomorrow – too late already…thanks again for pointing it out (it's all about the div 'datepicker' not being available).

October 23, 2007
11:02 pm
Martin
Guest

That's good, then I can go form some Coke and chocolate before I go to bed.

The occurence of the error might also be related to the compliance mode the browser is running the document in. So if your theme is not XHTML like mine (and probably Erics), the script doesn't use getElementById and maybe behaves different.

Good night.

Martin

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
29 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

tracedef: 43

mores: 21

Gyrus: 20

frozenwaste: 18

asuffredini: 15

photoworks: 14

Member Stats:

Guest Posters: 3713

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5311

Posts: 18672

Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass

Moderators: Paul (421), cnymike (8), sonika (95)

Administrators: Oliver (6400), Nicky (3)