Page 1 of 1

photoblog plugin javascript error in Firefox

Posted: Mon Aug 29, 2005 5:37 pm
by ultravox
The photoblog plugin throws this javascript error in Firefox when you click the Done button while adding a photo:

Error: document.getElementById(el).onchange is not a function
Source File: http://timf.anansi-web.com/serendipity/ ... _editor.js
Line: 142

It does insert the photo, but will not insert the thumbnail. This does work in IE and a quick Google shows me that there are problems with the getElementById function in Firefox, but I'm not a JS programmer and can't figure out how to fix it.

Re: photoblog plugin javascript error in Firefox

Posted: Mon Aug 29, 2005 6:22 pm
by garvinhicking
You cou please edit your serendipity_editor.js file and change

Code: Select all

        document.getElementById(el).onchange();
to

Code: Select all

    if (document.getElementById(el).onchange) {
        document.getElementById(el).onchange();
    }
and see if that works?

Best regards,
Garvin

Posted: Fri Sep 02, 2005 11:16 pm
by ultravox
Okay, I tried that. But I still get the same error.

Got another suggestion?

Posted: Sun Sep 04, 2005 12:10 am
by garvinhicking
Did you clear your browser's cache? Otherwise it can be that it still uses the old .js file.

Regards,
Garvin

Posted: Wed Sep 07, 2005 5:54 pm
by ultravox
Oops. Don't I feel dumb?

Okay, I cleared the cache and the error went away. I click on the 'Done' button and the window closes.

But now there is another problem. When I select the radio button to use the thumbnail in my entry, it inserts a path like this into the photoblog field for the entry: /serendipity/uploads/photoblog/tiny_tim.serendipityThumb.jpg

So it looks like it should use the thumbnail image.

But when I view the blog entry, it uses the full size image.

This is not really a problem for me, as I don't want the thumbnails in my entries, but it seems like odd behavior.