Radio Button Rather then DropDown

Hello,
I have a column with Boolean value, I know there is a way to display column in DropDown/EditBox/Multiselect. Is it posible to display Radio Button rather than Drop Down and it should work the same way as DropDown.
- Rahul

Hey Rahul,
Throw the following script in a text box on your dashboard page and enable html. It'll turn any dropdown box into radio buttons.
Cheers!
-Joe
<script type="text/javascript">
var create_radios = function (debug){
     if (debug === 1) { document.write("Begining Create_radios function"+"<BR>");}
     // Get an array of all the tables
     var tables = document.getElementsByTagName('table');
     if (debug === 1) { document.write("Get tables"+"<BR>");}
     // loop over the array
     if (debug === 1) { document.write("Loop over tables"+"<BR>");}
     for (var t = 0; t < tables.length; t++){
          // Check to see if we encountered a DB Prompt
          if ( tables\[t\].className != 'DashboardPromptViewTable'){
               if (debug === 1) { document.write("Object is not a prompt.  Continue to next table."+"<BR>");}
               continue; // This table isn't a DB Prompt. Continue to the next one
          // Get an array of all the table select
          var selects = tables\[t\].getElementsByTagName('select');
          if (debug === 1) { document.write("Get selects"+"<BR>");}
          // Check to see if there are any drop downs
          if ( selects.length == undefined || selects.length == 0){
               if (debug === 1) { document.write("No selects found.  Continue to next record."+"<BR>");}
               continue; // This DB Prompt doesn't have any select statements
          if (debug === 1) { document.write("Loop over the selects"+"<BR>");}          
          // Loop over the select elements to copy the values
          for (var s =0; s < selects.length; s++){
               // Create a new form element
               var new_form = document.createElement('form');
               if (debug === 1) { document.write("Created the new form object"+"<BR>");}
               // Get all the options associated with the drop down
               var options = selects\[s\].getElementsByTagName('option');
               if (debug === 1) { document.write("Created the options array"+"<BR>");}
               // Copy over form related details
               new_form.name = selects\[s\].name+"_radio";
               new_form.id = selects\[s\].id+"_radio";
               if (debug === 1) { document.write("Copy over the name and id attributes"+"<BR>");}
               if (debug === 1) { document.write("Loop over the options."+"<BR>");}
               for (var o=0; o<options.length; o++) {
                    // Create the input object
                    var new_input = document.createElement('input');
                    if (debug === 1) { document.write("Create a new input element"+"<BR>");}
                    // Update the type to radio
                    new_input.type = 'radio';
                    if (debug === 1) { document.write("Set the type to radio."+"<BR>");}
                    // Get the value from the exisitng dropdown
                    new_input.value = options\[o\].value;
                    if (debug === 1) { document.write("Copy the value over"+"<BR>");}
                    // Set the name
                    new_input.name = selects\[s\].name+"_radio";
                    if (debug === 1) { document.write("Set the name"+"<BR>");}
                    // Set the onclick value
                    //new_input.onClick = updateDropdown(selects\[s\].id,options\[o\].value);
                    new_input.onclick = function () {
                    // get a handle to the appropriate object
                         var sel = document.getElementById(this.name.substr(0,this.name.length-6));
                         // Check if no result is found
                         if ( sel == null){
                              // No match was found
                              alert("No match on : "+this.name.substr(0,this.name.length-6));
                              return;
                         // Get the options
                         var opts = sel.getElementsByTagName('option');
                         // Loop over all the options
                         for( var opt = 0; opt < opts.length; opt++){
                              // Check if we've found the requested value
                              if( opts\[opt\].value == this.value){
                                   // We found the requested value. Set the selectedindex
                                   sel.selectedIndex = opt;
                    if (debug === 1) { document.write("Set the onClick value: updateDropdown("+selects\[s\].id+","+options\[o\].value+")<BR>");}
                    // Get the innerHTML from the existing data
                    var new_text = document.createTextNode(options\[o\].innerHTML);
                    if (debug === 1) { document.write("Set the new text object to the innerHTML"+"<BR>");}
                    // Append this to as a child to the form
                    new_form.appendChild(new_input);          
                    if (debug === 1) { document.write("Append the input element to the form"+"<BR>");}
                    // Append text as a child node to the new input object
                    new_form.appendChild(new_text);
                    if (debug === 1) { document.write("Append the text element to the form"+"<BR>");}
               } // end options for loop
               // insert the new form before the select object
               selects\[s\].parentNode.insertBefore(new_form,selects\[s\]);
               if (debug === 1) { document.write("Insert the new form into the document"+"<BR>");}
               // hide existing select statement
               selects\[s\].style.display="none";
          } // end selects for loop
     } // end table foor loop
     if (debug === 1) { document.write("Completed the create_radio function"+"<BR>");}
create_radios(0);
</script>

Similar Messages

  • JSF h:commandButton which renders as an html button rather then input

    I've been struggling to find a way to create a jsf command button that will render as a <button>. The reason I want to do this is so that I can include content inside my button, as the html <button> tag allows. Is there a way to do this, or is this in plan? I am currently using jsf 1.2.

    J-M_T-D wrote:
    To further clarify, I want a <button> tag, and NOT an <input> tag.I did this by creating a "custom component" which really was the existing HtmlCommandButton as the component and a new renderer which outputs the button tag. (I am using Facelets so no need for a JSP tag.)

  • Radio buttons with dropdowns?

    I'm creating a form for my company's HR department, and I need some radio buttons with dependent dropdowns.
    In other words, I'd like (for example) three radio buttons. No dropdowns appear until one of the buttons is selected, and then the appropriate dropdown appears. Is this possible? Or is there a better way to do this? I don't want the unselected dropdowns to be available.
    I have Pro 9 for Windows and Pro X for Mac. I know virtually nothing about scripting, but I know that it can be done.
    Thanks in advance for any help!
    Theresa

    Do I add this code to the group's action, or to individual radio button actions?
    To each individual radio-button.
    Do I make the dropdowns visible or hidden?
    Their visibility will be determined by the state of the radio-buttons. As default you can set them to be hidden, when no radio button is selected.
    Do I put any code in the dropdown properties, or just in the radio button properties?
    Just in the radio buttons.
    And when you say "embed this code at the doc-level," what does that mean?
    Go to Advanced - Document Processing - Document JavaScripts...
    Create a new script, remove the default text that appears in the window and paste the code I provided instead.

  • Please solve  Radio buttons (when selected) will then display on the report

    Each of these new Radio buttons (when selected) will then display on the report in the same locations, which is after the existing columns.
    Check boxes are by default checked.
    When the 1st radio button is selected then a new column will be displayed in the ALV output
    Next to A.
    Like wise when 2nd radio button selected then a new column will be displayed in the ALV output next to B.
    Like wise the ALV output is displayed.
    A   is a checkbox
    B  is a checkbox
    C   is a checkbox
    D   is a checkbox
    1   is a radio button                         
    2   is a radio button      
    3  is a radio button
    4   is a radio button

    while populating fieldcatalog itself u include these condition....
    if Pradiobutton = 'X'.
    *--populate field catalog for field u want in specified position....
    endif.
    similarly u proceed for other fields and other condition

  • DropDown with dymica radio button

    Hi frnds,
    I am facing a problem with dropdown and the radio button i,e
    radio buttons will generate dynamically based on the drop down.
    now when i select one drop down   i can find the dymica generation of the radio button like  suppose
    dropdown -
    here
    rad1    rad12     rad 13     with radio group rg1
    rad2    rad22     rad23      with radio group rg2.
    so on...
    so when i select the dropdown 1 and select rad1   and rad22
    and suppose i change the drop down and iam seeing those radio's already selected which i don't want to .. i want them to refresh
    bhavana

    You can do this easily using client-side scripting - such as JavaScript. A good place to start learning this is at [http://www.w3schools.com|http://www.w3schools.com]. Lots of tutorials and samples.
    Cheers
    Graham Robbo

  • Calling an action on Click of Radio Button

    Hi,
    We have a form in which we need to display two radio buttons and two dropdown lists. Depending on the selection of Radio Button the drop down list should change.
    To get the different data in the dropdown based on the selection of radio button, what would be the best method?

    a.If the data is fairly static and little, then you could get it all at once and use standard javascript (or a toolkit like jquery)
    b. If the data is potentially large, then you could use javascript + ajax + dhtml using a toolkit like jquery
    c. If you cant use javascript , then you would have to first change the UI to have a submit button , then its like any other pageflow action.
    what would be the best methodDepends on what attributes you wish to measure best , development time, accessibility, response times etc.
    regards
    deepak

  • Pop up screen with radio buttons

    Hi,
    I'm a new to APEX and I've a requirement of creating popup page with two radio buttons.
    This pop needs to pop before the starting/Home page.User must select atleast one of those radio buttons and then it goes back to starting/home page unconditionally.
    Thanks,
    Mahender.

    Hi Mahender,
    OK - the user has finished with the login page and hasn't yet loaded page 1. Therefore, there is no page on screen, which is not possible :D
    What you can do is something like the following:
    1 - In your application, through Shared Components, create an Application Item called, say, G_OK_TO_CONTINUE
    2 - On your page 1, create a new branch. The Branch Point setting for this should be "On Load: Before Header" (this is the point before any page rendering starts). The page to point to would be your "popup1" (except that this should probably be a normal page rather than a popup). The Conditions section for this branch would have the following settings:
    Condition Type: Value of Item in Expression 1 != Expression 2
    Expression 1: G_OK_TO_CONTINUE
    Expression 2: 1
    3 - On your "popup1" page, you should then have a branch that takes the user back to page 1. This branch must set G_OK_TO_CONTINUE to 1 (use the "Set these items"/"With these values" settings on the branch to do this) otherwise you create a loop.
    So, when the user first logs in, Apex attempts to load page 1. The new branch is checked immediately and, as G_OK_TO_CONTIINUE is NULL at this point (and, therefore, does not equal 1), the branch will be triggered and the user is redirected to your "popup1" page. They do what they need to do on that page and, if you want them to actually go to page 1, the branch back to page 1 sets G_OK_TO_CONTINUE to 1, the new branch on page 1 checks this and because the condition is now false, the branch is not triggered and the user is passed through to page 1
    Andy

  • How to disable when one radio button is selected

    Hi Folks,
    One of our requirement is as follows,
    Scenario: We have two columns with radio buttons and two dropdown box for the same columns to select the values.
    Requirement: When user select one radio button then the other radio button and its relevant dropdown both is disabled.
    Radio Buttons:
    Company
    EmpNo
    Dropdown Box:
    Company
    EmpNo
    If CompName Radio button is selected then Radio Buttom and Dropdown Box for Policy Id is disabled.
    Finally, The filter is applied on CompName to populate the values in dropdown
    Thanks Guys,
    KK

    look for a function like setActive or setDisable

  • Radio button to determine what text is put into the body of an email

    Hi all,
    I need some help with a radio button and java scripting. This is the code I'm using on a button with a mouse up event using Java script run at the client
    var oSubmit = this.resolveNode("$..#submit");
    var cToAddr = "[email protected]";
    var cCCAddr = "[email protected]";
    var cSubLine = "Security Access Authorization";
    var cBodya = "Dear Help Desk," + "\n" + "\n" +
    "This email serves as my electronic approval for " + "\n" + "\n"
    var cBodyb = "============ SECURITY ACCESS REQUEST DETAILS ================" + "\n" + "\n"
    var cBodyc = (EffDate.length = "")
      if(EffDate.rawValue)
    cBodyc = "Effective Date - " + EffDate.formattedValue + "\n" + "\n"
    var cBodyd = (RadBut.length == "2")
      if(RadBut.rawValue)
    cBodyd = "Status - Create New User Account" + "\n" + "\n"
    var cBodye = (RadBut.length == "3")
      if(RadBut.rawValue)
    cBodye = "Status - Add/Remove Access" + "\n" + "\n"
    var cBodyf = (RadBut.length == "5")
      if(RadBut.rawValue)
    cBodyf = "Status - Terminate" + "\n" + "\n"
    var cBodyg = (RadBut.length == "1")
      if(RadBut.rawValue)
    cBodyg = "Status - Department Transfer from " + "\n" + "\n" 
    var cBodyh = (RadBut.length == "4")
      if(RadBut.rawValue)
    cBodyh = "Request to have name changed to - " + "\n" + "\n";
    oSubmit.target = "mailto:" + cToAddr + "?cc=" + cCCAddr
    + "&subject=" + cSubLine
    + "&body=" + cBodya + cBodyb + cBodyc + cBodyd + cBodye  + cBodyf  + cBodyg + cBodyh ;
    this is the test layout I'm using
    No matter what I try, it always put all of the choices in the body of the email, not just the one I checked. any help would be greatly appreciated...Thanks Erick

    First off welcome to the group! Livecycle can be an interesting program.
    For me I am not very technically proficient in coding so I tend to gravitate to, how you say, less than elegant solutions. What I do is create an Email Submit button for each Radio button. Then I create a dummy Email Submit button (this part will be key later). From the Object Library view on each Email Submit button I set the Email Address and Email Subject that I want. Then I hide all of the Email Submit buttons with the exception of the dummy Email Submit button. From the Action Builder I then create an action on the dummy Email Submit that when the button is clicked to open a dialog box to say "Please Select an Option". I then create an action within the Action Builder on each Radio button to show the corresponding Email Submit button that has the subject line I need while also making sure to hide the dummy Email Submit button (and any other buttons if the user clicks several radio buttons). That worked for me in the past. Then I added a DocuReady event on the dummy Email Submit button to make sure it was visible and the other buttons were hidden once the form was open. Sort of a reset if you will. The downside is if the user changes nothing they still get a prompt to save the changes. I am sure that some of our more advanced coders can offer a fix to your code lines, but that is sort of the non-coder way to go about this.
    Edit: Oh I forgot to say that if you want the buttons to appear the same to the user, just overlay them together. To the user there is no change.

  • Using the radio button component to go to a frame on a MovieClip

    hello,
    I am using the radio button component in Flash with a continue button.
    When the user clicks their option in the radio button and then clicks continue, I want it to go to a movieClips Specific frame.
    Here is the breakdown and the script I have so far is below.
    The radio group os named RadioButtonGroup
    The instance names for each of the three options are noviceButton,intermediateButton,expertButton
    My continue button has an instance name of continueButton
    and my movie clip I am trying to target has an instance name of level_mc
    here is my code so far:
    continueButton.enabled=false
    noviceButton.addEventListener(MouseEvent.CLICK, revealContinue);
    intermediateButton.addEventListener(MouseEvent.CLICK, revealContinue);
    expertButton.addEventListener(MouseEvent.CLICK, revealContinue);
    function revealContinue(evt){
        continueButton.enabled=true;
    continueButton.addEventListener(MouseEvent.CLICK, clickContinue);
    function clickContinue(evt){
    var frameNumber=mc_levels.Number(noviceButton.group.selectedData)
    gotoAndStop (frameNumber);
    the problem starts with my varFrame line-I don't know how to get it to go to the movieClip and gotoAndStop at a specific frame, based on which radio button was clicked and after the continue button is clicked.
    Does anyone out there have any ideas?
    thanks
    babs

    use:
    continueButton.enabled=false
    noviceButton.addEventListener(MouseEvent.CLICK, revealContinue);
    intermediateButton.addEventListener(MouseEvent.CLICK, revealContinue);
    expertButton.addEventListener(MouseEvent.CLICK, revealContinue);
    function revealContinue(evt){
        continueButton.enabled=true;
    continueButton.addEventListener(MouseEvent.CLICK, clickContinue);
    function clickContinue(evt){
    var frameNumber=mc_levels.Number(noviceButton.group.selectedData)
    level_mc.gotoAndStop (frameNumber);

  • How to Reset a Radio Button

    Hello,
    I have a radio button that uses a named LOV, with values High, Low, Medium. I want to be able to reset the radio button. I have tried this:
    onchange="$s('P5_RISK', '')"When I click on the selected button, it resets the radiogroup, but when I try to select another button it does nothing. I would like to be able to have the option of selecting a radio button or not. Please advise. I am using APEX 3.2.
    Thanks,
    Mary
    Edited by: MaryM on Aug 24, 2010 7:59 AM

    Jari,
    I tried the below code. It has a little bug with it, though. I am able to click and unclick high, medium, low. But when I click on one of the radio buttons and then click the next field, the radio button loses its state and displays as if nothing was selected. The button's source is an sql query.
    onChange="$f_CheckAll(null, false, $x_FormItems('P16_DFCY_NON_RESLN_RISK', 'radio'));"I placed this in the HTML Form Elements section of the radio button. Please let me know if I entered something incorrectly.
    Thanks,
    Mary

  • How to display a text field if yes selected in radio button

    Does anyone know how to hide/show a text field based upon a
    radio button selection? What I want to do is ask a question with
    yes or no as radio buttons. Then, if the user selects "YES" I want
    to display a required text field. If the user click no, there isn't
    a need for the text field.

    Try this...
    <html>
    <head>
    </head>
    <script>
    function ShowField(){document.MyForm.MyField.style.display =
    "inline";}
    </script>
    <body>
    <form name="MyForm">
    <input type="radio" name="MyCheckBox"
    onClick="ShowField()">
    <input type="text" style="display: none"
    name="MyField">
    </form>
    </body>
    </html>

  • Radio buttons - text format

    Hi everyone!
    I can't seem to get this to work! I want the text on the radio buttons to wrap correctly as they reach the end of the stage (right now they just keep going forever. Here is the code I am using:
    package {
        import flash.display.MovieClip;
        import flash.text.TextField;
        import flash.text.TextFormat;
        import flash.text.TextFieldAutoSize;
        import flash.events.Event;
        import fl.controls.RadioButton;
        import fl.controls.RadioButtonGroup;
        public class QuizQuestion extends MovieClip {
            private var question:String;
            private var questionField:TextField;
            private var choices:Array;
            private var theCorrectAnswer:int;
            private var theUserAnswer:int;
            //variables for positioning:
            private var questionX:int = 25;
            private var questionY:int = 150;
            private var answerX:int = 25;
            private var answerY:int = 200;
            private var spacing:int = 25;
            public function QuizQuestion(theQuestion:String, theAnswer:int, ...answers) {
                //store the supplied arguments in the private variables:
                question = theQuestion;
                theCorrectAnswer = theAnswer;
                choices = answers;
                //create and position the textfield (question):
                questionField = new TextField();
                questionField.width = 775;
                questionField.wordWrap = true;
                questionField.multiline = true;
                questionField.text = question;
                //trace (questionField.width);
                questionField.autoSize = TextFieldAutoSize.LEFT;
                questionField.x = questionX;
                questionField.y = questionY;
                addChild(questionField);
                //Text Format for radio buttons
                var txtFmt:TextFormat = new TextFormat();
                txtFmt.font = "Arial";
                txtFmt.blockIndent = 2;
                txtFmt.color = 0x000000;
                txtFmt.size = 11;
                txtFmt.leading = 4;
                //create and position the radio buttons (answers):
                var myGroup:RadioButtonGroup = new RadioButtonGroup("group1");
                myGroup.addEventListener(Event.CHANGE, changeHandler);
                for(var i:int = 0; i < choices.length; i++) {
                    var rb:RadioButton = new RadioButton();
                    rb.setStyle("textFormat", txtFmt);
                    rb.textField.autoSize = TextFieldAutoSize.LEFT;
                    rb.label = choices[i];
                    rb.group = myGroup;
                    rb.value = i + 1;
                    rb.x = answerX;
                    rb.y = questionY + questionField.height + 25 + (i * spacing);
                    addChild(rb);
            private function changeHandler(event:Event) {
                theUserAnswer = event.target.selectedData;
            public function get correctAnswer():int {
                return theCorrectAnswer;
            public function get userAnswer():int {
                return theUserAnswer;
    As you can see, I managed to get the text field style of the radio buttons to use "txtFmt" as the style:
    rb.setStyle("textFormat", txtFmt);
    The issue:
    If I add:
    rb.textField.width = 352;
    rb.textField.height = 60;
    rb.textField.multiline = rb.textField.wordWrap = true;
    inside the "for loop" that creates the radio button, it just makes my text go all crazy! It only extends the text about 30 pixels after the radio button and then starts wrapping it, making it all stack on top of each other. How can I make it create the radio button, show the text on the text field, wrap around once it reached the edge of the stage and the continue the next button.
    thank you in advanced,
    Rafa.

    Kglad,
    I added the trace command to the 1st frame of my FLA, and it shows the "test" message on the output window.
    I am looking thru my code, but can't figure what could be overwritting it. This is what I have on the first AS file:
    package {
        import flash.display.MovieClip;
        import flash.text.TextField;
         import flash.text.TextFormat;
        import flash.text.TextFieldAutoSize;
        import flash.events.Event;
        import fl.controls.RadioButton;
        import fl.controls.RadioButtonGroup;
        public class QuizQuestion extends MovieClip {
            private var question:String;
            private var questionField:TextField;
            private var choices:Array;
            private var theCorrectAnswer:int;
            private var theUserAnswer:int;
            //variables for positioning:
            private var questionX:int = 25;
            private var questionY:int = 150;
            private var answerX:int = 25;
            private var answerY:int = 200;
            private var spacing:int = 25;
            public function QuizQuestion(whichQuestion:int, theQuestion:String, theAnswer:int, ...answers) {
                //store the supplied arguments in the private variables:
                question = theQuestion;
                theCorrectAnswer = theAnswer;
                choices = answers;
                   //Text Format for readio buttons
                   var txtFmt:TextFormat = new TextFormat();
                   txtFmt.font = "Arial";
                   txtFmt.blockIndent = 2;
                   txtFmt.color = 0x000000;
                   txtFmt.size = 12;
                   txtFmt.leading = 4;
                //create and position the textfield (question):
                questionField = new TextField();
                questionField.width = 770;
                   questionField.wordWrap = true;
                   questionField.multiline = true;
                   questionField.text = question;
                   //trace (questionField.width);
                questionField.autoSize = TextFieldAutoSize.LEFT;
                questionField.x = questionX;
                questionField.y = questionY;
                   questionField.setTextFormat(txtFmt);
                addChild(questionField);
                //create and position the radio buttons (answers):
                var myGroup:RadioButtonGroup = new RadioButtonGroup("group1");
                myGroup.addEventListener(Event.CHANGE, changeHandler);
                var rbY:Number = 100;
                   for(var i:int = 0; i < choices.length; i++) {
                    var rb:RadioButton = new RadioButton();
                    rb.setStyle("textFormat", txtFmt);
                    rb.textField.width = 352;
                    rb.textField.autoSize = "left";
                    rb.textField.multiline  = rb.textField.wordWrap = true;
                    rb.textField.autoSize = TextFieldAutoSize.LEFT;
                    rb.label = choices[i];
                    rb.group = myGroup;
                    rb.value = i + 1;
                    rb.x = 300;
                    rb.y = rbY;
                    rbY = rb.y+rb.height;
                    addChild(rb);
            private function changeHandler(event:Event) {
                theUserAnswer = event.target.selectedData;
            public function get correctAnswer():int {
                return theCorrectAnswer;
            public function get userAnswer():int {
                return theUserAnswer;
    This is the AS that creates the questions:
    package {
        import flash.display.MovieClip;
        import fl.controls.Button;
        import flash.events.MouseEvent;
        import flash.text.TextField;
        import flash.text.TextFieldAutoSize;
        public class QuizApp extends MovieClip {
            //for managing questions:
            private var quizQuestions:Array;
            private var currentQuestion:QuizQuestion;
            private var currentIndex:int = 0;
            //the buttons:
            private var prevButton:Button;
            private var nextButton:Button;
            private var finishButton:Button;
            //scoring and messages:
            private var score:int = 0;
            private var status:TextField;
            public function QuizApp() {
                quizQuestions = new Array();
                createQuestions();
                createButtons();
                createStatusBox();
                addAllQuestions();
                hideAllQuestions();
                firstQuestion();
            private function createQuestions() {
                quizQuestions.push(new QuizQuestion(1, "1. Which of the following statements about the government auditor’s use of audit standards is least accurate? ",
                                                                1,
                                                                "Government auditors may be subject to a variety or range of audit standards.",
                                                                "Government auditors are not subject to audit standards for some types of work.",
                                                                "If the audit organization follows The Institute of Internal Auditors’ (IIA’s) International Standards for the Professional Practice of Internal Auditing (Standards), those Standards prevail over laws and regulations.",
                                                                "Different sets of audit standards that might be followed have many similarities."));
            private function createButtons() {
                var yPosition:Number = stage.stageHeight - 125;
                prevButton = new Button();
                prevButton.label = "Previous";
                prevButton.x = 30;
                prevButton.y = yPosition;
                prevButton.addEventListener(MouseEvent.CLICK, prevHandler);
                addChild(prevButton);
                nextButton = new Button();
                nextButton.label = "Next";
                nextButton.x = prevButton.x + prevButton.width + 40;
                nextButton.y = yPosition;
                nextButton.addEventListener(MouseEvent.CLICK, nextHandler);
                addChild(nextButton);
                finishButton = new Button();
                finishButton.label = "Finish";
                finishButton.x = nextButton.x + nextButton.width + 40;
                finishButton.y = yPosition;
                finishButton.addEventListener(MouseEvent.CLICK, finishHandler);
                addChild(finishButton);
            private function createStatusBox() {
                status = new TextField();
                status.autoSize = TextFieldAutoSize.LEFT;
                status.y = stage.stageHeight - 80;
                addChild(status);
            private function showMessage(theMessage:String) {
                status.text = theMessage;
                   status.x = (stage.stageWidth / 5) - (status.width / 5);
            private function addAllQuestions() {
                for(var i:int = 0; i < quizQuestions.length; i++) {
                    addChild(quizQuestions[i]);
            private function hideAllQuestions() {
                for(var i:int = 0; i < quizQuestions.length; i++) {
                    quizQuestions[i].visible = false;
            private function firstQuestion() {
                currentQuestion = quizQuestions[0];
                currentQuestion.visible = true;
            private function prevHandler(event:MouseEvent) {
                showMessage("");
                if(currentIndex > 0) {
                    currentQuestion.visible = false;
                    currentIndex--;
                    currentQuestion = quizQuestions[currentIndex];
                    currentQuestion.visible = true;
                } else {
                    showMessage("This is the first question, there are no previous ones");
            private function nextHandler(event:MouseEvent) {
                showMessage("");
                   //This will not allow the user to continue forward unless they answer the current question
               /* if(currentQuestion.userAnswer == 0) {
                    showMessage("Please answer the current question before continuing");
                    return;
                if(currentIndex < (quizQuestions.length - 1)) {
                    currentQuestion.visible = false;
                    currentIndex++;
                    currentQuestion = quizQuestions[currentIndex];
                    currentQuestion.visible = true;
                } else {
                    showMessage("That's all the questions! Click Finish to Score, or Previous to go back");
            private function finishHandler(event:MouseEvent) {
                showMessage("");
                var finished:Boolean = true;
                for(var i:int = 0; i < quizQuestions.length; i++) {
                    if(quizQuestions[i].userAnswer == 0) {
                        finished = false;
                        break;
                if(finished) {
                    prevButton.visible = false;
                    nextButton.visible = false;
                    finishButton.visible = false;
                    hideAllQuestions();
                    computeScore();
                } else {
                    showMessage("You haven't answered all of the questions");
            private function computeScore() {
                for(var i:int = 0; i < quizQuestions.length; i++) {
                    if(quizQuestions[i].userAnswer == quizQuestions[i].correctAnswer) {
                        score++;
                showMessage("You answered " + score + " correct out of " + quizQuestions.length + " questions.");
    I also have a timer running on my FLA, but even if I comment out the timer, I still get the same issue.
    thank you for your help,
    Rafa.

  • Radio button on selection screen event issue.

    Hi all,
    I have two radio buttons and two input mandatory fields on selection screen.
    - If  first radio button selected then some value 'ABC' should fill in second input field.(because it is a mandatory field)
    - If  second radio button selected then some value 'XYZ' should fill in first input field..(because it is a mandatory field)
    If suppose, user deletes first input value (ABC) and selects second Radio then, ABC to automatically display on first input field as this is mandatory. Same like,If he deletes second input field value and selects first radio, it should display XYZ in second input field. (As these fields are mandatory and requires some value).
    I tried with below code, but not working. Appreciate your quick response.
    PARAMETER          ppart RADIOBUTTON GROUP src  DEFAULT 'X'.
    SELECT-OPTIONS  p_sndprn FOR edoc_stat-sndprn OBLIGATORY DEFAULT 'ABC'.
    PARAMETER         psndr RADIOBUTTON GROUP src.
    SELECT-OPTIONS p_sendid FOR zabc-sndlad OBLIGATORY DEFAULT 'XYZ'.   
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP src.
    IF SSCRFIELDS-UCOMM = 'PRGP'.
      IF ppart EQ 'X'.
           P_SENDID-LOW = 'XYZ'.
      ELSE.
          P_SNDPRN-LOW = 'ABC'.
      ENDIF.
    ENDIF.
    Thanks,
    Ranjith.

    Search the forum... don't make fields obligatory and use event AT SELECTION-SCREEN OUTPUT.

  • Bring radio buttons structure from another screen

    Hi there,
    I have been looking without sucess on how to bring information from different transaction on a single screen - the Personas concept; so far OK, until I needed to bring the radio buttons information from my PA20 to my original screen.
    I tried to copy the radion button structure from the PA20 - infotype 331,and paste it to my newly created radio button on my main screen..but the result only contain the title.
    Does any one have a clue on this?

    You cannot move screen elements from one screen to another using Personas.
    What you could do is defining custom screen objects (such as the group box and the radio buttons), then use scripting to navigate to the standard screen, read the radio button settings then navigate back to your consolidation screen and set the custom radio buttons according to the retrieved values.

Maybe you are looking for

  • How can I use migration assistant to load my new Macbook Air?

    How do I use migration assistant to load my new Macbook Air?  Can this be done only wirelessly?

  • Nano 4th Genoration doesnt apper in My Computer or iTunes- still charges

    My iPod 8gb 4th Genoration Nano wont sync. It doesnt appeer in My Computer and iTunes but it still charges. When it works, it says 'iPod cant sync' or if i try and restore it it says 'iPod cant restore'. Some times it says 'This USB device is not rec

  • How to close a window in a jsp page ??

    Hi........I 've created an application in JSPDynpage. In my JSP Page i've a close button .On click of the "close" button , the window has to close. How can i achieve this . Please provide me some solutions. Thanks Smita

  • Changing functiional location

    Hi Can we change functional location ? For example: If one func location is 1000-REL-UTL-0001 Can we change it to say 1000-ABC-DEF-0001 Please reply Regards Pooja

  • Server vs Standalone

    Comparing the standalone RoboHelp product with RoboHelp Server 7 for published WebHelp with Internet access: Does using the server version result in a better end user experience based on (1) how quickly pages are served and (2) how quickly the user c