Re: access a checkbox in javascript!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



<input type="checkbox" name="1.1.1" id="1.1.1">

doc_obj=document.getElementById("1.1.1").checked;

It's work fine. Using Mozilla Firefox.

Fadjar Nurswanto
http://www.rindudendam.net


chandar wrote:

>Hi 
>I am trying access a checkbox which has some restrictions in the 
>naming conventions
>
>i have a check box with the following property
>
><input type=checkbox name=1.1.1>
>
>Here the restrictions are we cannot assign the id for this checkbox.
>How can we access the check box in javascript onclick of a button
>as this is "1.1.1" it throws some error when i acces 
>using document.frm.1.1.1.value
>
>I used a other alternative 
>ie 
>
>if (navigator.appName == "Netscape") {
>	doc_obj=document.frm.elements["1.1.1"].checked;
>}else{
>			doc_obj=document.getElementById
>("1.1.1").checked;
>}
>
>Is there any other work around other than this.
>here i have to mention browser specific code sepraterly.
>
>
>
>
>
>
>
>  
>



PHP Data object relational mapping generator
http://www.metastorage.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 




[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux