Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Nov 2011
    Posts
    250
    Thanks
    8
    Thanked 4 Times in 4 Posts

    Populate radio button when another radio button is selected

    ok so here i am again. My problem this time is i need a 2nd radio button to be populated when the first is clicked. if you need to see he code let me know, i'd prefer to do it without JS

    thanks

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,316
    Thanks
    23
    Thanked 613 Times in 612 Posts
    Of Course we need to see the code!

    And any time your changing the browser page it's done with js.

    In your case you want something to happen on a button click = Yeah, that's js.

  • #3
    Regular Coder
    Join Date
    Nov 2011
    Posts
    250
    Thanks
    8
    Thanked 4 Times in 4 Posts
    <!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>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link href="style.css" rel="stylesheet" type="text/css" />
    <title>Unarmed Weapon Shop</title>
    </head>

    <body>
    <div id="container">
    <div id="header">

    </div>
    <div id="content">
    <div id="left">
    <div class="menu">
    <div class="menuheader"><h3>Menu</h3></div>
    <div class="menucontent">
    <ul>
    <li><a href="index.html">Home</a></li>
    <li><a href="forum.html">Forums</a></li>
    <li><a href="chat.html">Chatroom</a></li>
    <li><a href="newbie.html">Newbie Guide</a></li>
    <li><a href="setting.html">Setting</a></li>
    <li><a href="characters.html">Characters</a></li>
    <li><a href="rules.html">Rules</a></li>
    <li><a href="system.html">Game System</a></li>
    <li><a href="chargen.html">Register Character</a></li>
    <li><?
    /* Include Files *********************/
    include("login2.php");
    /*************************************/
    ?></li>
    </ul>
    </div>
    <div class="menufooter"></div>
    </div>
    <div class="menu">
    <div class="menuheader"><h3>Shops</h3></div>
    <div class="menucontent">
    <ul>
    <li><a href="armour.html">Armour</a></li>
    <li><a href="weapons.html">Weapons</a></li>
    <li><a href="items.html">Items/Gear</a></li>
    <li><a href="enhancements.html">Enhancements</a></li>
    <li><a href="skills.html">Skills</a></li>
    <li><a href="vehicles.html">Vehicles</a></li>
    </ul>
    </div>
    <div class="menufooter"></div>
    </div>
    </div>


    </div>

    <div id="middle">
    <div class="post">
    <div class="postheader">
    <h1>Unarmed Weapon Shop</h1></div>
    <div class="postcontent">
    <!--BEGIN CONTENT-->
    In order to purchase a weapon, simply select the radio button beside its name, then press the submit button.<BR><BR>
    <form action="weapons.php" method="post">

    <input type="hidden" name="_submit_check" value="1">
    </td>
    <center>
    <table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="">
    <tr>
    <td bgcolor=""><font>&nbsp;</td>
    <td bgcolor=""><font><nobr>Weapon Name</nobr></font></td>
    <td bgcolor=""><font>Description</font></td>
    <td bgcolor=""><font>Price</font></td>
    <tr><td bgcolor="" valign="top"><font size="1" face="Verdana"><input type="radio" name="Weapons" value="Brass Knuckles, "><input type="radio" "hidden" name="Money" value="125"></td><td bgcolor="" valign="top"><font size="1" face="Verdana">Brass Knuckles</td><td bgcolor="" width="90%"><font size="1" face="Verdana"><strong>DMG</strong>: +5<BR><strong>Special</strong>: None<BR><strong>Restrictions:</strong>: None<BR>Want to pack a bit more in your punch? This finely crafted brass piece fits over the knuckles with a brace fitting into your palm. Perfect for gaining the upper hand in a fist fight.</td><td bgcolor="" valign="top"><font size="1" face="Verdana">$125</font></td></tr><tr><td bgcolor="" valign="top"><font size="1" face="Verdana"><input type="radio" name="Weapons" value="Spurs, "><input type="radio" "hidden" name="Money" value="125"></td><td bgcolor="" valign="top"><font size="1" face="Verdana">Spurs</td><td bgcolor="" width="90%"><font size="1" face="Verdana"><strong>DMG</strong>: +5<BR><strong>Special</strong>: Kicks only.<BR><strong>Restrictions:</strong>: None<BR>A pair of spurs to put on the heels of boots. Most of the time they're sharpened to add in a cut to the initial 'heel to the face' manuever. Just dont try riding a horse with a pair of the sharpened ones.</td><td bgcolor="" valign="top"><font size="1" face="Verdana">$125</font></td></tr><tr><td bgcolor="" valign="top"><font size="1" face="Verdana"><input type="radio" name="Weapons" value="Knife Boots, "><input type="radio" "hidden" name="Money" value="250"></td><td bgcolor="" valign="top"><font size="1" face="Verdana">Knife Boots</td><td bgcolor="" width="90%"><font size="1" face="Verdana"><strong>DMG</strong>: +15<BR><strong>Special</strong>: Kicks only.<BR><strong>Restrictions:</strong>: None<BR>A pair of boots with retractable knives in them. Made for those who prefer to put Boot-to-*** instead of Fist-to-Face.</td><td bgcolor="" valign="top"><font size="1" face="Verdana">$250</font></td></tr><tr><td bgcolor="" valign="top"><font size="1" face="Verdana"><input type="radio" name="Weapons" value="Spiked Gloves, "><input type="radio" "hidden" name="Money" value="350"></td><td bgcolor="" valign="top"><font size="1" face="Verdana">Spiked Gloves</td><td bgcolor="" width="90%"><font size="1" face="Verdana"><strong>DMG</strong>: +15<BR><strong>Special</strong>: Can use gloves to scale walls, rocks.<BR><strong>Restrictions</strong>: 25 Strength to climb walls<BR>Not just badass biker gear, the gauntlet-like metal plates sewn into the upper fingers and knuckles of these gloves act as a brace for the half-inch spikes protruding from the leather.</td><td bgcolor="" valign="top"><font size="1" face="Verdana">$350</font></td></tr><tr><td bgcolor="" valign="top"><font size="1" face="Verdana"><input type="radio" name="Weapons" value="Power Fist, "><input type="radio" "hidden" name="Money" value="600"></td><td bgcolor="" valign="top"><font size="1" face="Verdana">Power Fist</td><td bgcolor="" width="90%"><font size="1" face="Verdana"><strong>DMG</strong>: +25<BR><strong>Special</strong>: None<BR><strong>Restrictions:</strong>: Requires small energy cells.<BR>A mechanical glove that fits over both hands, the Power Fist is a mighty weapon for those who rely on their fists. Power by energy cells, the Power Fist makes a small explosion every punch by firing an energy cell out. </td><td bgcolor="" valign="top"><font size="1" face="Verdana">$600</font></td></tr><tr><tr><td></td><td width="20%"><font> Name:&nbsp;&nbsp;&nbsp;</td><td width="80%"><INPUT TYPE="text" name="name" size="50%" value=""><td bgcolor="" colspan="5" align="right"></tr><td></td>
    <td width="20%"><font>Password:&nbsp;&nbsp;&nbsp;</td>
    <td width="80%"><INPUT TYPE="password" name="password" size="50%" value=""><td bgcolor="" colspan="5" align="right"><input type="submit" name="update" value="BUY" /></tr></table><font size="1" face="Verdana"></form><BR><BR></td></tr></table>

    <!-- End Content -->
    <div class="postfooter"></div>
    <div id="footer">
    </div>
    </body>
    </html>
    When a radio box is clicked on i need for the hidden one below it to be populated automatically


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •