The generated javascript in javascript/editwizard.jsp only disables the
cancel and save button (setButtonsInactive()). The errror can also happen
when you click on the delete, add, or change links. They all change the
state of the editwizard stack.

IMO, the check should prevent the doSendCommand() to submit the form twice.
This can be done in two ways.

-1-------------------------------------------------------------------
Every href in the page should get an onclick event

<a href="javascript:someFunction();" onclick="return clickOnce();">
   description
</a>
<SCRIPT LANGUAGE="JavaScript">
   var cnt=0;
   function clickOnce() {
      if(cnt==1) {
         alert("A moment please,\nyour data is being submitted.");
         return false;
      } else {
         cnt=1;
         return true;
      }
   }
</SCRIPT>

This way the clickOnce() method decides whether I'm allowed to submit and
the someFunction() method does the actual submitting.

-2-------------------------------------------------------------------
The changed javascript which will do the trick too

Var submitted = 0;

function doSendCommand(cmd, value) {
    doCheckWysiwyg();

    var fld = document.getElementById("hiddencmdfield");
    fld.name = cmd;
    fld.value = "";
    if (value) fld.value = value;
    if (submitted==1) {
        alert("A moment please,\nyour data is being submitted.");
    } else {
        document.forms[0].submit();
        submitted = 1;
    }
}
---------------------------------------------------------------------

I like the first one more, because none of the other javascript is executed
when the clickOnce() returns false. The second one only requires to change
one method, but will execute all javascript code up to the point of
submission (validation, etc.).

Nico Klasens

Finalist IT Group
Java Specialists


-----Oorspronkelijk bericht-----
Van: Michiel Meeuwissen [mailto:[EMAIL PROTECTED] 
Verzonden: dinsdag 8 juli 2003 22:05
Aan: [EMAIL PROTECTED]
Onderwerp: Re: No node with fid=f_... could be found


Henk Hangyi <[EMAIL PROTECTED]> wrote:
> > I think we made it once that the buttons are disabled
> > immediately after clicking on it. It this not
> > working?
> 
> You made it after 1.6.1 ?

I'm not sure but I don't think so. Did you never notice that the buttons
'dissapear' after clicking? Also not in the 'default' style?

 Michiel

-- 
Michiel Meeuwissen 
Mediapark C101 Hilversum  
+31 (0)35 6772979
nl_NL, eo, en_US
mihxil'
[]()

Reply via email to