Sha256: 1b020eafe32d3cb65be58c649757c8494151449d484bd02b56ebc0e304dd02dc

Contents?: true

Size: 1.05 KB

Versions: 51

Compression:

Stored size: 1.05 KB

Contents

<htmL>
<head>
  <title>Prototype - Sample App</title>
  <script type="application/x-javascript" src="/prototype-1.6.0.3.js"></script>
</head>
<body>
  <div id="ajax-demo">
    <h2>AJAX Calculator</h2>
    <form id="calculator-form" action="#" method="post" onSubmit="return false;">
      <input id="calculator-expression" name="calculator-expression"/>
      <input type="submit" id="calculator-button" value="Compute" />
      <br/><br/>
      <div>Result: <input id="calculator-result" disabled /></div>
    </form>

    <script type="text/javascript" language="javascript">  
      Event.observe(window, 'load', function() {

        Event.observe('calculator-button', 'click', function (event) {
          new Ajax.Request('/compute', { 
              method: 'post', 
              parameters: $('calculator-form').serialize(true),
              onSuccess: function(transport) {
                $('calculator-result').value = transport.responseText;
              },
          });
          return false;
        });

      });
    </script>
  </div>

</body>
</html>

Version data entries

51 entries across 51 versions & 4 rubygems

Version Path
page-object-0.9.4 features/sample-app/public/prototype.html
page-object-0.9.3 features/sample-app/public/prototype.html
page-object-0.9.2 features/sample-app/public/prototype.html
page-object-0.9.1 features/sample-app/public/prototype.html
page-object-0.9.0 features/sample-app/public/prototype.html
page-object-0.8.10 features/sample-app/public/prototype.html
page-object-0.8.9 features/sample-app/public/prototype.html
page-object-0.8.8 features/sample-app/public/prototype.html
page-object-0.8.7 features/sample-app/public/prototype.html
page-object-0.8.6.1 features/sample-app/public/prototype.html
page-object-0.8.6 features/sample-app/public/prototype.html
page-object-0.8.5 features/sample-app/public/prototype.html
page-object-0.8.4 features/sample-app/public/prototype.html
page-object-0.8.3 features/sample-app/public/prototype.html
page-object-0.8.2 features/sample-app/public/prototype.html
page-object-0.8.1 features/sample-app/public/prototype.html
page-object-0.8 features/sample-app/public/prototype.html
page-object-0.7.6 features/sample-app/public/prototype.html
page-object-0.7.5.1 features/sample-app/public/prototype.html
page-object-0.7.5 features/sample-app/public/prototype.html