Title: Event.observe
I figured out what the problem is. I thought _javascript_ watched the ID not the name. As you can see, I've got a hidden input before the checkbox. That is on purpose. Since IE doesn't send unchecked checkboxes, I had to place a hidden before the actual checkboxes to clear the values in the SQL or unchecking the box wouldn't have any effect. This works in Firefox and until now, it worked in Internet Explorer. Is there any other way I can specify the checkbox input only?
 

Keith Davis (214) 906-5183

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Davis
Sent: Wednesday, June 28, 2006 2:56 PM
To: rails-spinoffs@lists.rubyonrails.org
Subject: RE: [Rails-spinoffs] Event.observe

I just realized that this works in Firefox, but not in Internet Explorer. Why would that be?
 

Keith Davis (214) 906-5183

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Davis
Sent: Wednesday, June 28, 2006 2:53 PM
To: rails-spinoffs@lists.rubyonrails.org
Subject: [Rails-spinoffs] Event.observe

Aaarrrggh. Here's the actual code that I need to work:

                        <INPUT TYPE="HIDDEN" NAME="assess_int9" VALUE="">
                        <INPUT TYPE="CHECKBOX" NAME="assess_int9" VALUE=":" CHECKED="CHECKED" CLASS="radiocheck" ID="assess_int9">

                        :
                        <INPUT TYPE="TEXT" NAME="assess_int9_s0" CLASS="" STYLE="" ID="assess_int9" VALUE="sfsadfsdf">
                        <SCRIPT LANGUAGE="_javascript_" TYPE="TEXT/_javascript_">
                                Event.observe('assess_int9', 'click', function() { ClearTextIfNotChecked('assess_int9', 'assess_int9_s0') = ''; });

                        </SCRIPT>


However, I did this as a test and it doesn't work either and no error:

                        <INPUT TYPE="HIDDEN" NAME="assess_int9" VALUE="">
                        <INPUT TYPE="CHECKBOX" NAME="assess_int9" VALUE=":" CHECKED="CHECKED" CLASS="radiocheck" ID="assess_int9">

                        :
                        <INPUT TYPE="TEXT" NAME="assess_int9_s0" CLASS="" STYLE="" ID="assess_int9" VALUE="sfsadfsdf">
                        <SCRIPT LANGUAGE="_javascript_" TYPE="TEXT/_javascript_">
                                Event.observe('assess_int9', 'click', function() { alert('test'); } );
                        </SCRIPT>

_____________________
Thanks,  

Keith Davis - MCSA, A+, N+
P.R.I.D.E. - Director of Computer Services
www.pridedallas.com
Work (214) 351-6600 ext. 119
Mobile (214) 906-5183


_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to