Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 14th, 2007, 08:26 AM
Authorized User
 
Join Date: Aug 2007
Location: , Tamil Nadu, India.
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default radio button

how i get full radio button length with out using

radio button name?
i not like this
- - - - - - --


<input type=radio name="mybutton">
<inpuy type=button name=submit OnClick="fun1()">
-----
<script>
function fun1()
{
var len=document.mybutton.length;
}



</script>











Reply With Quote
  #2 (permalink)  
Old September 15th, 2007, 08:54 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

I'm not sure what you are trying to avoid. You can use document.getElementsByName() though.

--

Joe (Microsoft MVP - XML)
Reply With Quote
  #3 (permalink)  
Old September 17th, 2007, 05:17 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hi anwarraja!!

you can use getElementById too


Cheers :)

vinod
Reply With Quote
  #4 (permalink)  
Old September 18th, 2007, 08:18 PM
Registered User
 
Join Date: Sep 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to ymaozi Send a message via MSN to ymaozi
Default

You look at a small section of my writing:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>ÎÞ±êÌâÒ³</title>
    <script language="javascript">
    function fun1()
    {
    var button=document.getElementsByName("mybutton");
    alert(button.length);
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <input type="radio" name="mybutton" />
    <input type="radio" name="mybutton" />
    <input type="button" name="submit" onclick="fun1()" />
     </div>
    </form>
</body>
</html>

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Radio button gaurisharya C# 2005 2 March 16th, 2008 06:43 AM
Radio button Jolley_tolson Javascript 2 July 15th, 2007 05:50 AM
radio-button grstad HTML Code Clinic 3 February 28th, 2006 08:32 AM
Button acts depending on radio button values janise Access 4 March 10th, 2004 12:53 AM
radio button damnnono_86 Access 5 October 28th, 2003 02:17 AM



All times are GMT -4. The time now is 04:54 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.