Validation JS code and Spry

This is frustratiing me.  I have found some code that purportedly will validate two check boxes to ensure at least one of them is >0.
I modified what I found for my site.  I don't know if it will do the trick or not.  If it does, how do I attach it to submit action without impeding the page's other validations -- Spry.  I don't want either or...I want both. Since I don't do JavaScript and I want to retain my Spry validations...what do I do?
<script type="text/javascript">
    function ff_confirmnext_action(element, action)
    // define elements input values
           var scount=ff_getElementByName('small').value;
        var mcount=ff_getElementByName('medium').value;
        var sub = 0 //subtotal
    // calculates if inputs have a value then add to total
        if (scount != '') sub += parseInt(scount);
        if (mcount != '') sub += parseInt(mcount);
    // check to make sure sub has a value > 0
        if (sub !=0) {
            ff_validate_nextpage();
            } else {
            alert ('At least one count field is required.');
            }//if
    } // ff_confirmnext_action
</script>
I would really appreciate some guidance.
Greg

In your site definition, did you specify where you want the
spry js created?
Site definition>Advanced>spry
If you don't, then the files get automatically written to the
default Spry
folder in the root of your defined site
I put up a page, and edited the folder where the js and the
css are stored,
even though the site definition points to the default folder.
I didn't have
any problems with that as long as the paths are correct in
your html... see
the code on this page:
http://www.dreamweaverresources.com/spry-widgets/spry-vertical-menu/index.html
Nadia
Adobe® Community Expert : Dreamweaver
CSS Templates |Tutorials |SEO Articles
http://www.DreamweaverResources.com
~ Customisation Service Available ~
http://www.csstemplates.com.au
Spry Widget Examples
http://www.dreamweaverresources.com/spry-widgets/
"jasals" <[email protected]> wrote in
message
news:f31tpl$2g3$[email protected]..
> doing that will update files that currently use the js
files or point to
> them
> (though I got an error when it did it - maybe the CSS
files failed... but
> ANYWAY... when I create new widgets on other pages... it
recreates the JS
> int
> he SPryAssets folder. It hasn't remembered that I want
that stuff in the
> /js/spry folder... also it still is using relative
pathing (../../../)
> rather
> than root (/js/spry)
>
>
>

Similar Messages

  • I'm having trouble activating CS6 Design Premium with a VALID product Code and a VALID previous version code, CS 5.5 Design Premium. Why isn't it accepted?

    I purchased CS6 Design Premium directly from Adobe, upgrading from CS5.5 Design Premium. Now it won't acknowledge my valid previous version serial number. And I have the original documentation.
    What should I do? I can use the trial version, but that is not the solution I need.

    First you should check your Adobe account online to confirm that you are using the same serial number associated with your older version.
    If things still lok okay then you will need to get in touch with Adobe support thru chat and see if you can get their help in resolving the matter.  They might not be available during the weekend.
    For the link below click the Still Need Help? option in the blue area at the bottom and choose the chat option...
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

  • HT1918 When I changed my credit card iTunes says that my security code is invalid. I even entered another card with its valid security code and got the same message. The security code I entered was correct but I can't get iTunes to accept it as valid.

    When I changed my credit card info iTunes says my security code is invalid but the one I've entered is correct. I've even added a different card and I still get the message that the code is invalid. This means that I cannot download an app or song because I can't get past the payment page.

    iTunes Store: My credit card's security code or zip code does not match my bank's records

  • HT1918 I have entered and re-entered my credit card information and it keeps telling me to enter a valid security code and I'm looking right at my card and the code is correct but I can't get past this step.

    I can't get past the entering my credit card info.

    See if the troubleshooting on this page helps : http://support.apple.com/kb/TS1646

  • Error "10000180 Specify valid tax code" after upgrading 2007 to 8.8 PL15

    Hi all,
    In one client, I've upgraded the database from 2007 to 8.8 PL15.
    When I try to add an Invoice or Sales order in 8.8, the system gives an immediate error "10000180  Specify valid tax code" and does not open the standard Invoice form to add a new document.
    The same happens when I select other sales or purchase menu options.
    I checked the tax definition (VAT table) and everything seems fine.
    Does anybody know what can cause this error?
    It must be related with 8.8 version, since in 2007 it worked fine...
    Thanks all,
    Manuel Dias

    Hi Syed,
    After some long checks, I've discovered the problem: after the upgrade, the VTG1 table had wrong value keys (01, 02, 03 and 04) against the OVTG table (which was 1,2,3 and 4).
    I've done a manual update of this entries and then it worked.
    Thanks anyway,
    Manuel Dias
    Edited by: Manuel Dias on Mar 28, 2011 9:46 PM
    Edited by: Manuel Dias on Jun 21, 2011 10:04 AM

  • How to get new company code and controlling area in SRM

    Hi SDN,
    we are on SRM 5.0.
    Our finacial experts want to implement a new company code and controlling area.
    In SRM I can set up a new company code easily in ppoma_bbp and import a new plant from backend for the new company code.
    When testing in EBP I get the error: "company code xyz not available in controlling area zzz"
    So I need to import the new backend controlling area, too. How can I get the second controlling area in SRM?
    Thanx for help,
    matthias

    Hi Muthuraman Govi  and Sanjeev,
    in fact I can see in backend in transaction KS03 (show cost center) there in the F4s, which comp.code + controll area combinations are valid and have indeed cost centers assigned.
    So I have a new valid comp.code and a new valid cont.area.
    The new comp.code belongs to the new contr. area.
    In SRM I set the BUK attribute as described by Sanjeev (I had that already done). Still, if it is like you say, why do I get an error in EBP when trying to buy products from the new plant in the new company code...
    Is there any more config.work necessary in backend or SRM?
    kind regards, matthias

  • UI Datepicker and Spry textfield Validation

    Hi, I am having a problem with using the UI Date picker and Spry textfield Validation together. I have created a sample form: 2 input boxe, the test box has the datepicker and spry validation and test2 has the date picker only,one submit button and some php code that echos the boxes values on submit.
    My date picker is date formated as 'yy-mm-dd' for four digit year.  My spry validation is formated 'yyyy-mm-dd' with validate on submit.
    Now when I click on the test input box the datepicker comes up normally and i select a date. I then select the date on test2. Once I click the submit button the test field with spry validation come back saying a value is required and nothing else happens.
    I was playing around and trying other things to get it to work and I noticed that when I select the test inputbox and the calander pops up if I enter some numbers into the text box then select a date from the datepicker then enter a date in the test2 inputbox and hit submit it works.
    So it appears to me that the validation is not reading anything in the test field when I just select a date.  Why is that?  When I select a date it shows a date in the inputbox.  It makes it hard to use the datepicker on a form.
    Any help would be a preciated.  Code is below.
    Thanks Winrol
    <?php echo "Test box 1 value = ". $_POST['test']. "<br/>" ?>
    <?php echo "Test box 2 value = ". $_POST['test2'] ?>
    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <script src="jquery-ui-1.7.2/js/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="jquery-ui-1.7.2/js/jquery-ui-1.7.2.min.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <link href="jquery-ui-1.7.2/css/base/ui.core.css" rel="stylesheet" type="text/css" />
    <link href="jquery-ui-1.7.2/css/base/ui.datepicker.css" rel="stylesheet" type="text/css" />
    <link href="jquery-ui-1.7.2/css/base/ui.theme.css" rel="stylesheet" type="text/css" />
    <link href="jquery-ui-1.7.2/css/base/ui.datepicker.images.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    /* BeginOAWidget_Instance_2137022: #datepicker */
    #datepicker .ui-widget {
    font-family: inherit;
    #datepicker .ui-datepicker {
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    #datepicker .ui-datepicker-title {
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    font-size: 1.1em;
    color: #000;
    font-weight: normal;
    line-height: 1.8em;
    #datepicker .ui-state-default, .ui-widget-content .ui-state-default {
    border-color: #e6e6e6;
    background-color: #e6e6e6;
    color: #555555;
    #datepicker .ui-state-default, .ui-state-default a {
    color: #555555;
    #datepicker .ui-state-highlight, .ui-widget-content .ui-state-highlight {
    border-color:#FCEFA1;
    background-color:#FCEFA1;
    color:#363636;
    #datepicker .ui-state-active, .ui-widget-content .ui-state-active {
    border-color: #FFFFFF;
    background-color: #FFFFFF;
    color: #212121;
    #datepicker .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus
    border-color: #5F5F5F;
    background-color: #5F5F5F;
    color: #212121;
    #datepicker .ui-widget-header
    border-color: #5F5F5F;
    background-color: #808080;
    border-width: 1px;
    /* Text attributes for the Days of Week Text */
    #datepicker .ui-datepicker table th
    font-size: .8em;
    color: #000;
    font-weight: bold;
    /* EndOAWidget_Instance_2137022 */
    </style>
    <script type="text/xml">
    <!--
    <oa:widgets>
      <oa:widget wid="2137022" binding="#datepicker" />
    </oa:widgets>
    -->
    </script>
      <script type="text/javascript">
    // BeginOAWidget_Instance_2137022: #datepicker
    $(function() {
    $('input').filter('.datepicker').datepicker({dateFormat: 'yy-mm-dd'});
    // EndOAWidget_Instance_2137022
      </script>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    body {
    background-color: #FFC;
    </style>
    </head>
    <body>
    <form id="form1" name="form1" method="post" action="">
      <p>
        <label for="test">test</label>
        <span id="sprytextfield1">
        <input name="test" type="text" class="datepicker" id="test"/>
        <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></p>
      <p>
        <label for="test2">test2</label>
        <input name="test2" type="text" id="test2"  class="datepicker" />
      </p>
      <p onclick="<?php echo $_POST['test'] ?>">
        <input type="submit" name="submit" id="submit" value="Submit" />
      </p>
    </form>
    <script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "date", {format:"yyyy-mm-dd", hint:"yyyy-mm-dd"});
    </script>
    </body>
    </html>

    This does work
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet">
    <link href="jquery-ui-1.7.2/css/base/ui.core.css" rel="stylesheet">
    <link href="jquery-ui-1.7.2/css/base/ui.datepicker.css" rel="stylesheet">
    <link href="jquery-ui-1.7.2/css/base/ui.theme.css" rel="stylesheet">
    <link href="jquery-ui-1.7.2/css/base/ui.datepicker.images.css" rel="stylesheet">
    </head>
    <body>
    <form action="" method="post">
    <span id="sprytextfield1">
    <label for="mydate">Date:</label>
    <input id="datepicker" name="mydate" type="text">
    <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span>
    <div id="datepicker" class="ui-glass-gradient ui-80TopTo0Bottom-gradient-header"></div>
    <input name="mysubmit" type="submit">
    </form>
    <script src="SpryAssets/SpryValidationTextField.js"></script>
    <script src="jquery-ui-1.7.2/js/jquery-1.3.2.min.js"></script>
    <script src="jquery-ui-1.7.2/js/jquery-ui-1.7.2.min.js"></script>
    <script>
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "date", {format:"mm/dd/yyyy", validateOn:["change"], useCharacterMasking:true});
    $(function() {
        $('#datepicker').datepicker({ showOtherMonths: false });
    </script>
    </body>
    </html>
    Gramps

  • CS6 form validation script code does allow return to form o get missing entry and then sends

    When submitting a form with a missing entry the validation code missing info popup window works correctly. However when you click OK to return to the form to correct it, the form is sent and doesn't return to correct the information. Something is missing in the Script code. I am using CS6 and the form validation software.
    Jad92009

    I am using the software that comes with CS6 for designing and validating a form. I am not using Spry. Following is the code and the script:
    <input name="submit" type="submit" onclick="MM_validateForm('first-name','','R');MM_validateForm('last-name','','R');MM_vali dateForm('company','','R');MM_validateForm('zip-code','','NisNum');MM_validateForm('phone- number','','RisNum');MM_validateForm('email-address','','RisEmail');return document.MM_returnValue"   value="Submit" />
    <script type="text/javascript">
    function MM_validateForm() { //v4.0
      if (document.getElementById){
        var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
        for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
          if (val) { nm=val.name; if ((val=val.value)!="") {
            if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
              if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
            } else if (test!='R') { num = parseFloat(val);
              if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
              if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
                min=test.substring(8,p); max=test.substring(p+1);
                if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
          } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
        } if (errors) alert('The following error(s) occurred:\n'+errors);
        document.MM_returnValue = (errors == '');
    </script>
    the URL is http://ddi.netouch.com/form-design-support1.asp.
    Your help would greatly appreciated.
    Jim

  • I am trying to add a new credit card and it keeps telling me that I have to enter a valid security code...I have tried 2 different cards and it is doing the same thing. How do I get past this?

    I guess it has been a year since I last purchased something on I-tunes and my account is saying that they couldn't authorize my card for some of my purchases.  I am trying to add a new credit card to clear this up and it keeps saying that I have to enter a valid security code.  I have tried 2 different cards and I get the same thing.  I have also added an I-tunes gift card and that isn't clearing up the money that I owe.  It is showing that I have a $25 credit for that.  How do I fix this, I have been trying for days and all I have got from the e-mail tech support is that its my credit card issuer that is causing the problem.  Thats not correct because one of the credit cards that I am trying to use, is a prepaid Visa gift card.  I know that these work on I-tunes because I have used them before in the past.  I am getting very frustrated with this whole process, I just want to clear up my account and buy some new music!! HELP!!

    You probably ran into blocks & locks.
    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html
    They'll sort it out.

  • I have a new iPhone 5 and receive the following message when texting some people within my contacts.  Message sent using invalid number of digits please resend using 10 digit number or valid short code Msg:2114

    I have a new iPhone 5 and receive the following message when texting some people within my contacts.  Message sent using invalid number of digits please resend using 10 digit number or valid short code Msg:2114. Online I found a discussion that stated i needed to delete contact and re-add. I have done that to no avail. Any ideas?

    I had the same issue with the iPhone 6 and tried everything!  I now understand that at some point I stored a number for a contact without including the area code and sent a text message.  So, to correct the issue, you must literally "erase" all references to the contact, not just the number.  Deleting the contact and entering a new one is not enough because the iPhone stores references to that number in multiple places.  The steps below worked and are very simple:
    1) On the contact screen, delete everything stored for that number.  You can't just edit the contact to fix the problem, so write down or record the info somewhere before you complete this step.  Choose edit and then select DELETE to eliminate the entire contact which means home, work, cell, email address, etc.
    2) Delete the entire string of messages you sent to that number.  That's every single message...
    3) Now delete the entire string of invalid 2114 messages you received after your text(s) failed.
    4) Finaly, remove the contact from FAVORITES if you saved it that way. 
    5) To validate that all this worked, simply go to the keypad or contact screen and enter the number associated with the contact to verify successful removal.  I used the keypad and dialed to confirm.  If the contact number still shows up, you need to go back and recheck your steps.  Trust me, I had to do this a few times.
    Several posts suggested that you should  reset and turn off your phone.  After following these steps, it was not necessary for me to reset or turn off my device. 
    is there a much faster way to achieve the same results?  Probably, but this was safe for an iPhone novice and may help you avoid inadvertently deleting other contacts or replacing factory settings that you need.  

  • 8 is rejecting my key code.  Support indicates it is a valid code and I need to reinstall.  I did and it is still rejecting.  What should I do next.

    Thank you for considering my question.  That is very generous.
    8 is rejecting my key code.  Support indicates it is a valid code and I need to re install.  I did and it is still rejecting.  What should I do next.

    Acrobat 8 ?
    Standard (sn:1016...) or Pro (sn:1118...) ?
    Do you install from CD/DVD or download?
    If it's a download, what's the size of the install file and where did you download it?
    Is it a full version or an upgrade?
    What's the operation System (Win, Mac) ?

  • I keep getting an error message that I have an invalid security code when trying to make purchased in itunes.  But my security code and billing info are valid.  How do I rectify this problem?

    I keep getting an error message that I have an invalid security code when trying to make purchased in itunes.  But my security code and billing info are valid.  How do I rectify this problem?

    Did you ever get an answer to this? Im having same issue now! So frustrating!

  • TS2755 I recently upgraded my IPhone and for 1 person I began receiving this "7233375 Error Invalid Number. Please re-send using a valid 10 digit mobile number or valid short code". I receive text from this person but cannot send. Please help. Thank you.

    I recently upgraded my IPhone and for 1 person I began receiving this "7233375 Error Invalid Number. Please re-send using a valid 10 digit mobile number or valid short code". I receive text from this person but cannot send. Please help. Thank you.

    Hi there
    I’d be happy to help with this messaging error! This will be due to the device storing the number incorrectly. Please do the following to resolve the issue:
    Delete texts from both old number and new
    Delete any call logs including these numbers
    Delete old number from contacts
    Delete new number from contacts
    Restart device
    Send text to the new number directly (do not save as contact)
    Once the text sends successfully, you can then save as a new contact
    I hope this helps!
    Charise

  • Quick Time 7.0 Pro (7.7.3) on Win 7 Home Prem 64-bit, Pro paid for, valid registration code, Open Image Sequence (and resulting time-lapse movies) has quit working after several successful operations.  What do?  How fix? Thanks.

    Quick Time 7.0 Pro (7.7.3) on Win 7 Home Prem 64-bit, Pro paid for, valid registration code, Open Image Sequence (and resulting time-lapse movies) has quit working after several successful operations.  What do?  How fix? Thanks.

    This tip is ready for submission.
    It REPLACES the prior version in the Time Machine forum, at: http://discussions.apple.com/thread.jspa?threadID=2057525
    Additions/wording changes to items C3, C4, C5, D4
    New topics C9, C10, C11, and E4

  • My i tunes account keeps telling me to enter valid security code from the back of my CC. i do and it keeps saying to enter it. i tried like 3 differnt cards. pls help cause i need apps for my new ipad3. thx

    hello, my itunes account keeps telling me to enter  a valid security code from the back of my CC. i do and it keeps saying to enter a valid one. i tried 3 differnt cards???? pls helppppp

    Usually there is some subtle difference other than the security code. E.g. your bank/credit card company says you live on Easy Street but you wrote Easy St. Compare your bank/credit card statement with the information you are trying to give Apple. If they don't match, for any reason, validation will fail with the same error message. No point giving the potential ID thief clues is there?
    tt2

Maybe you are looking for

  • Unable to install Sun Java System Web Server 6.1 Service Pack 7 on Wndows

    Dear All, I recently downloaded Sun Java System Web Server 6.1 Service Pack 7 and now I am trying to install it. The previous version of Web Server 6.1 that i installed is running successfully on Windows 2000 Prof. though it is not meant for it. To i

  • Getting the Details from a HTTP Request using C#

    Hi, Suppose, a user submits a form with some details as Address, Phone Number etc.. to a Web Application. On the client side, I need to have a proxy to intercept this http request message being sent to the Server and get the details in it like Phone

  • PC will not read disc which came with N95 8GB Phon...

    Upgraded to N95 8GB. So far so good, then !!!. Came back from hols to link with PC to find that the CD drive and DVD drive will not read the disc which came with the phone. PC will still read other discs but not the Nokia disc. What is the disc forma

  • Fm REUSE_ALV_GRID_DISPLAY

    I'm using this function module... the output look like this <a href="http://img92.imageshack.us/img92/9213/pic11fc.png">[Click here]</a> but for a reason I cannot save the customized layout. The Save option is disabled! <a href="http://img92.imagesha

  • Push Replication Pattern - How to replay events to warm a cache?

    I am trying to test what can be done if one cluster out of two clusters goes down. The two clusters are replicating data using push replication. There are two event channels - FileEventChannel RemoteClusterEventChannel The FileEventChannel is used to