SELECT-ELEMENT

hi!
I have a SELECT element in my html-file and i can't get the selected value from it in NETSCAPE. In Explorer
everything goes fine with the code tha is beneath.
I am a very beginner in this and do not know if there is a error in my code or should i code this diffrently in NETSCAPE.
Can anyone help me?
Here is part of the code i have.
function initSearch()
var f = document.search;
var fa = document.add;
fa.ADD_FORM.options.length = 1;
fa.ADD_FORM.options[1] = new Option('--Lakis��teinen tapaturmavakuutus', ' ');
fa.ADD_FORM.options[2] = new Option(' Palkkatiedot 4 viikon ajalta', '/redbox/servlet/com.sampo.redbox.servlet.FormServlet?ACTION=NEW&FORMVERSION=0&FORMNAME=OccuAcci4WeekPay');
<form name="add">
<TABLE name="add_table" border="0">
<TR>
<TD> </TD>
     <TR>      
<TD><FONT color=#000000 face=arial,helvetica size=3>Lomakkeet:</FONT></TD>
<TD colspan=3>
     <SELECT NAME="ADD_FORM"     
<option value="--none--">-
<option value="--none--">Valitse Lomake . . . . . .
<option value="--none--">-
<option value="--none--">-
<option value="--none--">-
</SELECT></TD>
     </TR>
<TR>
<TD colspan=4 align="center">
     <input type="button" value="Avaa" onClick= "loadFormLink(document.add.ADD_FORM.value)">
</TD>
</TR>
     </TABLE>
</form>

This should do:
document.yourForm.yourSelect[document.yourForm.yourSelect.selectedIndex].text;
or
document.yourForm.yourSelect[document.yourForm.yourSelect.selectedIndex].value;
For more information here you have a link to the JavaScript reference.
http://developer.netscape.com/docs/manuals/communicator/jsref/index.htm

