Displaying a field when radio button clicked

I am new using Acrobat and JavaScript and am trying to create a form. I have a radio button called Rate with 2 values, Pay and Bill. I also have 2 text boxes, called Pay_Rate_Fillin and Bill_Rate_Fillin which are initially set up as hidden fields. I would like for the Pay_Rate-Fillin text box to be visible when Pay is select and hidden otherwise. Then if Bill is selected the Bill_Rate_Fillin text box is visible. I have tried many different scripts and I just can't seem to get this right.

Place this code as Rate's custom calculation script:
var rate = event.value;
if (rate=="Pay") {
    this.getField("Pay_Rate_Fillin").display = display.visible;
    this.getField("Bill_Rate_Fillin").display = display.hidden;
} else if (rate=="Bill") {
    this.getField("Pay_Rate_Fillin").display = display.hidden;
    this.getField("Bill_Rate_Fillin").display = display.visible;

Similar Messages

  • Popup window when radio button clicked

    Hello,
    I have a button that has a URL redirect of:
    javascript:popUp2('f?p=&APP_ID.:8:&SESSION.::NO:::', 400, 400);
    This opens a separate window.
    Now I want this to happen when the user clicks on a radio button on that page.
    Thank you,
    Matt

    You dont have to put this in html head..
    ON THE PAGE RENDERING SECTION..
    UNDER ITEMS... FIND THE RADIO BUTTON ITEM AND CLICK ON THAT..
    U WILL SEE DIFFERENT TAB OVER THERE... LIKE .. SHOW ALL , NAME , DISPLAYED , LABEL , ELEMENT ... ETC..
    SELECT ELEMENT..
    UNDER ELEMENT YOU WILL SEE
    HTML FORM ELEMENTS ATTRIBUTES... IN THAT TEXT BOX U JUST HAVE TO COPY AND PASTE THE ABOVE CODE

  • Form Reset When Radio Button Clicked.

    I have two radio buttons.
    One is checked and form elements are visible
    The second, when clicks, makes all but one form element
    uneditable
    When the Second is clicked, I need the form elements to be
    reset.
    Any Ideas?

    Have any ideas that would work for this?
    >I have two radio buttons.
    > One is checked and form elements are visible
    > The second, when clicks, makes all but one form element
    uneditable
    >
    > When the Second is clicked, I need the form elements to
    be reset.

  • Textarea when Radio Button Clicked Yes

    I'm trying to add a textarea for a gift message if the users
    clicks the "Yes" radio button. The characters have to be limited to
    150. I'm not a programmer and know very, very, little coldfusion.
    The message in the textarea will be stored in a pre-existing DB
    column.
    Any help with this is greatly appreciated.

    <input type="radio" name="giftMessage" value="1"
    onclick="textAreaShow('inline');" />Yes
    <input type="radio" name="giftMessage" value="0"
    onclick="textAreaShow('none');" />No
    <textarea name="giftMessageText"
    id="giftMessageText"></textarea>
    <script type="text/javascript">
    function textAreaShow(onOff) {
    document.getElementById('giftMessageText').style.display =
    onoff;
    </script>
    for the text limit, that's a little tougher. textareas do not
    have the builtin maxlength attribute that text inputs have. there
    are javascripts you can use that will fire on the onkeyup event of
    the textarea counting the characters, but i personally don't care
    for those.
    i'd suggest on the submit action of the form, check the
    textarea.value length using JS and if it exceeds 150 characters,
    don't submit the form and alert the user. in addition, DEFINITELY
    check on the form's action page using CF to ensure that the length
    of the value passed is less than 150 (and if not, handle
    appropriately).

  • Change Button content when Radio button clicked...

    Within my BSP code I have an OnClientClick event against the Radio button tag.
    What I need to do is to have some kind of Javascript that changes the context (text) or colour of a button if the Radio button is clicked.
    I know very little of how to achieve this and would relish any guidance about how I can get this to work.
    I understand that I need to use a reference/handle to the button and change it's values via javascript, but how can I embed this code into my BSP code, what code do I use, and more importantly how can I obtain this reference/handle on the buttion?.
    Jon

    Hi Jon,
    below an Example to do this
    (due to security forum restriction replace scrip t with script and o nclick with onclick)
    <html>
    <head>
    <scrip t>
    function change_button_text(v_object){
    var button = document.getElementById("id_button");
    var new_text = v_object.value + ' Clicked!';
    if (button.childNodes[0])
            button.childNodes[0].nodeValue=new_text;
        else if (button.value)
            button.value=new_text;
    </scrip t>
    </head>
    <body>
    <form>
    <input type="radio" name="***" value="male" o nclick="change_button_text(this)"/> Male<br />
    <input type="radio" name="***" value="female" o nclick="change_button_text(this)"/> Female
    </form>
    <button id="id_button">Button Text</button>
    </body>
    </html>
    Edited by: alessandro spadoni on Apr 28, 2011 9:56 AM

  • Is it possible to fire an event when radio buttons are clicked in a report?

    Hi All,
    I have got a requirement. In the selection screen i have certain input fields and three radio buttons. When radio buttons are clicked i have to grey out certain input fields. Is it possible to fire an event when i write program through se38??
    Thanks
    Rakesh

    Hi Rakesh,
    Check this code.
    SELECTION-SCREEN BEGIN OF BLOCK FINPUT WITH FRAME TITLE TEXT-001.
    PARAMETERS  : FILENAME(132) TYPE C LOWER CASE  NO-DISPLAY,
                  FDLOAD RADIOBUTTON GROUP RAD1
                  USER-COMMAND R1 ,
                  FUPLOAD RADIOBUTTON GROUP RAD1 .
    SELECTION-SCREEN END OF BLOCK FINPUT.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-002.
    PARAMETERS : FUNAME(132) TYPE C LOWER CASE MODIF ID AA.
    SELECTION-SCREEN PUSHBUTTON /33(30) ACTION USER-COMMAND
                     BTNACT MODIF ID AA VISIBLE LENGTH 8 .
    SELECTION-SCREEN PUSHBUTTON 43(30) CANCEL USER-COMMAND
                     BTNCAN MODIF ID AA VISIBLE LENGTH 8  .
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    PARAMETERS : FDNAME(132) TYPE C LOWER CASE MODIF ID BB.
    SELECTION-SCREEN PUSHBUTTON /33(30) ACTIONS USER-COMMAND
                     BTNACT1 MODIF ID BB VISIBLE LENGTH 8.
    SELECTION-SCREEN PUSHBUTTON 43(30) CANCELS USER-COMMAND
                     BTNCAN1 MODIF ID BB VISIBLE LENGTH 8.
    SELECTION-SCREEN END OF BLOCK B2.
    DATA : ACTNAME(8) TYPE C,SCRGRUP(2) TYPE C.
    INITIALIZATION.
    ACTIONS = 'Download'.
    CANCEL = 'Cancel'.
    ACTION = 'Upload'.
    CANCELS = 'Cancel'.
    ACTNAME = 'Download'.
    SCRGRUP = 'AA'.
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD1.
    IF FUPLOAD = 'X'.
         MOVE 'Upload' TO ACTION.
         MOVE 'Upload' TO ACTNAME.
    ELSEIF FDLOAD = 'X'.
         MOVE 'Download' TO ACTION.
         MOVE 'Download' TO ACTNAME.
    ENDIF.
    AT SELECTION-SCREEN.
    IF SY-UCOMM = 'R1'.
        IF ACTION = 'Download'.
          SCRGRUP = 'AA'.
         MESSAGE S007(ZMESSAGE).
        ELSEIF ACTION = 'Upload'.
          SCRGRUP = 'BB'.
         MESSAGE S008(ZMESSAGE).
       ENDIF.
    ELSEIF SY-UCOMM = 'BTNCAN' OR SY-UCOMM = 'BTNCAN1'.
      LEAVE PROGRAM.
    ENDIF.
    *AT USER-COMMAND.
    CASE SY-UCOMM.
       WHEN 'ACTIONS'.
         LOOP AT SCREEN.
           IF SCREEN-NAME = 'FUNAME'.
           ENDIF.
         ENDLOOP.
    ENDCASE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FUNAME.
      PERFORM call_filedialog CHANGING FUNAME.
    PERFORM call_filedialog CHANGING FUNAME.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF SCREEN-GROUP1 = SCRGRUP AND ACTNAME = 'Download' .
      SCREEN-ACTIVE = 0.
      MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = SCRGRUP AND ACTNAME = 'Upload'.
      SCREEN-ACTIVE = 0.
      MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    FORM call_filedialog CHANGING fname.
      DATA: li_filetable TYPE STANDARD TABLE OF file_table,
        lv_return TYPE i,
        lw_filetable TYPE file_table.
      CALL FUNCTION 'TMP_GUI_FILE_OPEN_DIALOG'
        TABLES
          file_table = li_filetable
        EXCEPTIONS
          cntl_error = 1
          OTHERS     = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      READ TABLE li_filetable INDEX 1 INTO lw_filetable.
      fname = lw_filetable-filename.
    ENDFORM.                    "call_filedialog
    Reward Points, if useful.
    Regards,
    Manoj Kumar

  • Multiple flash files change when a button click using javascript function

    hi.. am new in flsh...
    i want to multiple flash files change when a button click using a javascript

    <script>
    var count=0;
    function mafunct(newSrc){
        alert("hi");
    var path="a"+count+".swf"; 
    flash+='<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" WIDTH="100%" HEIGHT="100%">';         
        flash+='<PARAM NAME=movie VALUE="'+path+'">';         
        flash+='<PARAM NAME="PLAY" VALUE="false">'; 
        flash+='<PARAM NAME="LOOP" VALUE="false">';
        flash+='<PARAM NAME="QUALITY" VALUE="high">';
        flash+='<PARAM NAME="SCALE" VALUE="SHOWALL">';
        flash+='<EMBED NAME="testmovie" SRC="Menu.swf" WIDTH="100%" HEIGHT="100%"PLAY="false" LOOP="false" QUALITY="high" SCALE="SHOWALL"swLiveConnect="true"PLUGINSPAGE="http://www.macromedia.com/go/flashplayer/">';
        flash+='</EMBED>';
        flash+='</OBJECT>';    
    count++;
    alert(path+"aa");
    </script>
    <button onclick="mafunct()">next</button>

  • Link radio button click to accordion 2nd tab

    how do i link a radio button click to bring up the 2nd tab of
    an accordion navagator?
    is there/where can i find a guide for things like this?
    e

    Hi,
    Not sure i understood the querstion but you could listen for
    the change event of the radio button and use the eventHandler to
    toggle between different indexes of the accordion, for example 1
    for the 2nd tab

  • Overlaying 2 fields to display different values on a button click

    hi,
    I have designer 7 in my local machine and I have overlaid 2 fields - one as visible and one as invisible - containing value and Percentage information. When the user clicks on a button I show percentages or values like a toggle. It seems to work fine in the preview mode of Designer 7.0 but it does not work in our form server that has version 6 .. Is there a work around to this issue?
    This is the actual function that I call when the toggle button is clicked..
    Thanks
    Subha
    JS Function:
    try {
    if( btnToggle.caption.value.text.value == 'Display Percentages' )
    btnToggle.caption.value.text.value = 'Display Values';
    var baseNode = root.StrategicChoices.WorkPrograms.region;
    for( var i = 0; i < baseNode.nodes.length; i++ )
    if ( baseNode.nodes.item(i).name != 'regionItem' ) continue;
    var item = baseNode.nodes.item(i).regionDetails;
    item.prior12mos.presence = 'invisible';
    item.last12mos.presence = 'invisible';
    item.plan.presence = 'invisible';
    item.outlook.presence = 'invisible';
    item.prior12mospct.presence = 'visible';
    item.last12mospct.presence = 'visible';
    item.planpct.presence = 'visible';
    item.outlookpct.presence = 'visible';
    else
    btnToggle.caption.value.text.value = 'Display Percentages';
    var baseNode = root.StrategicChoices.WorkPrograms.region;
    for( var i = 0; i < baseNode.nodes.length; i++ )
    if ( baseNode.nodes.item(i).name != 'regionItem' ) continue;
    var item = baseNode.nodes.item(i).regionDetails;
    item.prior12mos.presence = 'visible';
    item.last12mos.presence = 'visible';
    item.plan.presence = 'visible';
    item.outlook.presence = 'visible';
    item.prior12mospct.presence = 'invisible';
    item.last12mospct.presence = 'invisible';
    item.planpct.presence = 'invisible';
    item.outlookpct.presence = 'invisible';
    } catch( e ) { app.alert( e.toString() ); }

    With version 7, there is a new dynamic xfa tag within the document. If you are trying to change the content of the document within Reader then you are probably using Dynamic PDF. If you save your code with Acrobat 6 compatible PDF, then you will see the same thing happen as form server 6. Form Server 6 does not have support for Dynamic PDF yet. That will be available with Form Server 7

  • How to populate the whole path of the button in a field when the button is clicked.

    Hi,
    I have around 5 uploads in my file. I kept a hidden field on the header of the form. When ever i click on the upload button, the path of it needs to be populated in the hidden text field.
    by using   this.parent we can get the parent name of the element.
    is there any method similar to the above one to get the whole path of the button????????

    Try putting this script in the click event of the button
    Hidden_Text_Field_Path.rawValue=this.somExpression;
    This ought to work using either FormCalc or JavaScript.  I'm not sure from your description whether you will need to use the full path name for the hidden text field or use a relative one, but that's not too hard to deal with.

  • R12 OM Copy does not navigate to required field when OK button is clicked

    We are upgrading from 11.5.10 to 12.1.3.
    When a user is copying a Sales Order to a Return in 11i and the user leaves the return reason blank, the form will navigate to the return reason and raise ORA-40202 Field must be Entered.
    In R12, the navigation to the required field does not happen. The ORA-420202 is still raised, but the user must click through the tabs to find the return reason.
    I have examined OEORDCPY.pll and found the procedure OE_ORDER_COPY_WINDOW.action_ok, which is called when the user clicks on the OK button.
    The code below is from R12. Only the section for bug 4879216 is new since 11i. It is clear that the intent is for the form to navigate to the line type or return reason when they are missing (null, required, and enabled).
    I have attempted to use forms personalization to navigate to the return reason, when it is missing. However, I could not get the desired result using when-new-item-instance or when-button-pressed as the trigger. Anyone have any suggesstions to correct this change in behaviour?
    procedure action_ok IS
    QUERY_HEADER_ID NUMBER;
    BEGIN
    /* Added for bug 4879216 */
    validate(ITEM_SCOPE);
    IF NOT FORM_SUCCESS THEN
    raise form_trigger_failure;
    END IF;
    /* End of bug 4879216 */
    OE_Navigate.g_exec_post_forms_commit:='N';
    IF get_item_property('COPY.LINE_TYPE',REQUIRED) = 'TRUE' AND
    get_item_property('COPY.LINE_TYPE',ENABLED) = 'TRUE' AND
         NAME_IN('COPY.LINE_TYPE') IS NULL THEN
    --fnd_message.debug('go line type');
    go_item('copy.line_type');
    ELSIF get_item_property('COPY.RETURN_REASON',REQUIRED) = 'TRUE' AND
    get_item_property('COPY.RETURN_REASON',ENABLED) = 'TRUE' AND
         NAME_IN('COPY.RETURN_REASON') IS NULL THEN
    --fnd_message.debug('go return reason');
         go_item('copy.return_reason');
    ELSE
    --fnd_message.debug('copy');
    OE_ORDER_COPY_MAIN.copy_main(QUERY_HEADER_ID);
    END IF;
    /* OE_ORDER_COPY_GLOBALS.G_HEADER_ID_TO_QUERY := QUERY_HEADER_ID;
    hide_window('COPY');
    go_block(OE_ORDER_COPY_GLOBALS.G_SOURCE_BLOCK_NAME);
    app_special.enable('MODAL',PROPERTY_ON);
    app_special.enable('file.save',PROPERTY_ON);
    app_special.enable('file.accept',PROPERTY_ON);
    END action_ok;

    We have obtained a one-off patch from Oracle to address the issue. Is the patch available for public access? If yes, it would be great if you could share the patch number with us.
    Thanks,
    Hussein

  • Chaning color when radio button is clicked

    I am trying to change the background color when a radio button is clicked. The blue button is the only that I have added an actionListener, but when it is clicked, I get a runtime error. Any suggestions?
    [import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Radio
         public static void main(String[] args)
              JFrame frame = new JFrame("Radio");
              Container pane = frame.getContentPane();
              JPanel radioPanel = new JPanel();
              radioPanel.setLayout(new GridLayout(3,1));
              JRadioButton blue = new JRadioButton("Blue", false);
              blue.setActionCommand("blue");
              JRadioButton red = new JRadioButton("Red", false);
              JRadioButton green = new JRadioButton("Green", false);
              Radio2 listener = new Radio2(blue, red, green, radioPanel);
              blue.addActionListener(listener);
              blue.setBackground(Color.BLUE);
         blue.setContentAreaFilled(false);
    ButtonGroup bg = new ButtonGroup();
              bg.add(blue);
              bg.add(red);
              bg.add(green);
              radioPanel.add(blue);
              radioPanel.add(red);
              radioPanel.add(green);
              radioPanel.setBorder(BorderFactory.createTitledBorder(
    BorderFactory.createEtchedBorder(), "Change Color?"));
              frame.add(radioPanel);
              frame.setSize(200,200);
              frame.setVisible(true);
         class Radio2 implements ActionListener
              private JRadioButton blue, red, green;
              private JPanel radioPanel;
              public Radio2(JRadioButton blue, JRadioButton red, JRadioButton green, JPanel radioPanel)
                   blue = blue;
                   red = red;
                   green = green;
                   radioPanel = radioPanel;
              public void actionPerformed(ActionEvent e)
                   if(e.getActionCommand().equals("blue"))
                        radioPanel.setBackground(Color.blue);
                        System.out.println(e.getActionCommand());
    ]

    I am trying to change the background color when a
    radio button is clicked. The blue button is the only
    that I have added an actionListener, but when it is
    clicked, I get a runtime error. Any suggestions?
    [import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Radio
         public static void main(String[] args)
              JFrame frame = new JFrame("Radio");
              Container pane = frame.getContentPane();
              JPanel radioPanel = new JPanel();
              radioPanel.setLayout(new GridLayout(3,1));
    JRadioButton blue = new JRadioButton("Blue",
    ", false);
              blue.setActionCommand("blue");
              JRadioButton red = new JRadioButton("Red", false);
    JRadioButton green = new JRadioButton("Green",
    ", false);
    Radio2 listener = new Radio2(blue, red, green,
    n, radioPanel);
              blue.addActionListener(listener);
              blue.setBackground(Color.BLUE);
         blue.setContentAreaFilled(false);
    ButtonGroup bg = new ButtonGroup();
              bg.add(blue);
              bg.add(red);
              bg.add(green);
              radioPanel.add(blue);
              radioPanel.add(red);
              radioPanel.add(green);
              radioPanel.setBorder(BorderFactory.createTitledBorde
    r(
    BorderFactory.createEtchedBorder(),
    edBorder(), "Change Color?"));
              frame.add(radioPanel);
              frame.setSize(200,200);
              frame.setVisible(true);
         class Radio2 implements ActionListener
              private JRadioButton blue, red, green;
              private JPanel radioPanel;
    public Radio2(JRadioButton blue, JRadioButton red,
    d, JRadioButton green, JPanel radioPanel)
                   blue = blue;
                   red = red;
                   green = green;
                   radioPanel = radioPanel;
              public void actionPerformed(ActionEvent e)
                   if(e.getActionCommand().equals("blue"))
                        radioPanel.setBackground(Color.blue);
                        System.out.println(e.getActionCommand());
    ]Do me a favor, please. When you post code, put it inside code tags (the button you see above the text area.)
    Thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • ALV report to display data based upon radio button.

    i am new to abap, I have a requirement its like there are three radio buttons , r1 r2 r3  If i click r1 datas of r1 should display
    if i click r2 datas of r1 and r2 should display if i click r3 datas of r1 r2 and r3 should display , its ALV report. Please give me solution.

    Hi
    You can use by having the radio buttons in the same group. For ex i'm stating if want to have r radio buttons for change, display and create and you select it with a push button you can code it as ..
    //////SAMPLE CODE
    SELECTION-SCREEN BEGIN OF BLOCK BLOCK1 WITH FRAME TITLE TEXT-003 NO INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: SRCE RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-004.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: VARIN RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-005.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: ATTR RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-006.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: DOCU RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-007.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: TXELE RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-008.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 1(15)  TEXT-009 USER-COMMAND DISPL.
    SELECTION-SCREEN PUSHBUTTON 18(15) TEXT-010 USER-COMMAND CHNGE.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK BLOCK1.
    *PARAMETERS : XXX LIKE T100A-ARBGB MATCHCODE OBJECT YCL_T100A.
    AT SELECTION-SCREEN.
    CASE SY-UCOMM.
    WHEN 'CREAT'.
      MESSAGE I000(YCL_MC01) WITH 'Create'. // or insert your alv code here
    WHEN 'DISPL'.
      MESSAGE I000(YCL_MC01) WITH 'Display'. // or insert your alv code here
    WHEN 'CHNGE'.
      MESSAGE I000(YCL_MC01) WITH 'Change'. // or insert your alv code here
    ENDCASE.
    //////SAMPLE CODE
    In same you can code it.
    Hope this is useful to you.
    Regards
    Vinodh

  • New window everytime when submit button clicked in JSF

    Hi all,
    I am facing an issue where I need to popup a new window everytime the submit button on my JSF form is clicked.
    I have tried several methods but none is working to my purpose.
    1. Add a target="_blank" attribute in the JSF form. The problem is that even if any of my ValuechangeListeners get invoked, the page is rendered in a new window. My ValuechangeListeners work on onchange="submit()".
    2. Invoke a new window from javascript and name the window as say" new" . Also name the form's target as "new" but this does not generate a new window everytime and also problem 1 persists.
    3. If i use actionlistener and onclick event on button in the form, then the new page is rendered in both current page and new window.( javascript for new window is written).
    What I need is when a person clicks on submit button in the form, a new window should always popup up and the page should be rendered in the new window. The original form should remain as it is so that a user can again do a submit and get a new window.
    Please suggest.

    devayani wrote:
    Thanks all for the replies.
    Try onchange="this.form.target='_self';submit();"This works fine if all the valuechangelisteners are invoked. Suppose,if I dont select the radio
    button and dont select any values in list box. Now if i click submit, since the target=_blank,
    the page giving validation errors (for not selecting the list box)
    renders in a new page. As expected behavior, not my solution.
    If you need validation to remain in the same window (and that seems like the best for the user experience you have described), then delay the creation of the new window until after the request finishes. I.e., your page should always go back on itself. Under the right conditions (which you can set in your action method) it conditionally writes JavaScript which targets the new window.
    >
    Try returning false from the onclick event.I had tried it long back, so I just messed it up while writing, there were no actionlisteners.
    sorry about my third solution, lets consider solution 2 as below:
    Javascript
    <script type="text/javascript" >
         function newWindow(){
              window.open('','mywindow','width=400,height=200');
              return false;
         </script>
    JSF
    <h:form id="Frm_New" target="mywindow">     
    <h:commandButton id="btn_submit" disabled="false"             
                  action = "#{TestBean.submitValues}"
                  value="#{bundle.SC_SUBMIT}"
                  onclick ="newWindow()">But again this approach has above problems and also no new window everytime. For new window you said:
    Append a time stamp or random number to
    the end of the window name.This solution will not work as I have to reset the target for my form everytime to this new window name.You can remember the name of the window if necessary. Although you seem to be changing things on the fly; earlier the problem was you didn't get a new window every time. Or are you just confused on how to set the target?
    onclick="var wname = getWindowName(); createNewWindow(wname); this.form.target = wname; return true;">
    I was trying to actually set the target of the form as _blank at runtime during one of the phases of JSF lifecycle ( by using phaselistener). Although its not working as of now. Does this sound a good approach
    This is because I dont think that setting it on jsf would work as the page rendering on a new window( in my case) not only depends on clicking the submit button only but it depends on whether the user is done with all vaildations and now has to see the final result into new window.This would be addressed by the conditional JavaScript solution above.

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

Maybe you are looking for

  • IPhoto "metadata changes" and management with possible import to Aperture 2

    Sorry for the length of this but I am trying to get to figure out which will be the best product for me without having to waste more time and money. I may already have the best for what I want/need but I am not too terribly satisfied with it in its c

  • How to mofidy the selection text for a report

    Dears, Do you know how to modify a selection text in the selection screen of a standard report, such as changing "Storage Location" in the selection screen of report MB5B to "storage Loc"? one of a way to realize it is to modify the text of relevant

  • Package jdbc.sql

    we use j2sdk1.4.2_07 and we try to import the package jdbc.sql.* in order to connect our program(which is an applet) with an oracle database, but we receive the following error:"package jdbc.sql does not exist".Does anybody know where we can find the

  • External loading

    Hi guys.  Just have a couple of questions about external loading. Firstly, in order to reduce the file size of my swf, I want to place all the video and image content on a server and just loading it in using as.  Is this done using a standard URLRequ

  • White screen, boots only in safe boot

    Was watching a video, switched to full screen then computer froze during the transition.  Had to force shutdown by holding to power button.  Now on startup the apple logo displays, spinner, appears like it will boot, screen flashes dark then displays