Spry Validation, how to strip spaces from end

I have a form that is using Spry Validation. I'm validating onBlur and the field is required.  Everything works great, except if a user accidentally types a space at the end of their entry.  for example, they enter an e-mail address and put a space at the end - it will tell them it's not valid.  How can I strip the spaces?  Is it possible using the onBlur?

Still having some trouble figuring this out.  Now it's not accepting a valid e-mail (even w/o spaces entered at the end)?
<script type="text/javascript">
function validateNoSpaces(value) {
  return /^[a-zA-Z]+$/.test(value)
</script>
var sprytextfield4 = new Spry.Widget.ValidationTextField("spryEmail", "email", {validation:validateNoSpaces, validateOn:["blur"]});
Thanks,
Jane

Similar Messages

  • After Spry validation how to redirect to a "you have successfully register" page

    I am helping a friend set up a webpage for her business.  You can see the website here www.themessagetext.com.  I used a Spry validation for the phone number and the checkbox.  One the validation is verified, I want the user to be redirected to a page that says that they have successfully register.  Right now it takes you to an ugly page.  It looks like an error page, but it says that you have successfully register.
    I am using Internet Explorer 7.  I am also using CS4 Dreamweaver.  I am also usingSpryValidationCheckbox.css - version 0.4 - Spry Pre-Release 1.6.1 and SpryValidationTextField.css - version 0.4 - Spry Pre-Release 1.6.1
    I am new to web design.  So if you can be as specific as possible I would appreciate it.  I don't even know where in the code it tells the form after it is submitted to redirect to this certain page. 

    Sorry I did post the wrong code for the wrong page.  Here is the code for the right page.  The more I thought about it I figured it was a design problem.  Should I post it somewhere else since this form is for Spry.
    <!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>The Message Text</title>
    <style type="text/css">
    <!--
    body {
    margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
    padding: 0;
    text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
    color: #550459;
    background: #383737;
    font-family: "Times New Roman", Times, serif;
    .oneColElsCtr #container {
    width: 1024px;
    background: #FFFFFF;
    text-align: left; /* this overrides the text-align: center on the body element. */
    margin-top: 0px;
    margin-right: auto;
    margin-left: auto;
    margin-bottom: 0px;
    height: 100%;
    .oneColElsCtr #mainContent {
    background-color: #FFF;
    height: 100%;
    color: #550459;
    font-size: 10px;
    font-weight: bold;
    .oneColElsCtr #container #mainContent table tr td #Table_01 tr td #web_registration_form #just_submit {
    font-family: "Times New Roman", Times, serif;
    font-size: 16px;
    font-weight: bold;
    color: #550459;
    margin: 0px;
    padding: 0px;
    font-style: italic;
    height: 23px;
    vertical-align: baseline;
    border: 2px solid #999;
    background-color: #CCC;
    text-align: center;
    -->
    </style>
    <script src="SpryAssets/SpryValidationCheckbox.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    function MM_openBrWindow(theURL,winName,features) { //v2.0
      window.open(theURL,winName,features);
    //-->
    </script>
    <link href="SpryAssets/SpryValidationCheckbox.css" rel="stylesheet" type="text/css" />
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    </head>
    <body class="oneColElsCtr">
    <div id="container">
      <div id="mainContent">
       <table id="Table_01" width="1024" height="869" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td colspan="11">
       <img src="images/websitenew.gif" width="1024" height="176" alt=""></td>
    </tr>
    <tr>
      <td colspan="3" rowspan="2">
       <img src="images/websitenew-03.gif" width="112" height="379" alt=""></td>
      <td colspan="2">
       <img src="images/websitenew_03.gif" width="38" height="19" alt=""></td>
      <td colspan="6" rowspan="2">
       <img src="images/websitenew-05.gif" width="874" height="379" alt=""></td>
    </tr>
    <tr>
      <td colspan="2">
       <img src="images/websitenew-06.gif" width="38" height="360" alt=""></td>
    </tr>
    <tr>
      <td rowspan="4">
       <img src="images/websitenew-07.gif" width="58" height="313" alt=""></td>
      <td colspan="3">
       <a href="contact_us.html">
        <img src="images/websitenew_07.gif" width="79" height="18" border="0" alt=""></a></td>
      <td colspan="2" rowspan="2">
       <img src="images/websitenew-09.gif" width="15" height="53" alt=""></td>
      <td>
       <a href="#">
        <img src="images/websitenew_09.gif" width="168" height="18" border="0" alt=""onclick="MM_openBrWindow('terms_and_conditions_pop_up.html','','width=400,height=60 0')"></a></td>
      <td rowspan="2">
       <img src="images/websitenew-11.gif" width="17" height="53" alt=""></td>
      <td>
       <a href="#">
        <img src="images/websitenew_11.gif" width="108" height="18" border="0" alt=""onclick="MM_openBrWindow('privacy_policy_pop_up.html','','scrollbars=yes,resizable= yes,width=400')"></a></td>
      <td colspan="2" rowspan="2">
       <img src="images/websitenew-13.gif" width="579" height="53" alt=""></td>
    </tr>
    <tr>
      <td colspan="3">
       <img src="images/websitenew-14.gif" width="79" height="35" alt=""></td>
      <td>
       <img src="images/websitenew-15.gif" width="168" height="35" alt=""></td>
      <td>
       <img src="images/websitenew-16.gif" width="108" height="35" alt=""></td>
    </tr>
    <tr>
      <td rowspan="2">
       <img src="images/websitenew-17.gif" width="2" height="260" alt=""></td>
      <td colspan="8" background="images/websitenew-18.gif" width="527" height="247" valign="top" alt="">
              <form action="http://platform.3cinteractive.com/web_registration.php " method="post" name="web_registration_form" id="web_registration_form" onsubmit="" >
       <input id="username" name="username" type="hidden" value="VGn5S7PDQkBwb7csFvX2JA=="/>
          <input id="password" name="password" type="hidden" value="ee7CQE1n8XALlcHYtpSV0Hm+lRNppZrVAe573Vysrq0="/>
          <input id="trigger_id" name="trigger_id" type="hidden" value="78354" />
          <span id="sprytextfield1">
             <input name="phone_number" id="phone_number" size="30"  />
             <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Must be 10 digits</span></span>
          <input id="just_submit" name="just_submit" type="submit"  value="Submit" />
    <br />
                        (Do Not Include Dashes)
                        <br />
                  <span id="sprycheckbox1">
                    <label>
                          <input type="checkbox" name="agre" id="agre" />
                        By selecting this box, I agree to <a href="#" onclick="MM_openBrWindow('terms_and_conditions_pop_up.html','','width=400,height=600')">t erms and conditions</a></label>
                        <span class="checkboxRequiredMsg">Please select box.</span></span>
                    </form>
            </td>
      <td rowspan="2">
       <img src="images/websitenew-19.gif" width="437" height="260" alt=""></td>
    </tr>
    <tr>
      <td colspan="8">
       <img src="images/websitenew-20.gif" width="527" height="13" alt=""></td>
    </tr>
    <tr>
      <td>
       <img src="images/spacer.gif" width="58" height="1" alt=""></td>
      <td>
       <img src="images/spacer.gif" width="2" height="1" alt=""></td>
      <td>
       <img src="images/spacer.gif" width="52" height="1" alt=""></td>
      <td>
       <img src="images/spacer.gif" width="25" height="1" alt=""></td>
      <td>
       <img src="images/spacer.gif" width="13" height="1" alt=""></td>
      <td>
       <img src="images/spacer.gif" width="2" height="1" alt=""></td>
      <td>
       <img src="images/spacer.gif" width="168" height="1" alt=""></td>
      <td>
       <img src="images/spacer.gif" width="17" height="1" alt=""></td>
      <td>
       <img src="images/spacer.gif" width="108" height="1" alt=""></td>
      <td>
       <img src="images/spacer.gif" width="142" height="1" alt=""></td>
      <td>
       <img src="images/spacer.gif" width="437" height="1" alt=""></td>
    </tr>
    </table></td>
          </tr>
        </table>
      </div>
    </div>
    <script type="text/javascript">
    <!--
    var sprycheckbox1 = new Spry.Widget.ValidationCheckbox("sprycheckbox1");
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "phone_number", {format:"phone_custom", pattern:"0000000000"});
    //-->
    </script>
    </body>
    </html>

  • How to remove space from satrting

    help me please
    i have 16 digit field ,  so in output i have only 5 digit and left  11 digit is comming blank
    so please tell me how to reduse space form starting
    my field is coming like this   -- Rs:            78,999.00 
    so i want to reduse space between Rs and amount
    thanks

    you can either use condense statement
    condense <field name>.
    You can also use the following function module.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        INPUT         = <FIELD NAME>
    IMPORTING
       OUTPUT        = <FIELD NAME>.

  • How to remove space from a variable in a smartform

    Hi,
    I have a problem in displaying a variable in a smartform..The variable shows some blank space that preceeds the data.
    for eg:,
    variable =        18.000.
    How to remove space before 18.000?

    To remove the decimal places for quantity and rate/quantity , use the syntax to restrict the number of digits after decimal places. The syntax is
    &symbol(.N)&
    where N is number of decimal places.
    Since you dont want decimals use &symbol(.0)&
    For the other case it depends on how the currency is represented , any way try using the syntex &symbol(T)&
    Please give me reward point If it is useful
    Thanks
    Murali Poli

  • How to trim spaces from string in BMM layer?

    Hi friends,
    I need to trim spaces from the string. can you please give me syntax with example.
    Thanks

    Hi
    I have tried the below option , but it did not work . PS_D_PERSON
    PERSON_ID is char type in the data base oracle , and it is defined as varchar on the physical layer .
    So the table is loaded with space , i am not able to remove the space using trim both
    Thanks
    Sridhar.N

  • How to prevent Spaces from creating a new session after logging out

    Hi,
    I'm using WebCenter Spaces (11.1.1.4), and I notice that the user is redirected to the landing page after logging out which causes a new HTTP session to be created. I'd like to avoid this behavior, and I was told that this could be done by creating a custom logout page with pure HTML and redirect the user there upon logout. How do I go about doing this? I couldn't find anything related to this in the documentation.
    Thanks,
    Robert

    What's wrong with a new session?
    When you logout, the current session will be destroyed so it's just normal that he creates a new webcenter that does not contain a user credential.

  • Hi.. any ideas on how to free space from "Private"...

    Hi,
       i am using Nokia e63 for more than 2 years now....
    lately i started to notice that my phone's internal memory gets full without saving anything on phone.... even for softwares and such.... i install them on my card only...
    i used MGuard from the netqin software to check it and found out that a folder named "Private" is eating up a hell lot of space and i cant delete its contents using this software. also this folder is not visible normally....
    i contacted Nokia India... and got rubbish replies like... connect ur phone to PC and delete the folder... remove the Mguard software as its a 3rd party software... etc... even when i gave them details that its a system folder most probably...
    can anyone tell me a way to free up that space on my phone?
    i have really fed up going to nokia care for formatting my device every month as the warranty is over and i need to pay every time.
    I tried to restore factory settings as well.. but there is another problem... if i use the factory reset.. the nokia store app on my cell stops working... maybe coz the app in the firmware update came with older version and to use it.. iupgraded it... not sure... can anyone help me with it plz?
    Thanks and Regards
    Rohit Agrawal
    +91 94300 ROHIT

    If you uninstall applications, the application-specific subfolder under /private will be removed (freed up).
    If you wish to clean up the /private in one go (without uninstalling applications individually), then reformatting the phone is the way to accomplish that. Then you need to reinstall those apps that you still wish to use.
    From a memory card, you can clean up /private by connecting to a PC using USB mass storage mode, and then enabling viewing of hidden folders. Note that if you just delete the /private from the memory card, some applications that also put data in the phone memory and their corresponding /private directory, will leave the stuff in phone memory, as the applications, in effect, were not properly uninstalled, if you just delete their private folders. The apps will also consume space in /system where the actual application executables are stored.
    So, uninstall them properly, or reformat and reinstall only the apps you need.
    If you reformat, then remember to back up any data you wish to save (contacts, photos, messages, etc.).

  • How to strip audio from DVD?

    I want to get some audio off of a regular DVD - i want to import the audio (only) and use it on a new project.
    I have FCP, DVD SP. iDVD, Toast 7, iMovie but cannot figure out how to do it?
    Thanks

    Use DVDxDV or MPEG Streamclip to convert the VOB files into Quicktime.
    Export the audio as aif 48khz/16 bit using QT Pro.
    Perhaps the programs listed above will allow you to simply convert the audio portion, I don't know, never used them that way.
    FWIW, These programs will not work on protected disks.
    x

  • Space at end of each line in the RDF report.

    Hi All,
    I am developing one HRMS report for sending salaries to bank. Bank has given one format, there should be 24 spaces at the end of each line in the report. But I am not getting any spaces in the report at the end of line. I have tried soo many ways to get that, but I unable to get spaces. If I put any character it is coming, but if I put space that is not coming.
    Anyone please tell me how to get spaces at end of each line in RDF report. Its urgent guys...... Anyone please help me out.
    Thank you,
    Phani

    Hi,
    I am developing one HRMS report for sending salaries to bank. Bank has given one format, there should be 24 spaces at the end of each line in the report. But I am not getting any spaces in the report at the end of line. I have tried soo many ways to get that, but I unable to get spaces. If I put any character it is coming, but if I put space that is not coming. For the line that is set the height of the Repeating Frame long enough to have the blank space. Vertical Elasticity should be expand.
    Also you can try by setting the property *"Vert. Space between frames"* for the Repeating frame.
    Hope this helps.
    Best Regards
    Arif Khadas

  • Reclaim space from DBFs

    Hi All,
    I have one query regarding tablespace reclaim space. I have users tablespace which is having 5 dbfs. Some of the DBFs of USERS tablespace having autoextend on with max size 32G and some of the DBFs not having autoextend on and maxsize 4G.
    Now when I checked the USERS TBS through EM , I come to know only few MBs out of 20G are in used in 3 DBFs of USERS tablespace and rest of 2 dbfs are in good in use. Now I want to reclaim the space from 3 dbfs say users03,users04 and users05. users01 and users02 are properly in used. I want to reclaim the space from 03,04 and 05.
    can I have any idea how to reclaim space from dbfs? I try with alter database datafile ...resize but giving error "ORA-03297: file contains used data beyond requested RESIZE value".
    please suggest me,
    Thanks...

    Yes, I think you are understanding how it works. For a visual example, if this is your data file:
    XXXX--XX-XXXX-XXXX-XXXX-XXXXXXX-----------------
    and you delete some data
    XX----X--------X------------------X-----------------
    The datafile can be resized only down to
    XX----X--------X------------------X
    Which tools are available to do this efficiently vary by database version, for example in my 9.2.0.6 database I can use exp/imp, CREATE TABLE AS SELECT, rebuild indexes (mostly) online, exp/imp, move LOBs around with ALTER TABLE ... MOVE LOB, or other strategies - some of these are more work than others, and all will take some amount of time. In 8i There are fewer options; beginning with 10g data pump and DBMS_REDEFINITION are available; in 11g the index rebuilds don't lock the data, so the time may be less of a concern.
    Before you even spend the time to shrink these data files, consider the space needs for USERS. If the extended size was a one-time thing, then shrinking datafiles may be justified. If USERS may grow that large again then a data file shrink is a lot of work for little gain.

  • Free space from icloud

    How to free space from icloud?

    Use your iOS device or Mac to delete older backups or data if you do not need it anymore.
    iOS: "Settings > iCloud > Storage & Backup > Manage Storage"
    Mac: "System Preferences > iCloud > Manage ..."
    You could also delete some of your older emails (empty trash) to get a some storage capacity back.

  • How to delete blank space from value of Infoobject in the transfer rule

    does anyboady know how to write a routine in the transfer rule in order to delete ending blank spaces from value of Infoobject 'ORDTEXT'. E.g. value: 'ABM    '?  After routine, the result should be 'ABM'.
    Thanks for any input.

    Deleting 'ending blank spaces' from a character type field (ie info-object or text) in SAP is not meaningful. For all usage, a char type field of length 8 having value  'ABM     '  is same as 'ABM'.
    Ok, HTML is changing the display in the above, so let me restate it
    For all usage, a char type field of length 8 having value  'ABM_____'  is same as 'ABM', take the underscore character (_) in the first string as a placeholder for space character.
    Edited by: Ajay Das on Jul 29, 2009 12:07 PM

  • How to remove empty space from a file

    Hi all,
    Can any one help on how to remove the blank spaces from a file.
    I used trim function but unable to remove the spaces.
    I have a file in which there is a name like 'JAIRAM' and am storing this file in a variable FILE_CONTENTS.
    Now am unable to compare FILE_CONTENTS with another value as it is storing empty spaces also from the file.
    Please help on this
    Thanks,
    Srini

    Trim only trim at the beginning or at the end. Can you try using the replace sql function.. see below..
    SQL> select replace('abc def',' ','') from dual ;
    REPLAC
    abcdef
    cheers

  • Stripping extra white space from a string

    I am trying to strip extra spaces from a string, so it there are 2 or more spaces between a word I want to remove all but one. I am trying the following code
    getStringTwo().replaceAll("/\s+/is","");
    but all I get is an error saying Invalid escape sequence
    Thanks
    G

    >
    This strips out all the whitespace. I ended up
    getting round it by walking through the string and
    checking the values of each char and comparing that
    to the next value. What a wast of effortt A small modification of my earlier post gives -
    public class Test040320a
        public static void main(String[] args)
            String str = "this    is       a \t test";
            str = str.replaceAll("\\s+"," ");
            System.out.println(str);
    }

  • How can I easily move some space from NTFS to ext3 partition?

    I am starting to run out of free space in my / directory. I've got home and / on separate partitions (sda7 and sda8, respectively) and would liek to subtract ~5GB of space from my NTFS 50GB partition (sda5) and move it to sda7. is it possible without losing any data?
    [warnec@chakra ~]$ sudo fdisk -lu
    Disk /dev/sda: 320.1 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x00000001
    Device Boot Start End Blocks Id System
    /dev/sda1 * 63 42078959 21039448+ 7 HPFS/NTFS
    Partition 1 does not end on cylinder boundary.
    /dev/sda2 42079084 625121279 291521098 f W95 Ext'd (LBA)
    /dev/sda5 42079085 147072239 52496577+ 7 HPFS/NTFS
    /dev/sda6 147072303 594004319 223466008+ 7 HPFS/NTFS
    /dev/sda7 594019503 614984264 10482381 83 Linux
    /dev/sda8 614984328 621330001 3172837 83 Linux
    /dev/sda9 621330003 625121279 1895638+ 82 Linux swap / Solaris
    [warnec@chakra ~]$

    One more thing - AFAIR, I tried to do that once some time ago (don't really remember it now) and it worked fine, but after the whole process after booting Linux fsck came up saying it needs to repair something. Don't really remember. Anyway, it said that automatic repair isn't possible and gave me a propt like this (similar, am not sure after all that time has passed):
    "Sector 0000001 is broken, you want to repair it? [Y/n]"
    after saying "Y" there was:
    "Sector 0000002 is broken, you want to repair it? [Y/n]"
    and so on. You get it. I held Y for something like 20mins, and without any way of knowing how many sectors were left, I wanted to put a weight on "Y" key and go to sleep. But I was afraid that at the end there would be a prompt like "This will erase all your data, are you sure you want to continue?" and was afraid to leave this.
    I decided to reinstall then, and now I want to never have to do this again.
    PS.: This may be because I did this with Pragon Partition Manager (the WinXP program) and not Gparted.
    Last edited by warnec (2009-10-23 18:45:09)

Maybe you are looking for

  • Sales orders in TDMS company/time based reduction  are outside the scope

    Guys, I have had some issues with TDMS wheras it didn't handle company codes without plants very well. That was fixed by SAP. But I have another problem now. If I do a company code and time based reduction, It doesn't seem to affect my sales orders i

  • Confirmed quantity becomes zero in process order

    What scenario did the confirmed quantity becomes 0 (zero) even though it has value upon the creation of the process order. You can see the confirmed quantity on the material list of the process order. The RESB table for the component becomes zero. Bu

  • User decision step window

    Hi sdn community, I'm working on workflow where the first step is user decision (BOR Object Decision). After starting workflow, I want that the window for user decison will be created and shown to user automaticaly. The workflow is started at event,

  • OIM Deployment

    Hi I have installed two separate weblogic servers (non-cluster) and installed OIM 9101 on them with same Oracle Database. This system does not include any other servers. I am planning to use a hardware load balancer on top of these two OIM Weblogic s

  • How could we know the owner Iphone's email?

    I just bought the second hand iphone 4s from someone but now it is lock by Icloud after I upgraded to 7.1.1. And I know this information MEID: **********, IMEI:**********. If I can know the owner's email maybe I can contact with him. Someone has any