troubleshooting Question

Spry Validation Text Feild

Avatar of jasch2244
jasch2244 asked on
Web DevelopmentScripting LanguagesAJAX
20 Comments1 Solution1091 ViewsLast Modified:
How do you validate a web text form using spry validation and have an image pop up (if the text in the field is valid). Similar to what is on experts exchange website. I'm currently using Dreamweaver CS3

I can get an image to load no problem if the text is not valid, but can't figure out how to show an image(check mark) out side of the text feild if the text is valid. I hope this makes sense. My code in the SpryValidationTextField.css is as follows:
/* When the widget is in the valid state the INPUT has a green background applied on it. */
.textfieldValidState input, input.textfieldValidState {
      display: inline;
      background-image: url(../images/check.gif);
      background-repeat: no-repeat;
      background-position: right center;
      margin: 0px;
      padding-top: 0px;
      padding-right: 0px;
      padding-bottom: 0px;

This populates the image inside of the text feild not outside like in the required message.

My HTML code is as follows for the text feild:
<td height="30" colspan="2"><span id="sprytextfield1">
          <input name="StreetAddress" type="text" id="StreetAddress" size="40" />
          <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
Jason C. Levine
Don't talk to me.

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 20 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 20 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros