Use single message with multiple spry "states"

forgotten past decided to use spry widgets to do the validation. One of the things that can get old pretty quick is to have to create a different message for each thing that can go wrong, even if you need to display the same message. For example, if a user needs to enter 9 digits, the message for entering too few, too many, and letters can pretty much be handled by "The value should be exactly 9 digits."
Is there a way to use just one div/span and have it show for all of these conditions? I need to be able to code this manually, because for whatever reason the widgets don't show up properly in the DW UI (either because it's an old version or because the widgets have been edited by hand at some point in a way that's incompatible with the DW UI). It also needs to be compatible with older browsers (i.e. I could probably do this by assigning multiple classes to the element(s), but I am not sure what browsers would support this). Many of our users are in libraries, so we have to anticipate that the browser may not be up-to-date.

Don't use Spry.  Adobe abandoned the framework in 2012.  It is no longer supported.
Best advice, use HTML5 forms alone or with jQuery validation.  In the following example, the number field requires 9 characters.  This works in modern browsers.
<form id="MyForm">
<label for="number">Number:</label>
<input name="number" type="number"  id="number" placeholder="123456789" maxlength="9" minlength="9" required>
<input id="submit" name="submit" type="submit" value="SEND">
</form>
For older browsers that don't support HTML5 forms, you can add jQuery validation to your forms by adding this to your document's <head> tag.
<!--LATEST JQUERY CORE LIBRARY-->
<script src="http://code.jquery.com/jquery-latest.min.js">
</script>
<!--JQUERY VALIDATE PLUGIN-->
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js">
</script>
<!--INVOKE FORM VALIDATION-->
<script>
$(document).ready(function() {
    $("#MyForm").validate();
</script>
Nancy O.

Similar Messages

  • How to use BAM to start an XI message with multiple occorrences

    Hi:
    I am trying to use BAM to send some data to XI. It is working fine when I have a message that has only header information. I am able to do the binding and the message is being sent properly.
    The problem is when I have a XI message with multiple occurrences. This message creates a complex proxy structure like the sample bellow:
    -ZTSTPROXY (Header)
        -Header_Field1
        -Header_Field2
        -Occurrences (Items)
         -Item_Field1
         -Item_Field2
    It is possible to pass data the he Header fields separately on BAM, but I have no access to the line fields on BAM binding screen (it shows me only the name “Occurrence” but no field).
    So, I assumed that I have to pass the whole structure, not the fields separately. Then I tried to create a method on my Business Object that will return the same structure as my proxy, but this field cannot be used on BOR. I am receiving the message OL403 (Data Type cannot be used for methods).
    Ok, I would not give up. I tried to use an Abap Class instead of a Business Object. By using the class I can define an attribute with the same data type generated by the proxy and it is possible to do the bind on BAM (directly to the “output” field, not to the specific fields on the structure).
    But, when I raised the event, the message created on XI is empty. Only part of the tags were there and no field values.
    Debugging on the event, I found that the problem is when it is trying to assign the container element on the method EVAL_ABAP_ASSIGN_CODE on the class CL_SWF_EXP_EXPRESSION. The program is raising the exception CX_SWF_EXP_DYN_ASSGIN_FAILED. Probably because the proxy structure is not allowed on the container.
    Has anybody tried to pass a multi-line element to an XI message through BAM? How can this be done (if possible)?
    Best Regards,
    Flavio.

    Hi,
    why don't you use an internal list for your question if you are from Oracle? JDeveloper 11 and OC4J11 related questions for the public technology preview have their own forum:
    JDeveloper and OC4J 11g Technology Preview
    My suggestion is to get in contact with the BAM group internally to ask for documents.
    Frank

  • Sharing iTunes on a single computer with multiple users

    Greetings,
    I have been troubleshooting a problem sharing iTunes on a single computer with multiple users that cropped up a few weeks ago and have not had very good luck.
    Several months ago I successfully set up my wife’s G4 Laptop (PowerPC processor) so that we could share iTunes on that computer. I had just gotten her an “My Book” external hard drive (Western Digital). The iTunes Library will go on this new unit because the internal drive was running out of room. I successfully set the privileges, moved the entire library onto a “Share” directory and everything worked fine.
    In this way, when I got a new CD I could add it to iTunes (under my login, administrator privileges) and she could access it (under her login) to listen to while working on the computer or using her iPod. This arrangement went well for quite awhile.
    About a month and a half ago, when I tried to launch iTunes from my login I received this message:
    “The iTunes Library file is locked, on a locked disk, or you do not have write permission for this file.”
    I think the permissions must have changed when there was an update because my wife is pretty careful about what she does on her computer. Updates were the only thing I could think of that had changed since I had set her computer up. I also noticed that some of the iTunes defaults were different from the last time I had used it to add a CD.
    So, I did some reading and went back through the motions of trying to set it up again. I re-formatted the My Book hard drive to Mac OS Extended (Journaled) added the files back to the external, reset permissions on the external hard drive. (Owners: System, Access: read and write - Group: wheel, Access: read and write – Others: read and write).
    When I now launch iTunes under my login I get this message:
    “The operation cannot be completed because you do not have sufficient privileges for some of the items.”
    What gives? I am the original owner and have always had top-level privileges.
    Can someone point me to any articles or clues as to how I need to set-up iTunes on a single computer to be shared by more than one user? Also, I am considering upgrading to the newer system in a few weeks, so if a solution for OS X 10.5 is available, that would work too.
    Tim

    Was your wife logged into the libray at the time you tried to log in? I have had a similar problem and it was because another user was logged into the library when I attempted to. I got the permission denied banner.

  • Error Message with multiple line

    Hi
    How to display a error message with multiple line?
    Example
         Goods movement not possible for material 101
         Goods movement not possible for material 102
         Goods movement not possible for material 103
    is it possible is ABAP? If so please advice me.
    Best Regards
    Asheek

    Hi Anoop,
    You can use same thing like this
    I suggest write ur message through this.
    First set the obecj.
    CALL FUNCTION 'APPL_LOG_SET_OBJECT'
    for local memory
    FUNCTION 'APPL_LOG_WRITE_MESSAGES'
             EXPORTING
                  OBJECT              = OBJECT
                  SUBOBJECT           = SUBOBJECT
                  UPDATE_OR_INSERT    = UPDATE_INSERT_FLAG
             TABLES
                  MESSAGES            = MESSAGE_TABLE
             EXCEPTIONS
                  OBJECT_NOT_FOUND    = 1
                  SUBOBJECT_NOT_FOUND = 2
                  OTHERS              = 3.
    the call for physical memory
    CALL FUNCTION 'APPL_LOG_WRITE_DB'
    In this process you only need to provide the Itab with error messages.
    Reg,
    Arpit

  • Help with multiple case statements

    Hello,
    I am new to BO.  I am on XI 3.0.  SQL 2005.  In Designer, I am trying to create a measure in a financial universe that would end up being multiple case statements within one select.  This is what I tried to do, but it doesn't work with the two case statements.  Can I use an ELSE leading into the second CASE WHEN somehow?  How can I accomplish this?  Sorry for my ignorance!
    CASE WHEN dbo.ClientBudgetYear.DateStage1Approved > 01/01/1900 AND dbo.ClientBudgetMonth.Month = 12 THEN dbo.ClientBudgetMonth.Stage1Sales END
    CASE WHEN  dbo.ClientBudgetYear.DateStage1Approved > 01/01/1900 AND dbo.ClientBudgetMonth.Month = 11 THEN dbo.ClientBudgetMonth.Stage1Sales END
    Any Suggestions?
    Thanks,
    Holly

    Holly,
    I don't know enough about your data or requirement to provide a solution, however, the construct that you post will not work because it causes you to build an object with multiple case statements when only one case statement per object is permitted.  From what I see in your code I would be inclined to combine the two statements into one as such:
    CASE WHEN dbo.ClientBudgetYear.DateStage1Approved > 01/01/1900 AND dbo.ClientBudgetMonth.Month in (11,12) THEN dbo.ClientBudgetMonth.Stage1Sales else null END
    Thanks,
    John

  • How to compare single value with multiple values

    In my query I have something like this:
    A.SOR_CD=B.SOR_CODE where A and B are 2 different tables. This condition is in the where clause. The column in table A has single values but some values in table B have multiple comma separated values (822, 869, 811, ..).  I want to match this single
    value on the left side with each of the comma separated values. Please let me know how will I be able to do it. The number of comma separated values on the right side may vary.

    Hi MadRad123,
    According to your description, you want to compare single value with multiple values in your query. Right?
    In this scenario, the table B has comma separated values, however those comma separated values are concatenated into a string. So we can use charindex() function to return the index of the table A value. And use this index as condition in
    your where clause. See the sample below:
    CREATE TABLE #temp1(
    ID nvarchar(50),
    Name nvarchar(50))
    INSERT INTO #temp1 VALUES
    ('1','A'),
    ('2','A'),
    ('3','A'),
    ('4','A'),
    ('5','A')
    CREATE TABLE #temp2(
    ID nvarchar(50),
    Name nvarchar(50))
    INSERT INTO #temp2 VALUES
    ('1','a,A'),
    ('2','A,B'),
    ('3','c'),
    ('4','A,C'),
    ('5','d')
    select * from #temp1 a inner join #temp2 b on a.ID=b.ID
    where CHARINDEX(a.Name,b.Name)>0
    The result looks like below:
    Reference:
    CHARINDEX (Transact-SQL)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Splitting a message with multiple rows from the JDBC Adapter

    Hi,
    I'd like to split the resultset message with multiple row elements and process each row separately..
    Does someone have this experience?
    Thanx, Peter

    Hi Chandrasekhar,
    I tried to follow your advise, but I'm not able to complete the process correctly.
    Let me explain my process:
    First - output from the JDBC adapter goes into the first receive step. Of course, there are multiple ROW elements. (Should be marked the ingoing message marked in the container as Multiline??)
    The next should be the transformation:
    format of the source message is like
    <message>
      <row>
        <column>w</column>
      </row>
      <row>
        <column>w</column>
      </row>
    </message>
    In the message I have the ROW element as 0..unbounded
    and <column> element exactly 1
    This message should be mapped to multiple messages of the format:
    <message>
      <value>w</value>
    </message>
    How should be the mapping be done?
    Is it N:1 or 1:N (because in another thread there was an 1:N mapping advised)
    Then (as you say) should follow the Block step:
    Which message (container element) should be marked as Multiline? And what does it mean: Current Message?
    Can you give me some advise, when and how to use the multiline mark?
    Thanx a lot, Peter

  • Restricting single PO with multiple plant

    Experts,
    Pl help me in restricting user from creating single PO with multiple plant. Is there any config available??? 
    I dnt want to go for any ABAP development.
    Thanks in Advance,
    Parag Mahajan

    Dear Parag,
    Querry :  Restricting a single P.O. with multiple plants:
    If you want to restrict a single Purchase order with multiple plants the reason may be that;
    Suppose your ordering material A for which you have three vendors in you SAP. But you are requiring this material in all your plants say example three plants.
    You can create Purchase order for same with vendor but due the huge requirement your vendor get overloaded.And your other capable vendors are not used at all.
    You can try out with quota arrangement for all vendors with which the quantity will be allocated to all the vendors depending on the quota rating.
    Also you can define lot sizing procedure for a your vendor in customizing and can avoid creating Purcahse order with multiple plants.
    Thanks ,
    Tushar Patankar

  • How do I use your iPhone with multiple iTunes libraries

    Hi, I have my music spread out between 3 seperate Itunes libraries on 3 different profiles on my computer. I have the newest generation Ipod Nano, Ipod Shuffle, and Iphone 4s. My Ipod's are both full, so I've decided to start putting music onto my phone. With my Ipod's, I can plug them into one profile on the computer, download the music on the Itunes library that exists on that profile, then do the same with the other profiles with no issue. However when I try to do this with my phone, It asks me to erase the music I have gotten from one Itunes library and sync with the current library, as soon as I plug it in to a different Itunes on one of the other profiles. I have my Iphone configured with the Manually manage music option, and I still haven't found a way to use my Iphone with multiple music libraries. PLEASE HELP

    http://support.apple.com/kb/PH12113 - If you use manual syncing, you can sync items from more than one iTunes library to your iPod. (You can sync iPod touch, iPhone, and iPad with only one iTunes library.)
    http://support.apple.com/kb/HT1202 - When manually managing content, you can add content from multiple libraries to your iPod or iPad. Even when manually managing music, some content may be available from only one library at time. This includes all content on iPhone and video content on iPod and iPad.
    They seem inconsistent as far as the iPad is concerned but in both articles the iPhone appears to only be able to sync to one library at a time.
    Troubleshooting Home Sharing - http://support.apple.com/kb/TS2972

  • HT2688 Working on a single computer with multiple users, I have set things up to allow each user to view and listen to the others' music libraries under the "Shared Library" function.  Can you then connect an iPod touch and copy music from a shared librar

    Working on a single computer with multiple users, I have set things up to allow each user to view and listen to the others' music libraries under the "Shared Library" function.  Can you then connect an iPod touch and copy music from a shared library?

    Was your wife logged into the libray at the time you tried to log in? I have had a similar problem and it was because another user was logged into the library when I attempted to. I got the permission denied banner.

  • Use single realm for multiple web applciation in sharepoint 2013 and adfs 2.0

    Use single realm for multiple web applciation in sharepoint 2013 and adfs 2.0
    Please help!!

    I dont think you can do this, because you have to name/url of the web application in realm. You have to add new realm for each web application.here is script to add another realm.
    Add-PSSnapin "Microsoft.SharePoint.PowerShell"
    $sts = Get-SPTrustedIdentityTokenIssuer | where {$_.Name -eq "ADFS2.0"}
    $uri = new-object System.Uri("http://url/")
    $sts.ProviderRealms.Add($uri, "urn:sharepoint:Name")
    $sts.Update();
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Will there performance improvement over separate tables vs single table with multiple partitions?

    Will there performance improvement over separate tables vs single table with multiple partitions? Is advisable to have separate tables than having a single big table with partitions? Can we expect same performance having single big table with partitions? What is the recommendation approach in HANA?

    Suren,
    first off a friendly reminder: SCN is a public forum and for you as an SAP employee there are multiple internal forums/communities/JAM groups available. You may want to consider this.
    Concerning your question:
    You didn't tell us what you want to do with your table or your set of tables.
    As tables are not only storage units but usually bear semantics - read: if data is stored in one table it means something else than the same data in a different table - partitioned tables cannot simply be substituted by multiple tables.
    Looked at it on a storage technology level, table partitions are practically the same as tables. Each partition has got its own delta store & can be loaded and displaced to/from memory independent from the others.
    Generally speaking there shouldn't be too many performance differences between a partitioned table and multiple tables.
    However, when dealing with partitioned tables, the additional step of determining the partition to work on is always required. If computing the result of the partitioning function takes a major share in your total runtime (which is unlikely) then partitioned tables could have a negative performance impact.
    Having said this: as with all performance related questions, to get a conclusive answer you need to measure the times required for both alternatives.
    - Lars

  • How to use an Applet with multiple-jars

    Hi everybody,
    I would like to use an applet with multiple-jars.
    ex:
    <applet codebase="." archive="main.jar,Addon1.jar,Addon2.jar" code="Appl.class" id="MyTest" width="600" height="30">
         <param name = "MyParam" value = "1;2">
    </applet>
    An applet with :
    -> 1 Main JAR
    -> X Addon JARs (X : a parameter "PRM")
    My main part knows the parameter "PRM" -> knows which addon to use
    My question is, how do I use classes from addons, inside the main part (and vise-versa if possible) ?
    Thanks in advance
    Best regards

    I try what you say :
    === HTML ===
    <applet codebase="." archive="Main.jar,Addon1.jar" code="Test.Appli.class" id="MyTest"  width="600" height="30">
         <param name = "myPrm1" value = "1;2">
    </applet>=== MAIN JAR ===
    package retest;
    interface InterfAddOn1 {
        public void AfficheTest1(String sStrTest);
    public class Ctest {
        public Ctest() {}
        public void unTest(String sClassNameR) {
          String sClassName = "PackTestAddon.TestClass1";
          try {
              Object oObj = Class.forName(sClassName).newInstance();
              ((InterfAddOn1) oObj).AfficheTest1(" Hello World ");
          } catch (ClassNotFoundException ex1) {
              System.out.println("ERR Class not found");
          } catch (IllegalAccessException ex1) {
              System.out.println("ERR Illegal Access");
          } catch (InstantiationException ex1) {
              System.out.println("ERR Instantiation Exception");
    }=== ADDON JAR ===
    package PackTestAddon;
    public interface InterfAddOn1 {
        public void AfficheTest1(String sStrTest);
    package PackTestAddon;
    public class TestClass1 implements InterfAddOn1 {
        public TestClass1() {}
        public void AfficheTest1(String sStrTest) {
          System.out.println("Test :"+sStrTest);
    }I have this error :
    Exception in thread "AWT-EventQueue-2" java.lang.ClassCastException: PackTestAddon.TestClass1
         at retest.Ctest.unTest(Ctest.java:58)
         at retest.Appli.actionPerformed(Appli.java:442)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    I don't really know why ... =;o(
    Helppppp ... Thanks in advance.

  • Can bookmarks be protable for multiple computers? Is it an option to log on and use my bookmarks with multiple computers and locations? Thanks

    Can bookmarks be protable for multiple computers? Is it an option to log on and use my bookmarks with multiple computers and locations? Thanks

    Profile is a folder which store all your personal data in a safe place
    * https://support.mozilla.com/en-US/kb/Profiles
    You can use this button to go to the current Firefox profile folder:
    * Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    here explain how to backup profile
    * https://support.mozilla.com/en-US/kb/Backing%20up%20your%20information
    Here explain how to restore it
    *https://support.mozilla.com/en-US/kb/Recovering%20important%20data%20from%20an%20old%20profile

  • Read Statement with Single key with multiple values

    Dear Friends,
    In ECC 4.6c, I wrote statement like this.
    Read table message with key type = 'E' or 'S'.
    if sy-subrc = 0.
    Populated the message log to output internal table.
    endif.
    But when i transported to QA which is ECC 6.0, it is giving error.
    Can any one help me in modifying this qurey.
    Plse read my question thoroughly and reply me back.
    Regards,
    Santosh Kumar M

    Hi,
    You can't use OR condition with READ table. it is always AND condition.
    Here 2 ways for ur problem.
    If u want to have just one message in the log then use multiple reads.
    READ TABLE message WITH KEY type = 'E'.
    If sy-subrc IS INITIAL.
    populate log.
    ELSE.
    READ TABLE message WITH KEY type = 'S'.
    If sy-subrc IS INITIAL.
    populate log.
    ENDIF.
    ENDIF.
    If u want all messages then u have to loop through and populate the log as sugested by Vijay but
    Without exit in loop.(Since u need all the messages)
    LOOP AT message into wa WHERE type = 'E' or type = 'S'.
    populate log.
    ENDLOOP.
    Thanks,
    Vinod.

Maybe you are looking for

  • Is there any Function module available for GR IR for purchase order

    Hi Is there any function module available in SAP to get the list of Goods Received and Invoice Reciept for a purchase order. One way to create a custom fuction to fetch the details from MSEG and BKPF. Can somebody suggest a better solution. Thanks in

  • Gr/ir clearing account difference

    i what cases gr/ir clearing account from migo can be differ from  gr/ir clearing account from miro. suppose at the time of migo gr/ ir clearing account credited with 100 rs then at the time of miro can it be  debited with 80 or 120? i f it can then p

  • I am having many problems with Firefox 5 how do I go back to Firefox 4

    Whenever I log on to mymsn via Firefox I get this error message: TpyeError: Components. classes[cid] is undefined. Also I used to be able to type in an address or select one from the drop down menu and it would go to the site now I have to click the

  • Problem with wireless nenetwork

    Can someone please help me set up this wireless network on my 6500 all in one.  It worked before and suddenly lost its mind.  I am unable to sync the ip addresses and/or do that MAC thing.  It is being used on a stupid verizon "D" router thing, and I

  • 5700 issues

    I am not able to disable the flash light. Though I can set it to off, the next time I open the application, the selection reverts to "automatic". This is very annoying. I really dont want to use flash. I am not able to disable the flash sound when a