close ad
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Spry Validation Error with "Invalid Selection" option

Thread began 8/21/2012 9:21 am by msummers194171 | Last modified 8/22/2012 8:06 am by msummers194171 | 2020 views | 4 replies


Spry Validation Error with "Invalid Selection" option

I have created a new Update page for a data table containing a field that I elect to display as a list. I have defined that the validation for that list element would be to not allow an invalid value to be submitted, and select "-1" as the invalid value.

DB inserts the following code on the page -

<div class="lineGroup">
<label for="adminLevel" class="sublabel" > adminLevel:<span class="requiredIndicator">&nbsp;*</span></label>
<div class="errorGroup"> <span id="adminLevel_Spry"> <span>
<select class="formMenufield_Medium" name="adminLevel" id="adminLevel" tabindex="3" onChange="hideServerError('adminLevel_ServerError');">
<span class="selectRequiredMsg">Please enter a value.</span> </span> </span> </div>

At the bottom of the page, it also inserts this -

<script type="text/javascript">
var adminLevel_Spry = new Spry.Widget.ValidationSelect("adminLevel_Spry", { '-1', validateOn:["change"]});

DW highlights this line of javascript as containing an error, and so does Firefox's error console, telling me that -

Timestamp: 8/21/2012 11:28:33 AM
Error: SyntaxError: missing : after property id
Source File: adminUsers_Update.php?id=3
Line: 291, Column: 80
Source Code:
var adminLevel_Spry = new Spry.Widget.ValidationSelect("adminLevel_Spry", { '-1', validateOn:["change"]});

Sure enough, if I change the line of javascript to this -

var adminLevel_Spry = new Spry.Widget.ValidationSelect("adminLevel_Spry", { '-1':true, validateOn:["change"]});

then the error goes away. Would that be the correct syntax? I'd guess that this is a bug in DB, no?

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





Ease of use


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...