Skip to main content

Bug Tracker

Side navigation

Ticket #5519: local-only.html


File local-only.html, 0.5 KB (added by kipthegreat, November 16, 2009 08:53PM UTC)

Page using only locally-defined javascript, works OK.

<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
    $('textarea[name=comment]').data('tst', 'abc');
    $('textarea[name=comment]').live('keypress', function(e) {
      if(e.which == 0x20) { //spacebar
        alert("the stored data is: " + $(this).data('tst'));
        return false;
      }
    });
});
</script>
</head>
<body>
<textarea name="comment"></textarea>
</body>
</html>

Download in other formats:

Original Format