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

Similar Messages

  • 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

  • Many widgets don't work with Snow Leopard

    Loading SL was no problem however numerous widgets no longer function.(Maintidget, translator, backup status, movies, etc.) Why?? Developers problem?

    HI,
    Please update your profile for us. Click My Settings on the right side of this page. Thanks!
    Maintidget for one was originally written for 10.4. Check the developer site. According to the information there, it's compatible with 10.5. *As with any 3rd party software, check their*
    *sites for updates for SL compatibility.*
    http://www.giantmike.com/widgets/Maintidget.html
    Carolyn
    Message was edited by: Carolyn Samit

  • Dashboard Widgets don´t work with Leopard

    After installing Leopard the Widgets worked for a short time.
    I have installed the dashboard tools but did nothing with them.
    I don´t know if the widgets ran after this.
    Now I can press F12, the + sign appears in the left corner.
    I can press the + sign and the dashbord appears at the bottom of the desktop.
    If I click at a Widget the Dashboard disappears and nothing happens.
    No Widget starts.
    If I move a Widget to the desktop it disappears if I release the mouse button. The Dashboard disappears too.

    to fritzk who originally reported this and all others posting here —
    i have also reported in this forum (as have others), the problem with the widgets freezing —>> see my post here about it. that post also references other posts that have found the same thing.
    yes, we know about the workaround of creating a non-admin. account, logging out of your main account, logging into the non-admin. account, logging back out of that and back into your original admin. account, and then the widgets come back to life. that is a kludgy workaround at best — you shouldn't have to go through those type of machinations just to get your widgets working (so to speak).
    also, it should be clear that there are two separate issues here — the widget freeze situation and the widgets just disappearing altogether when dashboard is called up. the widget freeze is the most common one seen under leopard (and nowhere else now). that has nothing to do with the widgets disappearing, which seems to be a general mac os x error, not just leopard.
    and to throw more gas on the fire, here's something else — widgets, especially games that use a grid model, do not show up formatted correctly. their grid ends up looking weird. i reference examples to this in my post i list above.
    is there a place to bug report this with apple? please advise.

  • Recyclebin don't function with User Sys 10g

    Hi all,
    I have a doubt.
    With the user SYS I create a table test with two columns. Then I have dropped it to see in the recyclebin if it's there.
    I used the show recyclebin command and not show me any table.
    I ask you: The recyclebin feature is disable to user SYS ? How I do to function ?
    Thanks.
    Wander(Brazil)

    You can verify whether the recycle bin is working by flashing your table back. If it comes back, the recycle bin is working:
    flashback tablename to before drop;
    The recycle bin can be turned off, as in this manual fragment:
    If you use a parameter file (PFILE) with your database, you can specify the value of RECYCLEBIN in the parameter file, as in this example:
    # turn off recycle bin
    RECYCLEBIN=OFF
    You should see this value set in your parameter file if the recycle bin has been turned off.

  • 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

  • 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

  • Textarea validation with max only

    How can I set up my textarea validation so that there is no
    minimum but the IS a maximum number of characters?
    I tried setting min to zero bas below but it doesn't work.
    It gives an error unless I try ONE character.
    var theDescription = new
    Spry.Widget.ValidationTextarea("theDescription",
    {useCharacterMasking:true, minChars:0, maxChars:180,
    counterType:"chars_count", counterId:"Countvalidta1",
    validateOn:["change"]});

    Hi Kate,
    As Dragos suggested you should add the isRequired: false.
    This will tell to the Validation Textarea to simply ignore the fact
    the textarea value is empty.
    Then if you completely remove the the minChars then you
    should obtain the behavior you expected. If any numerical value is
    passed through the minChars then the length of textarea value is
    validated against that value. Instead if you remove the option the
    Validation Widget will simply stop make the check.
    Into the documentation you have detailed examples for the
    different options that could be used for the textarea widget:
    http://labs.adobe.com/technologies/spry/articles/textarea_overview/
    Regards,
    Cristian MARIN

  • I bought an unlocked iphone 5s with full paid but what i got is "SIM Not Valid". Don't know this is because of Apple or Sprint problem?

    I bought an unlocked iphone 5s with full paid but what i got is "SIM Not Valid". Don't know this is because of Apple or Sprint problem? It suppose to be unlocked and allow me to use any carrier worldwide. What is going on? What should i do? Return a phone and get refund?

    If you purchased a Sprint iPhone, you DID NOT purchase an unlocked iPhone. All Sprint iPhones are carrier locked to Sprint, & Sprint will only authorize the unlocking of the sim slot for current customers using the phone on their network. If you are not a current customer, using that phone on Sprint's network, you wasted your money, as Sprint will not authorize the unlocking of the sim slot.
    So, it the above is the case with you, yes, return the phone for a refund, if you still can.

  • BRFplus: Functions with different Signatures for Decision Table

    Hi all,
    I am new to BRFplus and attempting to do some prototyping with it.
    I have created a Decision Table which defines valid combinations of width and thickness for a product.  The product id, width and thickness are the query columns; the results column is a boolean value that indicates if the combination is valid.
    I have successfuly created a Function that given product id, width and thickness returns whether the combination is valid.
    I now want to create another Function that given product id and width only (but not thickness) refers to the same Decision Table and returns whether the product id and width combination is valid.
    Is this possible ?  If so, how do I go about it ??
    I tried creating a new Function with this signature but I just get an error "Assigned expression uses Element WIDTH/Width which is not in the context ".
    Any comments or suggestions appreciated.
    Thanks,
    Grogan

    Hi, Grogan
    When you're talking about a Functio  you men a BRF+ function, don`t you?
    So, if you go to this function there is a tab called "Signature" , the second one....
    Have you tried to add your Element WIDTH to the Function signature and test again ?  
    May be the long text of the error message could help you as well.....
    Kind regards

  • 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?

  • Reg an Error: no function with name 'CURRENT_RECORD' exists in this scope

    Hi All,
    I am getting the following error when i try using Set_Item_Instance_Property for assigning a visual attribute to an item.
    This is the code. I have replaced Display_Item with Set_Item_Instance_Property for setting the visual attribute.
    --DISPLAY_ITEM(lv_cur_item, 'VA_CURRENT_BUTTON');
    SET_ITEM_INSTANCE_PROPERTY(lv_cur_item,CURRENT_RECORD,VISUAL_ATTRIBUTE,'VA_CURRENT_BUTTON');
    no function with name 'CURRENT_RECORD' exists in this scope
    Any suggestion regarding this.
    Regards,
    Prasad.

    L.Rajesh - :SYSTEM.CURRENT_RECORD global variable does not exist - use :SYSTEM.CURSOR_RECORD or :SYSTEM.TRIGGER_RECORD instead.
    Prasad - what version of Forms are you using? For Forms 6i and higher, CURRENT_RECORD property is a valid reference. (not sure about Forms 5 or earlier as I don't have access to these versions any longer :) ) Are you logged into a database when you compile your code? There might be a TYPO somewhere in your code that the PL/SQL compiler can't determine the cause and CURRENT_RECORD is the first recognizable term the compiler can find. Sometimes, I've had to log out, close Forms Builder and reopen the form I'm working on to eliminate these types of odd compilation errors.
    Hope this helps,
    Craig B-)
    If a response is helpful or correct, please mark it accordingly.

  • 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/

  • 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);
    }

  • Spry Textarea validation extension to prevent spam

    I am using the fairly limited features of the spry framework in Dreamweaver to validate forms.
    When I get to the textarea, validation is limited to:
    required
    min char, char count
    AND NOT MUCH MORE!
    I would like to continue to use the spry framework since it is pervasive inside DW CS4 and seems useful - BUT I need to be able to add functionality.
    Specificly I would like to check the textarea for content matching a regx string. To determin if the form is getting hit by a spam bot.
    I can do this in PHP, like so;
    <?PHP
    // Spam Detection code block
    // The \b in the pattern indicates a word boundary, so only the distinct
    //word "web" is matched, and not a word partial like "webbing" or "cobweb" */
    // Check for html and img tags in string
    function check($comment) {
      // if(ereg('(href=\b|http\b|url=http\b|<a href|<IMG=|<img|img=|scr=|www\b)@i', $comment)) {
      if (preg_match('(href=\b|http\b|url\b|http\b|<a href|<IMG=|<img|img\b|scr\b|www\b)i', "$comment")) {
          // comment looks dirty, lets put up a bogus thankyou.
          echo("<pre> 
         </pre><center> Thanks <p>We have received your comment and hope you enjoyed visiting our site. <p>To continue browsing, use the links above.</center>");
    exit();
    else{ // comment is clean of URLs
    // End of Spam Detection code block 
    ?>
    Is there a way to integrate this code (or similar javascipt) into the Spry library, so I can do this in DW?
    Anti spam technologies are a very important part of forms these days.
    I hope other people value this request and pipe up about it.
    Thanks
    -Daniel Hoviss

    Never mind. After doing some experimenting, it turns out it's
    something in my company's template that is conflicting with
    something.
    Now I just have to figure out what it is.

Maybe you are looking for

  • Safari quit unexpectedly while using the .PictureOrganizerv.png plug-in?

    Hello For the past week my safari has been closing randomly while having safari open for lengthy periods of time (which I usually do) with the message "Safari quit unexpectedly while using hte .PictureOrganizer.png plug-in I tried to find the specifi

  • Office 365 Pro Plus install failures during SCCM OSD

    Hi All, I'm in the process of deploying Office 365Pro Plus using SCCM 2012 r2 and have found some very weird behaviour. I have already downloaded the source and the Office folder exists in the same folder as setup.exe and my install xml looks like th

  • AggregatorAdapterServices vs JMSAdapterServices for my Scenario?

    Hi, I have a requirement where in a Payment Request from Siebel is to be submitted to backend financials system for processing (The Payment Request in Siebel gets mapped to PayableInvoiceEBO FYI). In my design, which is the best fit between Siebel Ap

  • Disk you are attempting to use is full

    I am trying to download purchased movie to iTouch and it is saying it is full. This is impossible as the iTouch is showing 6GB of space on it and the movie is only 1GB. Is there an issue with determining space allocation on the iTouch? Why am I getti

  • Is this only a one-way sync?

    It doesn't seem like the edits I make in either Illustrator or Indesign gets sent back to the app?  That would really be ideal.  Maybe I'm not saving correctly?  Anyway, looks very promising! J.