Sha256: f074757da67d025e77659c5794240156895f952a4043231167aa6f0eac594f34

Contents?: true

Size: 1.04 KB

Versions: 15

Compression:

Stored size: 1.04 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>

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
druid-s-1.0.0 features/sample-app/public/prototype.html
druid-ts-1.2.6 features/sample-app/public/prototype.html
druid-ts-1.2.5 features/sample-app/public/prototype.html
druid-ts-1.2.4 features/sample-app/public/prototype.html
druid-ts-1.2.3 features/sample-app/public/prototype.html
druid-ts-1.2.2 features/sample-app/public/prototype.html
druid-ts-1.2.1 features/sample-app/public/prototype.html
druid-ts-1.2.0 features/sample-app/public/prototype.html
druid-ts-1.1.8 features/sample-app/public/prototype.html
druid-ts-1.1.7 features/sample-app/public/prototype.html
druid-ts-1.1.6 features/sample-app/public/prototype.html
druid-ts-1.1.5 features/sample-app/public/prototype.html
druid-ts-1.1.4 features/sample-app/public/prototype.html
druid-ts-1.1.3 features/sample-app/public/prototype.html
druid-ts-1.1.2 features/sample-app/public/prototype.html