"Fossies" - the Fresh Open Source Software Archive

Member "selenium-selenium-4.8.1/common/src/web/formSelectionPage.html" (17 Feb 2023, 1408 Bytes) of package /linux/www/selenium-selenium-4.8.1.tar.gz:


The requested HTML page contains a <FORM> tag that is unusable on "Fossies" in "automatic" (rendered) mode so that page is shown as HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <?xml version="1.0"?>
    2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    3 <head>
    4     <title>Testing Typing into body</title>
    5     <script type="text/javascript">
    6         function setMessage(message) {
    7             document.getElementById('result').innerHTML = message;
    8         }
    9 
   10         function showSelected() {
   11           var selectElement = document.getElementById('multi');
   12           if (selectElement == null) {
   13             appendMessage("null!");
   14           }
   15 
   16           var options_array = selectElement.getElementsByTagName('option');
   17           var selected_cheese = "";
   18           for (var i = 0; i < options_array.length; i++) {
   19             if (options_array[i].selected) {
   20               selected_cheese = selected_cheese + options_array[i].label + " ";
   21             }
   22           }
   23           setMessage(selected_cheese);
   24         }
   25     </script>
   26 </head>
   27 
   28 <body>
   29   <h1>Type Stuff</h1>
   30 
   31   <div id="result">
   32     &nbsp;
   33   </div>
   34 
   35   <form action="" id="on-form" name="multichoice">
   36     <select name="multi" id="multi" multiple="multiple">
   37         <option selected="selected" label="emmental">Emmental</option>
   38         <option label="roquefort" >Roquefort</option>
   39         <option label="parmigiano">Parmigiano</option>
   40         <option label="cheddar">Cheddar</option>
   41     </select>
   42   </form>
   43 
   44   <input type="button" name="showselected" onclick="showSelected()" value="Show selected"/>
   45 </body>
   46