Similar Messages

  • Get selected elements from a table

    Hi all,
    I have a requirement like i m enhancing standard component in that i have added one button on click of that i want fetch the selected line item from the table ( which is a normal table). selection mode is auto.
    i tried with  the following code.
    DATA:lr_element                   TYPE REF TO if_wd_context_element,
           lv_index                     TYPE i.
    *--Get selected element
      lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
    ****Here itself its throughing dump because lr_element is initial***************
    *--get selected element index.
      lv_index = lr_element->get_index( ).
    can any one help me what is the wrong.. else suggest me how to get the selected elements from a table....
    Thanks in advance.

    *--Get selected element
    lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
    if  lr_element is bound.
    lv_index = lr_element->get_index( ).
    endif.
    Instead you can directly read the node if that row is a lead selected one.
    lo_node = wd_context->get_child_node( name = 'EMP' ).  "Emp is node name
    lo_ele = lo_node->get_lead_selection( ).
    or
    lv_index = lo_node->get_lead_selection_index( ).
    where is the above code written..is it written in OnLeadSelect event of the TABLE..
    can any one help me what is the wrong.. else suggest me how to get the selected elements from a table....
    As the selection mode is Auto there is no multiple selection..hence try to use the lead selection only.
    Edited by: Lekha on Jan 3, 2012 6:47 PM

  • How can I access the selected element of a DropDownByIndex-box?

    Hi,
    I want to create a WebDynpro with two web services. I created the first request with the first web service and the results are displayed in a DropDownByIndex-Box. Now the user should choose one of the results and I would like to use this for the request with my second web service. How can I access the selected Element of a DropDownByIndexBox in the Code?
    Thank you!!
    Julia

    Hi Julia,
    when user select one element in drop down it automatically set lead selection of node binded to dropdown.
    For example if you bind a dropdown to node myNode with value attribute myAttribute the lead selection of node myNode is set in the position of element choose from user.
    So to take this chooised element use this code:
    wdContext.currentMyNodeElement.getmyAttribute()
    bye
    Andrea

  • Error Rendering SELECT Element in Safari Under iOS (iPhone & iPad)

    Hello,
    Our website contains three SELECT elements that are not rendering properly under Safari, iOS 4.2 on both an iPhone and iPad.
    If you load http://demo.campusguides.com in a normal browser (Chrome, FF, non-mobile Safari) you will see that the three "Browse By" boxes at the top of the page each contain text that you can select using your mouse. Each of those boxes is actually a SELECT element and each piece of text is an OPTION within that SELECT box. We have set a SIZE property on the SELECT element that allows the user to see more than one OPTION value at a time. Here is the W3C page that mentions the SIZE option for SELECT boxes - http://www.w3.org/TR/html401/interact/forms.html#adef-size-SELECT.
    On all the browsers I have tested the list displays properly, meaning that you can see multiple OPTION values at once as well as a scroll bar (when needed) that allows you to scroll up and down the list. On iOS Safari however the list is displayed as an empty box with no OPTION values visible to the user. If the iOS user clicks the SELECT element they are taken to the normal SELECT interface for Safari which does work fine, but without any content displaying in the box to begin with, I don't think many users would know they can / should click that element.
    So basically I think this is a bug, and that iOS Safari should either render that SELECT element with the OPTIONS visible to the user, or it should ignore the SIZE property and render that element like a "normal" SELECT menu where only one option is visible at a time.
    Thank you!

    Check here for Safari HTML guidelines: Safari HTML Reference
    If you regard the seen behavior as a bug then report it to Apple at: Bug Report Form
    Note: This is a user-to-user forum. You might get better response in the developers forums.

  • Firefox 33 HTML select elements do not display correctly

    HTML form <select> elements do not display options correctly in Firefox 33.
    For example:
    <select id="field_4" class="mainForm" name="field_4">
    <option value=""></option>
    <option value="submitted"></option>
    <option value="pending"></option>
    <option value="discarded"></option>
    <option value="all"></option>
    </select>
    should display a drop down with 5 elements (first one blank) but no elements at all are displayed.
    The bounding box does not seem to be computed correctly so no options display.
    I have observed this issue on multiple pages. These pages displayed correctly in older version of Firefox and they display correctly under IE. The problem occurs with no addons or additional themes installed. The problem does not occur in SafeMode so I suspect that it is theme related but the Default 33.0 theme is the only installed theme and it cannot be disabled outside of SafeMode. I tried installing and changing multiple themes without success. The problem persists after restarting Firefox and after rebooting the computer and even after uninstalling and re-installing Firefox.
    I can supply a screen shot if needed.

    You can try to disable hardware acceleration in Firefox.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    You need to close and restart Firefox after toggling this setting.
    *https://support.mozilla.org/kb/upgrade-graphics-drivers-use-hardware-acceleration
    If it works in Safe Mode and in normal mode with all extensions (Firefox/Tools > Add-ons > Extensions) disabled then try to find which extension is causing it by enabling one extension at a time until the problem reappears.
    Close and restart Firefox after each change via "Firefox > Exit" (Windows: Firefox/File > Exit; Mac: Firefox > Quit Firefox; Linux: Firefox/File > Quit)
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • When using the google translate js api to dynamically translate a webpage the chosen option in a select element does not show up. This happens to me only in FF (using v4)

    I am asking you this because I did not find this problem in any of the other browsers I have (chrome, opera, ie, safari).
    I uploaded a simple html file to show this problem here: http://rvyu.com/mKLG
    Notice that if you don’t change the language you have no problem changing the value in the select element (the original one with 3 options, not the one generated by google translate) but if you do when you switch values the selected one does not show up.

    Ok thank you so much, for your timely response.
    RESPONSES:
    1)   When I set up my iMac, I did not transfer any data directly from my windows PC.  I simply used the same iTunes login and account.  I have access to all of the files via the "Purchased" section of the iTunes store.  If I click "Download Previous Purchases"  text, I can download ALL of the purchases I have ever made.
    2)   I have the Apple TV 2, so good news, question answered.  I thought maybe it was the Apple TV 1, but it is the Black model, so bam.  Good response for you.  Well the whole damned reply is an awesome response, just pointing out that one piece of awesome.  I stated that it was an Apple TV 2, and yet you were still good enough to figure I could be mistaken, and provide me with knowleedge just incase.
    QUESTIONS:
    3)   So can my iMac not stream the data directly from itunes, without download?  Apple TV can, but perhaps that is something among many things that maker it unique, and awesome.
    SERIOUSLY.... THANK YOU... 
    I work in the computer support section for the Military.  The only problem is we use Windows , lol.  Well that and i've been gone for nearly 6 months on recover.  I go back next month though I hope.  But working in that field gives me the abilty to judge responses that run inside the same vein.  Your response was so awesome that I half thought I might have written it myself. 

  • Current selected element of table ( using tree  )

    Hi experts ,
                         I am using a tree by table UI in which master. I want to know text of current selected element of table (which is one of the column of table ) . as table is dynamically expanding or collapsing upon expanding or closing master column.
    so i used follwing code in do modify view to get it
    IWDTable tab =  (IWDTable) view.getElement("Table1");
                        tab.mappingOfOnLeadSelect().addSourceMapping("row", "element");     
    public void onActionOnrowSelect
    (com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, int element )
        //@@begin onActionOnrowSelect(ServerEvent)
        //@@end
    but above code also give me current row (an integer value) .
    but its not solving my problem . as current row elemt is always not going to be same row in which table (data source for table).
    can any body have solution ?
    Regards
    abhay

    Hi Abay,
    IWDTable tab = (IWDTable) view.getElement("Table1");
    tab.mappingOfOnLeadSelect().addSourceMapping(IWDTreeNodeType.IWDOnLoadChildren.NODE_ELEMENT,"element");
    datatype of the <b>element</b> should be <b>IWDNodeElement</b>
    Or
    You can use
    IWDNodeElement IWDNode.getTreeSelection()
    Ex: wdContext.nodeA().getTreeSelection()
    Regards
    Ayyapparaj

  • JScrollpane, scroll to selected element

    I have a JList of years inside a JScrollPane. The size of the scrollpane is the height of one row, so you can only see one year at a time. If the selected element in the list is changed, I want the ScrollPane to move to the selected element.
    It was suggested to me that I use the methods
    scrollRectToVisible()
    and
    getCellBounds()
    but I can't get that to work.
    Here is just a rough bit of code using these functions:
    import java.awt.*;
    import javax.swing.*;
    public class test {
         public static void main(String[] args) {
              JList selectYear;
              DefaultListModel selectYearModel;
              JScrollPane selectYearScrollPane;
              selectYearModel = new DefaultListModel();
              selectYear = new JList(selectYearModel);
              selectYear.setFixedCellHeight(25);
              selectYearScrollPane = new JScrollPane(selectYear);
              selectYearScrollPane.setPreferredSize( new Dimension(100, 25) );
              for(int i=1800; i<2200; i++) {
                   selectYearModel.addElement(""+i);
              selectYear.setSelectedIndex(5);
              selectYearScrollPane.scrollRectToVisible( selectYear.getCellBounds(selectYear.getSelectedIndex(), selectYear.getSelectedIndex()) );
              JFrame myFrame = new JFrame();
              myFrame.setVisible(true);
              myFrame.add(selectYearScrollPane);
              myFrame.pack();
    }If you run this you will see that the selected index is not scrolled to.

    I have a JList of years inside a JScrollPane. The
    size of the scrollpane is the height of one row, so
    you can only see one year at a time.Then you shouldn't use a JList. A JSpinner seems more appropriate.
    If the selected
    element in the list is changed, I want the ScrollPane
    to move to the selected element.
    It was suggested to me that I use the methods
    scrollRectToVisible()
    and
    getCellBounds()
    ensureIndexIsVisible(int index) might work better.

  • Editor closes program when panorama is selected elements 7

    editor closes program when panorama selection of photos is selected, elements 7

    I have another question....
    I want to set my program to fill the screen. This works mainFrame.setExtendedState(JFrame.MAXIMIZED_BOTH);
    but it covers the windows start bar. I want it to maximize and not cover the windows task bar (the thing that has the clock and start button etc...)
    also this program is intended for all plate forms. so for mac I don't want it to cover the task bar that is at the top of the screen.
    and for linux i don't want it to cover the task bar if there is one. thanks.

  • Sometimes Cannot Select Elements in Design view of Dreamweaver

    Hello,
    From time to time, i have trouble selecting elements in the design view.
    Sometimes it works right away. Sometimes I need to click 6-10 times, and sometimes it just doesn't work ( a larger all encompassing element stays selected and no matter how much i click, there is no change )
    I originally thought it was a bug, but I expected it to be fixed by now.
    This also seems arbitrary, perhaps someone here know why it's happening and how to avoid it.
    Thanks
    Peter

    You probably have a CSS overflow:hidden property applied to one or more divisions for float containment.  Switch to Split View.  Or turn off CSS styles in Design View:  View > Style Rendering > untick Display Styles.
    Or you can comment out /**overflow:hidden **/ until you're ready to Preview.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Type choices in select elements

    I have an order entry form that uses a select list as the id
    that will be inserted into another table.
    I want the user to be able to type in several characters to
    locate an exact name or id in a table. Currently, the user can only
    type in one character to find a match on the first character in the
    select element. Do I have to write a function to accomplish this? I
    don't see any reference to cfselect and onKeyDown on this forum.
    So, I thought I'd ask before I go and recreate the wheel.
    Thanks,

    I would like to use the combobox-multicharacter search
    dropdown script but I am having trouble adapting your code to my
    database query/insert. I have changed the names to reference my
    form and query but it doesn't seem that the javascript is being
    invoked.
    I get no errors.....just the same functionality that is
    inherent with the browser. Should I do something else to
    this?

  • Select element not found

    Hi,
     i am using vugen 11.00 for recording an application.. It is recording correctly but while replaying the script it is showing error as " SELECT element not found in the list"... The version of IE is 8.. is it application bug or vugen recording problem?
    please tell me how to resolve the bug... we are using Web( CLICK & SCRIPT) protocol..
     The error is occring in the below code line which is made bold ( web_list ).
        web_list("wddlOccurBeat",
            "Snapshot=t18.inf",
            DESCRIPTION,
            "Name=wddlOccurBeat",
            ACTION,
            "Select=BEAT 3",
            LAST);
        web_list("wddlOccurVillage",
            "Snapshot=t19.inf",
            DESCRIPTION,
            "class=sSfocus"
            "Name=wddlOccurVillage",
            ACTION,
            "Select=GOWDAKARANAGANAHATTI",
            LAST);
    Thanks,
    shrinivas

    I'm using another keyboard model (not vim-like). I often prefer to navigate with [shift]+[arrows] with [tab] in case of form. So this browsers are not suitable for me because it is not acting in a way that I like.

  • HTML Select element doesn't work in IOS8 UIWebView and PhoneGap

    Local HTML pages in UIWebView containing or PhoneGap (Cordova) apps render the HTML select element on screen but it does not respond to clicks.  The usual option picker does not pop up when these apps are run in iOS8.
    The same apps work fine in iOS7 and below.  Any insights?

    I had the same issue with the ios 8 simulator. Unchecked Hardware>Keyboard>Connect hardware keyboard and the issue is solved!

  • IOS 8.1 Mobile Safari Crashes when adding options to a select element

    I got the following crash report when trying to add options to a <select> element using jQuery 1.11 and native javascript. Any ideas? Does anyone know anything about this crash?
    Date/Time: 2014-11-26 11:45:28.852 -0600
    Launch Time: 2014-11-26 11:40:10.181 -0600
    OS Version: iOS 8.1 (12B410)
    Report Version: 105
    Exception Type: EXC_CRASH (SIGABRT)
    Exception Codes: 0x0000000000000000, 0x0000000000000000
    Triggered by Thread: 0
    Last Exception Backtrace:
    0 CoreFoundation 0x2bb3bc1a exceptionPreprocess + 122
    1 libobjc.A.dylib 0x39720c86 objc_exception_throw + 34
    2 CoreFoundation 0x2bb3bb60 +[NSException raise:format:] + 108
    3 UIKit 0x2f2023a2 -[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:] + 442
    4 UIKit 0x2f2021be -[UITableView scrollToRowAtIndexPath:atScrollPosition:animated:] + 34
    5 WebKit 0x2f979aaa -[WKSelectTableViewController viewWillAppear:] + 146
    6 UIKit 0x2f010766 -[UIViewController setViewAppearState:isAnimating:] + 434
    7 UIKit 0x2f2c6dc8 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 580
    8 UIKit 0x2f074c48 _applyBlockToCFArrayCopiedToStack + 304
    9 UIKit 0x2eff0aa6 _afterCACommitHandler + 454
    10 CoreFoundation 0x2bb023b0 _CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 16
    11 CoreFoundation 0x2baffa6e __CFRunLoopDoObservers + 274
    12 CoreFoundation 0x2baffe76 __CFRunLoopRun + 910
    13 CoreFoundation 0x2ba4e20c CFRunLoopRunSpecific + 472
    14 CoreFoundation 0x2ba4e01e CFRunLoopRunInMode + 102
    15 GraphicsServices 0x32e2d0a4 GSEventRunModal + 132
    16 UIKit 0x2f05a1cc UIApplicationMain + 1436
    17 MobileSafari 0x0007a944 0x72000 + 35140
    18 libdyld.dylib 0x39ca0aaa tlv_initializer + 2

    I think the Microsoft Office software may be causing Safari to crash. There are 14 referencees in the crash report. If Safari didn't crash before the 5.1 update, then that's more then likely the culprit.
    Check to see if there are any Office updates available.

  • SelectManyListBox - unselect selected elements

    Hi.
    I'm not be able to unselect select items in a selectmanylistbox
    I have defined two selectmanylistbox, so when I select items in one of them I want the elements selected in other selectmanylistbox (in case of there are elements selected) were unselected (Dissapear the blue band).
    this is my code:
    private SelectItem[] selectManyListBoxItems_02;
    private SelectItem[] selectManyListBoxAllItems_02;
    private String[] selectedManyListBox_02;
    private SelectItem[] selectManyListBoxItems_03;
    private SelectItem[] selectManyListBoxAllItems_03;
    private String[] selectedManyListBox_03;
    I populate correctly the list in my bean.
    and later in my page:
    <h:selectManyListbox id="manyListBox_02"
    value="#{myBean.*selectedManyListBox_02*}"
    valueChangeListener="#{myBean.selectManyListBox_02Changed}">
    <f:selectItems id="SlctManyListBox_02Itms"
    value="#{myBean.selectManyListBoxItems_02}" />
    <h:selectManyListbox>
    <h:selectManyListbox id="manyListBox_03"
    value="#{myBean.*selectedManyListBox_03*}"
    valueChangeListener="#{myBean.selectManyListBox_03Changed}">
    <f:selectItems id="SlctManyListBox_03Itms"
    value="#{myBean.selectManyListBoxItems_03}" />
    </h:selectManyListbox>
    Now in the change events I do something like this:
    public void selectManyListBox_02Changed(ValueChangeEvent event) {
    //Here I want to catch the selected Items and at the same time unselect
    //the selected items in selectManyListBox_03 (eliminate the blue band )
    //I get the elements selected
    s = (String[]) event.getNewValue();
    //Here is my problem
    //Clean the list of elements selected in selectedManyListBox_03, but no works on my page
    selectedManyListBox_03 = new String[] {};
    //I debug and the selected elements is set correctly to 0.
    Any idea, suggestion, tutorial or something to fix this problem
    thanks

    This is a Java forum. Is your question related to Java?
    db

Maybe you are looking for

  • How to email PDF form as attachment?

    Hi All, I have developed online interactive form app(dynamic). When user clicks the submit button after entered the data, I want to email the PDF form as an attachment to some users. Could anyone please explain the steps or give me some sample code?

  • F4 selection screen layout - WAD 7

    Hi guys, We have a simple selection screen over a variable and we have a couple of questions regarding the layout of the selection screen. 1. Can we change the default to "Search" instead of "All"? 2.  When we scroll down in the list the width of the

  • Secure a folder with sessions - PHP/MySQL

    I have a member site that I hav erecently developed a download library for. All the downloads (Word docs or PDFs) are stored in one directory and the user must be logged in using a session based system to gain access to the download page (in the dire

  • Af:panelAccordion expand mouse click on lable

    Hello I tried different approaches to expand item of panelAccordion when clicking on it's label but no luck by now. First I tried with clientListener on the <af:showDetailItem> <af:panelAccordion ... > <af:showDetailItem ... > <af:clientListener meth

  • Pages loses formatting and text when converting from docx or doc

    I receive .docx or .doc documents that I need to convert to a PDF. However, I frequently lose both formatting and text when I open the document in Pages. I don't understand how to fix the problem. I have tried copying/pasting the text into a new Page