Where is this line of code calling this method from?

332 views Asked by At

I am trying to deduce why this method in my href does not work. It returns a javascript error :

<form name="mutate" method="post" action="index.php?a=24">
  <a href="#" onclick="documentDirty=false; document.mutate.save.click();saveWait('mutate');">

The error is document.mutate.save is undefined

Fair enough. But I want to figure out why, and then define it.

What is the best way for me to trace the source of this error?

1

There are 1 answers

3
Brian Driscoll On

document.mutate refers to the form element you are working in (<form name="mutate"...>)

I'd assume that document.mutate.save refers to a button named save somewhere in the form.

The error is telling you that the button does not exist.