PC Review


Reply
Thread Tools Rate Thread

Required Fields - Please Help

 
 
=?Utf-8?B?TmlraGls?=
Guest
Posts: n/a
 
      27th Jul 2006
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>

 
Reply With Quote
 
 
 
 
Paul C
Guest
Posts: n/a
 
      27th Jul 2006
Hi Nikhil
The simplest way would be to have a page with a form which has validation
rules and a page with a form with no validation rules.
If the person selects selects A then they are directed to the validation
form page or B they could be directed to the non validation form page.

Put this code in the head of the page, it redirects as soon as the drop down
is selected


<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>

and put this in the body where you want the form to go

<form name="form1" id="form1" method="post" action="">
<div align="right">
<b><font color="#2691A2">Search by
category</font>&nbsp;</b>&nbsp;
<select name="menu1" onchange="MM_jumpMenu('parent',this,0)"
size="1" id="imageblock">
<option>select your choice...</option>
<option value="http://www.google.co.uk/">google</option>
<option value="http://www.google.co.uk/">googlle</option>
</select>
</div>
</form>

Paul M
here is an example of the form
http://www.paulcmilner.co.uk/Gallery.asp

"Nikhil" <(E-Mail Removed)> wrote in message
news:A36F1FD9-6510-4F3D-8280-(E-Mail Removed)...
>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>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Required Fields Ann Microsoft Access Forms 3 14th Aug 2009 09:19 PM
how to have fields to be required Mandatory fields in Excel Microsoft Excel Worksheet Functions 1 6th Jun 2008 11:41 PM
Making fields into required fields =?Utf-8?B?UGF1bA==?= Microsoft Access Forms 4 22nd Mar 2006 02:51 PM
Required fields =?Utf-8?B?U3RlcGhhbmll?= Microsoft Access Form Coding 1 12th Oct 2004 04:07 AM
Required Fields/Help Ken Microsoft Access Forms 4 8th Jun 2004 09:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:07 PM.