A text box should appear based on combo box selection in a jsp page.

Hi,
I have this problem. I ahve an option in the combo box"other". If other is selected then a text box shud appear . Can any one post a quick answer for me. may be a sample of how to do it will help me a lot.
Thank You,
Sagar.

Hi Guys,
Thnx all for ur replies. Let me explain u the scenario which i work in now. I have a combo box with 4 values "other " being the last of them. If i select "other" then a text box shud appear with the label. what happenes now is i have added onChange whn an option is changed . I have named that functiion refresh for which the code goes like this..
function refresh()
window.location.reload(true);
whn i select an other option thn the whole page gets refreshed and the first value only appears. If i select other then the page refreshes and gets back again to the first value. These guys here use tags like <c: if> <C;choose> <c: otherwise> which am not familiar with. Do pls help me in retaining the option selected.. Thank You.

Similar Messages

  • How do I disable the drop down box which appears below the Search Box (which shows previous searches) when I start typing in my search topic

    Hi I would like to know how to disable the drop down box which appears below the search box on the start page when I start to type in my search topic. If for example the first letter I type in is an S then it shows a list of previous searches of sites beginning with the letter S.

    This is stored in the Firefox form history. For details of how to clear form history and prevent Firefox from storing any more form history see https://support.mozilla.com/kb/Form+autocomplete

  • How to change the text color to red in a combo box?

    I'm writing a java program which have a combo box which shows all the name of the member from the database. However, I would like to change the text color of those member who have now currently on-line.
    Please help, it's URGENT. Thanks in advance.
    Clark

    hi,
    as i mentioned, you would require to use a custom renderer for this, for this
    //Class subclass the JFrame and has a JList in it
    import javax.swing.*;
    import java.awt.*;
    import java.util.Vector;
    public class ListRendererTest extends JFrame
         private JList lstMenu;
         private DefaultListModel defaultListModel;
         private JScrollPane scrollPane;
         private Vector listVector;
         public ListRendererTest()
              init();
              addComponents();
              showFrame();
         public void init()
              lstMenu = new JList();
              defaultListModel= new DefaultListModel();
              lstMenu.setModel(defaultListModel);
              scrollPane      = new JScrollPane(lstMenu);
              listVector = new Vector();
              MyListData m1 = new MyListData();
              m1.setName("Rakesh");
              m1.setOnline(false);
              listVector.addElement(m1);
              m1 = new MyListData();   //represents each User instance
              m1.setName("Makesh");
              m1.setOnline(true);
              listVector.addElement(m1);
              for (int i=0;i < listVector.size(); i++)
                   defaultListModel.addElement(((MyListData)listVector.elementAt(i)));
              lstMenu.setCellRenderer(new MyListRenderer());  //set custom renderer
         public void addComponents()
              getContentPane().add(scrollPane,BorderLayout.CENTER);
         public void showFrame()
              setTitle("List renderer test");
              setSize(300,300);
              setLocation(200,200);
              setVisible(true);
         public static void main(String args[])
              new ListRendererTest();
    }The above class is the Container which houses the JList in it, it uses two other classes, MyListData which is used to represent each user instance ( username, and information about whether he is online) and MyListRenderer (custom renderer).
    // Represents each user instance //
    public class MyListData
         private String name;
         private boolean online;
         public void setName(String name)
              this.name = name;
         public String getName()
              return name;
         public void setOnline(boolean online)
              this.online = online;
         public boolean isOnline()
              return online;
    //custom list renderer
    import javax.swing.*;
    import java.awt.*;
    public class MyListRenderer extends DefaultListCellRenderer
         private MyListData myListData;
         public Component getListCellRendererComponent(JList list, Object value, int index,  boolean isSelected, boolean cellHasFocus)
               myListData = (MyListData)value;
               setText(myListData.getName());
               setBackground(myListData.isOnline() ? Color.red: Color.white);  //check if online, if so show in different color
               setForeground(isSelected ? Color.blue : Color.black);
               return this;
    }hope that helps.
    cheerz
    ynkrish

  • Layer/OCG Visibility based on Combo Box Selection

    Hello,
    I'm VERY new to javascript, so please bear with me.  I have a combo box with multiple selections.  For some selections, I would like a separate OCG layer to appear, and with other selections that same layer to disappear.
    For example:
    ComboBox1: A, B, C
    Layer 1 default: hidden
    A - toggle layer 1: hidden
    B - toggle layer 2: hidden
    C - toggle layer 3: visible
    I have seen the javascripting involved turning layers on/off with buttons, but I'm having some difficultly with the combo box. 
    Thanks!
    Mike

    The code would be much the same as with buttons. Use the Validate event of the combo box to get the selected value (event.value) and show/hide the appropriate OCGs. If the combo box items have export values, you'd use the Keystroke event so you can get the export value of the selected item via the event.changeEx property: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.607.html

  • Display Record Based on Combo Box Selection

    Hi
    Using Flash Builder 4.6.
    I have a combo box that lists names stored in a mysql database. Once the user selects a name from the combo box, I would like to have the complete record display on a form.  Can you please point me in the right direction to accomplish this task?
    Thanks

    Hi
    Using Flash Builder 4.6.
    I have a combo box that lists names stored in a mysql database. Once the user selects a name from the combo box, I would like to have the complete record display on a form.  Can you please point me in the right direction to accomplish this task?
    Thanks

  • PDF forms have problems displaying text and only appears when the field is selected

    Hello,
    I created some pdf forms to distribute to the company clients. But we are having some people complaining about the text visibility. When they have work in team, the pdf that they receive from a third person often appears unfill or without text, the text is only visible when the field is selected. I need to find a solution for this because our company products are base on this forms.
    If there is any addition information that I should add to understand what is happening and how to fix it, I'll be happy to write it.
    In the company, we all have mac and the forms where created innitially in Adobe acrobat 9 pro, but we have now Adobe acropabt XI pro.
    The users have both Mac and Windows systems.
    Thank you,

    This is usually caused by the form being filled-in and saved by a Mac user who is using the Preview application to view the PDF. More information is here: http://kb2.adobe.com/community/publishing/885/cpsid_88564.html
    It is a good idea to inform your users that Adobe Reader (or Acrobat) should be used to work with the forms.

  • Form Based Authentication on Tomcat with custom index.jsp page...

    Hi there ppl,
    I've got Form Based Authentication working correctly on my Tomcat server but I want to override the default generated index.jsp after successfully logging on. I've tried placing my own index.jsp in the directory that's restricted, but its only overridden by the default one when successfully logged on which displays:
    "Authentication Mechanism FORM"
    This means having to navigate by typing the url in the address bar to another page which is gets really annoying afterawhile.
    Any help on this would be much appreciated,
    thanks already

    Yes there's a default generated index.jsp page that I'm having trouble overriding with one of my own. Have you used Form Based Authentication before? To do so you have edit the WEB-INF/web.xml file by adding:
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Secure Area</web-resource-name>
    <url-pattern>/test/secure/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>admin</role-name>
    </auth-constraint>      
    </security-constraint>
    <login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
    <form-login-page>/test/secure/loginpage.jsp</form-login-page>
    <form-error-page>/test/secure/errorpage.jsp</form-error-page>
    </form-login-config>
    </login-config>
    When you attempt to first go to any page in my /test/secure/ directory you get redirected to the /test/secure/loginpage.jsp where you have to login as a tomcat user, when succesfully logged on you get redirected to an index.jsp page which is NOT the one I created in test/secure/index.jsp. Even when I type in the url to go to my own test/secure/index.jsp I still don't get my own one that exists there, but instead get the default one that's generated that displays:
    "Authentication Mechanism FORM".
    Hope that makes more sense.
    I've tried restarting tomcat but it makes no difference.

  • Trying to update table based on combo box choice

    Hey all,
    I have taken over code someone has created and it is confusing me what they have done. the code uses an abstracttablemodel to create the table (and i assume, fill the data). I can't for the life of me, figure out how the data is loaded. Can someone tell me what is happening. also, what would be the easiest way to update it to only show that info that matches the criteria? I will post what i think is relevant code, but if i am missing something, i will be happy to throw it in there. Here's the code:
    public class ABMD extends JPanel implements ActionListener
    private JTable table;
        private TableSorter sorter;
    public ABMD()
    sorter = new TableSorter(new ABMDTableModel());
            table = new JTable(sorter);
            sorter.setTableHeader(table.getTableHeader());
            ListSelectionModel rowSM = table.getSelectionModel();
            rowSM.addListSelectionListener(new ListSelectionListener()
                public void valueChanged(ListSelectionEvent e)
                    if (e.getValueIsAdjusting()) return;
                    ListSelectionModel lsm = (ListSelectionModel)e.getSource();
                    if (lsm.isSelectionEmpty())
                        viewDataButton.setEnabled(false);
                        getDataButton.setEnabled(false);
                        removeDataButton.setEnabled(false);
                    else
                        int selectedRow = sorter.modelIndex(table.getSelectedRow());
                        PlanData currentPlanData = (PlanData) planArrayList.get(selectedRow);
                        if (!currentPlanData.getPlanListLoaded())
                            getDataButton.setEnabled(true);
                            viewDataButton.setEnabled(false);
                            removeDataButton.setEnabled(false);
                        else
                            getDataButton.setEnabled(false);
                            viewDataButton.setEnabled(true);
                            removeDataButton.setEnabled(true);
                        String desc = "";
                        desc = currentPlanData.getUniqueID();
                        descTextAreaValue.setText(desc);
    class ABMDTableModel extends AbstractTableModel
            private String[] columnNames = {"Plan Local",
                    "OPLAN",
                    "Air Defense Plan",
                    "Planning Period",
                    "Defense Design",
                    "Published Date"
            public int getColumnCount()
                return columnNames.length;
            public int getRowCount()
                return planArrayList.size();
            public String getColumnName(int col)
                return columnNames[col];
            public Object getValueAt(int row, int col)
                PlanData planData = (PlanData) planArrayList.get(row);
                switch(col)
                    case 0:
                        return Boolean.valueOf(planData.getPlanListLoaded());
                    case 1:
                        return planData.getOplan();
                    case 2:
                        return planData.getAirDefensePlan();
                    case 3:
                        return planData.getPlanningPeriod();
                    case 4:
                        return planData.getDefenseDesign();
                    case 5:
                        return planData.getPublishedDate();
                throw new IllegalArgumentException("Illegal Column: " + getColumnName(col));
            public Class getColumnClass(int c)
                return getValueAt(0, c).getClass();
            public boolean isCellEditable(int row, int col)
                return false;
    }

    I can't for the life of me, figure out how the data is loadedLooking at the get value method we see:
    PlanData planData = (PlanData) planArrayList.get(row);Therefore the data is store in the "planArrayList". So the data is loaded whenever you add data to that ArrayList.

  • Is there a way to make the spell check work on the entire web page without making the content editable? Or at least those boxes that appear when you enable spell check on the entire page, can you make them disappear?

    I found an addon that allows you to spell check on the webpage but it make the entire page editable and these boxes appear on everything i highlight. Can i get rid of the boxes?

    I had thought this situation was solved but it just got worse. In addition to being without service for several days I am now being charged  a cancellation fee for a broadband service that BT disconnected in error. BT Vision was also terminated by BT but the set up charges are still in place. Does anyone know who the relevant Ombudsman is? I called BT from America on Friday - for an hour - while someone called Aruj sorted out why there is an order 'in progress' that I didn't initiate; why I have fees relating to a problem created by BT and why there are references to a house move that didn't take place and a BT Vision service I no longer have but didn't cancel myself. He assured me it would be rectified and my bill would be reduced by 139 pounds and we would get confirmation of this later that day. I asked him what chance there was that this would not actually happen - he said no chance at all; my new bill would be 23.50.
    There was no text message. An online chat person today told me there had been a fee reduction request which had been declined and there was nothing else he could help me with as he dealt only with broadband. But he would get BT Vision to email me. They always seem so helpful.............
    I'm sure I'm listed somewhere as 'a problem', there's no other explanation for why I get the runaround

  • Selecting item in combo box itemEditor, after passing it's dataprovider from a popup window

    Hi..
    I have a datagrid which has a combo box itemeditor in the first column. When I click on the combobox, there is an item called 'Search'. When this is selected, a pop up window appears where we can search for some contact names. The search results are populated in List component, within the pop up and on double click of any of the names from the list, all of the list content is passed on as dataprovider to the combobox itemeditor of the grid. It works fine till here. Now, how can I highlight the selected name(name on which I double click, in the list of the pop up window), as the 'selectedItem' of the combobox itemeditor? ie., as soon as I double click the name, that name should appear on that combo box. As of now, wehn I double click, the search result names are passed on as dataprovider to the combobox, but a blank entry will be selected in th combobox, instead of the selected name from teh list of the pop up window. Can you please help me out on how to achieve this? I had been cracking my head for 2days now, hasn't worked out yet for me

    Hi...
    there are two events which have been used, one is doubleclick event and the other one is on selecting the item from the list and clicking on OK button(this will be the most frequently used function, i cannot use event target event for this OK button... ) . I have attached the screen shot. Please have a look at it and let me know how can i achieve that...
    I can use custom event, but the main problem is that the inline itemeditor's details are not accessible in the code.... I can access some function from within the inline itemeditor combo box using outerDocument.myFunction() (this is something like GET). Is there a similar way, to SET the data into this itemeditor?

  • Simple date selector based on three combo boxes

    Hi all,
    I am looking for a simple script to allow users to choose a valid date. However, it should only be based on combo boxes (I just need the basics really).
    Similar to: http://www.easyjet.co.uk/en/book/index.asp
    But without the visual calendar bit and with a separate combo box for choosing the year. I had a look at jcalendar and various other scripts, but they are way too advanced for my application
    Does anybody know how to accomplish this?
    Thanks in advance.

    we have Hboxes i.e. A,B,C etc and each containing many boxes and that boxes contain the labels
    for 'A' HBox I have many boxes inside 'A' may be 20 and these boxes contains the label for each box A1,A2,....A20
    some of them may be highlighted with red color based on the values coming from database for respectivg HBoxes A,B,C etc
    Now I want to select a value from combo box if it is 7 I have only 3 positions to select in 'A' which didn't highlighted
    and these three are in contiguous so when i click on any one of them the remaing possible number of values to be highlighted either they are left or right to the selected box and then i have 4 in my hand to select I need to have the chance to select them from any 4 from any remaining boxes from B,C etc
    and if tere are 7 contiguous boxes to select and my selected value is 3 only three needs to be selected when i click on any one box

  • I have to combo box content change based on the selection on the other

    I have huge unsolve problem where by I have to combo box change content of the combo box based on the selection in the first combo box . The problem is The value changes do not have effect on the second combo box. Below is the content of the coding used for both the combo box.
    function setReasonCode(obj){
                         <%String sql_query3 = "SELECT DISTINCT (ir_tran_typ) "+
                                              "  FROM intrcd ";
                               System.out.println("trans type"+sql_query3 );           
                                try{
                                    rset = db.execSQL(sql_query3);
                                catch(SQLException e) {
                                    System.err.println("Error in query - intrcd - transaction_main.jsp " +e +" sql " +sql_query3);
                                while(rset.next()){
                                    tran_cde = rset.getString("ir_tran_typ");
                                            tran_typ.addElement(rset.getString("ir_tran_typ"));
                                            System.out.println("trans type 34 "+tran_typ );%>
                                            <% }%>
                                          alert(obj.value);
                                  <%for(int i=0 ;i<tran_typ.size();i++){
                                     System.out.println("trans type 222  "+ tran_typ.size());
                                       tran_cde =tran_typ.elementAt(index).toString();%>
                                       <%System.out.println("trans type before "+ tran_cde);%> 
                                        eval(document.all.tran_cde.option
                                      if(D == <%=tran_cde%> ){
                                       <%System.out.println("trans type D"+ tran_cde);%>     
                                       <%String sql_query2 = "SELECT ir_rea_cde,ir_rea_desc"+
                                              "  FROM intrcd"+
                                              " WHERE ir_tran_typ = 'D' " +
                                                        " ORDER BY ir_rea_cde ";
                               System.out.println("query"+ sql_query2);           
                                try{
                                    rset = db.execSQL(sql_query2);
                                catch(SQLException e) {
                                    System.err.println("Error in query - emmast2 - transaction_main.jsp " +e +" sql " +sql_query2);
                                        index = 1;
                                while(rset.next()){
                                        rea_cde = rset.getString("ir_rea_cde");
                                        rea_desc =  rset.getString("ir_rea_desc");
                                       tran_typ.removeAllElements();
                                       }%>
                                  if( R == obj.value){
                                       alert(R)
                                      if(R== <%=tran_cde%> ){
                                       <%System.out.println("trans type R"+ tran_cde);%>     
                                       <% sql_query2 = "SELECT ir_rea_cde,ir_rea_desc"+
                                              "  FROM intrcd"+
                                              " WHERE ir_tran_typ = 'R' " +
                                                        " ORDER BY ir_rea_cde ";
                               System.out.println("query 2"+ sql_query2 );           
                                try{
                                    rset = db.execSQL(sql_query2);
                                catch(SQLException e) {
                                    System.err.println("Error in query - intrcd - transaction_main.jsp " +e +" sql " +sql_query2);
                                        index = 1;
                                while(rset.next()){
                                        rea_cde = rset.getString("ir_rea_cde");
                                        rea_desc =  rset.getString("ir_rea_desc");
                                       }%>
              <%}%>
                }

    Not unless you know which file in the app sets the choices. I've been through it pretty thoroughly and can't find the one.

  • Report error when using combo box and one text field is empty

    I'm building an interactive pdf in adobe pro 9. My problem is the following: I have one text field where you can enter a numeric code and that is used to populate another text field when I choose an option on one combo box.For example: suppose I write the code 123 in the text field "A" and that the combo box has two options ("data" and "-"). When I select "-", another text field "B" is empty, while when I select "data" i populate the text field "B" using the code entered "A" with the text "data_123". In order to do this I use the standard javascript code in the Format>Custom tab of the combo-box.
    My questions are:
    - how can I prevent the pdf to proceed selecting an option in the combo box when the field "A" is empty?
    - how can I update the field "B" every time that I change the text in "A"? I found that the text is "B" is updated only when I press the selection in the combo box.

    You can set the combo box to read-only in the Validate event of the A field:
    // Validate script for text field
    getField("combo1").readonly = !event.value;
    To update the value of B when A changes, you can expand the script above to something like:
    // Validate script for text field
    var f1 = getField("combo1");
    var f2 = getField("B");
    // If there is an entry in the A field...
    if (event.value) {
        f1.readonly = false;  // Make sure the combo box is activated
        f2.value = f1.value === "-" ? "" : "fa.value + event.value;  // Update the value of field B
    } else {
        f1.readonly = true;  // Deactivate the combo box
        f2.value = f2.defaultValue;  // Reset field B
    You might also want to reset the combo box somewhere in there, but it's not clear to me when you would want to do that.

  • How to change screen combo box value from a method?

    Hi,
    I have a screen that has a combo box and an ALV.
    the combo box has the line numbers of the data in the ALV.
    you can select the line item and then the ALV changes...
    I fill the combo with function VRM_SET_VALUE.
    all is good once the user changes the combo box.
    I want to enable the user to click (hotspot) on ALV and then to ... and to change the value of the combo box to the line number he clicked on.
    I couldn't change the value inside that box.
    The combo box is declared as global parameter.
    when I assign a value to it inside the method, it is good. but once back to PAI, it is the old value.
    Do you have any idea how to set up that value?
    Thanks.

    Itay,
    When you load the combo box, you should be setting a "key" for each entry in the combo box.
    See below:
      move '2010FY' to Value-Key.
      move '2010 - Full Year' to Value-Text.
      append value to list.
      move '2010Q1' to Value-Key.
      move '2010 - Q1' to Value-Text.
      append value to list.
      move '2010Q2' to Value-Key.
      move '2010 - Q2' to Value-Text.
      append value to list.
      move '2010Q3' to Value-Key.
      move '2010 - Q3' to Value-Text.
      append value to list.
      move '2010Q4' to Value-Key.
      move '2010 - Q4' to Value-Text.
      append value to list.
      move 'COMBO1' to name.  "name of Combo box in the screen
      call function 'VRM_SET_VALUES'
        exporting
          id = name
          values = list.
    So add these "keys" to a hidden column in the ALV grid.  Then .... when the user presses a hotspot, pass the value of the hidden column (for the selected row) into the COMBO1 box.
      move '2010'FY' into Combo1.  " if they selected Full Year of 2010

  • Need to change the LOV field based on checked box selection in OAF page

    Dear ALL,
    I have a requirement as below:
    I have a custom OAF page having a lov  field which is mandatory, a check box and a two text fields.
    So based on LOV value selection i am defaulting two text field value automatically.
    So my requirement is when user selects the check box automatically the LOV field should be non mandatory and user can insert in values to the lov field and text field and submit it.
    SO basically based on check box field selection i need to make the lov field in such a way it should accept all the values what user enters instead of check the query added in VO behind the LOV.
    Please suggest me some pointers to achieve this requirement.
    Thanks
    Deb

    hi,
    in PFR use:
    if ("checkevent".equals(pageContext.getParameter(EVENT_PARAM))) 
                     HashMap hashMap = new HashMap();
                     String checkboxval=pageContext.getParameter("item2");
                  hashMap.put("checkboxval",checkboxval);
                    pageContext.setForwardURLToCurrentPage(hashMap ,
                    true, // retain the AM
                    OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
                    OAWebBeanConstants.IGNORE_MESSAGES);
    and in PR use:
    if((pageContext.getParameter("checkboxval'))!=null)
    OAMessageLovInputBean lovInputBean=(OAMessageLovInputBean)webBean.findIndexedChildRecursive("item3");
          lovInputBean.setRequired("false");
    try it
    Regards
    Mahesh

Maybe you are looking for

  • Blurry printing after 10.1.7 update on Acrobat X Pro

    After the latest update (10.1.7)  to my copy of Acrobat X Professional in around May 15th, all my PDFs print out - BLURRY like Acrobat has double vision or bad hangover. All printing from all other programs on my computer continues to have excellent

  • ADD-ON missing in Phase "ADD-ON Selection"

    Hello All, We are in the process of updating our ERP 6.0 system (EHP4 FOR SAP ERP 6.0 / NW7.01) to EHP5. While running maintaince optimizer  got some warnings for 4 add-ons as below. Component C-CEE 110_604 without suitable Product Instance Software

  • How to setup a track for production support in NWDI ??

    Hi, *I have a requirement:* Suppose I am working on a product development, i have finished phase -1 of the development, I moved the changes to QA system and than I moved it to the production. Than I started working on Phase-2 of that product developm

  • How to open PS in CC?

    I am using trial of CC and have downloaded it and PS.  Can't seem to find PS in the Apps window located on side of my files.   I'm ready to rock, but have nothing to do it with.  On Mac Powerbook that is one month old.

  • Interface Port Channel

    My port channel is not coming up can you review my port channel configuration. SWITCH# interface Port-channel12 switchport access vlan 513 switchport mode access end