Skip to content

Commit

Permalink
ditch submit btn
Browse files Browse the repository at this point in the history
  • Loading branch information
softprops committed Nov 26, 2011
1 parent 287c81b commit 042be5c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/main/g8/src/main/resources/client.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
</head>
<body>
ws://localhost:$websocket_port$/
<form onsubmit="return false;">
<form id="frm">
<input type="text" name="message" id="message" placeholder="Hey bro" />
<input type="submit" value="Send" disabled="disabled" id="submit" />
<input type="button" value="toogle connection" id="tooglr" />
<div><input type="button" value="toogle connection" id="tooglr" /></div>
</form>
<div id="debug"></div>
<ul></ul>
Expand Down Expand Up @@ -73,10 +72,10 @@
jq("#submit").removeAttr("disabled");
jq(this).unbind('keydown');
});
jq("#submit").click(function(e){
jq("#frm").submit(function(e){
e.preventDefault();
send(this.form.message.value);
this.form.message.value = '';
send(this.message.value);
this.message.value = '';
return false;
});
jq("#tooglr").click(function(e){
Expand Down

0 comments on commit 042be5c

Please sign in to comment.