Sha256: d8eb567c5b456c675866b78e7c053f4545c8b5b10eee3011ec2f74771ad52259

Contents?: true

Size: 1.38 KB

Versions: 10

Compression:

Stored size: 1.38 KB

Contents

<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>Testing Typing into body</title>
    <script type="text/javascript">
        function setMessage(message) {
            document.getElementById('result').innerHTML = message;
        }

        function showSelected() {
          var selectElement = document.getElementById('multi');
          if (selectElement == null) {
            appendMessage("null!");
          }

          var options_array = selectElement.getElementsByTagName('option');
          var selected_cheese = "";
          for (var i = 0; i < options_array.length; i++) {
            if (options_array[i].selected) {
              selected_cheese = selected_cheese + options_array[i].label + " ";
            }
          }
          setMessage(selected_cheese);
        }
    </script>
</head>

<body>
  <h1>Type Stuff</h1>

  <div id="result">
    &nbsp;
  </div>

  <form action="" id="on-form" name="multichoice">
    <select name="multi" id="multi" multiple="multiple">
        <option selected="selected" label="emmental">Emmental</option>
        <option label="roquefort" >Roquefort</option>
        <option label="parmigiano">Parmigiano</option>
        <option label="cheddar">Cheddar</option>
    </select>
  </form>

  <input type="button" name="showselected" onclick="showSelected()" value="Show selected"/>
</body>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
operawatir-0.7.pre4-jruby spec/operawatir/fixtures/formSelectionPage.html
operawatir-0.7.pre3-jruby spec/operawatir/fixtures/formSelectionPage.html
operawatir-0.7.pre2-jruby spec/operawatir/fixtures/formSelectionPage.html
operawatir-0.7.pre1-jruby spec/operawatir/fixtures/formSelectionPage.html
operawatir-0.6.pre1-jruby spec/operawatir/fixtures/formSelectionPage.html
operawatir-0.5.1-jruby spec/operawatir/fixtures/formSelectionPage.html
operawatir-0.5-jruby spec/operawatir/fixtures/formSelectionPage.html
operawatir-0.5.pre3-jruby spec/operawatir/fixtures/formSelectionPage.html
operawatir-0.5.pre2-jruby spec/operawatir/fixtures/formSelectionPage.html
operawatir-0.5.pre1-jruby spec/operawatir/fixtures/formSelectionPage.html