Text box with qualifier and Javascript
OK guys, 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 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} Help! Laurie
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.
participants (2)
-
Laurie Nason -
Oleg Broytmann