]> www.wagner.pp.ru Git - oss/stilllife.git/blobdiff - templates/basicset/page.js
Few bugs fixed
[oss/stilllife.git] / templates / basicset / page.js
index 573e965af44f320175e20fc6a0f5eaf41c286885..ec6ed9c1dae65cd24ebd1d3633c5bd63e3f2ad87 100644 (file)
@@ -29,7 +29,7 @@ function getBaseURLs() {
        for (i=0;i<links.length;i++) {
                if (links[i].rel == "forum-script") {
                        forumScriptUrl = links[i].href;
-               } else if (links[i].rel = "forum-user-list") {
+               } else if (links[i].rel == "forum-user-list") {
                        userListUrl = links[i].href;
                }
        }       
@@ -217,9 +217,11 @@ function hideDeniedOperations() {
 //  Использование  <a href="forum?operation=1&id=id" //  onClick="showform(this,operation)">
 function showForm(link, formName) {
        var id;
+       var action;
    if (link.form) {
        link = link.form;
        id = link.elements["id"].value;
+       action = link.action;
    } else {    
        var linktext=link.href;
        // Разобрать параметры, получить значение id
@@ -230,9 +232,12 @@ function showForm(link, formName) {
                        if (end==-1) end=linktext.length;
                        id = linktext.substring(start,end);
        }       
+       start=linktext.indexOf("?");
+       action=linktext.substring(0,start);
    }
    var block = document.getElementById(formName);
    var         f       = block.getElementsByTagName("form")[0];
+       f.action=action;
    if (id) {
       f.elements["id"].value=id;
    }