Jump to content


Photo

checkboxes behaving badly


  • Please log in to reply
6 replies to this topic

#1 appeland

appeland
  • Members
  • PipPipPip
  • Advanced Member
  • 30 posts

Posted 05 October 2006 - 06:54 AM

Hello,
this is my first post in the JavaScript Forum, hope someone can help me.
I have written a webmail client that integrates with the popular Mambo/Joomla CMS.
On the INBOX view there are checkboxes for each listed email to enable users to do certain operations that can be choosen with a select box.

That select box is disbled by default and only if one or more checkboxes are ticket will it become active.
That works fine in Firefox, but in IE ::) it behaves very funny, to enable the select box
you have to tick at least two of the checkboxes, one is not enough. However, if one IS ticked and you klick into the select box it becomes active ???

To see that happening live goto http://dev.jennyandandi.net and use the DEMO LOGIN button, you will be taken to the inbox view where you see the checkboxes and the disabled "I want to" select box.

The little bit of javascript on each tickbox is :
onchange="enable(action_choice);"
a sample checkbox looks like this:
<input type="checkbox" name="delete_msg[194]" onchange="enable(action_choice);" />
and the select tag looks like this:
<select class='inputbox' name="action_choice" OnChange="submit('action_choice')" disabled style="background-color:white">

All help is very, much appreciated.
Thansk & Regards,
Andi







#2 appeland

appeland
  • Members
  • PipPipPip
  • Advanced Member
  • 30 posts

Posted 05 October 2006 - 07:03 AM

just realized another thing: once you have one tickbox activated you can klick anywhere in the page and the select box becomes active  :P

#3 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 05 October 2006 - 07:23 PM

Well, what's the relevant JS code for the functions you described?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#4 appeland

appeland
  • Members
  • PipPipPip
  • Advanced Member
  • 30 posts

Posted 06 October 2006 - 08:15 AM

Hmm, that's it, no further coding, just what's in the onchange event.

#5 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 06 October 2006 - 01:21 PM

Hmm, that's it, no further coding, just what's in the onchange event.

Perhaps I wasn't clear... what does the enable() function actually do?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#6 appeland

appeland
  • Members
  • PipPipPip
  • Advanced Member
  • 30 posts

Posted 06 October 2006 - 01:26 PM

Hello,
it enables disabled form elements.
regards,
Andi

#7 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 06 October 2006 - 01:27 PM

Well, according to your post, it's not doing this as desired... I can only guess as to why without the code itself.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users