Help Please on Setting Required Fields!!

N

Nikhil

I have a simple question i hope,

I have a drop down with the value's "A" and "B"

If i selected any values from my drop down other than "B" i want the "name"
and "address" fields to be required by the user, however, if i select "B"
these fields are not required.

Please Help!!

I had a script like this going, but i know i am off:

<SCRIPT language = "javaScript">
if (deal_type = "B")
<!--webbot bot="Validation" b-value-required="FALSE" --><select size="1"
name="Name" style="background-color: #faebd7" tabindex="11"> and <!--webbot
bot="Validation" b-value-required="FALSE" --><select size="1" name="Address"
style="background-color: #faebd7" tabindex="11">
else
<!--webbot bot="Validation" b-value-required="TRUE" --><select size="1"
name="Name" style="background-color: #00FFFF" tabindex="11"> and <!--webbot
bot="Validation" b-value-required="TRUE" --><select size="1" name="Address"
style="background-color: #00FFFF" tabindex="11">;
</SCRIPT>
 
S

Stefan B Rusynko

For conditional validation you can't use any FP webbot validation
- you will need to do all validation w/ a custom JavaScript
See http://irt.org/script/form.htm#4

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|I have a simple question i hope,
|
| I have a drop down with the value's "A" and "B"
|
| If i selected any values from my drop down other than "B" i want the "name"
| and "address" fields to be required by the user, however, if i select "B"
| these fields are not required.
|
| Please Help!!
|
| I had a script like this going, but i know i am off:
|
| <SCRIPT language = "javaScript">
| if (deal_type = "B")
| <!--webbot bot="Validation" b-value-required="FALSE" --><select size="1"
| name="Name" style="background-color: #faebd7" tabindex="11"> and <!--webbot
| bot="Validation" b-value-required="FALSE" --><select size="1" name="Address"
| style="background-color: #faebd7" tabindex="11">
| else
| <!--webbot bot="Validation" b-value-required="TRUE" --><select size="1"
| name="Name" style="background-color: #00FFFF" tabindex="11"> and <!--webbot
| bot="Validation" b-value-required="TRUE" --><select size="1" name="Address"
| style="background-color: #00FFFF" tabindex="11">;
| </SCRIPT>
|
|
 
N

Nikhil

Thank you much. I am thinking i need to utilize the onchange function. Can i
get some help writing this piece of code.

basically of i select item 'a' in my drop down list named 'deal_type' set
the 'address field to not being required. i think this is where i am getting
stuck.

thanks!!
 
S

Stefan B Rusynko

See the link in my other post

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Thank you much. I am thinking i need to utilize the onchange function. Can i
| get some help writing this piece of code.
|
| basically of i select item 'a' in my drop down list named 'deal_type' set
| the 'address field to not being required. i think this is where i am getting
| stuck.
|
| thanks!!
|
| "Stefan B Rusynko" wrote:
|
| > For conditional validation you can't use any FP webbot validation
| > - you will need to do all validation w/ a custom JavaScript
| > See http://irt.org/script/form.htm#4
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > |I have a simple question i hope,
| > |
| > | I have a drop down with the value's "A" and "B"
| > |
| > | If i selected any values from my drop down other than "B" i want the "name"
| > | and "address" fields to be required by the user, however, if i select "B"
| > | these fields are not required.
| > |
| > | Please Help!!
| > |
| > | I had a script like this going, but i know i am off:
| > |
| > | <SCRIPT language = "javaScript">
| > | if (deal_type = "B")
| > | <!--webbot bot="Validation" b-value-required="FALSE" --><select size="1"
| > | name="Name" style="background-color: #faebd7" tabindex="11"> and <!--webbot
| > | bot="Validation" b-value-required="FALSE" --><select size="1" name="Address"
| > | style="background-color: #faebd7" tabindex="11">
| > | else
| > | <!--webbot bot="Validation" b-value-required="TRUE" --><select size="1"
| > | name="Name" style="background-color: #00FFFF" tabindex="11"> and <!--webbot
| > | bot="Validation" b-value-required="TRUE" --><select size="1" name="Address"
| > | style="background-color: #00FFFF" tabindex="11">;
| > | </SCRIPT>
| > |
| > |
| >
| >
| >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top