Tuesday, March 23, 2010

Spry and DW CS3

I'm just trying out the Spry features in DW CS3. I set up to
validate a

textfield on a form. And added a hint for a email format, but
here's my

problem.



If users don't type anything in the form at submit it, it
still processes

the hinted email address as the users email address.



Is there a way to get Spry to recoginze that the the hint
isn't what is

suppose to be processed????



Does that make sense??





Spry and DW CS3
Hi Steve,

I tried the use-case you described here, but seems to work
for me. When I try to submit the form, the required message
appears. What browser do you use?



The code for my example is posted below.

Please let me know more details about your problem.



%26lt;form id=''form1'' name=''form1'' method=''post'' action=''''%26gt;

%26lt;span id=''sprytextfield1''%26gt;

%26lt;input type=''text'' name=''textfield'' id=''textfield'' /%26gt;

%26lt;span class=''textfieldRequiredMsg''%26gt;A value is
required.%26lt;/span%26gt;

%26lt;span class=''textfieldInvalidFormatMsg''%26gt;Invalid
format.%26lt;/span%26gt;

%26lt;/span%26gt;

%26lt;input type=''submit'' name=''button'' id=''button''
value=''Submit'' /%26gt;

%26lt;/form%26gt;

%26lt;script type=''text/javascript''%26gt;

%26lt;!--

var sprytextfield1 = new
Spry.Widget.ValidationTextField(''sprytextfield1'', ''email'',
{hint:''test@yahoo.com''});

//--%26gt;

%26lt;/script%26gt;





Diana

No comments:

Post a Comment