forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: tvidal99 on March 29, 2006, 03:11:15 pm

Title: keyword list and firefox
Post by: tvidal99 on March 29, 2006, 03:11:15 pm
Hi,

firstly I want to thanks you very much all the dev team ! very nice application !

Well, because i'm using firefox and not IE I find a problem with firefox (1.5.0.1) : when I upload file and click on the "Insert from list" I've got the list of my keywords. Great. But when I click on a keyword it doesn't appear in the text field !
I think it's a javascript problem ?? but I'm not a programmeur, so I can't found a solution....

Someone can help me ?

Many thnaks,

Thomas
Title: Re: keyword list and firefox
Post by: Roderic on April 02, 2006, 10:06:49 am
Hi there,

same with me, the keywords just don't get transferred to the main input window in FF 1.5.0.1.
JS is enabled, as well as all options in the "Advanced JavaScript Settings" menu.

Rod


Title: Re: keyword list and firefox
Post by: Paver on June 16, 2006, 02:28:19 am
Bug confirmed in 1.4.8.

Here's the fix.  In upload.php, in function text_box_input, replace this line:
Code: [Select]
<input type="text" style="width: 100%" name="$name" maxlength="$max_length" value="$default" class="textinput" />with this line:
Code: [Select]
<input type="text" style="width: 100%" name="$name" maxlength="$max_length" value="$default" class="textinput" id="$name" />
So you added an id tag to the text input box, so the popup window can reference it correctly in Firefox.

I would think getElementById would require an id tag, but in IE, according to this page (http://www.javascriptjedi.com/getElementById/):
Quote
IE works correctly on elements that CAN'T have a name attribute. It works incorrectly, however, on elements that can.

So you need to have a name tag for IE (for elements that can have a name tag), and you need to have an id tag for Firefox and for IE when you have an element that doesn't have a name tag.

Phew!

Committed to 'devel' branch.  I'm skittish about adding to 'stable' branch due to a bug I added to 1.4.7.  So please make the change manually to 1.4.x if you want this to work in Firefox.
Title: Re: keyword list and firefox
Post by: Sami on June 16, 2006, 10:01:29 am
if you have same string for name tag and id tag , it will work without problem for both (IE ,FF)
Title: Re: keyword list and firefox
Post by: Paver on June 26, 2006, 07:21:50 am
Committed to stable branch.  Will be in next version (1.4.9).
Title: Re: keyword list and firefox
Post by: rainbowz on July 23, 2006, 07:43:46 pm
Bug confirmed in 1.4.8.

Here's the fix.  In upload.php, in function text_box_input, replace this line:
...

Woot!!

This hack is also required for Safari and a few other Mac browsers . And it works perfectly, too.

Thanks tons! Now my keywords list is actually useful! :D