diff options
author | Eduardo Gurgel <[email protected]> | 2014-04-27 09:46:14 +1200 |
---|---|---|
committer | Eduardo Gurgel <[email protected]> | 2014-04-27 09:54:24 +1200 |
commit | f9e76d7df2f919b7d7be3ffd33059d55c86439b0 (patch) | |
tree | 4db9e3c775e3b9ecd79038c19adb969c99f866f3 /examples/websocket | |
parent | 23eb3f8e9addfbc4217e4046ef867c5ec99582b1 (diff) | |
download | cowboy-f9e76d7df2f919b7d7be3ffd33059d55c86439b0.tar.gz cowboy-f9e76d7df2f919b7d7be3ffd33059d55c86439b0.tar.bz2 cowboy-f9e76d7df2f919b7d7be3ffd33059d55c86439b0.zip |
Use current host as base to Websocket Example URL
Diffstat (limited to 'examples/websocket')
-rw-r--r-- | examples/websocket/priv/index.html | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/websocket/priv/index.html b/examples/websocket/priv/index.html index 5bc7f15..56f36b2 100644 --- a/examples/websocket/priv/index.html +++ b/examples/websocket/priv/index.html @@ -9,6 +9,7 @@ $(document).ready(init); function init() { + $('#server').val("ws://" + window.location.host + "/websocket"); if(!("WebSocket" in window)){ $('#status').append('<p><span style="color: red;">websockets are not supported </span></p>'); $("#navigation").hide(); @@ -92,7 +93,7 @@ <div id="navigation"> <p id="connecting"> - <input type='text' id="server" value="ws://localhost:8080/websocket"></input> + <input type='text' id="server" value=""></input> <button type="button" onclick="toggle_connection()">connection</button> </p> <div id="connected"> |