Forums

This topic is locked

Check form help

Posted 30 Apr 2003 18:27:22
1
has voted
30 Apr 2003 18:27:22 Jeff Montgomery posted:
I am using the behavior in UD4 however I need to be able to modify it becasue I have two submit button. I need to be able to check one field when submit button one is pressed. Does anyone know how I can do this.
Thanks for you help.

Replies

Replied 06 May 2003 17:33:28
06 May 2003 17:33:28 Michael dmxzone@lizmik.com replied:
Not sure if this helps...

Sounds like you need a control array, that should fire your form validation. something like this:

if submit(0) <> "" or submit(1) <> "" then

Do Some thing

end if

if you need info on form validation using javascript - here's a great resource.

www.smartwebby.com/dhtml

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I am using the behavior in UD4 however I need to be able to modify it becasue I have two submit button. I need to be able to check one field when submit button one is pressed. Does anyone know how I can do this.
Thanks for you help.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Replied 06 May 2003 17:40:04
06 May 2003 17:40:04 Michael dmxzone@lizmik.com replied:
Here's some code that check the value of two checkboxes. (note: both checkboxes have the same name and are referenced by their index (0) and (1) - in vb this is known as a control array)
=======javascript code=======

if (!listtype[0].checked && !listtype[1].checked){
alert("In Step 1- you must choose New or Correction";
listtype[0].focus();
return false;
}
==================
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Not sure if this helps...

Sounds like you need a control array, that should fire your form validation. something like this:

if submit(0) &lt;&gt; "" or submit(1) &lt;&gt; "" then

Do Some thing

end if

if you need info on form validation using javascript - here's a great resource.

www.smartwebby.com/dhtml

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I am using the behavior in UD4 however I need to be able to modify it becasue I have two submit button. I need to be able to check one field when submit button one is pressed. Does anyone know how I can do this.
Thanks for you help.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Reply to this topic