Created a new html document and included this in the head:

 <script language="JavaScript" type="text/javascript" src =
"scriptaculous/prototype.js"></script>
    <script language="JavaScript" type="text/javascript" src =
"scriptaculous/scriptaculous.js"></script>
    <script language="JavaScript" type="text/javascript">
        <!--
        Event.observe(window, 'load', function() {
            Event.observe('loginForm', 'keyup', 'catchEnterKey');
        });
        function catchEnterKey(e) {
            if (!e) { e = window.event; }
            if (e.keyCode == 13) { alert('ok'); }
        }
        //-->
    </script>

and this in the body:

<form id="loginForm" method="POST" action="javascript: submitLogin">
  <div>
    <label for="loginId">Username</label>
    <input id="loginId" type="text" name="loginId" value="" />
  </div>
  <div>
    <label for="password">Password</label>
    <input id="password" type="password" name="password" value="" />
  </div>
  <div id="uaButtonDiv">
    <input id="loginButton" type="submit" name="login" value="Login"
class="uauthLogin" onclick="submitLogin()" />
  </div>
</form>

Got this error:

uncaught exception: [Exception... "Could not convert JavaScript
argument" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"
location: "JS frame :: http://withheld/prototype.js :: anonymous ::
line 2241" data: no]


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to