Java

Moderators: zibadian
Number of threads: 7836
Number of posts: 18235

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Radio Form help Posted by sigmast on 2 Feb 2011 at 12:23 PM
I need help with the following code badly. This is able to display numerical values for the <label> but I need it to display text. For example

<input id="r1" onclick="check(two or more);" name="r1" type="radio" value="two" /> Two


I own two or more chickens.

Here is the code that will only display the numbers only.

<script type="text/javascript">// <![CDATA[
 function check(x) { document.getElementById('Radio1').innerHTML = x; }
// ]]></script>

<form> <input id="r1" onclick="check(1);" name="r1" type="radio" value="one" /> One

<input id="r1" onclick="check(2);" name="r1" type="radio" value="two" /> Two

<input id="r1" onclick="check(3);" name="r1" type="radio" value="three" /> Three

<input id="r1" onclick="check(4);" name="r1" type="radio" value="four" /> Four

</form>I own <label id="Radio1" for="r1">blank</label> chickens.



Any help would be greatly appriciated
Report
Re: Radio Form help Posted by sigmast on 2 Feb 2011 at 1:03 PM
nevermind figured it out: ('text')



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.