[Greasemonkey] An amateur's question

Geir Thorud geir.thorud at chello.no
Wed Apr 27 20:43:08 EDT 2005


Hi,

I have a question that is probably easy for
most of you.

I am adding a text input to a form named "Scroll"
as follows:

        var T = document.createElement("INPUT");
        T.setAttribute("type","text");
        T.setAttribute("name","SetVertScrLengde");
        T.setAttribute("size","2");
        T.setAttribute("value", Shv);
        T.setAttribute("onChange","Change_vertikal_scroll(document.SetVertSc
rLengde.value);");

      navbarlast = document.getElementsByName("Scroll");
      navbarlast[0].appendChild(T);

When the vaulue of the text intup is changed, the form is
submitted to the server together with values from
another element (a select) in the form, but I only want
it to excecute the Change_vertikal_scroll function.

I have no Submit button in the form, since the form is only
used to trigger javascript functions.

What am I doint wrong, maybe several things?

Sorry to bother you excperts with this.

Geir



More information about the Greasemonkey mailing list