Radio buttons don't uncheck when another button is checked

I have this strange problem with my radio buttons. I was taught that when a radio button is checked any other button that is checked becomes unchecked, but that's not what is happening here. This form is part of a php data base; therefore, the value of the name attribute in the form has to correspond with the value of the name attribute in the php file. It appears as long as I keep the default value in the name attribute in the form the buttons will uncheck when another is checked. But I can't keep the default name. Any suggestions? Here is the code.
<!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=UTF-8" />
<title>Homework 7</title>
<script type="text/javascript">
function edits()
if(document.getElementById("name").value=="")
    alert("Please enter your whole name.")
    return false;
    if(document.getElementById("jarreau").checked=="")
    alert("Please enter your whole name.")
    return false;
    else if(document.getElementById("aretha").checked=="")
    alert("Please enter your whole name.")
    return false;
    else if(document.getElementById("withers").checked=="")
    alert("Please enter your whole name.")
    return false;
    else if(document.getElementById("joel").checked=="")
    alert("Please enter your whole name.")
    return false;
    else if(document.getElementById("warwidk").checked=="")
    alert("Please enter your whole name.")
    return false;
    if(document.getElementById("rate").value=="")
    alert("Please enter your whole name.")
    return false;
    if(document.getElementById("email").value=="")
    alert("Please enter your whole name.")
    return false;
