X-Git-Url: http://cgit.babelmonkeys.de/?p=adhocweb.git;a=blobdiff_plain;f=js%2Fmain.js;h=a0800ad54ddecfbcd4d7f0ccff4c3c48a65fe641;hp=3c42647592beb91644d684c169fc7af0a459ed29;hb=eea26db826d1821aa4268fa8ccba484bff97a5bb;hpb=907bec3b47789820c53a68559c5ca15d9f899bec diff --git a/js/main.js b/js/main.js index 3c42647..a0800ad 100644 --- a/js/main.js +++ b/js/main.js @@ -1,5 +1,4 @@ var BOSH_SERVICE = 'http://localhost:5280/http-bind/'; - var show_log = false; Strophe.addNamespace("ADHOC", "http://jabber.org/protocol/commands"); @@ -8,6 +7,7 @@ var localJID = null; var connection = null; var sessionid = null; var cmdNode = null; +var queryJID = null; function log(msg) { var entry = $('
').append(document.createTextNode(msg)); @@ -40,6 +40,9 @@ function onConnect(status) { } } else if (status == Strophe.Status.CONNECTED) { log('Strophe is connected.'); + queryJID = connection.domain; + $('#queryJID').val(queryJID); + $('#query').show(); checkFeatures(); } } @@ -53,7 +56,7 @@ function addNote(elem, text, type) { function addForm(elem, x) { var form = $("
"); - form.submit(function(){return false;}); + form.submit(function(event){event.preventDefault();}); var fieldset = $("
"); form.append(fieldset); if ($(x).find("title").length > 0) @@ -65,6 +68,7 @@ function addForm(elem, x) { var type = $(this).attr("type"); if($(this).attr("label")) { $("