HighDots Forums  

Spry: Conditionally Fields

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Spry: Conditionally Fields in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
_chribonn_
 
Posts: n/a

Default Spry: Conditionally Fields - 10-09-2007 , 12:13 PM






Hi,

I am using DW CS3 to create spry fields.

I have a situation in which I want one field to become required based upon the
value of another field. In my page I added the following:

var chkOtherValid = function(value, options){
var sel = document.getElementById("Chk");
var Chk_value = sel.options[sel.selectedIndex].value;
if ((Chk_value == 'OTH') && (value == '')) {
return false;
}
return true;
}


var chkOtherValid = new
Spry.Widget.ValidationTextField("spryChkOther", "custom",
{isRequired:false});

Within my form I have the following:

<span id="spryChkOther">
<input type="text" name="ChkOth"
size="23" maxlength="15"
onblur="this.value=this.value.toUpperCase();" />
<span class="textfieldRequiredMsg">A value is required.</
span></span> </td>
</tr>


My problem is that I am no getting the expected result.

Can someone please help me.


Thank You.


Regards,
Al




Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.