How do I remove empty space combo box

My promblem is that I have empty space between selected option and the other option Below are code i used to build this combo box .This combo box display list of possible user of the system and selected option show to the currrent user of the system. Code are
<%      sql_query = "SELECT em_num, em_name, dfu_usr_id "+
                                        "  FROM dfusrf, emmast "+
                                        " WHERE dfu_emp_id = em_num "+
                                        " ORDER BY em_name ";
                           try{
                                  rset = db.execSQL(sql_query);
      while ( rset.next()){
           String em_num2 = rset.getString("em_num");
          String em_nme2 = rset.getString("em_name");
                              %>
     <option value="<%= em_num2 %>">
     <% if ( em_num2.equals(em_num) ){%>
     <option value="<%= em_num2 %>"selected>
                      <%=  em_nme2 %></option>
     <%} // end if
     %><%= em_nme2 %></option>
    <%} // end while
  } // end try
  catch ( Exception e )
    System.err.println("Error in query -  emmast2 - transaction_main.jsp " +e.getMessage() + " sql " + sql_query);
  finally
    if ( rset != null ) rset.close();
%>
</select>

while ( rset.next())
     String SELECTED = "";
     String em_num2 = rset.getString("em_num");
     String em_nme2 = rset.getString("em_name");
     if ( em_num2.equals(em_nme2) )
          SELECTED = " SELECTED ";
%>
     <option <%=SELECTED%> value="<%= em_num2 %>"><%=  em_nme2 %></option>
<%
} // end while

