tag to wrap the text with controlls

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mukeshrasm
    Contributor
    • Nov 2007
    • 254

    tag to wrap the text with controlls

    Hi

    I wanted to click any where in the text and the corresponding radio button should get selected. like

    Code:
    <input type =radiobutton>mukesh 
    <input type =radiobutton>kumar 
    <input type =radiobutton>mishra
    <input type =radiobutton>software professional
    so when user will click any where on the text say mukesh it will select that radio button.


    To worst of my memory I just forgot the tag name!
  • harshmaul
    Recognized Expert Contributor
    • Jul 2007
    • 490

    #2
    Originally posted by mukeshrasm
    Hi

    I wanted to click any where in the text and the corresponding radio button should get selected. like

    Code:
    <input type =radiobutton>mukesh 
    <input type =radiobutton>kumar 
    <input type =radiobutton>mishra
    <input type =radiobutton>software professional
    so when user will click any where on the text say mukesh it will select that radio button.


    To worst of my memory I just forgot the tag name!
    This should do the job for you


    [HTML]<label for="a"><input type="radio" value="mukesh" name="group" id="a">mukesh</label>
    <label for="b"><input type="radio" value="kumar" name="group" id="b">kumar</label>
    <label for="c"><input type="radio" value="mishra" name="group" id="c">mishra</label>
    <label for="d"><input type="radio" value="software professioinal" name="group" id="d">softwar e professional</label>[/HTML]

    Comment

    • mukeshrasm
      Contributor
      • Nov 2007
      • 254

      #3
      Originally posted by harshmaul
      This should do the job for you


      [HTML]<label for="a"><input type="radio" value="mukesh" name="group" id="a">mukesh</label>
      <label for="b"><input type="radio" value="kumar" name="group" id="b">kumar</label>
      <label for="c"><input type="radio" value="mishra" name="group" id="c">mishra</label>
      <label for="d"><input type="radio" value="software professioinal" name="group" id="d">softwar e professional</label>[/HTML]

      Thanks and where could I get more on this label tag

      Comment

      • harshmaul
        Recognized Expert Contributor
        • Jul 2007
        • 490

        #4
        w3 schools is pretty good for that

        W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

        Comment

        Working...