This is just a client-side keyup event handler -- it doesn't impact the 
server-side framework.

On Tuesday, November 29, 2011 6:28:08 PM UTC-5, Constantine Vasil wrote:
>
> I am using jQuery Mobile and here is a code for a keyup handler 
> directly from the source.
>
> The question is would it work under web2py? What about IE?
>
>
> http://jquerymobile.com/demos/1.0a2/#experiments/api-viewer/docs/keyup/index.html
>
> Show the event object for the keyup handler when a key is released in the 
> input.
>
> <!DOCTYPE html>
> <html>
> <head>
>  <style>
> fieldset { margin-bottom: 1em; }
> input { display: block; margin-bottom: .25em; }
> #print-output {
>  width: 100%;
> }
> .print-output-line {
>  white-space: pre;
>  padding: 5px;
>  font-family: monaco, monospace;
>  font-size: .7em;
> }
>
> </style>
>  <script src="http://code.jquery.com/jquery-latest.js";></script>
> </head>
> <body>
> <form>
>   <fieldset>
>      <label for="target">Type Something:</label>
>      <input id="target" type="text" />
>   </fieldset>
>           </form>
>
>
> <button id="other">
>  Trigger the handler
> </button>
> <script type="text/javascript" src="/scripts/events.js"></script>
>
> <script>
> var xTriggered = 0;
> $('#target').keyup(function(event) {
>  if (event.keyCode == '13') {
>     event.preventDefault();
>   }
>   xTriggered++;
>   var msg = 'Handler for .keyup() called ' + xTriggered + ' time(s).';
>  $.print(msg, 'html');
>  $.print(event);
> });
>
> $('#other').click(function() {
>  $('#target').keyup();
> });
>
> </script>
>
> </body>
> </html>
>
>
>
>
>
>
>

Reply via email to