Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #21281

Re: Multiple forms in one HTML page.

From "Jukka K. Korpela" <jkorpela@cs.tut.fi>
Newsgroups comp.lang.javascript
Subject Re: Multiple forms in one HTML page.
Date 2013-09-12 14:17 +0300
Organization A noiseless patient Spider
Message-ID <l0s7rg$su0$1@dont-email.me> (permalink)
References <c1c93558-3a49-4429-a263-2720ddd8ee01@googlegroups.com>

Show all headers | View raw


2013-09-12 13:40, jonas.thornvall@gmail.com wrote:

 > Problem is that it seems that all forms are submitted, thus all the
 > functions is called.

Then there's something you haven't described at all. As such, each form 
works independently of other forms. So it seems that it's your 
JavaScript code that causes the issue, and that code has not been disclosed.

> Basicly i try to use buttons, to step forward, backward zoomin and zoomout.

If the logic relies on JavaScript (i.e., the page or application does 
not work at all without it), what do you need forms for? Your forms seem 
to contain just one submit button each. You could use just 
JavaScript-powered buttons, no <form> element.

If you wish to code robustly, with server-side fallback for situations 
where JavaScript is disabled, then it makes sense to wrap the buttons in 
forms. But the forms need action=... attributes to make this useful in 
any way.

> <FORM NAME=Adoit onSubmit="parent.ulam.next(); return false;">

What are ulam and its methods, and what do they do?

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Multiple forms in one HTML page. jonas.thornvall@gmail.com - 2013-09-12 03:40 -0700
  Re: Multiple forms in one HTML page. "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2013-09-12 14:17 +0300
    Re: Multiple forms in one HTML page. jonas.thornvall@gmail.com - 2013-09-12 04:33 -0700
    Re: Multiple forms in one HTML page. jonas.thornvall@gmail.com - 2013-09-12 04:37 -0700
      Re: Multiple forms in one HTML page. jonas.thornvall@gmail.com - 2013-09-12 04:58 -0700
        Re: Multiple forms in one HTML page. jonas.thornvall@gmail.com - 2013-09-12 06:10 -0700
        Re: Multiple forms in one HTML page. jonas.thornvall@gmail.com - 2013-09-12 06:13 -0700
    Re: Multiple forms in one HTML page. jonas.thornvall@gmail.com - 2013-09-12 07:57 -0700
      Re: Multiple forms in one HTML page. "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2013-09-12 18:57 +0300

csiph-web