Jump to content

Search the Community

Showing results for tags 'radio button'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 8 results

  1. I have the following code. When executed, if you select one button then select the other button, it does not clear the first button, so both buttons are selected. I can't see what I've done wrong. Any help? <!DOCTYPE html> <html> <body> <h2>Radio Buttons</h2> <p>The <strong>input type="radio"</strong> defines a radio button:</p> <form action="/action_page.php"> <tr> <td><select name="os0"> <option value="$5 donation">$5 donation $5.00 USD</option> <option value="$10 donation">$10 donation $10.00 USD</option> <option value="$25 donation">$25 donation $25.00 USD</option> <option value="$50 donation">$50 donation $50.00 USD</option> <option value="$100 donation">$100 donation $100.00 USD</option> </select></td></tr> <br><br> <tr> <td> <input name="on1" <input type="radio" id="memory" value="In Memory of"> <label for="memory">In Memory of: </label><br> <input type="radio" id="honor" name="honor" value="In Honor of"> <label for="honor">In Honor of: </label><br><br> </td> </tr> </form> </body> </html>
  2. I am trying to get the value of a radio button. The value of the radio button should get put into the answer box. Why won't the radio value get returned and/or shown? Thx <head> <script> function test() { var myinput = document.getElementById("guess").value; document.getElementById("answer").value = myinput; } </script> </head> <body> <input type="radio" name="guess" value="1"> One<br> <input type="radio" name="guess" value="2"> Two<br> <input type="radio" name="guess" value="3"> Three<br> <input type="radio" name="guess" value="4"> Four<br> <br> <br> Answer <input type="text" id="answer" size=8 style="background-color:#cfc;"> <br> <br> <button onclick="test()">Calculate</button>  </body>
  3. Hi, guys. I have a problem. I'm trying to create an Eddsworld personality quiz but the results don't show up on the following page. I'm not using a server to do it, which might be part of the problem. This is the code for the question page: This is the code for the results page (so far). Please tell me what I'm doing wrong.
  4. The following line does not work. $("label[for=pick] .ui-btn-text").html("new label"); JS Bin - Collaborative JavaScript Debugging How to correct this?
  5. The drop-down doesn't disappear once switched from one selected option to the next option For instance if click of Radio button main group the drop down display now again clicking of country its also displaying but if i click subgroup ,main group drop down is not clearing and if i click item group ,subgroup and main group is not clear <script>(function ($) {$.widget("custom.combobox", {_create: function () {this.wrapper = $("<span>").addClass("custom-combobox").insertAfter(this.element);this.element.hide();this._createAutocomplete();this._createShowAllButton();},_createAutocomplete: function () {var selected = this.element.children(":selected"),value = selected.val() ? selected.text() : "";this.input = $("<input>").appendTo(this.wrapper).val(value).attr("title", "").attr("id", "sss").addClass("custom-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left").autocomplete({delay: 0,minLength: 0,source: $.proxy(this, "_source")}).tooltip({tooltipClass: "ui-state-highlight"});this._on(this.input, {autocompleteselect: function (event, ui) {ui.item.option.selected = true;this._trigger("select", event, {item: ui.item.option});},autocompletechange: "_removeIfInvalid"});}, Reference the link http://jsfiddle.net/dvx53/26/
  6. Hello internet Safari is not allowing my radio buttons to work and it will not let submit my form connected with those... any help is greatly appreciated. Thanks. SUBMITTING THE FORMHTML<form name=poll1 id=poll1 method="post" target="_blank">.....<input type="radio" name="ne" id="ne1" value="1">.....</form> JAVAfunction poll1submit(){poll1.action = "polls_p.php";document.getElementById('poll1').submit()}
  7. I have tried so many different approaches. This is what I currently have. I know it's not pretty but my first goal is to get it to work, then figure out how to make it more elegant. I have a form where the required elements are outlined in red. Then I have a radio button input for contact preference with the choices Email or Phone. I want the input for these respective elements to be outlined in red based on the radio button selection. But if they change their mind, the red box has to go back to not being red anymore... Here is what I have so far... <script type="text/javascript"> function highlight(a,{ thing1 = document.getElementById("a"); thing2 = document.getElementById("b"); thing1.style.border="solid 1px #EE0000"; thing2.style.border="#7F9DB9";} </script><form name="FelixContact" enctype="multipart/form-data" action="process.php" method="post"><table><tr><td>Prefered contact method</td><td><table> <tr><td> <input type=radio name="ContactBy" value="Email" onclick="highlight(EmailAddress,PhoneNumber)">Email<br> <input type=radio name="ContactBy" value="Phone" onclick="highlight(PhoneNumber,EmailAddress)">Phone<br> </td></tr></table></td></tr><tr><td>Email Address</td><td><table id="EmailAddress" border="0"><tr><td> <input type=text name="EmailAddress"></td></tr></table></td></tr><tr><td>Phone Number</td><td><table id="PhoneNumber"> <input type=text name="PhoneNumber"></td></tr></table></td></tr> I also tried onchange instead of onclick and it didn't work either
  8. I want to display a table with 3rd column a radio buttom. Could not figure out this bug in my code. Please help. See attachment. or the displayed code below: <?php include("../mylibrary/login.php"); login(); // attach to DB echo "<table width=\"100%\" cellpadding=\"1\" border=\"1\">\n";// echo "<tr><td colspan=\"4\"><b>Students in this lesson "</b></td></tr>\n";<- something wrong here echo "<tr><td><b>Last Name</b></td><td><b>First Name</b></td><td><b>Attending Status</b></td></tr>\n"; $classname = $_REQUEST['classname']; $ldate = $_REQUEST['ldate']; $cname = $_REQUEST['cname']; $chour = $_REQUEST['chour']; $query = "SELECT classid "; $query .= " from class "; $query .= " where classname = '$classname'"; // echo "class is $classname\n<br>";// echo "SQL is $query\n"; $result = mysql_query($query);//if (!$result) echo "<h2>SQL error</h2>\n". mysql_error(); $row = mysql_fetch_array($result, MYSQL_ASSOC); $classid = $row['classid']; // echo " classid fetched is $classid\n"; // $classid = 7; $query = "SELECT lastname, firstname "; $query .= " FROM student"; $query .= " where classid = $classid"; $query .= " order by lastname"; $result = mysql_query($query); if (!$result) echo "<h2>SQL error</h2>\n". mysql_error(); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $lastname = $row['lastname']; $firstname = $row['firstname']; echo "<tr><td>$lastname</td><td>$firstname</td>"; $absent_status = 'unchecked'; $partiallyThere_status = 'unchecked'; $present_status = 'checked'; if (isset($_POST['phour'])) { $selected_radio = $_POST['gender']; if ($selected_radio == 'absent') { $absent_status = 'checked'; } else if ($selected_radio == 'partiallyThere') { $partiallyThere_status = 'checked'; } else if ($selected_radio == 'present') { $present_status = 'checked'; } }// <body>//<FORM NAME ="form1" METHOD ="POST" ACTION ="radioButton.php">//echo "<td>//<INPUT TYPE = 'Radio' Name ='gender' value= 'present' <?PHP print $present_status; ?>>Present//<INPUT TYPE = 'Radio' Name ='gender' value= 'absent' <?PHP print $absent_status; ?>>absent//<INPUT TYPE = 'Radio' Name ='gender' value= 'partiallyThere' <?PHP print $partiallyThere_status; ?>>partiallyThere,// Hours in class//<INPUT TYPE = "text" Name = "phour" size = 4 ></td>";//<INPUT TYPE = "Submit" Name = "Submit1" VALUE = "Submit">//</FORM>//</body>// echo "<form action=\"updtattd.php\" method=\"post\">\n";// echo " <h2>Class: $classname </h2> <br>";// echo "<h2>Lesson Name: $cname </h2> <br>";// echo "<h2>Lesson Date: $ldate </h2> <br>";// echo "<h2>Credit Hours: $chour </h2> <br>"; echo "<td><input type=\"radio\" name=\"group1\" value=\"1\" checked> Present</td>"; echo "<td><input type=\"radio\" name=\"group1\" value=\"Absent\" > Absent</td>"; echo "<td><input type=\"radio\" name=\"group1\" value=\"PartialPresent\"> Partially there</td>"; echo "<td><input type=\"text\" name=\"phour\" size=\"4\"></td>";// echo "</form>"; //?>//\n"; echo "</table>\n";}?>
×
×
  • Create New...