else return true;
</script>
<style type="text/css">
body {
    background-color: #F9F;   
h1 {
    font-size: xx-large;
    color: #FFF;
</style>
</head>
<body>
<h1 font color="#fff">Old School Concert</h1>
<table width="87%" border="0" cellspacing="0" cellpadding="2">
  <tr>
    <th align="left" width="19%" scope="col">Al Jarreau</th>
    <th align="left"width="13%" scope="col">Aretha Franklin</th>
    <th align="left"width="16%" scope="col">Bill Withers</th>
    <th align="left"width="19%" scope="col">Billy Joel</th>
    <th align="left"width="19%" scope="col">Dionne Warwick</th>
  </tr>
  <tr>
    <td><img src="al jarreau.jpg" width="247" height="204" alt="Al Jarreau" /></td>
    <td><img src="images/aretha franklin.jpg" width="198" height="204" alt="aretha franklin" /></td>
    <td><img src="Bill Withers.jpg" width="192" height="204" alt="Bill Withers" /></td>
    <td><img src="billy joel.jpg" width="225" height="204" alt="Billy Joel" /></td>
    <td><img src="Dionne Warwick.jpg" width="176" height="204" alt="Dionne Warwick" /></td>
  </tr>
</table>
<h2><font color="#FFFFFF">In order to keep bringing you the best in old school legends please fill out this brief survey.</font></h2>
<form name="service" method="post" action="concert.php" />
<label for="fname">First name:</label>
  <input name="name" type="text" id="fname" size="20" maxlength="15" />
  (optional)
  <br />
<label for="lname">Last name:</label>
  <input name="name" type="text" id="lname" size="20" maxlength="15" />
  (optional)<br />
  <label>Which performance you liked best:</label><br />
    <p>
      <label>
        <input type="radio" name="jarreau1_0" value="radio" id="RadioGroup1_0" />
        Al Jarreau</label>
      <br />
      <label>
        <input type="radio" name="aretha1_1" value="radio" id="RadioGroup1_1" />
        Aretha Franklin</label>
      <br />
      <label>
        <input type="radio" name="withers" value="radio" id="RadioGroup1_2" />
        Bill Withers</label>
      <br />
      <label>
        <input type="radio" name="joel" value="radio" id="RadioGroup1_3" />
        Billy Joel</label>
      <br />
      <label>
        <input type="radio" name="warwidk" value="radio" id="RadioGroup1_4" />
        Dionne Warwick</label>
    </p>
<br />
  <label for="rate">On a scale of 1 to 10 how would you rate this concert?</label>
  <br />
    <input name="rate" type="text" id="rate" size="5" maxlength="2" />
  <label for="email"><br />
    Your email address:</label>
  <br />
<input name="email" type="text" id="email" size="45" maxlength="45" />
</p>
<p>
<label for="comment">Your comments:</label>
    <textarea name="comment" cols="50" rows="5" id="comment"></textarea>
</p>
<input type="button" value="submit" name="" id="" onclick="edits()" />
</form>
</body>
</html>

You are completely right. Part of my problem is how to ask the question.
The buttons now uncheck. When I submit the form I'm suppose to get a php
output that shows all the fields completed. And I also need for Dreamweaver
to make an alert message if no button is checked?  Is that possible? Or do
I have to use javascript code for that? So far the form won't submit until
I clean up javascript if else statements to create an alert box if a button
is not checked or false. But I don't need an alert message for each button,
right? Just for the radio group? So that means I have to give the radio
group a name, right? But I don't see a way to do that so far. Any
suggestions. Oh, here the link:
http://ciswebs.smc.edu/cis54/tyson_schweidel/concert.htm

Similar Messages

  • Acrobat 9.1  Mac How do you change from Radio buttons to Check boxes?

    I have a DMV Form I Downloaded and had to convert to PS then back to PDF (written originally on PC Acrobat was in XML format).
    So on new form, I am able to add fields. I used the the Forms manager to automatically create the fields. Fields that were made Radio Buttons should have been Check boxes. How do change the Radio buttons to check boxes. There are a lot of them and I don't wish to have to re-key them in.
    Suggestions?

    Well when I click on the box it shows a Check mark in the box. That exactly what I need because in the instructions it requires a Check mark in each of the check boxes. Normally the Med form is sent as a paper copy from DMV every two years.
    Also another Tip. A PDF that has XML Content. (PC Acrobat Version).
    If you want a usable PDF on Mac and get rid of the XML do the following:
    Open the XML Based PDF on Mac Acrobat 9.X .
    Now choose export and save as Postscript File (.ps).
    Now locate and drop on Distiller 9.X.
    When PDF created will be a Pristine exact replica of the XML file except Mac Acrobat can edit and create forms with it.

  • Forms - Radio Buttons as check boxes which turn into circles - Need them to stay as check boxes.

    Hi
    I am working on some forms for Teachers Reports it is a generic document for student reports. I have set the document in Indesign 6 and edited the pdf form in Acrobat Pro.
    The form consists of Radio Buttons (Check Boxes) as they have to score the child between 1-4 and the teacher is only allowed to select 1 box from out of the 4 boxes (hence radio buttons) .
    The problem we are having is that there might be 2-3 teachers that have to write and score each child's in a certain section of the report and they might use a PC or MAC to do this.
    For some reason, some of the reports have changed the Radio Button "Check Boxes" to a "Circle" both in the PDF and when printing and they need it to be a Check box. (In indesign this was set to Check Box and to print as a Check box)
    Some how after the teachers have used different computers the check boxes have changed to circles and we need to change them back to check boxes but is there a way to change them without having to go "Forms" > "Edit" > "Select all circles" > "Properties" > "Options" > "Button Styles" > "Change to Check".
    But it is not changing to all of the reports on some.
    Is there an easier option can select properties and search the "circles" and change to "check boxes" for the whole document?
    I really don't want to have to go into each report and have to change each individually or export and import the data in the forms and the teachers dont want to have to rewrite each report.
    Someone please help!

    Are all of the teachers using Adobe Reader (or Acrobat), as opposed to something like Preview on tha Mac or Microsoft Reader on Windows? Preview is known to corrupts PDF form in a number of ways, including converting radio buttons to check boxes. Microsoft Reader causes other types of corruption. Also, if you create the fields in InDesign, it uses non-standard appearances for the various states and even Reader/Acrobat doesn't always set them in the way you might expect, so it's best to create them in Acrobat.
    Your description is a bit confusing since you're calling them radio buttons and check boxes at the same time. Can you clarify what the original field type is?
    It is possible to set the various field appearance properties with a script, which could loop through all of the fields and make the needed changes, but without more information about what's causing the changes and exactly what the changes are, it's hard to suggest anything specific.

  • Option ( Radio button  or check box)  on selection - screen , to go to CNR2

    <b>Subject - Option ( Radio button  or check box)  on selection - screen  , to go to Tcode CNR2</b>
    Hi all,
          I have developed  a report   , which  has  a  selection screen  with  one select-option ,  where i enter employee number     and  two radio buttons   ,  one is for all workcentres  and  other one   for active workcentre.   so when i enter  employee number  and  choose  either of the radio button  i wil get the  output  properly.  the output   displays ,  employee no,  employee name ,  work centre  and project  of that employee .   an employee may have  many workcentres   and   a corresponding project  for that work centre.
    Now the  Problem is  ,  from the same   report  i need to add  a option  on the selection -screen ,  ( plz  tell me whether to use  radio button  or check box   and if it is radio button    should  i  use it seperately  or  group it  in the above two buttons.) .
    so that when user selects  the  option   , the control should  go to  transaction code CNR2,  from where  i  can enter workcentre  and   in the next screen i have  HR assigntment tab , after choosing that it will dsplay persons   linked to the workcentre  and there is a delete icon  , from where i can delete the person.
    The only thing is  now to move / Navigate to the screen   or  go to transaction code CNR2   from  the report  or  from the selection screen.
    Your valuable Inputs are awaited, PLz  do lemme know 
    Thanks  in advance ,
    regards,
    Shuja

    Shuja,
    A radio button nor a checkbox should be used for navigation.  I would suggest a COMMAND BUTTON. 
    Something like this:
    Report ZZZZZZ.
    TABLES: sscrfields.
    SELECTION-SCREEN BEGIN OF BLOCK ONE WITH FRAME TITLE TEXT-001.
    selection-screen: PUSHBUTTON /10(20) but1 USER-COMMAND cli1.
    SELECTION-SCREEN END OF BLOCK ONE.
    initialization.
      but1 = 'Button Text Goes Here'.
    AT SELECTION-SCREEN.
      CASE sscrfields.
        WHEN 'CLI1'.
          call transaction 'CNR2'.
    start-of-selection.
    Your code here

  • Captivate 8, knowledge check radio buttons and check boxes not diplaying correctly in HTML5

    Hello. I am working in Cp 8 on a pc (Win 7, 64-bit) and publishing in HTML5, SCORM 2004, 3rd ed. My issue is with knowledge checks. In preview they look fine, but when published, the radio buttons and check boxes are oversized and do not appear as they should. Additionally, the rollover highlight that covers the distracters is skewed and does not cover all the text in cases of long answer choices. When published as a SWF, there are no issues but project requirements are for HTML5 output only. Help?

    Create an XML Schema (XSD) and define that as the default form schema. The form data will conforms to the order of fields defined in the XML schema.
    Hope that helps.
    Nith

  • How do I get a radio button acting/check box looking "yes,no" set of checkboxes in InDesign CS6?

    I'm able to do radio buttons OR check boxes, but not the desired "pick only one" yes/no checkbox. Have found lots of general info but not this specific answer. Thanks for any help.

    If I'm understanding your question correctly, you want the FUNCTION of radio buttons (choose only one) with the APPEARANCE of checkboxes (choose all that apply).
    If this is the case you have two options:
    • Create the buttons in ID as radio buttons and edit their button state appearances as appropriate, OR
    • Just create the labels in ID and make the buttons in Acrobat, where there are 6 visual options for radio buttons.

  • Step by step process to add Radio Buttons and Check boxes in a view

    Hi,
    Could somone give me the steo by step process for adding the Radio Buttons and Check boxes in a view.
    Regards
    Hrudaya Raju

    https://www.sdn.sap.com/irj/sdn/articles-topic?rid=/webcontent/uuid/7082f9fc-070d-2a10-88a2-a82b12cea93c
    https://www.sdn.sap.com/irj/sdn/webdynpro-elearning
    https://help.sap.com/javadocs/NW04S/current/wd/index.html
    https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDCheckBox.html
    https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDCheckBoxGroup.html
    https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDRadioButtonGroupByIndex.html
    https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDRadioButtonGroupByKey.html
    Armin

  • Radio Button or Check Box Group

    Hi,
    I built a form based on a query. There is a flag column, only one of queried records is allowed to be "Y" in this column. The rests must be null.
    Most ideal thing is to have a radio button group, only one of them can be selected.
    Another way is to have a group of check boxes also allow only one checked. Once another check box is selected, the previously selected box must be unchecked.
    Does anybody have idea of how to do it?
    Thanks,
    null

    You have the save the number of the current ("checked") record in your data block.
    After that you can launch a trigger which will scan every record in your data block (there are enough built-ins like FIRST_RECORD, LAST_RECORD, NEXT_RECORD, Current_record property, etc.)to allow you to do this. The trigger will set the check item property to "unchecked" if it is not the saved "checked" record.
    Joseph
    null

  • Radio Button and Check Box

    I am looking for a way to implement a column domain as a radio button (e.g. Yes or No). So far I have only seen JHeadstart generate a list box. I cannot find any reference to radio buttons in the User Guide. Is it possible to generate a radio button?

    Jan,
    I looked into this post-gen action, but am not able to insert a radio group and buttons.
    In a simple emp-dept application I am trying to create radio buttons in empTablePage.uix for the extra emp_class column I added to the emp table. The UIX components palette only gives me the option to insert a radio set. I can only get the option for radio group when I change the application structure to JSP.
    BTW: Jdev 9.0.5.2

  • How do I change the text in a field with radio buttons or check box?

    Hi All:
    I have a form that has a list of things with check boxes (could be done with radio buttons) at the bottom. The client wants a single field at the top of the form that repeats the text next to the checkboxes. For example if a user checks the box next to the words "You did thing 1 wrong" the client wants "You did thing 1 wrong" to appear in this text box at the top of the form. If the user checks the box next to the words "You did thing 2 wrong" the client wants the words "You did thing 2 wrong" to appear in the magic box at the top of the page. There are 10 different check box options, so the box at the top would need to be able to have 10 different things in it.
    Client is not interested in a drop down menu. I asked.
    I am in a bit over my head here, so my question is twofold.
    1. Can you do this in Acrobat Pro 10 on a Mac?
    2. Can you supply me with code?
    Thanks in Advance,
    Amy W.

    Create a text field and make this script its custom calculation script :
         var a ="";
         if (this.getField("Check1").value == "Yes"){
         a="You did thing 1 wrong";
         event.value = a;
    Also, replace "Check1" with the name of your check box or radio button, and give it an export value of "Yes".

  • If radio button is checked then check box will be selected withoutexecuting

    hi,
    i have one doubt,
    is it possible if i select a radio button i want to check the check box at the same time and vice versa with out executing (f8) .
                       plz provide the solution,
                           thanks, in advance.

    REPORT  ZTEST_CHECK                             .
    parameters: r1 radiobutton group g1 default 'X' user-command ABC,
                r2 radiobutton group g1,
                p_check as checkbox.
    at selection-screen output.
    if r1 = 'X'.
    p_check = 'X'.
    endif.
    if r2 = 'X'.
    p_check = ' '.
    endif.
    Check this code,,
    Regards
    vijay

  • Creation of radio buttons and check boxes

    Hi
    This  is ravi
    Please help me to write the following program-
    &#9632;        Design a selection screen having 5 check boxes and five radio-buttons
    &#9632;        Each check box and radio button be given a number starting with one to five
    &#9632;        Depending on which checkbox and radio button is selected output that number
    For example if I have selected check box one and radio button two then the output should be-
    check box number 1
    radio button number 2

    Hi,
    Check the following code:
    SELECTION-SCREEN: BEGIN OF BLOCK BLK WITH FRAME TITLE TEXT-001.
    parameters: chk1 as checkbox,
                chk2 as checkbox,
                chk3 as checkbox,
                chk4 as checkbox,
                chk5 as checkbox,
                rad1 radiobutton group grp1,
                rad2 radiobutton group grp1,
                rad3 radiobutton group grp1,
                rad4 radiobutton group grp1,
                rad5 radiobutton group grp1.
    selection-screen: end of block blk.
    start-of-selection.
    if chk1 = 'X'.
      write:/ 'You selected first checkbox'.
    elseif chk2 = 'X'.
      write:/ 'You selected second checkbox'.
    elseif chk3 = 'X'.
      write:/ 'You selected third checkbox'.
    elseif chk4 = 'X'.
      write:/ 'You selected fourth checkbox'.
    elseif chk5 = 'X'.
      write:/ 'You selected fifth checkbox'.
    endif.
    if rad1 = 'X'.
      write:/ 'You selected first radiobutton'.
    elseif rad2 = 'X'.
      write:/ 'You selected second radiobutton'.
    elseif rad3 = 'X'.
      write:/ 'You selected third radiobutton'.
    elseif rad4 = 'X'.
      write:/ 'You selected fourth radiobutton'.
    elseif rad5 = 'X'.
      write:/ 'You selected fifth radiobutton'.
    endif.
    Regards,
    Bhaskar

  • How to enable/disable an image button when one radio button is checked?

    The checked radio needs to equated with some value , if it returns true, then the Image button for submit should be disabled.otherwise, it needs to be disabled always.please help me to pass th' this requirement.
    Thanks in Advance

    look for a function like setActive or setDisable

  • Radio button getting unchecked when form in query mode

    There are 4 radio buttons on my form.Initially when the form is opened one radio button is checked.But when the form is in query mode that radio button got unchecked.Is there any way that the initial checked radio button remains checked even the form is in query mode ?
    Message was edited by:
    user496853

    Hi,
    Solutions given by Kevin and Zaibiman is not applicable for my form as the radio button will be in data base block only.This is the requirement of the form.
    The other solution given by Zaibiman was to set the radio button item when entered in query mode , i have tried that but that is also not working.
    Pranati,the solution given by you i have also tried that ,but that has not solved the issue,Radio button get unchecked when eneterd in query mode.
    Please elaborate and suggest.
    Thanks,
    Kirti

  • Radio buttons (from Indesign) get larger and overlap when fields are highlighted in Acrobat X

    I have created my first set of interactive forms using Indesign CS6 Buttons and Forms dialog box. As the formatting of the fields does not seem to carry over, I have left the text boxes as Indesign objects and added text fields over the top of them in Acrobat X. I also intended to add drop down menus in Acrobat instead because I didn't like how the Indesign list box behaved in Acrobat (having to click through each item rather than dropping down the entire list). There does not seem to be a way to add a drop down menu item from within Indesign. (Or if there is, can someone please point it out? :-) )
    However I used the sample buttons supplied within Indesign to create radio buttons and check boxes (which automatically included the graphics for the different states). On my first test export to Acrobat it appeared that the buttons retained their formatting, but something rather strange is happening when the fields are highlighted, whereby the buttons enlarge and overlap each other. Very frustrating I must say! I have just about gone nuts trying to find a solution. I've tried several different button options from the sample set; I've created them from scratch within Indesign; I've attempted to resize the fields in Acrobat form editing mode, but this screws up the original buttons. I also have found that once selected in Acrobat, I cannot deselect them again. (Don't know if this is significant info but it may point to some kind of stacking problem??)
    Anyway, to make it clearer here are some screen captures:
    1. Form as it looks when opened in Acrobat X. The two different check box styles are from me experimenting in trying to fix this issue. But they all seem to behave the same way once highlighted.                                                               
    2. Form when interactive fields are highlighted. The text fields are perfect but note the big ugly overlapping circles... :-(
    And some further explanation of how I created the buttons and their issues:
    I would very much appreciate some guidance on what I'm doing wrong here, as my poor little head is going to explode very shortly (and my client is getting pretty annoyed at the delay!!)
    Thank you in advance :-)

    I am having the exact same problem. I can't find a way around it. It seems that they included some states like normal, rollover, and click—but they didn't include a highlighted state. So when highlight fields is on it just shows the generic standard check box, which looks ridiculous if you have customized it at all in inDesign. I read a lot of people saying they can't find a way to change the highlight state—anyone out there have any answers?

Maybe you are looking for