[Zope] Text box with qualifier and Javascript
Oleg Broytmann
Oleg Broytmann <phd@phd.fep.ru>
Wed, 18 Apr 2001 12:52:22 +0400 (MSD)
On Tue, 17 Apr 2001, Laurie Nason wrote:
> Is it possible to specify an input box with a qualifier (:int) and then
> check it when the form is submitted using javascript? - the name of the box
Yes, it is pretty possible.
> now includes the :int
> i.e.
> <input type="text" name="event:int" size="10" value="5">
> .....
> .....
> <script Language="Javascript">
> function checkform(myform) {
>
> if(myform.event:.value=="")
> {alert("The event cannot be blank!")
> myform.event.focus()
> return false}
if (myform.elements["event:int"].value=="")
(or use just index - myform.elements[1] - if the index of the object is 1)
Oleg.
----
Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.