X-Git-Url: http://cgit.babelmonkeys.de/?p=adhocweb.git;a=blobdiff_plain;f=js%2Fmain.js;h=4cff25caf4b3a5e62fc7acbf1ae133f656cb383e;hp=9f802b5f8e8bea4f4af7bb1334e5beee1ed04384;hb=eab81f9e4afd38c8390745449865185e9637c830;hpb=38cd189c63c36d684943f0c21e32d4933e26863c;ds=sidebyside diff --git a/js/main.js b/js/main.js index 9f802b5..4cff25c 100644 --- a/js/main.js +++ b/js/main.js @@ -55,7 +55,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) @@ -209,7 +209,7 @@ function displayResult(result) { } } -function runCommand() { +function runCommand(event) { cmdNode = $(this).attr("id"); // Save node of executed command (in global var) var execIQ = $iq({ type: "set", to: queryJID, id: connection.getUniqueId() }) .c("command", { xmlns: Strophe.NS.ADHOC, node: cmdNode, action: "execute" }); @@ -217,6 +217,7 @@ function runCommand() { sessionid = $(result).find("command").attr("sessionid"); displayResult(result); }); + event.preventDefault(); } function getCommandNodes() { @@ -224,7 +225,8 @@ function getCommandNodes() { connection.sendIQ(nodesIQ, function(result) { $('#output').append("