X-Git-Url: http://cgit.babelmonkeys.de/?p=adhocweb.git;a=blobdiff_plain;f=js%2Fmain.js;h=6bd32412743739166210a6cc07f5d3c9e3df1a29;hp=9f802b5f8e8bea4f4af7bb1334e5beee1ed04384;hb=e5d4fe480e02907b80e91d9ed42854700c5866c1;hpb=38cd189c63c36d684943f0c21e32d4933e26863c diff --git a/js/main.js b/js/main.js index 9f802b5..6bd3241 100644 --- a/js/main.js +++ b/js/main.js @@ -41,6 +41,7 @@ function onConnect(status) { } else if (status == Strophe.Status.CONNECTED) { log('Strophe is connected.'); queryJID = connection.domain; + $('#queryJID').val(queryJID); $('#query').show(); checkFeatures(); } @@ -50,12 +51,13 @@ function addNote(elem, text, type) { if (!type) { type = "info"; } + text = text.replace(/\n/g, "
"); $(elem).append("

" + text + "

"); } 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) @@ -67,6 +69,7 @@ function addForm(elem, x) { var type = $(this).attr("type"); if($(this).attr("label")) { $("