close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

spry validation

Thread began 8/27/2009 6:18 am by CraigR | Last modified 8/28/2009 6:51 am by Ray Borduin | 3985 views | 3 replies |

CraigRBeta Tester

spry validation

I have created an insert query to append n rows to a table.

On my upload form, the price input text fields are generated dynamically, which reflects the number of size options available from a recordset called rssizes.

What i want to do is apply spry validation to these text input fields, so that they only accept numerical values, but having tried this, only the first field is validated.

offending page is here, please try it.

upload.php

Sign in to reply to this post

Ray BorduinWebAssist

You would have to dynamically name the spry span tags and add the necessary .js code to initiate each as a spry validated area.

Sign in to reply to this post
Did this help? Tips are appreciated...

CraigRBeta Tester

thanks Ray,

i'm half way there.

concatenating the sizeid onto the spryvalidation text field in the php loop gives me the increments I need.

where the variables are declared in the js is the only bit I haven't solved yet.

if i create the variables manually, rather than in the php loop, the page works fine, (albeit with dreamweaver warning messages at design time due to the fact that the rssizes recordset hasn't yet got any data in it).

what i have't been able to do yet is create the js variable names within the php loop

eg

var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "currency", {isRequired:false});

Sign in to reply to this post

Ray BorduinWebAssist

You should probably add a second loop on the bottom of the page to add that part, making sure to reset your loop to the first record so it can run again.

The code may need to appear after the "</form>" tag, since it manipulates the form onsubmit code, which may be why it won't work when added to the loop inside it.

It could also be a problem with your syntax or a missing <script> tag when you are writing it to the page.

Sign in to reply to this post
Did this help? Tips are appreciated...

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...