Similar Messages

  • How can we remove empty space created in the flat file unintentionally

    Hi Forums,
    In our data flow, transactional data is flowing from one ODS(Acquisition Layer) to two different ODS's(Integration Layer) parallely. Error occured in first ODS(Acquisition Layer) i.e ODS was not getting activated for long time coz of empty space[#] in one of the infoobjects of a particular record. After manually deleting the request in two ODS's of Integration Layer & edited that particular record in PSA and reconstructed that deleted request form PSA the problem was solved.
    This wrong entry is getting visible only at the time of ODS activation. Can any one suggest me a permanent solution for not occuring of empty space at the source system level or at SAP XI interface level or in the SAP BW system level?
    Thanks in advance

    Hi,
    If your ino object is of numeric type then check the condition if it is # (empty) then
    replace with 0 (zero), if it is char. then make it SPACE..you can use this following statement in your transfer / update rule for the IO.
    replace all occurances of '#'  with ' '.  (for Char.)
    (for Numeric)
    if COMM_STRUCTURE-XXXX is initial.  
    RESULT = 0.
    endif.
    Hope it helps..
    assign points if useful.
    Cheers,
    Pattan.

  • Help Needed - FusionFx Style - How do I remove the Dashboard Grey Box Section, so that Dashboard Background is Blank

    Help Needed - FusionFx Style - How do I remove the Dashboard Grey Box Section, so that Dashboard Background is Blank
    We like FusionFx Style but would like to keep the background white like blafp style.

    Can you be a little more descriptive on what you need here and explain what exactly you want to be changed.

  • How do I remove the space key on my keyboard for cleaning underneath?

    How do I remove the space key on my keyboard for cleaning underneath?

    Don't.  It will void the warranty.  Take is to an Apple store or an AASP and have them do it.

  • How to implement alphabetic search in combo box

    Hi all,
    how to implement alphabetic search in combo box through coding.
    Thanks for any replies

    Im not sure if I undestand correctly, but example is
    sCFL_ID = oCFLEvento.ChooseFromListUID
                        Dim oCFL As SAPbouiCOM.ChooseFromList
                        oCFL = oFormKontrolaMZ.ChooseFromLists.Item(sCFL_ID)
                        If oCFLEvento.BeforeAction = False Then
                            Dim oDataTable As SAPbouiCOM.DataTable
                            oDataTable = oCFLEvento.SelectedObjects
                                    val = oDataTable.GetValue(1, 0)
    oForm.DataSources.UserDataSources.Item("EditDS").ValueEx  = val
    and then load from datasource to matrix.
    hope it helps
    Petr

  • How to get value of html combo box (i.e select) in jsp?

    Hello,
    I was just wondering how to get value of html combo box in jsp page. My code for combo box is:
    <select name="combo" size="1">
    <%
    List<Project> projects = mgr.getProjects();
    for(Project project : projects){
    %>
    <option value="<%= project.getId()%>"><%= project.getName()%></option>
    <%
    %>
    </select>
    I thought combo.value might give me the value, but it throws exception.
    Any help is appreciated.
    Thanks.

    The combo does not exists in Java, but only in HTML. You have to submit the form containing the combo and then use request.getParameter("combo") to get it's value ;-)

  • How to select an item in combo box...!

    How to select an item in combo box in order to appear in a box of text (programmed in VB.Net for SAP Business One).

    Hi Carlos,
    I am not sure if this is what you want, but here's an example of selecting a value in a combo box. This is the item master data window and I'm changing Item Type to Labor.
            Dim oCombo As SAPbouiCOM.ComboBox
            Dim oForm As SAPbouiCOM.Form
            oForm = oApplication.Forms.ActiveForm
            oCombo = oForm.Items.Item("214").Specific
            oCombo.Select("L", SAPbouiCOM.BoSearchKey.psk_ByValue)
    Hope it helps,
    Adele

  • How to remove empty space from a file

    Hi all,
    Can any one help on how to remove the blank spaces from a file.
    I used trim function but unable to remove the spaces.
    I have a file in which there is a name like 'JAIRAM' and am storing this file in a variable FILE_CONTENTS.
    Now am unable to compare FILE_CONTENTS with another value as it is storing empty spaces also from the file.
    Please help on this
    Thanks,
    Srini

    Trim only trim at the beginning or at the end. Can you try using the replace sql function.. see below..
    SQL> select replace('abc def',' ','') from dual ;
    REPLAC
    abcdef
    cheers

  • How to remove empty space in CSS table and move spry menu bar?

    Hello! I created www.stonecreekha.com about a year ago basically by watching youtube tutorials and haven't done much with it since so I've forgotten everything! In IE7, everything appears as it should; but in Firefox and IE8, the spry menu bar is positioned slightly higher than it should be (it slightly cuts off the foot of the golfer) and there is an empty space between the navigation bar and the photo. The source code can be viewed from the website. Here are some pics:
    IE7 - how it is supposed to look:
    IE8:
    Firefox:
    Dreamweaver:
    So basically, I need to know how to remove that empty space between the navigation bar and the picture, and how to move the spry menu bar down a few pixels, in a way that it looks correct in IE8 and Firefox, and preferably IE7 as well.
    P.S. I'm a noob so if you could be as specific as possible on what to do in Dreamweaver I'd really appreciate it. Thanks

    I belive it's because of the -minus margin being used on the navbar, that you will need to use a negative margin to bring up both the left and right bodyArea divs.
    Try :       margin-top: -18px;  on both divs.  You may need to play around with that to get it more precise.
    Again, not sure what effect that has on IE as I can't test it.
    If it affects IE, then you may need to feed IE a conditional comment for the placement of those divs.

  • Remove empty space in Picture Library Slideshow web part

    I'm using Picture Library Slideshow web part in one of my pages. The web part itself is working fine, but I'm a bit annoyed by the white space the web part is consuming.
    The web part puts lots of empty space between the web part header and the picture and also to the bottom of the web part.
    The Slideshow web part generates the CSS on the fly, so I cannot really get a control of it cause it doesn't have any static CSS classes(that I know of, at least).
    How could I get rid of these white spaces?

    Hi Pekch,
    Thanks for your post.
    You can achieve this using JQuery.
    1.      
    Download
    JQuery to your SharePoint Server, and then add a Content Editor Web Part to the page;
    2.      
    View the source code using IE developer(Press F12), the code likes below:
    <td style="width: 195px; height: 213px;">
                    <div style="..." id="MSOPictureLibrarySlideshowWebPart_ctl00_m_g_ffa17524_ffa7_44e7_974c_1756a39257b9_cell">
                    </div>
    </td>
    3.      
    So now, you can find the control whose id is started with “MSOPictureLibrarySlideshowWebPart” using the JQuery Code below:
    jQuery('div[@id^=”MSOPictureLibrarySlideshowWebPart”]')
    4.      
    Remove the style of the “div” and his parent “td”. Because there is a “Width” attribute in both levels.
    More information:
    http://weblogs.asp.net/jan/archive/2010/10/05/getting-started-with-jquery-templates-and-sharepoint-2010.aspx
    http://www.bennadel.com/blog/1003-Cool-jQuery-Predicate-Selectors.htm

  • Search Engine issues and how to get multiple answers in combo box

    I'm doing a project in vb6 i have a data where when i search it should give multiple answers in combo box.
    example i have a debtor code each debtor code as more than one addresses when i search in one debtor code how can i get multiple addresses in the combo box. my search engine command
    as follows 
    Private Sub Command2_Click()
    Adodc1.Recordset.MoveFirst
    Adodc1.Recordset.Find "DEBTOR_CODE = '" & Text11.Text & "'"
    If Adodc1.Recordset.EOF = True Or Adodc1.Recordset.BOF = True Then
    MsgBox "Record Not Found!", vbApplicationModal
    Adodc1.Recordset.MoveFirst
    Me.Combo1.SetFocus
    Me.Combo1.ListIndex = Me.Text11.Text
    End If
    End Sub
    when i search in my text filed i should answer to the debtor code i'm finding and multiple answer in the combo box for the same debtor code.
    Please help ;( 

    Hello,
    This forum is for VB.NET for VB6 please review the links at
    the following page.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • How to add an image to combo box model in java

    i want to display a images.for that i take a combox.in that i want to add al images those i want to display, while clicking the image in combo box the image will be display.there is no problem for displaying an image, but i dont know how to add
    an image to a combo box model in net beans. please help me. if u have any idea plese forward to this mail
    [email protected]

    Hi Thomas,
                     You need to create an image field and in the source choose 'graphic content ; give the name of the variable which has the binary data . and give the type as 'MIME/image'.

  • How do I remove a space before the first word in a sentence using find and replace or GREP?

    Right, so I am laying out a document in inDesign from a word document and it has a space before every first word in a sentence. It is really annoying and I need a quick way to get rid of them. I wasn't too sure how to do it with find/change but I am sure there is a way in GREP if someone can help me. I have included an image so that people can see exactly what I mean.

    The ^ location works for all paragraphs.
    But a note to the OP, there is a sample script called FindChangeByList that removes leading and trailing spaces as well as extra spaces after punctuation, all in one go. But if you want to continue to use a GREP find/change to remove leading space, I'd modify Joel's suggestion to ^\s+ to get those cases where the user typed multiple spaces as well.
    And don't forget there are actually legitimate places for leading tabs, which both the script and this GREP will find and remove, so be careful.

  • How to compare value of two Combo Box

    I've two Combo Box(cbFirst & cbSecond). I want to compare the value that has been selected by the user and based on the result, output is displayed. In both Combo Box I've provided the value.
    Here is my code:
    var a:Number;
    var b:Number;
    function First(evt:Event):void{
        a = evt.target.value;
        trace(a);   
    cbFirst.addEventListener(Event.CHANGE, First);
    function Second(evt:Event):void{
        b = evt.target.value;
        trace(b);
    cbSecond.addEventListener(Event.CHANGE, Second);
    If (a > b){
         trace("a is greater")
    else
         trace(b is greater);
    The trace statement inside the functions are working fine and the correct value of a & b is printed. But the comparison in the if statement doesn't seem to work. Could you please help me out.

    there's a typo.  fix it or remove it:
    var a:Number;
    var b:Number;
    function First(evt:Event):void{
        a = evt.target.value;
    trace(a);
       compareF();
    cbFirst.addEventListener(Event.CHANGE, First);
    function Second(evt:Event):void{
        b = evt.target.value;
        trace(b);
    compareF()
    cbSecond.addEventListener(Event.CHANGE, Second);
    function compareF(){
    If (a > b){
         trace("a is greater")
    else
         trace(b is greater);

  • How to get values in the combo box in a XML form?

    Hi All,
        1. I have created a property which has "Default value" as "Clothings" and  "Allowed Values(csv)" as Real Estate - Sales , Clothings etc" by navigating to KM > CM > Global Services > Property Metadata > Properties.
       2. In the XML form builder when I drag this property I get a combo box for this property.
       3. But when I preview this by going to Content Management > Folder > New > FORMS > and select my XML form project I get a preview but it is not showing me the default values in the combo boxes which I created using the property in XML form builder.
    Please Suggest me as to how to get those values (which I mentioned in property) in the combo box ?
    Thanks in Advance,
    Jasmine.

    Hi All,
      I ll make the above Query Simple.
    1.In Xml Form Builder when you drag a property which has some 3-4 assigned values so you are  recomended to use a combo box.
    2.But the problem after using COMBOBOX is I am not getting these values in the preview of the combo box.
    3.Help Required please its urgent.
    Thanks in advance,
    Jasmine.

Maybe you are looking for