Validation Widget onSubmit

I would like to use the validation widgets when submitting
data via Spry.Utils.loadURL. The validations work automatically
when the form is submitted, but I want to call the
Spry.Utils.loadURL in a function in an onSubmit function. Is there
a way to invoke the validation manually?
Something like:
<script language="JavaScript" type="text/javascript">
function SendFormCallback(request)
//callback processing here
function SendForm(theForm)
Spry.Utils.loadURL("GET", "
http://"+document.domain+"/scripts/myProxy.cfm?method=sendemail&"+formValsToString(theForm ),
true, SendFormCallback);
</script>
<form name="myForm" method="post" action=""
onSubmit="SendForm('myForm'); return false;">
<table>
<tr valign="top">
<td align="right" valign="top"
class="label">Name:</td>
<td align="left" id="nameWidget"><input type="text"
name="nameField" id="nameField" size="70">
<span class="textfieldRequiredMsg">Please enter your
name. </span></td>
</tr>
<tr valign="top">
<td align="center" colspan="2"><input type="submit"
name="Submit" value="Submit"></td>
</tr>
</table>
</form>
<script language="JavaScript" type="text/javascript">
var nameWidget = new
Spry.Widget.ValidationTextField("nameWidget", "none",
{useCharacterMasking:true,
validateOn:["blur","change"]});</script>

Thanks for your help on this.
Just wanted to let you know that in order to get this to work
I had to add:
var theForm = document.getElementById(form);
So I ended up with:
function SendForm(form)
var theForm = document.getElementById(form);
var ret = Spry.Widget.Form.validate(theForm);
if (ret)
Spry.Utils.loadURL("GET", "
http://"+document.domain+"/scripts/myProxy.cfm?
method=sendemail&"+formValsToString(theForm), true,
SendFormCallback);
}

