Help With Radio Buttons -- URGENT!!

Hi i am new to using UI compents in flash.
Basically i havnt a clue where to start.
Just some simple action script will help and be much
appreciated if someone can give me it.
Basically i have a question to ask which requires radio
buttons to answer the question.
I have a question and the answers are A, B, C, D.
I want:
A to equal 1
B to equal 2
C to equal 3
D to equal 4
E to equal 5
Would someone be able to tell me how to set up the radio
button so that the value of the radio button is stored into an
array called SCORE.
i dont need a tutor for arrays, i can do them, i just need
help with the radio buttons so a reference to an array would be
enough, eg how to store the answer from the radio button in an
array.
Thank you

Place the radio buttons on the stage and set their parameters
to what you need. Make sure that for each group of radio buttons
you give them the same group name. Then you could use something
like this:
var listenerObject:Object = new Object();
var answerArr:Array = new Array();
listenerObject.click = function(eventObj:Object) {
answerArr.push(eventObj.target.selectedData);
trace(answerArr);
radioGroup.addEventListener("click", listenerObject);
radioGroup refers to the group name for the buttons.
eventObj.target will refer to the actual radio button
clicked.
Tim

Similar Messages

  • Popup window with radio button-urgent

    Hi..
    Is ther any functionmodule for dispalying a popup window with radio button ....

    Use This
    K_KKB_POPUP_RADIO2
    I_TITLE   ...                      This is the title                       
    I_TEXT1   ...                      first radio button                      
    I_TEXT2    ...                     second radio button                     
    I_DEFAULT     ...                  default                     
    reward if useful
    Amit Singla

  • Help with Radio Buttons in Form

    Hi. I have inherited a website that has a simple form. I have
    been asked to edit the form adding 4 radio buttons to collect the
    consumer's satisfaction with the content of the website. I have
    added the radio buttons using Dreamweaver MX, however, they do not
    work as I expected them to. I was under the impression that radio
    buttons did not allow the user to select more than one option
    because when the user selected a different option, the first option
    was unselected. My form is currently allowing all four options to
    be selected at the same time. The code for the form is below. I
    have changed the @ in the email address of the form to prevent
    possible spam. Any help would be greatly appreciated.

    It looks like you need to change the name= to the same on
    each radio button, if they all have the same name then you can only
    check one. Then click the form in the behaviors panel and be sure
    the radio button name is inserting into the proper db
    column.

  • Help with radio buttons

    Hi, I am new to forms and and want to create several radio button fields each with two choices, I want the field to be required so that the recipient has to choose either choice 1 or choice 2.
    Problem I am having is that when I set the field to required it sets both choices to required and when testing the form I cannot submit it because one or more required fields are incomplete. Is there a work around or should I be using another type of check box?

    Thank you for your prompt response - I have no experience or knowledge about writing script although from what you wrote this would seem to be the remedy to my problem. For the time being I will have to uncheck the required field option and rely on the recipients completing the form correctly.
    Hopefully over a period of time I will learn how to write the appropriate script.
    Thanks for your help and advice

  • Help with Radio Buttons & Combo Box for Flash Form that sends email

    I'm having a bit of a hard time with a Flash form that I'm working on.
    I've got the basic text fields working fine, but I'm not sure how to retrieve the values from the Radio Button and Menu List components.
    The PHP script pulls the values from the text fields with:
    $contact_name = $_POST['name'];
    $contact_email = $_POST['email'];
    $contact_subject = $_POST['subject'];
    but using
    $radioGroup = $_POST['radioGroup'];
    doesn't retrieve the selected radio button value.
    The radio buttons have a groupName of "radioGroup". The combo box component doesn't even show up in the HTML version, but does in the .swf.
    Can anyone point me in the correct direction to pull these values from these components and get them passed to the PHP form? The native .FLA and the php file are here for reference:
    http://dl.getdropbox.com/u/21984/flashform.zip
    My solution needs to be ActionScript 2.
    Thanks!

    again, you assign a variable.  the selected radiobutton's data and/or label isn't going to magically be sent to the php file.
    for example, if you have sendLV and receiveLV loadvars instances, you can use:
    sendLV.rbData=yourradiogroup.selection.data;
    sendLV.yourothervariables=yourothervariables;
    sendLV.sendAndLoad("yourphp.php",receiveLV,"POST");

  • Help with radio buttons and show/hide javascript

    Hi. I'm new working with LiveCycle and also pretty much at a basic/beginner level of javascripting. I'm creating a pdf fillable form and one of the tasks I've been given is to add a function where if Option A is chosen by the user, then the correspondng table will appear, and if Option B is chosen another table will appear. After some searching I Iearned more about how radio buttons can be used, so I created a set of radio buttons. I have tried several different things, the latest was making both tables "hidden", and then taking to the radio button list group and applying the show/hide script to each of the radio buttons in the group. Still nothing seems to be working as I want it to. The table remains hidden when I click on the . This is what the code looks like right now. I know I'm obviously doing something wrong, this seems like such a basic thing to code. Getting to the frustration point, if you can sort me out with what I am missing/overlooking please let me know. Many thanks!
    Note. The radio buttons are not in the same table, they are higher up in the form outside of the tables that I am trying to show/hide, but they are in the same subform. I don't know if that might be an issue?
    form1.#subform[0].RadioButtonList::click - (JavaScript, client)
    form1.#subform[0].RadioButtonList.#field[0]::click - (JavaScript, client)
       if ( RadioButtonList.#field[0].selectedIndex == 1)
         form1.#subform[0].Table1_Work.presence = "visible"
       else
       form1.#subform[0].Table1_Work.presence = "hidden"
    form1.#subform[0].RadioButtonList.#field[1]::click - (JavaScript, client)
       if ( RadioButtonList.#field[1].selectedIndex == 2)
        form1.#subform[0].Table1_Official.presence = "visible"
      else
         form1.#subform[0].Table1_Official.presence = "hidden"

    Hi,
    For starters you have unnamed pages, which is not a good idea. This makes it more difficult to reference objects. In your JavaScript you would have to resolve the node, however the simpliest route would be to name the page first. Something like "page1". Have a look at this example for referencing objects: http://assure.ly/kUP02y.
    Next I would not place the script in each of the radio buttons, as this is likely to cause conflicts and is doubling the script. The best place to put the script is in the click event of the radio button exclusion group. This contains all of the radio buttons. See an example here: http://assure.ly/h7whb8 and https://acrobat.com/#d=ALebgueDXjewHjGyYRdrmw.
    You syntax for JavaScript if/else statements is potentially incorrect. The script within the statements should be wrapped in curly brackets. While you can get away with it for single lines, I would not be inclined to take that approach. So:
    if (a test) {
         // do something
    else {
         // do something else
    With the radio button exclusion group you can use its rawValue, just specify it in the Object > Binding palette. So on the basis of chaning the page name:
    if (this.rawValue == "1") {
         page1.Table1_Work.presence = "visible";
    else {
         page1.Table1_Work.presence = "hidden";
    There is a syntax checker button in the Script Editor that should highlight errors.
    Niall

  • Help with radio buttons in jsp

    I have a form with 6 radio button sets with each set containing three radio buttons. User can select different combination of the radio buttons.. Once the user is finshed selecting the radio buttons I need to pass a message to back end on the selection criteria. The format of the message is to put the same kind of radio buttons in together so say ....
    I have radio buttons like this ...
    N/A Verify NotVerify
    rb rb rb (set 1)
    rb rb rb (set 2)
    rb rb rb (set 3)
    rb rb rb (set 4)
    rb rb rb (set 5)
    rb rb rb (set 6)
    Not if they click verify for 1 and 3 sets and NotVerify for 2,4,6 and N/A for 5 then the String I need to pass to the back end should look like this.....
    ;set2, set4; set6 (set1, set3) i.e group together I type of selection ....
    any ideas how can I do it I will greatly appreciate it.
    Sorry I post it on the wrong message board before
    Thanks

    Okay, let's say you had this HTML code
    <tr>
    <td><radio name="set1" value="na">N/Z</td>
    <td><radio name="set1" value="verify">Verify</td>
    <td><radio name="set1" value="notverify">Not Verify</td>
    </tr>
    <tr>
    <td><radio name="set2" value="na">N/Z</td>
    <td><radio name="set2" value="verify">Verify</td>
    <td><radio name="set2" value="notverify">Not Verify</td>
    </tr>
    ... and so on.
    Why not create 3 vectors, one for each case, and add the necessary string to the vector (or whatever object you need in the backend).
    You could get use request.getParameterNames to get the names of all the sets, loop through that getting the values, and then check to see which it is and add to the vector. I would, thinking about it, use ints instead of strings as the value of the buttons, so you could actually use a switch statement to determine which vector add to. Not saying by any means this is the most effective way, but just one off the top of my head that might lead you in the right direction.

  • Problem with radio Button(urgent)

    hai friends
    (sub:- deselecting radio buttons(2 radio buttons) at a time. ie. no one is selected at any point of time. whenever he/she cliks it is going to select.)
    In my form, i have 2 radio buttons. if i click one radio button it opens one canvas and enter some data and when i press OK button there, it will come back to original canvas.at this movement selected radio button should be deselected.
    If i click 2nd radio button it also opens another canvas and enter some data and when i press OK button there, it will come back to its original canvas.at this movement selected radio button should be deselected.
    when come back to its original canvas, is there any chance of deselecting both radio buttons at a time. ie. at any point of time customer may select any one. no one is default . i need that methodology. it is possible? if so, give me code for it.
    regards
    madhava

    Hi,
    you can use a third radio button and set it to be invisible. Whenever you want your two visible buttons to be deselected simply set the value to your third button value.
    Achim

  • Help with Emoticon buttons, Urgent!!!

    Hi,
    I'm writing a Chat Application and I want to add Emoticon, I did so by adding buttons but I don't know how to send the gif to my JTextField and to my JTextArea.
    Here is part of my code can someone can help me PLEASE!!!
    JPanel chatPane = new JPanel(new BorderLayout());
         JPanel emoticon = new JPanel(new GridLayout(2, 5));
    b1 = new JButton (sourrire);
    b1.setToolTipText("Un Sourire");
    // b1.addActionListener();
    emoticon.add(b1);
    b2 = new JButton (gsourrire);
    b2.setToolTipText("Un Grand Sourire");
    // b2.addActionListener();
    emoticon.add(b2);
    b3 = new JButton (triste);
    b3.setToolTipText("Triste");
    // b3.addActionListener();
    emoticon.add(b3);
    b4 = new JButton (grimace);
    b4.setToolTipText("Grimace");
    // b4.addActionListener();
    emoticon.add(b4);
    b5 = new JButton (pleure);
    b5.setToolTipText("Pleure");
    // b5.addActionListener();
    emoticon.add(b5);
    b6 = new JButton (bec);
    b6.setToolTipText("Un bec");
    // b6.addActionListener();
    emoticon.add(b6);
    b7 = new JButton (coeur);
    b7.setToolTipText("Un coeur pour toi");
    // b7.addActionListener();
    emoticon.add(b7);
    b8 = new JButton (fache);
    b8.setToolTipText("Fache");
         // b8.addActionListener();
         emoticon.add(b8);
    b9 = new JButton (lunettes);
    b9.setToolTipText("Je suis Cool");
    // b9.addActionListener();
    emoticon.add(b9);
    b10 = new JButton (clinoeil);
    b10.setToolTipText("Clin d'Oeil");
    //b10.addActionListener(new ActionAdapter2());
    emoticon.add(b10);
    Thanks a lot!
    Isabelle

    youe can't do it on a textfield. Play with this;-import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.Color;
    public class MultiColouredText extends JFrame {
       public MultiColouredText() {
       StyledDocument doc = new DefaultStyledDocument();
       JTextPane pane = new JTextPane(doc);
       pane.setEditable(false);
       pane.setFont(new java.awt.Font("Verdana", 0 , 16));
       MutableAttributeSet mas = new SimpleAttributeSet();
          try {
             StyleConstants.setForeground(mas, Color.yellow);
             StyleConstants.setBackground(mas, Color.blue);
             doc.insertString(doc.getLength(), " Hello ", mas);
             StyleConstants.setForeground(mas, Color.blue);
             StyleConstants.setBackground(mas, Color.yellow);
             doc.insertString(doc.getLength(), " World ", mas);
             StyleConstants.setForeground(mas, Color.red);
             StyleConstants.setBackground(mas, Color.green);
             doc.insertString(doc.getLength(), " And ", mas);
             StyleConstants.setForeground(mas, Color.green);
             StyleConstants.setBackground(mas, Color.red);
             doc.insertString(doc.getLength(), " Farewell", mas);
          catch (Exception ignore) {}
       getContentPane().add(pane);
       setSize(245,56);
       show();
       public static void main(String[] args) {
          new MultiColouredText();
    }

  • How do I move a table with radio buttons to another page?

    I created a document in Word, converted to PDF, added a page (which was created in Adobe Forms Central, only way to get a table with radio buttons - see below for example).
    The issue I have is whilst using the Trial of Adobe XI Pro I was able to move this table up a page and place it under the header.  Now that the trial has run out I cannot complete this task with other documents.
    I started to edit using LiveCycle but it won't let me move the table.
    We have Acrobat X Pro but when I go to edit, it directs me to edit in LiveCycle.  I have tried moving the table using all of these programs.  Can anyone help/guide please? 

    Thank you for your reply.  I am new to editing a pdf and using these programs. I have subscribed to Acrobat XI Pro.  When I try to edit the document it directs me to LiveCycle.  I cannot move the table in LiveCycle.  It won't let me, and I cannot make changes in XI Pro as I did in the trial as it directs me to edit in LiveCycle.  Am going in circles.

  • NEED HELP IN RADIO BUTTON QUERY

    Hi, Friends
    I like to query to extract data from my table with the help of radio button but I am not able to think what I should write to query. Plz help.
    The radio button select jsp page code is-
    <form action="queryservice.jsp" method="post">
    <h3><strong>Services Available</strong></h3>
      <p>
        <label>
          <input type="radio" name="service" value="si"  />
          Institutions</label>
        <br />
        <label>
          <input type="radio" name="service" value="sc" />
          Corporate_Offices</label>
        <br />
        <label>
          <input type="radio" name="service" value="sr" />
          Restaurent_Cafe</label>
        <br />
        <label>
          <input type="radio" name="service" value="sb" />
          Bus_Stop</label>
        <br />
        <label>
          <input type="radio" name="service" value="sa" />
          Apartment</label>
        <br />
        <label>
          <input type="radio" name="service" value="sh" />
          Hotels</label>
        <br />
      </p>
      <label>
        <input type="submit" value="Submit" />
      </label>
    </form>And queryservice.jsp page is
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
    <sql:query var="xyz" scope="request">
       <% String var = request.getParameter("service"); %>
             if(var.equals("si")){ SELECT si FROM serviceTable}
          else if(var.equals("sc")){ SELECT sc FROM serviceTable}
          else if(var.equals("sr")){ SELECT sr FROM serviceTable}
          else if(var.equals("sb")){ SELECT sb FROM serviceTable}
          else if(var.equals("sa")){ SELECT sa FROM serviceTable}
          else if(var.equals("sh")){ SELECT sh FROM serviceTable}
    </sql:query>Please correct it.
    Thanking you

    Error Report-
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException:
           if(var.equals("si")){ SELECT si FROM serviceTable }
          else if(var.equals("sc")){ SELECT sc FROM serviceTable}
          else if(var.equals("sr")){ SELECT sr FROM serviceTable}
          else if(var.equals("sb")){ SELECT sb FROM serviceTable}
          else if(var.equals("sa")){ SELECT sa FROM serviceTable}
          else if(var.equals("sh")){ SELECT sh FROM serviceTable}
    : Non supported SQL92 token at position: 57: SELECT
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    javax.servlet.ServletException: javax.servlet.jsp.JspException:
           note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.
    Apache Tomcat/6.0.14

  • Dynamic table with radio buttons

    I need to load a dynamic table with radio buttons that allow
    the user to select an item in the table. I need to have it add a
    radio button with a unique identifier for each table item.
    For example: the table will load all of the seminars
    locations available in a certain state, the radio button will allow
    the user to select the city in which they would like to attend and
    that value will get passed to the registration page. The value of
    each radio button would be equal to the location_id in the database
    for each of the locations in the table (The table includes the
    date, day, venue, address, hotel info, etc. details for each city.)
    When I add dynamic radio buttons and set the value to the
    location_id in the database, it allows the user to select multiple
    radio buttons. I cannot find any information on how to
    resolve.....??
    Any help is appreciated.

    beanieboo wrote:
    > I need to load a dynamic table with radio buttons that
    allow the user to select
    > an item in the table. I need to have it add a radio
    button with a unique
    > identifier for each table item.
    >
    > For example: the table will load all of the seminars
    locations available in a
    > certain state, the radio button will allow the user to
    select the city in which
    > they would like to attend and that value will get passed
    to the registration
    > page. The value of each radio button would be equal to
    the location_id in the
    > database for each of the locations in the table (The
    table includes the date,
    > day, venue, address, hotel info, etc. details for each
    city.)
    >
    > When I add dynamic radio buttons and set the value to
    the location_id in the
    > database, it allows the user to select multiple radio
    buttons. I cannot find
    > any information on how to resolve.....??
    > Any help is appreciated.
    Give each radio button the same name
    <input type="radio" name=theLocation" value="<?php
    $recordset['location_id'] ?>">
    Mick

  • 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".

  • Need help with a button

    Hello,
    I need help with a button. I created a button and set it up
    so that when you click and hold it, the button becomes lighter in
    color (I used Alpha). I want the button to stay this light color
    after i release the click. Right now it goes back to the normal
    color when I release the click. Can somone help we this?
    Thanks!

    rpofclt wrote:
    > Hello,
    >
    > I need help with a button. I created a button and set it
    up so that when you
    > click and hold it, the button becomes lighter in color
    (I used Alpha). I want
    > the button to stay this light color after i release the
    click. Right now it
    > goes back to the normal color when I release the click.
    Can somone help we
    > this?
    you can't use the button itself if you want to maintain the
    DOWN state after
    release as button automatically resets itself once the mouse
    lives the HIT zone.
    Use movie clip instead and on press simply send it to a frame
    where there
    is DOWN state like image.
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Want to create F1 Help for radio button in my report

    Hi All,
          I want to create F1 Help for radio button in my report program. Which function module should i call in <b>at selection screen on help-request</b>
          Also do I need to define the texts somewhere or I can pass it directly to the function module.

    Try DYN_FIELD_F1_HELP,
    ~Suresh
    that is only for Dic fields..
    Pl take alook at this<a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/79/34a243d9b511d1950e0000e8353423/frameset.htm">SAP Help</a>
    ~Suresh
    Message was edited by: Suresh Datti

Maybe you are looking for

  • Cannot deploy with NWDS 2004s SP9

    Hi all, I just recently upgraded to NWDS 2004s SP9 from 2004 SP14. Each time I attempt to deploy and run a WebDynpro project (one of my older projects), I get the following error: <b>Application error occurred during request processing:</b> <b>Detail

  • Rman Backupset size is exceeding the database size

    Hi my rman backup size is exceeding the database backup size and occupying the full mountpoint. and finally due to space issue, backup is failing. Below is the RMAN script run { backup incremental level 0 tag ASCPLVL0 database plus archivelog ; delet

  • Extending Employee End Date...urgent!!

    Hello I saw that there is APPS.HR_PERSON_API.This has update_person and update_us_person procedures for extending the end_date of an employee. May I know which one is the correct one to use please advice thanks Edited by: user8612301 on Dec 28, 2011

  • Updates disappear after restart

    After updating Premiere CC to Premier CC 2014 through Creative Cloud I spent a whole day editing various projects and saving them in the updated version. Today I get back to opening Premiere and it seems to have reverted back to the old version and I

  • Wireless AP

    I am getting following logs on one of my controllers.  IDS Signature attack cleared. Signature Type: Standard, Name: Auth flood, Description: Authentication Request flood, Track: per-Mac, Detecting AP Name: BE-KO-A-AP103, Radio Type: 802.11b/g, Prece