Similar Messages

  • Function to perform onSubmit - validation widget

    Ok, Ussually, when a form takes time to load the destination
    page (event that I will call
    form submission delay), the user tends to press again the
    submit button. Every time the button is pressed, the information is
    sent again. In spite of that the user will, of course only be sent
    once to the page specified in the action attribute of the form. So,
    the user may think he did right by pressing the button many times,
    but we end up with multiple copies of the same information.
    The solution I came up with, was to modify the validation
    widget javascript file as follows:
    function realizarAlRemitir()
    if (!Spry.Widget.Form.onSubmit) {
    Spry.Widget.Form.onSubmit = function(e, form)
    if (Spry.Widget.Form.validate(form) == false) {
    return false;
    realizarAlRemitir()
    return true;
    I created a wildcard function "realizarAlRemitir()" to be
    performed only when, having pressed the submit button, there is no
    incorrect or empty required field to fill.
    Then, in the html page containig the form, Iredefined the
    "realizarAlRemitir()" function as follows:
    <script language="JavaScript" type="text/javascript">
    <!--
    function realizarAlRemitir()
    ratioGrow = 0.68;
    Spry.Effect.GrowShrink('enviando', {duration:300, from:
    '1px', to: '559px', toggle: true, growCenter:false});
    Spry.Effect.AppearFade('enviando',
    {duration:300,from:1,to:100,toggle:true});
    // -->
    </script>
    This function "draws" using a modified spry effect a div tag
    that effectively blocks the whole form so that the user cannot
    modify the information or press again the submit button, while
    giving her or him appropriate feedback that indicates that the
    submission is being performed correctly.
    This is the sample page:
    http://192.168.10.2/nuevawebdesarrollo/eventos/conferencia.aspx?id=mbatc
    Finnally, my question is whether or not there is a less
    intrusive way to do such a thing, meaning, not having to touch the
    javascript files code. I didn't find one, for instance, so will
    some functionality like this be added to the framework? And,
    lastly, once the framework is embedded inside Dreamweaver, will we
    still be able to make such changes, without generating some trouble
    that will cause the framework to stop working correctly with
    dreamweaver.

    Hello Marin,
    Thanks a lot for your reply. I´m really sorry I made the
    mistake of giving you our internal address. I'm used to just
    copy/pasting it and sending the link to be reviewed. In spite of
    that, you seem to have gotten the idea, perfectly fine, so thanks
    again for making the effort to reply to a flawed question.
    This is the public link, so It should work well for you:
    http://www.esan.edu.pe/nuevawebdesarrollo/eventos/conferencia.aspx?id=mbatc
    It's in spanish, but I don't think language matters to
    understand how it works. Your solution is perfect, as it
    effectively stops the user from pressing the submit button more
    than once.
    Still, the final part of my question holds. We are inserting
    an event, after the submit button has been pressed and,
    consequently, after we've got your javascript files running. So,
    the only way to insert such an event is messing with the files. Or
    can it be done with our own scripts? Will there be a less intrusive
    way to do such a thing, meaning, not having to touch the javascript
    code of your source files to add events or functionality? I didn't
    find a way but that doesn't mean that there isn't one, right? I'm
    worried that now that we have dreamweaver CS3, if anybody needs to
    do such a thing, dreamweaver will no longer recognize the files and
    it will look like in the preview window, that we didn't insert it,
    even if it still works perfectly in the browser.
    Thanks again,
    DANTESAENZ

  • Spry Validation widgets not working on local WAMP server

    I just started the process of creating a contact page. I got the client side done last night, woke up this morning and panicked. The spry validation widgets weren't working anymore. I re-did the entire page and realized it was only the contact.html page in the wamp directory that wasn't working. All the needed CSS and javascript assets are there and in the proper folders, so what's up?
    (I'm still in the middle of the lynda.com series Dreamweaver CS5 with PHP and MySQL , so I'm not even certain where I'm heading just yet. I'm doing stuff as I think I understand it.)

    OK, this is interesting. It works online, but not in local cache.
    Here's the contact page on my website: http://www.ladyhawkslair.com/contact.html (So far, GNDN: goes nowhere; does nothing.)
    And here's the WAMP version: http://www.ladyhawkslair.com/wamp/contact.html
    worky-worky online.
    No worky-worky when I preview in Firefox on my system.
    Wait. Hold that thought.
    I only refuses to work when I preview it in Firefox THROUGH Dreamweaver. Let me test again.
    Verified.
    The spry widgets don't work when I load them to Firefox WITH Dreamweaver. Interestingly, it works with IE.
    Any ideas, Gramps?

  • Making a Swf a valid widget

    I have a swf carousel that will work sat inside an HTML file for the purposes of siting on a web page.
    What as3 code do I need to make this a valid widget?
    I don't actually need it to interact with the captivate project, but I need the user to be able to click the images on the carousel and view the image on the carousel stage area inside the project.

    The Widget King blog is your best resource for advice about coding widgets for Captivate using the WidgetFactory API.
    Take a look at this post about setting the widget type:
    http://www.infosemantics.com.au/widgetking/2012/07/building-a-widget-step-by-step-part-2/

  • Using validation widgets within a data region

    My problem stems from the fact that when I place Spry Validation Widgets in a form within a Spry Data Region, the validation widgets do not work. When I remove the data region, all is well.
    Please help!
    This is a sample code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var dsMembers = new Spry.Data.XMLDataSet("data/members_xml.php", "export/row", {useCache: false});
    //-->
    </script>
    </head>
    <body>
    <div spry:region="dsMembers">
      <form id="editForm" name="editForm" action="">
        <table>
          <tr id="email">
            <td>E-mail:</td>
            <td>
              <input name="email_mem" type="text" id="email_mem" value="{username}" />
              <span class="textfieldRequiredMsg">The value is required.</span>
              <span class="textfieldInvalidFormatMsg">Invalid format.</span>
            </td>
          </tr>
          <tr id="password">
            <td>Password:</td>
            <td>
              <input name="password_mem" type="password" id="password_mem" value="{password}" />
              <span class="textfieldRequiredMsg">The value is required.</span>
              <span class="textfieldMinCharsMsg">The minimum number of characters not met.</span>
              <span class="textfieldMaxCharsMsg">The maximum number of characters exceeded.</span>
            </td>
          </tr>
          <tr id="site">
            <td>Website:</td>
            <td>
              <input name="website_mem" type="text" id="website_mem" value="{buswebsite}" />
              <span class="textfieldRequiredMsg">The value is required.</span>
              <span class="textfieldInvalidFormatMsg">Invalid format.</span>
            </td>
          </tr>
          <tr id="date">
            <td>Date:</td>
            <td><input name="registrationdate_mem" type="text" id="registrationdate_mem" value="{registrationdate}" />
            <span class="textfieldInvalidFormatMsg">Invalid format.</span> <span class="textfieldRequiredMsg">A value is required.</span></td>
          </tr>
          <tr>
            <td colspan="2">
              <input type="submit" name="Submit" id="Submit" value="Submit" />
              <input name="Reset" type="reset" value="Reset" />
            </td>     
          </tr>
        </table>
      <script type="text/javascript">
        <!--
        var email = new Spry.Widget.ValidationTextField("email", "email", {validateOn:["blur"]});
        var password = new Spry.Widget.ValidationTextField("password", "none", {minChars:6, maxChars:10, validateOn:["blur"]});
        var site = new Spry.Widget.ValidationTextField("site", "url", {validateOn:["blur"]});
        var date = new Spry.Widget.ValidationTextField("date", "date", {validateOn:["blur"], format:"dd/mm/yyyy", useCharacterMasking:true});
        //-->
        </script>
      </form>
    </div>
    </body>
    </html>
    Ben

    Ben,
    You need to add a function observer that will instantiate the form widgets and  add the Form Widget Init observer to the region.
    The modified code is as follows:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var dsMembers = new Spry.Data.XMLDataSet("data/members_xml.php", "export/row", {useCache: false});
    //  Define a function observer that will instantiate the form widgets.
    var widgetInitObserver = function(nType, notifier, data) {
        if(nType == 'onPostUpdate'){
            var email = new Spry.Widget.ValidationTextField("email", "email", {validateOn:["blur"]});
            var password = new Spry.Widget.ValidationTextField("password", "none", {minChars:6, maxChars:10, validateOn:["blur"]});
            var site = new Spry.Widget.ValidationTextField("site", "url", {validateOn:["blur"]});
            var date = new Spry.Widget.ValidationTextField("date", "date", {validateOn:["blur"], format:"dd/mm/yyyy", useCharacterMasking:true});
    //    add the Form Widget Init observer to the region
    Spry.Data.Region.addObserver('formregion', widgetInitObserver);
    //-->
    </script>
    </head>
    <body>
    <form id="editForm" name="editForm" action="">
      <div id="formregion" spry:region="dsMembers">
        <table>
          <tr id="email">
            <td>E-mail:</td>
            <td>
              <input name="email_mem" type="text" id="email_mem" value="{username}" />
              <span class="textfieldRequiredMsg">The value is required.</span>
              <span class="textfieldInvalidFormatMsg">Invalid format.</span>
            </td>
          </tr>
          <tr id="password">
            <td>Password:</td>
            <td>
              <input name="password_mem" type="password" id="password_mem" value="{password}" />
              <span class="textfieldRequiredMsg">The value is required.</span>
              <span class="textfieldMinCharsMsg">The minimum number of characters not met.</span>
              <span class="textfieldMaxCharsMsg">The maximum number of characters exceeded.</span>
            </td>
          </tr>
          <tr id="site">
            <td>Website:</td>
            <td>
              <input name="website_mem" type="text" id="website_mem" value="{buswebsite}" />
              <span class="textfieldRequiredMsg">The value is required.</span>
              <span class="textfieldInvalidFormatMsg">Invalid format.</span>
            </td>
          </tr>
          <tr id="date">
            <td>Date:</td>
            <td><input name="registrationdate_mem" type="text" id="registrationdate_mem" value="{registrationdate}" />
            <span class="textfieldInvalidFormatMsg">Invalid format.</span> <span class="textfieldRequiredMsg">A value is required.</span></td>
          </tr>
          <tr>
            <td colspan="2">
              <input type="submit" name="Submit" id="Submit" value="Submit" />
              <input name="Reset" type="reset" value="Reset" />
            </td>     
          </tr>
        </table>
      </div>
    </form>
    </body>
    </html>
    I hope this helps.
    Ben

  • Radio Validation Widget Blocked by table formatting?

    We are building a form we will be using to assess user
    satisfaction with our application (university employee development)
    and it contains a number of likert scale questions (one a scale of
    1-5 this best addresses . . . . ). The likert scale is displayed in
    a table format.
    The problem is that the spry Radio validation widget
    (radioRequiredMsg) will ONLY display if the table formatting is
    suppressed. The table formatting appears to be blocking the spry
    validation.
    Anyone have any idea why this is? Or how we could solve this
    problem?
    Please HELP!
    thanks in advance
    m

    Have to use the following as suggested by KPSeal:
    // If you're using a JMenuJMenu menu = new JMenu("Menu 1");menu.getPopupMenu().setLightweightPopupEnabled(false); // If you're using a JPopupMenuJPopupMenu popupMenu = new JPopupMenu("Popup Menu 1");popupMenu.setLightweightPopupEnabled(false);
    Best Regards,
    yckok

  • Validation widget don't work in regions?

    Is it true, Validation Widget don't work in regions? If I
    create a text validation widget, then wrap it in a region for xml
    data, the validation no longer functions for the widget. Is there
    something I'm missing here, or does it simply not work in that
    configruation?
    Thanks,
    Nathan

    Hi Nathan,
    There is a workaround to have the validation widgets working
    inside a spry:region.n
    The reason why they don't work inside a region is because the
    spry region removes anything from page when it is created. In this
    way, the widget remains somewhere in the memory instantiated and
    will search from an element that no longer exists.This will make
    the widget to not function properly.
    You should do the following to have the widgets working
    inside a spry:region.
    - add the widgets' constructors instantiation inside the
    region
    - make an extra check if the widgets already exist and
    destroy them if any. I
    Below is a code sample of what you should do:
    <div spry:region="ds1">
    <form id="form1" name="form1" method="post" action="">
    <span id="sprytextfield1">
    <input type="text" name="text1" id="text1" />
    <span class="textfieldRequiredMsg">A value is
    required.</span></span>
    <p><span id="sprytextarea1">
    <label>
    <textarea name="textarea1" id="textarea1" cols="45"
    rows="5"></textarea>
    <span id="countsprytextarea1"> </span>
    </label>
    <span class="textareaRequiredMsg">A value is
    required.</span><span
    class="textareaMinCharsMsg">Minimum number of characters not
    met.</span><span class="textareaMaxCharsMsg">Exceeded
    maximum number of characters.</span></span></p>
    <p>
    <input type="submit" name="button" id="button"
    value="Submit" />
    </p>
    </form>
    <script type="text/javascript">
    <!--
    if (typeof sprytextfield1 != 'undefined' &&
    sprytextfield1.destroy) sprytextfield1.destroy();
    if (typeof sprytextfield1 != 'undefined' &&
    sprytextfield1.destroy) sprytextfield1.destroy();
    var sprytextfield1 = new
    Spry.Widget.ValidationTextField("sprytextfield1");
    var sprytextarea1 = new
    Spry.Widget.ValidationTextarea("sprytextarea1",
    {validateOn:["blur", "change"], counterType:"chars_count",
    counterId:"countsprytextarea1", minChars:2, maxChars:12});
    //-->
    </script>
    </div>
    Hope this makes things more clear,
    Diana

  • Dreaded "Not a Valid Widget" Error

    Hi Folks,
    I'm getting the dreaded "Not a Valid Widget" error when I try to import my Flash (Professional CS5) file as a widget into my Captivate 5 project. I've done my research on this problem, and found an earlier post from Vikranth regarding copying the AS3\static actionscript into the first frame of the Flash file:
                                                                          http://forums.adobe.com/message/3614964
    However, I'm not getting enough detail about exactly where to past this actionscript into Flash.
    Is this truly the fix? Even for the latest software fully updated?. If this is still the fix, am I going to have to do this every time I construct a Flash widget?
    Very much appreciate your help,
    Roger

    I think you may misunderstand. Installing WidgetFactory or any other API on your PC is not an instant fix for some issue in your widget coding.  I suggested that you go with an API because they are better documented than the Adobe templates and offer far more possibilities in the long run.
    To get the most out of the APIs you need to read the tutorials and documentation provided by their creators. Only then will you understand the differences in the templates, which use a framescripting approach to coding, versus the APIs, which use a class-based coding approach.  When using the APIs you do NOT use the Adobe templates at all to create widgets.  You begin your widget directly in Flash.
    Try these two tutorials first to get an idea of how it's done:
    http://www.infosemantics.com.au/widgetking/2010/11/building-widgets-in-flash/
    http://www.infosemantics.com.au/widgetking/2010/11/sign-up-for-the-widget-eseminars/
    Flash and Captivate DO work together very well, but only if you know what you are doing.  What's currently wrong with your picture is that you need to learn a lot more about how widgets work and how they need to be created.  As your ActionScript 3 skills improve, so will your widgets.

  • Not a valid widget

    This is so frustrating.   My Cap 5 keeps vomiting the not a valid widget error.....
    From Captivate 5:
    File>new project>Widget in Flash
    I select AS3, Static   (default)
    New file opens in Flash.   I chnage nothing....   I publish the swf from flash.
    Go back to captivate 5 and attempt to:
    Insert>widget
    "Not a valid widget"
    How can this be?    It has the default Adobe widget code??    It has no functionality....  but seriously...   it should allow it to be imported.
    I've checked the settings within Flash:
    File>Actionscript settings
    C:\Program Files\Adobe\Adobe Captivate 5\ActionScript\export\as3
    I know what CPgears and Widget factory do...    I get it...  so don't point me that way...     but I want to know WHY Adobe prodcut to Adobe product is broken...    I've checked the web, and it appears that everyone that has the same error as me were given work arounds...   not a genuine fix.
    This is the usual Adobe frustration...  

    Hi,
    I think this issue is same as the below post:-
    http://forums.adobe.com/message/3624888#3624888
    Please check and let me know if your issue gets resolved.
    Thanks,
    Vikranth

  • Validation Widgets

    When I create a new div id for my form the color is not
    changing from gray to yellow when selected. It just stay yellow in
    my background.
    I am using the Validation Widgets Demo template for testing.
    It only happen when I create a custom input field like name
    and address the background is yellow.
    I try looking around in the css codes and can't find any
    linking words to my input text fields .
    Here is the link
    http://www.sarniasatellite.com/Contact_Viewsatusa.html
    thanks for the help

    Hello,
    1. When the user select any form input the corresponding
    validation widget apply a css class name on the input HTML
    container. Based on this class you can highlight the background
    color of your input. If you create a generic CSS rule it will apply
    to every input textfield in page. In the same time you can specify
    for each input a different color.
    The corresponding "focus" classes for each widget are:
    selectFocusState - Select Validation Widget
    textfieldFocusState - Textfield Validation Widget
    textareaFocusState - Textarea Validation Widget
    You can search into the corresponding css of each validation
    widget you already included in your page and change the background
    for all the textfields:
    .textfieldFocusState input, input.textfieldFocusState {
    background-color: #blue;
    or you can change a single one:
    .textfieldFocusState #fName1{
    background-color: pink;
    2. The default behaviour for the Validation Widgets is to
    request a value to be inserted. However this behavior could be
    switched off by using the isRequired option for each widget:
    isRequired: false
    Regardsm
    Cristian

  • Error in TextField Validation Widget reset() method

    There appears to be an error in the Textfield Validation
    Widget's reset() method. When I set the widget to "real" or
    "custom" validation, the reset() method is throwing an error when
    it reaches the line "this.oldValue = this.input.defaultValue;"
    I seached the code and it appears that
    "this.input.defaultValue" is not set anywhere else. Is there a
    missing option, or is this line incorrect and copied over from
    another widget that uses "defaultValue"?

    It looks as though you're trying to use main-content as a CSS selector. If it's a class, it should begin with a dot (period) like this:
    .main-content
    If it's an ID selector, it should begin with a hash:
    #main-content

  • I get a message 'not a valid widget' when I try to add an interaction slide? Please help

    Hi Guys,
    I hope everyone is well.
    I get a message 'not a valid widget' when I try to add an interaction slide? Can some please help me?
    Many thanks,
    Peter Panayi

    Hi Rod,
    I hope you are well. I can insert a widget by going into insert then selecting the widget. Thanks very much for your message.
    Best regards,
    Peter Panayi

  • CFFORM and validation widget

    if you use a cfform this normally overwrites the spry
    validation at submit. Call on your cfform the validate() function
    on submit action. You should have something like: if
    (Spry.Widget.Form.validate(form) == true)....
    On submit check if the validate() function returns true or
    false. If true, continue submission, if false trigger the spry
    validation.
    Does anyone have a sample of the code, or more detailed
    information on the code reffered to above. I have included my code
    below:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry/">
    <head>
    <title>Admissions Application</title>
    <cfinclude template="/head/app.htm" />
    <script type="text/javascript">
    <!--
    function ValidateForm(form){
    if(Spry.Widget.Form.validate(form)==true)
    return true;
    //-->
    </script>
    </head>
    <body>
    <div id="container" style="background-image:none;">
    <div id="header">
    <cfinclude template="/templates/header.htm" />
    </div>
    <img id="leafBottom" src="/images/rightNavLeaf.png"
    alt="" />
    <div id="content">
    <cfform method="post" name="app" id="application"
    action="" onsubmit="javascript:return ValidateForm(this)"
    enctype="x-www-form-urlencoded">
    <div id="box">
    <h1>I.D. and Name Information</h1>
    <p class="section">Section 1 of 7</p>
    <h3>Social Security Number</h3>
    <div id="thessn">
    <label for="ssn"><span
    class="required">*</span>Social Security
    Number:</label>
    <p><cfinput id="ssn" class="field" name="ssn"
    type="text" size="10" />
    <span class="textfieldRequiredMsg">Please enter your
    social security number.</span>
    <span class="textfieldInvalidFormatMsg">Please enter a
    valid social security number.</span></p>
    </div>
    <div id="thessn2">
    <label for="ssn2"><span
    class="required">*</span>Re-enter Social Security
    Number:</label>
    <p><cfinput id="ssn2" class="field" name="ssn2"
    type="text" size="10" />
    <span class="textfieldRequiredMsg">Please re-enter
    your social security number.</span>
    <span class="textfieldInvalidFormatMsg">Please enter a
    valid social security number.</span>
    <span class="confirmInvalidMsg">Social Security
    entires do not match.</span></p>
    </div>
    <p><cfinput class="field" type="submit" name=""
    value="Submit Application" /></p>
    </div>
    </cfform>
    <script type="text/javascript">
    <!--
    var thessn = new Spry.Widget.ValidationTextField("thessn",
    "social_security_number", {isRequired:"true", validateOn:["change",
    "blur"]});
    var thessn2 = new Spry.Widget.ValidationTextField("thessn2",
    "social_security_number", {isRequired:"true", validateOn:["change",
    "blur"]});
    var spryconfirm = new
    Spry.Widget.ValidationConfirm("thessn2", "ssn");
    //-->
    </script>
    </div>
    <div id="footer">
    <cfinclude template="/Templates/footer.htm" />
    </div>
    </div>
    </body>
    </html>

    if you use a cfform this normally overwrites the spry
    validation at submit. Call on your cfform the validate() function
    on submit action. You should have something like: if
    (Spry.Widget.Form.validate(form) == true)....
    On submit check if the validate() function returns true or
    false. If true, continue submission, if false trigger the spry
    validation.
    Does anyone have a sample of the code, or more detailed
    information on the code reffered to above. I have included my code
    below:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry/">
    <head>
    <title>Admissions Application</title>
    <cfinclude template="/head/app.htm" />
    <script type="text/javascript">
    <!--
    function ValidateForm(form){
    if(Spry.Widget.Form.validate(form)==true)
    return true;
    //-->
    </script>
    </head>
    <body>
    <div id="container" style="background-image:none;">
    <div id="header">
    <cfinclude template="/templates/header.htm" />
    </div>
    <img id="leafBottom" src="/images/rightNavLeaf.png"
    alt="" />
    <div id="content">
    <cfform method="post" name="app" id="application"
    action="" onsubmit="javascript:return ValidateForm(this)"
    enctype="x-www-form-urlencoded">
    <div id="box">
    <h1>I.D. and Name Information</h1>
    <p class="section">Section 1 of 7</p>
    <h3>Social Security Number</h3>
    <div id="thessn">
    <label for="ssn"><span
    class="required">*</span>Social Security
    Number:</label>
    <p><cfinput id="ssn" class="field" name="ssn"
    type="text" size="10" />
    <span class="textfieldRequiredMsg">Please enter your
    social security number.</span>
    <span class="textfieldInvalidFormatMsg">Please enter a
    valid social security number.</span></p>
    </div>
    <div id="thessn2">
    <label for="ssn2"><span
    class="required">*</span>Re-enter Social Security
    Number:</label>
    <p><cfinput id="ssn2" class="field" name="ssn2"
    type="text" size="10" />
    <span class="textfieldRequiredMsg">Please re-enter
    your social security number.</span>
    <span class="textfieldInvalidFormatMsg">Please enter a
    valid social security number.</span>
    <span class="confirmInvalidMsg">Social Security
    entires do not match.</span></p>
    </div>
    <p><cfinput class="field" type="submit" name=""
    value="Submit Application" /></p>
    </div>
    </cfform>
    <script type="text/javascript">
    <!--
    var thessn = new Spry.Widget.ValidationTextField("thessn",
    "social_security_number", {isRequired:"true", validateOn:["change",
    "blur"]});
    var thessn2 = new Spry.Widget.ValidationTextField("thessn2",
    "social_security_number", {isRequired:"true", validateOn:["change",
    "blur"]});
    var spryconfirm = new
    Spry.Widget.ValidationConfirm("thessn2", "ssn");
    //-->
    </script>
    </div>
    <div id="footer">
    <cfinclude template="/Templates/footer.htm" />
    </div>
    </div>
    </body>
    </html>

  • Text validation widget bug?

    I have used text validation in a table body like this:
    <table style="width:20%">
    <tbody id="login_val">
    <tr><td>E-Mail</td><td><input
    name="login" id="login" type="text"></td></tr>
    <tr class="textfieldRequiredMsg"><td
    colspan="2">Enter your login E-Mail.</td></tr>
    <tr class="textfieldInvalidFormatMsg"><td
    colspan="2">Enter a valid E-Mail address.</td></tr>
    </tbody>
    <tbody>
    <tr><td></td><td><input
    name="submint" id="submit" type="submit" value="Log
    In"></td></tr>
    </tbody>
    </table>
    Initialised with: var login_val = new
    Spry.Widget.ValidationTextField("login_val", "email",
    {validateOn:["blur"]});
    If there is an input error - the error table-row shows up as
    expected but the first td of the first row (the one showing the
    word 'E-Mail') suddenly has a colspan"2" on it too. (tested only in
    Firefox)
    Do I miss something here? Or is this a bug? Feature???
    Cheers from down under.

    Hello,
    I think the problem in this situation appears because of the
    CSS definition. The default definition right now to display an
    error message is:
    .textfieldRequiredState .textfieldRequiredMsg,
    display: inline;
    color: #CC3333;
    border: 1px solid #CC3333;
    When this class is used with table rows the results are
    unexpected because the table rows have a special status and cannot
    normally be displayed as an inline element. Unfortunately your
    scenario hit a browser limitation in the CSS implementation. The IE
    because it doesn't have yet support for display:table as the CSS2
    specify will render "correctly (?!)" the display:inline or
    display:block on table row elements. FF because it has correct
    support for display:table-row will work incorrectly with the inline
    as the specification mention.
    The only solution I see is to manipulate the CSS height
    property, margin and padding instead of manipulating the display if
    you want to continue to use the table structure above.
    Regards,
    Cristian

  • TextArea Validation Widget don't function with Prototype

    I have seen that TextAreaValidationWidget don't function
    properly if is loaded also the Prototype library. To verify, I have
    also simply insert this code in the HEAD section of the
    FormsValidation Demo included in the framework:
    quote:
    <script type='text/javascript'
    src='prototype.js'></script>
    By adding this file, the validation of text field is running
    properly but the validation of textarea doesn't. The Firefox
    console of errors report:
    quote:
    Invalid Quantifier +);} catch (e) {if!=$continue) {throw
    e;}}});} catch(e) {if(e!=$break){thow e; }} return this;}\b
    in SpryValidationTextarea.js line 785
    Do you know how to solve this?
    I use Spry 1.4, prototype 1.5.0 (because I use also lightbox
    2.0)

    Hi,
    Based on a previous report we fixed this bug in the Spry 1.5
    preview release. To fix this bug you should edit the
    SpryValidationTextarea.js. Search for the:
    Spry.Widget.ValidationTextarea.prototype.switchClassName =
    function (className){
    and inside you should see around line 763 the following code:
    for (var k in classes){
    if (classes[k] != className){
    this.removeClassName(classes[k]);
    This code should change to the following:
    for (var k = 0; k < classes.length; k++){
    if (classes[k] != className){
    this.removeClassName(classes[k]);
    Please let me know about your results.
    Regards,
    Cristian MARIN

Maybe you are looking for

  • Mini is recognized Xfer ok....but not music is there

    This is what I have: I have a mini on a pc. The mini just had the updater applied. There is no music there. Itunes sees the ipod. Says that it is transfering music to it. However when I browse the mini there is not a single song. I have tried to load

  • Self-assigned IP address problem - My solution

    I am new to this board and created an ID just to write this post. When I searched for this self-assigned IP problem, I found almost 1 million results on Google so obviously I am not alone. I have this problem off and on on the wireless network at hom

  • How can I add Arabic to Nokia 5800

    I got my phone in the U.S. and it doesn't support Arabic language, please help if anyone knows how to add the language or if there is some sort of software that I can download in order to enable the language on my phone. Thanks

  • I Tunes 7 without internet

    Hi i've just bought a ipod, however at present i do not have an internet connection. when i recieved my ipod there was no cd to install itunes onto my computer. Is there any way i can get the new itunes on disk? Or download it from the internet on to

  • Switched from vista to W7 and can't locate my audiobook files in iTunes. help

    My Vista os crashed, and I'm now using Windows 7 on the same desktop computer. I am not a teenager, considerably older!, and thus technology is not intuitive. I had backed up my files before the crash, and had music, but mostly audiobooks in my iTune