How to restrict max. no. of pages in SP01 spool display ? e.g.  to max. 40 pages

Sometimes users open very large spools displaying thousands of pages.
We want to restrict maximum number of pages that can be displayed in SP01 , e.g. up to 40 pages.
We do not want to restrict size of spool.
Users should be able to create spools of any number of pages but should be able to display only up to to 40 pages.
Any idea how this can be done?

Hi,
I'm not sure if this is just for printing or applies to page output but have a look at S_SPO_PAGE + param rspo/auth/pagelimit = 1
https://help.sap.com/saphelp_nw04/helpdata/en/c7/58c902e5bf11d18e2b0000e83dd9fc/content.htm

Similar Messages

  • How to restrict the Users at Page level

    Hi Gurus,
                         I want to restrict the users page to page.I am having 3 pages and 3 set of users.If any user having access to page1 then he will not see Page2 & Page3 .For Page2 & Page3 it is same case i.e page2 will displayed to user2 and not to user1 & user3.Same for page3 which will be displayed to user3 only.
    Waiting for reply..
    Thanks & Regards
    Ganesh

    Hi,
    There is PCDFilter, which can be used to filter role and workset content depending on the context.
    I think this can solve your usecase.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3367e690-0201-0010-d285-c69bd884c9f3
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/17968de1-0a01-0010-1f9f-c090fbc7001a
    Greetings,
    Praveen Gudapati
    [Points are always welcome for helpful answers]

  • How to Restrict Max Recipient for Inbound in Exchange 2010

    Hi,
    I want to restrict my inbound mails which is having more than 10 recipients (it may be TO,CC & BCC) in my Exchange 2010.
    I set the limit to 10 in the following area.
    1.Mailbox
    2.Organization
    3.Connector (for Receive connectors only)
    4.Transport server
    But still external users send a mail to more than 10 of our users.
    Accepted domain is configured as an internal relay domain.

    Hi,
    Based on my knowledge, we can't restrict the inbound recipients number in Exchange server. What we can do is restrict the outbound recipients number. For an example, if you set the value of RecipientLimits to 10 for user1, then user1 can't send an message
    with more than 10 recipients, but the setting can't have an effect on receiving messages. Your understanding will be appreciated.
    Hope my clarification can be helpful to you.
    Best regards,
    If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Amy Wang
    TechNet Community Support

  • How to restrict max children for a node containing different node types

    Hi,
    I have the following XML:
    <categories>
        <category id="hsp">
            <cardUsage id="hsp.approvals">
                <tabUsage id="hsp.approvals.puListing"/>
                <tabUsage id="hsp.approvals.puDashboard"/>
            </cardUsage>
            <cardClusterUsage id="hsp.someCluster">
                <cardUsage id="hsp.someCluster.approvals"/>
            </cardClusterUsage>
        </category>
        <category  id="psb">
        </category>
        <category  id="pfp">
        </category>
        <category  id="cx">
        </category>
    </categories>
    I need to put a restriction that node category cannot have more than 16 children (cardUsage nodes + cardClusterUsage nodes).
    The way I was thinking to achieve this is, use a new node Usage as child of category. I could set maxOccurs on Usage to 16. And then in Usage use the xs:choice to choose between cardUsage and cardClusterUsage. And setting the maxOccurs to 1.
    Please let me know if there is a better way to do this. Or you see any flaws in my proposal.
    Thanks for you time in advance,
    Manish.

    Does the order of category children matter?
    If not, you can directly set maxOccurs to 16 in the xs:choice element :
    <xs:element name="category">
      <xs:complexType>
        <xs:choice maxOccurs="16">
          <xs:element name="cardUsage" type="..."/>
          <xs:element name="cardClusterUsage" type="..."/>
        </xs:choice>
        <xs:attribute name="id" type="string"/>
      </xs:complexType>
    </xs:element>

  • How to restrict max message size in outlook?

    hi all
    libimta.so 5.2 (built 15:07:23, Feb 21 2002)
    SunOS sundb2 5.9 Generic_112233-08 sun4u sparc SUNW,Sun-Fire-880

    Several thoughts:
    1. You're using the original 5.2 released bits. We have released MANY updates since then. With hundreds of fixes. You should REALLY download and install 5.2p2 patch update. Takes 15 minutes:
    http://www.sun.com/download/products.xml?id=411bb50d
    2. You question, "in outlook" makes answering very difficult. Messaging Server doesn't know Outlook as something different from any other client application. Are you asking, "how do I limit the size of ALL messages handled by the server?", or are you asking something else? If this is the question you're really asking, I can answer that for you. If it's not, please clarify, co I can understand what it is you want.

  • How to restrict max number of client connection per extend server?

    Does anybody point me or tell me what is the vm property or config element I need to put so that an extend client will not accept more than specified number of connections at any give point in time.

    Hello,
    Look at http://coherence.oracle.com/display/COH34UG/acceptor-config the <connection-limit> should do what you want.
    Thanks,
    Nick

  • How to restrict user to change "Client" in sp01

    Hi,
    I have a requirement that must release my users to use sp01, but I want to restrict them to see only the spools in the logon client.  Recently, they can change the "client" field in t-code sp01, is there anything I can do to disable "client" field from specific users ?
    Diana

    You can restrict through the object S_ADMI_FCD below mention activity
    SP01     Use of SP01 (all users)
    SP0R     Spool request management (all users)
    SPAA     Spool administration (device administration)
    SPAB     Spool administration (general settings)
    SPAC     Spool administration (device type, character sets)
    SPAD     Spool administration (all clients)
    SPAM     Spool administration (cross-client job authorization)
    SPAR     Client-specific spool administration
    SPOS     Use of Transaction SP01 (all systems)
    SPTD     TemSe administration (all clients)
    SPTR     Client-specific TemSe administration
    ST0M     Change trace switches
    And you can restrict device also through the below mention object
    SPODEVICE
    S_SPO_ACT
    S_SPO_PAGE
    Provide the sp01 authorization as per your requirement

  • How to restrict the Standard Check In Page

    Hello,
    Please let me know how to restrict standard check in page in sysadmin account.
    It would be great if anyone replying me as soon as possible.
    Thanks,
    Ramesh

    If I got your question, you intend to restrict a user 'sysadmin' (or someone with similar permissions) from any check in. And I guess, it's 10g (it 11g you would probably mention 'weblogic', because 'sysadmin' is already quite restricted there).
    Well, you cannot use security model (roles, security groups and all that stuff), because you would disable admin rights together with checkins ('W' permission).
    Therefore, the only way I can think of, is a component. You can create a custom component that will modify CHECKIN service to prevent a particular user or group of users from checkin of particular (or all) content. Check HOWTOCOMPONENT to get an idea. Or drop me an email and I send you a component which does a similar check, but controls that a user cannot exceed his or her quota.
    Alternatively, you could also modify GUI to disable access to CHECKIN pages to such people - but I would suggest to use the component as well - users could use other ways (checkin via website or virtual folders) and GUI change would not work for these.

  • How can I set download restrictions on a web page ?

    how can I set download restrictions on a web page ?
    I mean: to make a web site with text and pictures but in a way that the visitors cannot download the pictures or text ?
    Is it possible ?
    Thanks

    Freeway allows you to inject code into the HTML of the page. Upload the movie file to a folder on your server and reference it in the code.
    <script src="http://www.domain.com/Folder-Name/QT-JS.js" language="javascript"> </script>
    <script language="javascript">
    QT_WriteOBJECT('http://www.domain.com/Folder-Name/Movie.mp4' , '640', '496', '', 'AUTOPLAY', 'false', 'CONTROLLER', 'true', 'VOLUME', '50', 'KIOSKMODE', 'true', 'SCALE', 'Aspect') ;
    </script>
    If you are going to go this route it would be better to use HTML5 with flash fallback to cover all browsers and devices...
    http://www.iwebformusicians.com/Website-Movie-Video/Easy-Movie-Player.html
    http://www.iwebformusicians.com/Website-Movie-Video/JW-Media-Player.html
    http://www.iwebformusicians.com/Website-Movie-Video/Fallback-To-Flash.html
    http://www.iwebformusicians.com/Website-Movie-Video/Flow-Player.html

  • How to restrict no of records per page in script

    Hi Experts,
    I am working on SAP Scripts and I am having one problem I need to restrict 15 records per page.
    Please help me out.
    LOOP AT  IT_ITAB
    Call function WRITE_FORM
    ENDLOOP.
    Is there any ways to restrict in loop?
    Thanks in advance
    Basu

    Inside the loop,
    after the write_form give the following if condition
    loop at itab.
    ...write_form...
    w_count = sy-tabix MOD 15.
    if w_count eq 0.
    CALL FUNCITON 'control_form'
    COMMAND = 'NEW-PAGE' .
    endif.
    endloop.
    Regards
    Sharath

  • How to restrict number of rows display using ig:gridView

    Hi
    All
    How to restrict number of rows display using <ig:gridView datasource="{mybean.mylist}">
    i am getting 10 rows using data_row . i wanna show only first 5 rows .
    pageSize ="5" will be ok . but it displays remaining rows in next page. but i want to display only first 5 rows . is there any attribute to restrict number of rows.
    thanks
    rambhapuri

    I have no idea which component you're talking about. If want to discuss here about a non-Sun JSF component, then please mention about the name, version and build in detail. You can also consider posting this question at the website/forum/mailinglist of the component manfacturer rather than here. At least I can tell you that the Sun JSF h:dataTable has the 'rows' attribute for that. I can also suggest you to just take a look in the TLD documentation of the component in question. There should be all possible attributes listed with a detailed explanation about the behaviour.

  • How to restrict the department to not user other departments' equipment?

    Dear SAPIENTS,
    How to restrict the department to not user other departments' equipment? If suppose any one creating order for equipment having different authorization group then system should not allow me to do this.
    Regards,
    Kaushal Rai

    Kaushal Rai,
    Use Authorization group for technical objects, create authorization gruops in IMG and assign the same to the Equipment master and block the other department with the same authorization group. For ristricting the authorization group to other departments after creating and assigning it to the equipment seek help from your BASIS team.
    goto the below path for cerating the Authorization group:
    IMG - PMCS - Master data in PMCS - Technical Objects - Define Authorization groups:
    Here you define the authorization groups, after completion of this step go to the Equipment master in General Data tab page there is a feild Authourization Group, mention the respective authorization group and provide this Authorization gruop value to the respective user in the user role with the help of BASIS Team.
    Regards,
    Praveen.

  • How to restrict number of concurrent connections etc.

    Hi,
    I'm able to use wi-fi thru WRT54GC.
    I want to know:
    1. How to restrict number of users connecting to the wireless network that is setup thru my router?
    2. I also want to know about any monitoring software which can tell me about connected PCs, user names, bandwidth available, bandwidth utilized etc.
    Thanks in advance
    Rajeev

    1. logon to router's setup page, open I.E. and in the address bar type 192.168.1.1, it would ask for username and password, put "admin" default password without any username... click on the wireless tab >> wireless security >> try setting up wireless security as per the requirements, also you can setup wireless MAC filter and you can setup MAC address of wireless computers which you want to allow to coonect to the network...
    2. not quiet sure about monitoring software which would show you detail log about bandwidth, bandwidth utilized by each computer...however you should view router's logs from linksys "logviewer" utility...go to ftp.linksys.com/pub/network and download the "logviewer" utility.
    let me know if you have any issues.

  • How to scale down number of pages in ps files

    I am having ps files that are havings 4 to 8  pages per file. Each page may contain just 5-6 lines and therefore though the content in total is not too much but there is unnecessay paper wastage.
    Is it possible to make some changes in code inside ps files throgh notepad so that the content may be restricted to lesser number of pages. I am having programing skill in vfp,need guidance that what changes i need to do in ps script and where.
    my sample ps file can be downloaded from
    https://www.dropbox.com/s/l9n3juzltlajki2/1010568351.ps
    Code is also replicated here
    %!PS-Adobe-3.0
    %Creator: iECCM
    %Version: 0.1
    %%Pages: 4
    /d{def}bind def/b{bind d}bind d/X1 0 d/Y1 0 d/SG{setgray}b/g{gsave}b/l1{rlineto}b/m{moveto}b/n{newpath}b/o{closepath}b/r{lineto}b/s{s how}b/c{clip}b/z{stroke}b
    /A{n arc}b/B{0 SG}b/C1{n m curveto}b/D 0 d/E{0.78 SG}b/F{findfont exch scalefont setfont}b/G{grestore}b/H1{n 0 5 Y1 {0 exch m X1 0 l1} for z}b
    /J{rectclip}b/K{0.79 SG}b/L{n m r z}b/M{0 0 m}b/N{0.80 SG}b/O{rotate}b/P{setlinecap}b/Q{setrgbcolor}b/R{n 4 -2 roll m dup 0 exch l1 exch 0 l1 neg 0 exch l1 o}b
    /S{[] 0 h}b/T{translate}b/U1{showpage}b/V1{n 0 5 X1 {0 m 0 Y1 l1} for z}b/W1{1 SG}b/w{m s}b
    /a{stringwidth}b/v{rmoveto}b/w1{setlinewidth}b/h{setdash}b/wc{w1 Q}b
    /t{D arct}b
    /u{a exch currentpoint 3 -1 roll dup neg I 10 div neg v 0 l1 I 20 div w1 z m}b
    /st{a exch currentpoint 3 -1 roll dup neg I 3 div v 0 l1 I 20 div w1 z m}b
    /us{a exch currentpoint 2 copy 5 -1 roll dup dup neg I 3 div v 0 l1 3 1 roll m dup neg I 10 div neg v 0 l1 I 20 div w1 z m}b
    /u1{dup a pop exch s currentpoint 3 -1 roll dup neg I 10 div neg v 0 l1 I 20 div w1 z m}b
    /st1{dup a pop exch s currentpoint 3 -1 roll dup neg I 3 div v 0 l1 I 20 div w1 z m}b
    /us1{dup a pop exch s currentpoint 2 copy 5 -1 roll dup dup neg I 3 div v 0 l1 3 1 roll m dup neg I 10 div neg v 0 l1 I 20 div w1 z m}b
    /x{m dup a exch neg exch v s}b/y{m dup a exch 2 div neg exch v s}b/e{wc z}b/f{g fill G}b
    /wu{m dup s}b/xu{m dup dup a exch neg exch v s}b/yu{m dup dup a exch 2 div neg exch v s}b
    /i{n rectfill}b/j{2 setlinejoin}b/k{n rectstroke}b
    /ML{m l1}b/U{/H H V sub d}b/V 0 d/W{H w}b/X{H x}b/Y{H y}b/RMS11{T O M s O T}b
    /BC{Q a pop currentpoint I 4 div sub 2 index I i G pop s}b%%EndProlog
    %%Page: 1 1
    <</Duplex false /Tumble false /ManualFeed false /MediaPosition 0>>  setpagedevice
    /Fn1{d I/Arial-Bold F}b/F1{/I 8.0 Fn1}b
    F1 (229.00)513 612 w
    1 w1 2 P 385 601 188 -406 k
    g n
    G
    g n
    /Fn2{d I/Arial F}b/F2{/I 8.0 Fn2}b
    F2 B (One Time Charges)387 547 w
    G
    0 P 427 152 161 -50 k
    24 601 360 -406 k
    7 152 141 -50 k
    183.16 135.36 1.44 -19.67 i
    185.31 135.36 0.72 -19.67 i
    187.47 135.36 2.15 -19.67 i
    191.06 135.36 1.44 -19.67 i
    193.93 135.36 0.72 -19.67 i
    196.81 135.36 0.72 -19.67 i
    198.96 135.36 1.44 -19.67 i
    201.84 135.36 0.72 -19.67 i
    204.71 135.36 0.72 -19.67 i
    206.86 135.36 2.15 -19.67 i
    211.17 135.36 0.72 -19.67 i
    212.61 135.36 1.44 -19.67 i
    214.76 135.36 0.72 -19.67 i
    216.20 135.36 2.87 -19.67 i
    220.51 135.36 0.72 -19.67 i
    222.67 135.36 1.44 -19.67 i
    224.82 135.36 2.15 -19.67 i
    227.69 135.36 0.72 -19.67 i
    230.57 135.36 0.72 -19.67 i
    232.72 135.36 0.72 -19.67 i
    236.31 135.36 1.44 -19.67 i
    238.47 135.36 1.44 -19.67 i
    242.06 135.36 2.15 -19.67 i
    244.93 135.36 0.72 -19.67 i
    246.37 135.36 1.44 -19.67 i
    g n
    F2 B (+)307 625 y
    G
    g n
    F2 B (-)108 625 y
    G
    g n
    /F3{/I 12.0 Fn1}b
    F3 B (BHARAT SANCHAR NIGAM LTD)284 140 y
    G
    2 P 497 648 72 -43 k
    g n
    F1 B (Amount Payable  )533 640 y
    F1 B (\(Rounded Up\))533 631 y
    G
    0 P 7 102 581 -83 k
    g n
    F2 B (Name & Address of the Customer)27 760 w
    G
    g n
    F1 B (Counter Foil)494 174 w
    G
    [3 1] 0 h 594 184 0 184 L S
    574 76 502 76 L
    446 76 374 76 L
    g n
    /F4{/I 7.0 Fn2}b
    F4 B (Diners)513 60 w
    G
    g n
    F4 B (Masters)460 60 w
    G
    g n
    F4 B (Visa)420 60 w
    G
    355 45 228 45 L
    575 45 459 45 L
    394 59 254 59 L
    g n
    F4 B (Card Holder's Name)367 45 w
    G
    181 59 91 59 L
    g n
    F4 B (Signature)184 45 w
    G
    g n
    F4 B (Please make crossed Cheque/DD/Pay order for Amount Payable \(Rounded Up\) in favour of AO \(Cash\),BSNL, INDORE )13 32 w
    G
    g n
    F4 B (Expiry Date)16 45 w
    G
    g n
    F4 B (Against Card no.)186 61 w
    G
    g n
    F4 B (Please Charge Rs.)16 60 w
    G
    192 76 86 76 L
    g n
    F4 B (Branch)474 76 w
    G
    g n
    F4 B (Bank)350 76 w
    G
    418 101 12 -9 k
    g n
    F4 B (Cheque/DD)228 93 w
    G
    g n
    F4 B (E-payment)437 93 w
    G
    g n
    F4 B (Credit / Debit Card)323 93 w
    G
    g n
    F4 B (Dated)224 76 w
    G
    g n
    F4 B (Cheque/DD No.)16 76 w
    G
    g n
    F4 B (Cash)154 93 y
    G
    g n
    F4 B (Mode of payment)16 93 w
    G
    401 68 12 -9 k
    124 101 12 -9 k
    208 101 12 -9 k
    302 101 12 -9 k
    441 68 12 -9 k
    496 68 12 -9 k
    82 52 8 -8 k
    105 52 8 -8 k
    113 52 8 -8 k
    89 52 8 -8 k
    121 52 8 -8 k
    129 52 8 -8 k
    316 83 8 -8 k
    309 83 8 -8 k
    301 83 8 -8 k
    293 83 8 -8 k
    280 83 8 -8 k
    272 83 8 -8 k
    260 83 8 -8 k
    252 83 8 -8 k
    2 P 26 648 72 -43 k
    g n
    F2 B (Previous Balance)62 640 y
    G
    g n
    F2 B (=)488 625 y
    G
    g n
    F2 B (+)208 625 y
    G
    126 649 72 -43 k
    g n
    F2 B (Last Payment)162 641 y
    G
    317 648 72 -43 k
    g n
    F2 B (Current Charges)353 640 y
    G
    g n
    F2 B (Usage Charges)387 530 w
    G
    g n
    F2 B (Tax)387 499 w
    G
    g n
    F2 B (Discount)387 515 w
    G
    g n
    /F5{/I 9.0 Fn1}b
    F5 B (Summary of )389 589 w
    F5 B (Current Charges)389 579 w
    G
    g n
    F5 B (Amount \(Rs.\))558 589 x
    G
    g n
    F5 B (Total Charges)390 478 w
    G
    0 P 21 188 9 181 L
    9 188 21 181 L
    2 P 220 648 72 -43 k
    g n
    F2 B (Adjustments)256 640 y
    G
    0 P 97 623 25 623 L
    198 623 126 623 L
    292 623 220 623 L
    389 623 316 623 L
    569 623 497 623 L
    (ANNIE BESANT SCHOOL NARAYANDAS)28 748 w
    (SHIKSHA PRASAR SAMITI)28 739 w
    (ANNIE BESANT SCHOOL PRECA ANNAPURNNA MANDIR ROAD INDORE)28 730 w
    (MADHYA PRADESH)28 721 w
    (452009.0)28 712 w
    (India)28 703 w
    F5 (229.67)562 477 x
    F2 (160.00)144 611 w
    (0.00)246 611 w
    (229.67)340 611 w
    (0.00)561 547 x
    (149.00)562 562 x
    (441.40)562 530 x
    (25.27)562 498 x
    (159.20)39 611 w
    g n
    F2 B (Deposit              3010.00)28 670 w
    G
    g n
    F4 B (Amex)559 60 w
    G
    542 68 12 -9 k
    g n
    F1 B (Telephone Bill)281 773 y
    G
    g n
    F4 B (Note: Post Offices / Banks to accept Bills against Account Number on or before Due Date only)14 20 w
    G
    g n
    /F6{/I 6.0 Fn1}b
    F6 B (E & OE)328 188 w
    G
    459 152 135 152 L
    /F7{/I 10.0 Fn2}b
    F7 (Indore  Telecom  District)283 155 y
    g n
    F5 B (Account Summary)28 656 w
    G
    E 386 454 181 -9 i
    /F8{/I 7.3 Fn1}b
    F8 B (Tax Details)389 446 w
    (Description)389 437 w
    (Tax Rate)483 437 w
    (Amount \(Rs.\))565 437 x
    /F9{/I 7.3 Fn2}b
    F9 (Service Tax)389 427 w
    (12.00%)483 427 w
    (24.53)565 427 x
    (Education Cess)389 417 w
    (0.24%)483 417 w
    (0.49)565 417 x
    (Higher Edu. Cess)389 407 w
    (0.12%)483 407 w
    (0.25)565 407 x
    570 463 382 463 L
    433.12 44.86 1.44 -25.97 i
    435.27 44.86 0.72 -25.97 i
    437.43 44.86 2.15 -25.97 i
    441.02 44.86 1.44 -25.97 i
    443.89 44.86 1.44 -25.97 i
    446.05 44.86 1.44 -25.97 i
    448.92 44.86 1.44 -25.97 i
    451.79 44.86 1.44 -25.97 i
    453.95 44.86 1.44 -25.97 i
    456.82 44.86 0.72 -25.97 i
    459.70 44.86 0.72 -25.97 i
    461.85 44.86 1.44 -25.97 i
    464.72 44.86 0.72 -25.97 i
    468.32 44.86 0.72 -25.97 i
    470.47 44.86 1.44 -25.97 i
    472.62 44.86 0.72 -25.97 i
    475.50 44.86 0.72 -25.97 i
    478.37 44.86 1.44 -25.97 i
    480.53 44.86 1.44 -25.97 i
    483.40 44.86 0.72 -25.97 i
    486.27 44.86 0.72 -25.97 i
    488.43 44.86 1.44 -25.97 i
    492.02 44.86 0.72 -25.97 i
    493.45 44.86 2.15 -25.97 i
    496.33 44.86 0.72 -25.97 i
    497.76 44.86 0.72 -25.97 i
    499.20 44.86 2.87 -25.97 i
    504.23 44.86 1.44 -25.97 i
    507.10 44.86 1.44 -25.97 i
    509.26 44.86 1.44 -25.97 i
    512.13 44.86 1.44 -25.97 i
    515 44.86 2.15 -25.97 i
    517.88 44.86 0.72 -25.97 i
    520.03 44.86 2.15 -25.97 i
    523.62 44.86 1.44 -25.97 i
    526.50 44.86 0.72 -25.97 i
    527.93 44.86 2.15 -25.97 i
    530.81 44.86 0.72 -25.97 i
    532.24 44.86 2.87 -25.97 i
    535.83 44.86 1.44 -25.97 i
    539.42 44.86 2.15 -25.97 i
    542.30 44.86 0.72 -25.97 i
    543.73 44.86 1.44 -25.97 i
    g n
    F9 B (For bank use only)415 13 w
    G
    493 101 12 -9 k
    g n
    F9 B (EFT)512 93 w
    G
    g n
    F2 B (Customer ID                1010404461)392 759 w
    G
    g n
    F1 B (Account Number        1010568351)392 744 w
    G
    g n
    F2 B (Invoice Number          10105683510030)392 730 w
    G
    g n
    F2 B (Invoice Date               05/09/2012)392 715 w
    G
    g n
    F2 B (Invoice Period             01/08/2012 to 31/08/2012)392 701 w
    G
    g n
    F1 B (Due Date                     27/09/2012)392 687 w
    G
    g n
    F2 B (Customer Type            INDIVIDUAL)392 672 w
    G
    g n
    F4 B (This is a Computer generated Bill and hence )476 209 y
    F4 B (does not require any Signature.)476 201 y
    G
    g n
    F1 B (Due Date:       27/09/2012)14 109 w
    G
    g n
    F2 B (Invoice No.:  10105683510030)14 140 w
    G
    g n
    F1 B (Amount Due :  229.00)435 109 w
    G
    g n
    F2 B (Account No.:  1010568351)435 140 w
    G
    g n
    F2 B (Invoice Date:  05/09/2012)14 124 w
    G
    g n
    F5 B (Accounts Officer \(TR\))478 221 y
    G
    g n
    F2 B (Recurring Charges)387 562 w
    G
    577 432 T  M 270 O g n
    M -270 O  -577 -432 T
    577 432 T  M 270 O F2 B (PAN Number    AABCB5576G)-68 -3 w
    G
    M -270 O  -577 -432 T
    F2 (-386.00)562 515 x
    2 P 408 650 72 -43 k
    g n
    F2 B (Account Balance)445 641 y
    G
    0 P 480 625 408 625 L
    g n
    F2 B (=)398 624 y
    G
    (228.87)429 614 w
    g n
    /F10{/I 7.0 Fn1}b
    F10 B (Dear Customer,)394 382 w
    F10 B (      Henceforth, the invoices \(Bills\) shall not be )394 374 w
    F10 B (printed / dispatched if the total dues are less )394 366 w
    F10 B (than Rs. 100/- and the amount due shall be )394 358 w
    F10 B (included in the next bill.)394 350 w
    F10 B (      Kindly pay bill amount in whole rupee and )394 342 w
    F10 B (not in fraction of a rupee.)394 334 w
    G
    g g n
    /F15{/I 7.5 Fn2}b
    F15 B (of 4)525 13 w
    G
    G
    g n
    /F11{/I 7.2 Fn2}b
    F11 B (Page 1)495 13 w
    G
    N 26 586 353 -8 i
    F8 B (Payment Details)28 578 w
    (Description)28 571 w
    (Date)146 571 w
    (Amount\(Rs.\))377 571 x
    F9 (Payments)28 562 w
    (23/08/12)146 562 w
    (160.00)377 562 x
    F2 (0731-2484034)475 659 w
    g n
    F2 B (Phone Number)392 660 w
    G
    (0731-2484034)484 125 w
    g n
    F2 B (Phone No.:)435 124 w
    G
    13 403 T  M 90 O g n
    M -90 O  -13 -403 T
    13 403 T  M 90 O F2 B ( SERVICE TAX REG. NUMBER : AABCB5576GSD733)-141 -2 w
    G
    M -90 O  -13 -403 T
    U1
    %%Page: 2 2
    <</Duplex true /Tumble false /ManualFeed false /MediaPosition 1>>  setpagedevice
    g n
    /Fn3{d I/ArialBlack F}b/F12{/I 15.0 Fn3}b
    F12 B (BHARAT SANCHAR NIGAM LIMITED)301 805 y
    G
    1 w1 594 774 2 774 L
    g n
    F2 B (Account Number    1010568351)13 789 w
    G
    g n
    F2 B (Invoice Number    10105683510030)580 789 x
    G
    g n
    F2 B (Invoice Date    05/09/2012)229 789 w
    G
    g n
    /F13{/I 7.4 Fn2}b
    F13 B (Page 2)496 16 w
    G
    g g n
    /F15{/I 7.5 Fn2}b
    F15 B (of 4)532 16 w
    G
    G
    N 36 766 534 -8 i
    F8 B (Recurring Charges)38 759 w
    (Product)38 749 w
    (Plan)195 749 w
    (Period)352 749 w
    (Qty)442 749 x
    (Rate)481 749 x
    (Charges)568 749 x
    F9 (DISCOUNT)38 737 w
    (LO-KAR-LO-BAAT-OTHER)195 737 w
    (01/08/12 to 31/08/12)352 737 w
    (NA)442 737 x
    (NA)481 737 x
    (149.00)568 737 x
    F8 (Total Charges \(Rs.\))38 726 w
    (149.00)568 726 x
    N 36 715 534 -8 i
    B (Usage Charges)38 708 w
    (Phone Calls)38 699 w
    (Units)258 699 w
    (Duration/Volume)321 699 w
    (Gross Amt)443 699 x
    (Discount)505 699 x
    (Net Amt)568 699 x
    F9 (Local Cellular)38 688 w
    (361)258 687 w
    (04:35:40)321 687 w
    (361.00)443 687 x
    (21.00)505 687 x
    (340.000)568 687 x
    (Local LL BSNL)38 676 w
    (13)258 675 w
    (00:10:39)321 675 w
    (13.00)443 675 x
    (13.00)505 675 x
    (0.000)568 675 x
    (Local LL Other Operator)38 664 w
    (23)258 663 w
    (00:17:55)321 663 w
    (23.00)443 663 x
    (0.00)505 663 x
    (23.000)568 663 x
    (Special Number Band 8)38 652 w
    (3)258 652 w
    (00:02:06)321 652 w
    (0.00)443 652 x
    (0.00)505 652 x
    (0.000)568 652 x
    (STD Cellular)38 640 w
    (40)258 640 w
    (00:35:09)321 640 w
    (40.00)443 640 x
    (0.00)505 640 x
    (40.000)568 640 x
    (STD Intra Circle GT50 BSNL)38 629 w
    (1)258 628 w
    (00:01:49)321 628 w
    (1.00)443 628 x
    (1.00)505 628 x
    (0.000)568 628 x
    (STD Intra Circle LT50 BSNL)38 617 w
    (1)258 616 w
    (00:00:24)321 616 w
    (1.00)443 616 x
    (1.00)505 616 x
    (0.000)568 616 x
    F8 (Total Charges \(Rs.\))38 604 w
    (439.00)443 604 x
    (36.00)505 604 x
    (403.00)568 604 x
    /Fn4{d I/Arial-Italic F}b/F14{/I 6.3 Fn4}b
    F14 (For BB 1 Unit = 1 KB)38 595 w
    N 36 586 534 -8 i
    F8 B (Discounts)38 579 w
    (Discount Type)38 570 w
    (Period)258 570 w
    (Discounts)568 570 x
    F9 (LL-FREE-CALLS-350-1)38 558 w
    (01/08/12 to 31/08/12)258 558 w
    (-350.00)568 558 x
    (LO-KAR-LO-BAAT)38 546 w
    (01/08/12 to 31/08/12)258 546 w
    (0.00 - 36.00 [email protected]%)38 534 w
    (-36.00)568 534 x
    F8 (Total Discounts \(Rs.\))38 523 w
    (-386.00)568 523 x
    g n
    F2 B (Plan    LO-KAR-LO-BAAT-OTHER)13 775 w
    G
    g n
    F2 B (Phone Number / UserName    0731-2484034)580 775 x
    G
    U1
    %%Page: 3 3
    g n
    F12 B (BHARAT SANCHAR NIGAM LIMITED)301 805 y
    G
    1 w1 594 774 2 774 L
    g n
    F2 B (Account Number    1010568351)13 789 w
    G
    g n
    F2 B (Invoice Number    10105683510030)580 789 x
    G
    g n
    F2 B (Invoice Date    05/09/2012)229 789 w
    G
    g n
    F13 B (Page 3)496 16 w
    G
    g g n
    /F15{/I 7.5 Fn2}b
    F15 B (of 4)532 16 w
    G
    G
    N 36 766 534 -8 i
    F8 B (Usage Charges)38 759 w
    (Phone Calls)38 749 w
    (Units)258 749 w
    (Duration/Volume)321 749 w
    (Gross Amt)443 749 x
    (Discount)505 749 x
    (Net Amt)568 749 x
    F9 (Local LL Other Operator)38 738 w
    (2)258 737 w
    (00:00:14)321 737 w
    (2.40)443 737 x
    (0.00)505 737 x
    (2.400)568 737 x
    F8 (Total Charges \(Rs.\))38 726 w
    (2.40)443 726 x
    (0.00)505 726 x
    (2.40)568 726 x
    F14 (For BB 1 Unit = 1 KB)38 716 w
    g n
    F2 B (Plan    RENT-FREE-SECOND-PHONE)13 775 w
    G
    g n
    F2 B (Phone Number / UserName    0731-2484033)580 775 x
    G
    U1
    %%Page: 4 4
    g n
    F12 B (BHARAT SANCHAR NIGAM LIMITED)301 805 y
    G
    1 w1 594 774 2 774 L
    g n
    F2 B (Account Number    1010568351)13 789 w
    G
    g n
    F2 B (Invoice Number    10105683510030)580 789 x
    G
    g n
    F2 B (Invoice Date    05/09/2012)229 789 w
    G
    g n
    F13 B (Page 4)496 16 w
    G
    g g n
    /F15{/I 7.5 Fn2}b
    F15 B (of 4)532 16 w
    G
    G
    N 36 766 534 -8 i
    F8 B (Usage Charges)38 759 w
    (Phone Calls)38 749 w
    (Units)258 749 w
    (Duration/Volume)321 749 w
    (Gross Amt)443 749 x
    (Discount)505 749 x
    (Net Amt)568 749 x
    F9 (BSNL Broadband)38 738 w
    (15026372)258 737 w
    (15026372)321 737 w
    (0.00)443 737 x
    (0.00)505 737 x
    (0.000)568 737 x
    F8 (Total Charges \(Rs.\))38 726 w
    (0.00)443 726 x
    (0.00)505 726 x
    (0.00)568 726 x
    F14 (For BB 1 Unit = 1 KB)38 716 w
    g n
    F2 B (Plan    BBG-COMBO-ULD-850-ANNUAL-COMMIT)13 775 w
    G
    g n
    F2 B (Phone Number / UserName    an7312484034_wcdr)580 775 x
    G
    U1

    thanks, i am trying to do that. in case I will need your help i will contact u again.
    one more doubt.
    F8 B (Recurring Charges)38 759 w
    what does F8 B 38 759 & w denotes in the above string
    what does y & z denote
    and what means
    /F15{/I 7.5 Fn2}b
    On Wed, 12 Dec 2012 23:29:23 +0530  wrote
        Re: How to scale down number of pages in ps files
        created by abeddie in PostScript Programming - View the full discussion
    Remember this is just a sample of what you could do and when your jobs changewhat you do would have to change. The edits are:1) find the %%Page 3 32) change the line above from: U1 to %U13) add the line: 0 792 ypos 72 sub sub neg translate4) Find the line with the smallest y position: F8 (Total Discounts \(Rs.\))38 523 w5) Add this line below: currentpoint /ypos exch def pop %added repeat steps 1-5 for but use for step 1:%%Page 4 4 and step 4: F14 (For BB 1 Unit = 1 KB)38 716 w       old before page 3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%F8 (Total Discounts \(Rs.\))38 523 w(-386.00)568 523 xg nF2 B (Plan    LO-KAR-LO-BAAT-OTHER)13 775 wGg nF2 B (Phone Number / UserName    0731-2484034)580 775 xGU1%%Page: 3 3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     old before page 4%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%F14 (For BB 1 Unit = 1 KB)38 716 wg nF2 B (Plan    RENT-FREE-SECOND-PHONE)13 775 wGg nF2 B (Phone Number / UserName    0731-2484033)580 775 xGU1%%Page: 4 4%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%     new before page 3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%F8 (Total Discounts \(Rs.\))38 523 wcurrentpoint /ypos exch def pop %added(-386.00)568 523 xg nF2 B (Plan    LO-KAR-LO-BAAT-OTHER)13 775 wGg nF2 B (Phone Number / UserName    0731-2484034)580 775 xG%U1 %commented out0 792 ypos 72 sub sub neg translate % added%%Page: 3 3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     new before page 4%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%currentpoint /ypos exch def pop %addedg nF2 B (Plan    RENT-FREE-SECOND-PHONE)13 775 wGg nF2 B (Phone Number / UserName    0731-2484033)580 775 xG 0 792 ypos 72 sub sub neg translate%U1 %commented out%%Page: 4 4%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 3
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/4915986#4915986
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4915986#4915986
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4915986#4915986. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in PostScript Programming by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • On a form w Validation, how to redirect to a custom page

    Hi. I have created a form in Dreamweaver CS5 that uses spry validation successfully. Once the form is submitted, the user is redirected to the home page. But I don't want that redirect.
    My question is, how can I have the validated page redirect to a custom thank you page I designed? I don't know the exact code/syntax to write to make it do what I want and, even if I had the code, I wouldn't know exactly where it should be placed. Please help if you can. Here's the source code. )BTW, when I use Dreamweaver Behaviors to add a URL redirect, it ignores the required validation and simply allows you to click the submit button and redirect.) Many thanks!
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="UTF-8">
    <link href="../_css/main.css" rel="stylesheet" media="screen, projection">
    <link href="../_css/forms.css" rel="stylesheet" media="screen, projection">
    <title></title>
    <!--[if lt IE 9]>
    <script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script><![endif]-->
    <script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">
    <script type="text/javascript">
    <!-- **** I think the line of code for the redirect is here??...I just don't know how to write the code to redirect to the page I want ***** -->
    function MM_goToURL() { //v3.0
      var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
      for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
    </script>
    </head>
    <body>
    <header id="pageHeader">
    <a href="../index.htm"><img src="../_images/logo.gif" width="170" height="91" alt="HMN logo" id="logo"></a>
    <img src="../_images/tagline.png" width="296" height="92" alt="HMN tagline" id="tagline">
    </header>
    <nav id="mainNav">
    <ul>
    <li><a href="../index.htm">Home</a></li>
    <li><a href="../press.htm">Press</a></li>
    <li><a href="../about.htm">About</a></li>
    <li><a href="../contact.htm">Contact</a></li>
    </ul>
    </nav>
    <br class="clear">
    <div class="headerContact">
    </div>
    <article>
      <!-- The file webformmailer.php sits on the web server at godaddy.com in case that matters -->
    <section id="Request">
    <p id="intro">To request your link for the downloadable <span id="highlight">Media Kit</span>, please provide the following information:</p>
    <form name="Request" method="post" action="../../webformmailer.php"> <p id="formCaption">Fields marked with * are required.</p>
      <p><span id="sprytextfield1">
        <label for="first_name">First Name:*</label>
        <input type="text" name="first_name" id="first_name">
        <span class="textfieldRequiredMsg">(required)</span></span></p>
      <p><span id="sprytextfield2">
        <label for="last_name">Last Name:*</label>
        <input type="text" name="last_name" id="last_name">
        <span class="textfieldRequiredMsg">(required)</span></span></p>
      <p><span id="sprytextfield3">
        <label for="company">Company:*</label>
        <input type="text" name="company" id="company">
        <span class="textfieldRequiredMsg">(required)</span></span></p>
      <p>
        <label for="address">Address:</label>
        <input type="text" name="address" id="address">
      </p>
      <p>
        <label for="address_2">Address 2:</label>
        <input type="text" name="address_2" id="address_2">
      </p>
      <p>
        <label for="city">City:</label>
        <input type="text" name="city" id="city">
      </p>
      <p>
        <label for="state">State:</label>
        <input type="text" name="state" id="state">
      </p>
      <p>
        <label for="zip">Zip:</label>
        <input type="text" name="zip" id="zip">
      </p>
      <p><span id="sprytextfield4">
      <label for="email">Email:*</label>
      <input type="text" name="email" id="email">
      <span class="textfieldRequiredMsg">(required)</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span> </p>
      <p>
      <input name="submit" type="image" id="submit" onClick="MM_goToURL('parent','media_kit_download.htm');return document.MM_returnValue" src="../_images/btn_submit.png">
      </p>
      <p> </p>
    </form>
    <p>
    </p>
    </div>
    </div>
    </section>
    </article>
    <script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:["blur"]});
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "none", {validateOn:["blur"]});
    var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "none", {validateOn:["blur"]});
    var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "email", {validateOn:["blur"]});
    </script>
    </body>
    </html>

    Thanks for replying. The  URL you've bolded is actually the correct page I'd like the redirect to go to when the form is successfully submitted after validation. But for some reason, that URL request is being ignored and the redirect brings me back to the index page in the root directory. I don't see anywhere in the code that makes the request to do that. Unless that's a default behavior if I've gotten the redirect wrong?
    I don't know if this is helpful, but there is also a .js file that Dreamweaver created and attached to the above HTML source file. The .js file appears to have all the spry code validation including code for features and widgets I'm not even using. I searched through the code several times trying to identify where there might be a redirect to the index page but didn't recognize anything that made sense to me. Here is the complete, unedited file:
    // SpryValidationTextField.js - version 0.38 - Spry Pre-Release 1.6.1
    // Copyright (c) 2006. Adobe Systems Incorporated.
    // All rights reserved.
    // Redistribution and use in source and binary forms, with or without
    // modification, are permitted provided that the following conditions are met:
    //   * Redistributions of source code must retain the above copyright notice,
    //     this list of conditions and the following disclaimer.
    //   * Redistributions in binary form must reproduce the above copyright notice,
    //     this list of conditions and the following disclaimer in the documentation
    //     and/or other materials provided with the distribution.
    //   * Neither the name of Adobe Systems Incorporated nor the names of its
    //     contributors may be used to endorse or promote products derived from this
    //     software without specific prior written permission.
    // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
    // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    // POSSIBILITY OF SUCH DAMAGE.
    (function() { // BeginSpryComponent
    if (typeof Spry == "undefined") window.Spry = {}; if (!Spry.Widget) Spry.Widget = {};
    Spry.Widget.BrowserSniff = function()
        var b = navigator.appName.toString();
        var up = navigator.platform.toString();
        var ua = navigator.userAgent.toString();
        this.mozilla = this.ie = this.opera = this.safari = false;
        var re_opera = /Opera.([0-9\.]*)/i;
        var re_msie = /MSIE.([0-9\.]*)/i;
        var re_gecko = /gecko/i;
        var re_safari = /(applewebkit|safari)\/([\d\.]*)/i;
        var r = false;
        if ( (r = ua.match(re_opera))) {
            this.opera = true;
            this.version = parseFloat(r[1]);
        } else if ( (r = ua.match(re_msie))) {
            this.ie = true;
            this.version = parseFloat(r[1]);
        } else if ( (r = ua.match(re_safari))) {
            this.safari = true;
            this.version = parseFloat(r[2]);
        } else if (ua.match(re_gecko)) {
            var re_gecko_version = /rv:\s*([0-9\.]+)/i;
            r = ua.match(re_gecko_version);
            this.mozilla = true;
            this.version = parseFloat(r[1]);
        this.windows = this.mac = this.linux = false;
        this.Platform = ua.match(/windows/i) ? "windows" :
                        (ua.match(/linux/i) ? "linux" :
                        (ua.match(/mac/i) ? "mac" :
                        ua.match(/unix/i)? "unix" : "unknown"));
        this[this.Platform] = true;
        this.v = this.version;
        if (this.safari && this.mac && this.mozilla) {
            this.mozilla = false;
    Spry.is = new Spry.Widget.BrowserSniff();
    Spry.Widget.ValidationTextField = function(element, type, options)
        type = Spry.Widget.Utils.firstValid(type, "none");
        if (typeof type != 'string') {
            this.showError('The second parameter in the constructor should be the validation type, the options are the third parameter.');
            return;
        if (typeof Spry.Widget.ValidationTextField.ValidationDescriptors[type] == 'undefined') {
            this.showError('Unknown validation type received as the second parameter.');
            return;
        options = Spry.Widget.Utils.firstValid(options, {});
        this.type = type;
        if (!this.isBrowserSupported()) {
            //disable character masking and pattern behaviors for low level browsers
            options.useCharacterMasking = false;
        this.init(element, options);
        //make sure we validate at least on submit
        var validateOn = ['submit'].concat(Spry.Widget.Utils.firstValid(this.options.validateOn, []));
        validateOn = validateOn.join(",");
        this.validateOn = 0;
        this.validateOn = this.validateOn | (validateOn.indexOf('submit') != -1 ? Spry.Widget.ValidationTextField.ONSUBMIT : 0);
        this.validateOn = this.validateOn | (validateOn.indexOf('blur') != -1 ? Spry.Widget.ValidationTextField.ONBLUR : 0);
        this.validateOn = this.validateOn | (validateOn.indexOf('change') != -1 ? Spry.Widget.ValidationTextField.ONCHANGE : 0);
        if (Spry.Widget.ValidationTextField.onloadDidFire)
            this.attachBehaviors();
        else
            Spry.Widget.ValidationTextField.loadQueue.push(this);
    Spry.Widget.ValidationTextField.ONCHANGE = 1;
    Spry.Widget.ValidationTextField.ONBLUR = 2;
    Spry.Widget.ValidationTextField.ONSUBMIT = 4;
    Spry.Widget.ValidationTextField.ERROR_REQUIRED = 1;
    Spry.Widget.ValidationTextField.ERROR_FORMAT = 2;
    Spry.Widget.ValidationTextField.ERROR_RANGE_MIN = 4;
    Spry.Widget.ValidationTextField.ERROR_RANGE_MAX = 8;
    Spry.Widget.ValidationTextField.ERROR_CHARS_MIN = 16;
    Spry.Widget.ValidationTextField.ERROR_CHARS_MAX = 32;
    /* validation parameters:
    *  - characterMasking : prevent typing of characters not matching an regular expression
    *  - regExpFilter : additional regular expression to disalow typing of characters
    *        (like the "-" sign in the middle of the value); use for partial matching of the currently typed value;
    *         the typed value must match regExpFilter at any moment
    *  - pattern : enforce character on each position inside a pattern (AX0?)
    *  - validation : function performing logic validation; return false if failed and the typedValue value on success
    *  - minValue, maxValue : range validation; check if typedValue inside the specified range
    *  - minChars, maxChars : value length validation; at least/at most number of characters
    Spry.Widget.ValidationTextField.ValidationDescriptors = {
        'none': {
        'custom': {
        'integer': {
            characterMasking: /[\-\+\d]/,
            regExpFilter: /^[\-\+]?\d*$/,
            validation: function(value, options) {
                if (value == '' || value == '-' || value == '+') {
                    return false;
                var regExp = /^[\-\+]?\d*$/;
                if (!regExp.test(value)) {
                    return false;
                options = options || {allowNegative:false};
                var ret = parseInt(value, 10);
                if (!isNaN(ret)) {
                    var allowNegative = true;
                    if (typeof options.allowNegative != 'undefined' && options.allowNegative == false) {
                        allowNegative = false;
                    if (!allowNegative && value < 0) {
                        ret = false;
                } else {
                    ret = false;
                return ret;
        'real': {
            characterMasking: /[\d\.,\-\+e]/i,
            regExpFilter: /^[\-\+]?\d(?:|\.,\d{0,2})|(?:|e{0,1}[\-\+]?\d{0,})$/i,
            validation: function (value, options) {
                var regExp = /^[\+\-]?[0-9]+([\.,][0-9]+)?([eE]{0,1}[\-\+]?[0-9]+)?$/;
                if (!regExp.test(value)) {
                    return false;
                var ret = parseFloat(value);
                if (isNaN(ret)) {
                    ret = false;
                return ret;
        'currency': {
            formats: {
                'dot_comma': {
                    characterMasking: /[\d\.\,\-\+\$]/,
                    regExpFilter: /^[\-\+]?(?:[\d\.]*)+(|\,\d{0,2})$/,
                    validation: function(value, options) {
                        var ret = false;
                        //2 or no digits after the comma
                        if (/^(\-|\+)?\d{1,3}(?:\.\d{3})*(?:\,\d{2}|)$/.test(value) || /^(\-|\+)?\d+(?:\,\d{2}|)$/.test(value)) {
                            value = value.toString().replace(/\./gi, '').replace(/\,/, '.');
                            ret = parseFloat(value);
                        return ret;
                'comma_dot': {
                    characterMasking: /[\d\.\,\-\+\$]/,
                    regExpFilter: /^[\-\+]?(?:[\d\,]*)+(|\.\d{0,2})$/,
                    validation: function(value, options) {
                        var ret = false;
                        //2 or no digits after the comma
                        if (/^(\-|\+)?\d{1,3}(?:\,\d{3})*(?:\.\d{2}|)$/.test(value) || /^(\-|\+)?\d+(?:\.\d{2}|)$/.test(value)) {
                            value = value.toString().replace(/\,/gi, '');
                            ret = parseFloat(value);
                        return ret;
        'email': {
            characterMasking: /[^\s]/,
            validation: function(value, options) {
                var rx = /^[\w\.-]+@[\w\.-]+\.\w+$/i;
                return rx.test(value);
        'date': {
            validation: function(value, options) {
                var formatRegExp = /^([mdy]+)[\.\-\/\\\s]+([mdy]+)[\.\-\/\\\s]+([mdy]+)$/i;
                var valueRegExp = this.dateValidationPattern;
                var formatGroups = options.format.match(formatRegExp);
                var valueGroups = value.match(valueRegExp);
                if (formatGroups !== null && valueGroups !== null) {
                    var dayIndex = -1;
                    var monthIndex = -1;
                    var yearIndex = -1;
                    for (var i=1; i<formatGroups.length; i++) {
                        switch (formatGroups[i].toLowerCase()) {
                            case "dd":
                                dayIndex = i;
                                break;
                            case "mm":
                                monthIndex = i;
                                break;
                            case "yy":
                            case "yyyy":
                                yearIndex = i;
                                break;
                    if (dayIndex != -1 && monthIndex != -1 && yearIndex != -1) {
                        var maxDay = -1;
                        var theDay = parseInt(valueGroups[dayIndex], 10);
                        var theMonth = parseInt(valueGroups[monthIndex], 10);
                        var theYear = parseInt(valueGroups[yearIndex], 10);
                        // Check month value to be between 1..12
                        if (theMonth < 1 || theMonth > 12) {
                            return false;
                        // Calculate the maxDay according to the current month
                        switch (theMonth) {
                            case 1:    // January
                            case 3: // March
                            case 5: // May
                            case 7: // July
                            case 8: // August
                            case 10: // October
                            case 12: // December
                                maxDay = 31;
                                break;
                            case 4:    // April
                            case 6: // June
                            case 9: // September
                            case 11: // November
                                maxDay = 30;
                                break;
                            case 2: // February
                                if ((parseInt(theYear/4, 10) * 4 == theYear) && (theYear % 100 != 0 || theYear % 400 == 0)) {
                                    maxDay = 29;
                                } else {
                                    maxDay = 28;
                                break;
                        // Check day value to be between 1..maxDay
                        if (theDay < 1 || theDay > maxDay) {
                            return false;
                        // If successfull we'll return the date object
                        return (new Date(theYear, theMonth - 1, theDay));   //JavaScript requires a month between 0 and 11
                } else {
                    return false;
        'time': {
            validation: function(value, options) {
                //    HH:MM:SS T
                var formatRegExp = /([hmst]+)/gi;
                var valueRegExp = /(\d+|AM?|PM?)/gi;
                var formatGroups = options.format.match(formatRegExp);
                var valueGroups = value.match(valueRegExp);
                //mast match and have same length
                if (formatGroups !== null && valueGroups !== null) {
                    if (formatGroups.length != valueGroups.length) {
                        return false;
                    var hourIndex = -1;
                    var minuteIndex = -1;
                    var secondIndex = -1;
                    //T is AM or PM
                    var tIndex = -1;
                    var theHour = 0, theMinute = 0, theSecond = 0, theT = 'AM';
                    for (var i=0; i<formatGroups.length; i++) {
                        switch (formatGroups[i].toLowerCase()) {
                            case "hh":
                                hourIndex = i;
                                break;
                            case "mm":
                                minuteIndex = i;
                                break;
                            case "ss":
                                secondIndex = i;
                                break;
                            case "t":
                            case "tt":
                                tIndex = i;
                                break;
                    if (hourIndex != -1) {
                        var theHour = parseInt(valueGroups[hourIndex], 10);
                        if (isNaN(theHour) || theHour > (formatGroups[hourIndex] == 'HH' ? 23 : 12 )) {
                            return false;
                    if (minuteIndex != -1) {
                        var theMinute = parseInt(valueGroups[minuteIndex], 10);
                        if (isNaN(theMinute) || theMinute > 59) {
                            return false;
                    if (secondIndex != -1) {
                        var theSecond = parseInt(valueGroups[secondIndex], 10);
                        if (isNaN(theSecond) || theSecond > 59) {
                            return false;
                    if (tIndex != -1) {
                        var theT = valueGroups[tIndex].toUpperCase();
                        if (
                            formatGroups[tIndex].toUpperCase() == 'TT' && !/^a|pm$/i.test(theT) ||
                            formatGroups[tIndex].toUpperCase() == 'T' && !/^a|p$/i.test(theT)
                            return false;
                    var date = new Date(2000, 0, 1, theHour + (theT.charAt(0) == 'P'?12:0), theMinute, theSecond);
                    return date;
                } else {
                    return false;
        'credit_card': {
            characterMasking: /\d/,
            validation: function(value, options) {
                var regExp = null;
                options.format = options.format || 'ALL';
                switch (options.format.toUpperCase()) {
                    case 'ALL': regExp = /^[3-6]{1}[0-9]{12,18}$/; break;
                    case 'VISA': regExp = /^4(?:[0-9]{12}|[0-9]{15})$/; break;
                    case 'MASTERCARD': regExp = /^5[1-5]{1}[0-9]{14}$/; break;
                    case 'AMEX': regExp = /^3(4|7){1}[0-9]{13}$/; break;
                    case 'DISCOVER': regExp = /^6011[0-9]{12}$/; break;
                    case 'DINERSCLUB': regExp = /^3(?:(0[0-5]{1}[0-9]{11})|(6[0-9]{12})|(8[0-9]{12}))$/; break;
                if (!regExp.test(value)) {
                    return false;
                var digits = [];
                var j = 1, digit = '';
                for (var i = value.length - 1; i >= 0; i--) {
                    if ((j%2) == 0) {
                        digit = parseInt(value.charAt(i), 10) * 2;
                        digits[digits.length] = digit.toString().charAt(0);
                        if (digit.toString().length == 2) {
                            digits[digits.length] = digit.toString().charAt(1);
                    } else {
                        digit = value.charAt(i);
                        digits[digits.length] = digit;
                    j++;
                var sum = 0;
                for(i=0; i < digits.length; i++ ) {
                    sum += parseInt(digits[i], 10);
                if ((sum%10) == 0) {
                    return true;
                return false;
        'zip_code': {
            formats: {
                'zip_us9': {
                    pattern:'00000-0000'
                'zip_us5': {
                    pattern:'00000'
                'zip_uk': {
                    characterMasking: /[\dA-Z\s]/,
                    validation: function(value, options) {
                        //check one of the following masks
                        // AN NAA, ANA NAA, ANN NAA, AAN NAA, AANA NAA, AANN NAA
                        return /^[A-Z]{1,2}\d[\dA-Z]?\s?\d[A-Z]{2}$/.test(value);
                'zip_canada': {
                    characterMasking: /[\dA-Z\s]/,
                    pattern: 'A0A 0A0'
                'zip_custom': {}
        'phone_number': {
            formats: {
                //US phone number; 10 digits
                'phone_us': {
                    pattern:'(000) 000-0000'
                'phone_custom': {}
        'social_security_number': {
            pattern:'000-00-0000'
        'ip': {
            characterMaskingFormats: {
                'ipv4': /[\d\.]/i,
                'ipv6_ipv4': /[\d\.\:A-F\/]/i,
                'ipv6': /[\d\.\:A-F\/]/i
            validation: function (value, options) {
                return Spry.Widget.ValidationTextField.validateIP(value, options.format);
        'url': {
            characterMasking: /[^\s]/,
            validation: function(value, options) {
                //fix for ?ID=223429 and ?ID=223387
                /* the following regexp matches components of an URI as specified in http://tools.ietf.org/html/rfc3986#page-51 page 51, Appendix B.
                    scheme    = $2
                    authority = $4
                    path      = $5
                    query     = $7
                    fragment  = $9
                var URI_spliter = /^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
                var parts = value.match(URI_spliter);
                if (parts && parts[4]) {
                    //encode each component of the domain name using Punycode encoding scheme: http://tools.ietf.org/html/rfc3492
                    var host  = parts[4].split(".");
                    var punyencoded = '';
                    for (var i=0; i<host.length; i++) {
                        punyencoded = Spry.Widget.Utils.punycode_encode(host[i], 64);
                        if (!punyencoded) {
                            return false;
                        } else {
                            if (punyencoded != (host[i] + "-")) {
                                host[i] = 'xn--' + punyencoded;
                    host = host .join(".");
                    //the encoded domain name is replaced into the original URL to be validated again later as URL
                    value = value.replace(URI_spliter, "$1//" + host + "$5$6$8");
                //fix for ?ID=223358 and ?ID=223594
                //the following validates an URL using ABNF rules as defined in http://tools.ietf.org/html/rfc3986 , Appendix A., page 49
                //except host which is extracted by match[1] and validated separately
                 * userinfo=    (?:(?:[a-z0-9\-\._~\!\$\&\'\(\)\*\+\,\;\=:]|%[0-9a-f]{2,2})*\@)?
                 * host=            (?:((?:(?:[a-z0-9][a-z0-9\-]*[a-z0-9]|[a-z0-9])\.)*(?:[a-z][a-z0-9\-]*[a-z0-9]|[a-z])|(?: \[[^\]]*\]))
                 * pathname=    (?:\/(?:[a-z0-9\-\._~\!\$\&\'\(\)\*\+\,\;\=\:\@]|%[0-9a-f]{2,2})*)*
                 * query=            (?:\?(?:[a-z0-9\-\._~\!\$\&\'\(\)\*\+\,\;\=\:\@\/\?]|%[0-9a-f]{2,2})*)?
                 * anchor=        (?:\#(?:[a-z0-9\-\._~\!\$\&\'\(\)\*\+\,\;\=\:\@\/\?]|%[0-9a-f]{2,2})*)?
                var regExp = /^(?:https?|ftp)\:\/\/(?:(?:[a-z0-9\-\._~\!\$\&\'\(\)\*\+\,\;\=:]|%[0-9a-f]{2,2})*\@)?(?: ((?:(?:[a-z0-9][a-z0-9\-]*[a-z0-9]|[a-z0-9])\.)*(?:[a-z][a-z0-9\-]*[a-z0-9]|[a-z])|(?:\[[^ \]]*\]))(?:\:[0-9]*)?)(?:\/(?:[a-z0-9\-\._~\!\$\&\'\(\)\*\+\,\;\=\:\@]|%[0-9a-f]{2,2})*)*( ?:\?(?:[a-z0-9\-\._~\!\$\&\'\(\)\*\+\,\;\=\:\@\/\?]|%[0-9a-f]{2,2})*)?(?:\#(?:[a-z0-9\-\._ ~\!\$\&\'\(\)\*\+\,\;\=\:\@\/\?]|%[0-9a-f]{2,2})*)?$/i;
                var valid = value.match(regExp);
                if (valid) {
                    //extract the  address from URL
                    var address = valid[1];
                    if (address) {
                        if (address == '[]') {
                            return false;
                        if (address.charAt(0) == '[' ) {
                            //IPv6 address or IPv4 enclosed in square brackets
                            address = address.replace(/^\[|\]$/gi, '');
                            return Spry.Widget.ValidationTextField.validateIP(address, 'ipv6_ipv4');
                        } else {
                            if (/[^0-9\.]/.test(address)) {
                                return true;
                            } else {
                                //check if hostname is all digits and dots and then check for IPv4
                                return Spry.Widget.ValidationTextField.validateIP(address, 'ipv4');
                    } else {
                        return true;
                } else {
                    return false;
    2.2.1. Preferred
    x:x:x:x:x:x:x:x, where the 'x's are the hexadecimal values of the eight 16-bit pieces of the address.
    Examples:
        FEDC:BA98:7654:3210:FEDC:BA98:7654:3210
        1080:0:0:0:8:800:200C:417A
    Note that it is not necessary to write the leading zeros in an
    individual field, but there must be at least one numeral in every
    field (except for the case described in 2.2.2.).
    2.2.2. Compressed
    The use of "::" indicates multiple groups of 16-bits of zeros.
    The "::" can only appear once in an address.  The "::" can also be
    used to compress the leading and/or trailing zeros in an address.
        1080:0:0:0:8:800:200C:417A --> 1080::8:800:200C:417A
        FF01:0:0:0:0:0:0:101 --> FF01::101
        0:0:0:0:0:0:0:1 --> ::1
        0:0:0:0:0:0:0:0 --> ::
    2.5.4 IPv6 Addresses with Embedded IPv4 Addresses
        IPv4-compatible IPv6 address (tunnel IPv6 packets over IPv4 routing infrastructures)
        ::0:129.144.52.38
        IPv4-mapped IPv6 address (represent the addresses of IPv4-only nodes as IPv6 addresses)
        ::ffff:129.144.52.38
    The text representation of IPv6 addresses and prefixes in Augmented BNF (Backus-Naur Form) [ABNF] for reference purposes.
    [ABNF http://tools.ietf.org/html/rfc2234]
          IPv6address = hexpart [ ":" IPv4address ]
          IPv4address = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT
          IPv6prefix  = hexpart "/" 1*2DIGIT
          hexpart = hexseq | hexseq "::" [ hexseq ] | "::" [ hexseq ]
          hexseq  = hex4 *( ":" hex4)
          hex4    = 1*4HEXDIG
    Spry.Widget.ValidationTextField.validateIP = function (value, format)
        var validIPv6Addresses = [
            //preferred
            /^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}(?:\/\d{1,3})?$/i,
            //various compressed
            /^[a-f0-9]{0,4}::(?:\/\d{1,3})?$/i,
            /^:(?::[a-f0-9]{1,4}){1,6}(?:\/\d{1,3})?$/i,
            /^(?:[a-f0-9]{1,4}:){1,6}:(?:\/\d{1,3})?$/i,
            /^(?:[a-f0-9]{1,4}:)(?::[a-f0-9]{1,4}){1,6}(?:\/\d{1,3})?$/i,
            /^(?:[a-f0-9]{1,4}:){2}(?::[a-f0-9]{1,4}){1,5}(?:\/\d{1,3})?$/i,
            /^(?:[a-f0-9]{1,4}:){3}(?::[a-f0-9]{1,4}){1,4}(?:\/\d{1,3})?$/i,
            /^(?:[a-f0-9]{1,4}:){4}(?::[a-f0-9]{1,4}){1,3}(?:\/\d{1,3})?$/i,
            /^(?:[a-f0-9]{1,4}:){5}(?::[a-f0-9]{1,4}){1,2}(?:\/\d{1,3})?$/i,
            /^(?:[a-f0-9]{1,4}:){6}(?::[a-f0-9]{1,4})(?:\/\d{1,3})?$/i,
            //IPv6 mixes with IPv4
            /^(?:[a-f0-9]{1,4}:){6}(?:\d{1,3}\.){3}\d{1,3}(?:\/\d{1,3})?$/i,
            /^:(?::[a-f0-9]{1,4}){0,4}:(?:\d{1,3}\.){3}\d{1,3}(?:\/\d{1,3})?$/i,
            /^(?:[a-f0-9]{1,4}:){1,5}:(?:\d{1,3}\.){3}\d{1,3}(?:\/\d{1,3})?$/i,
            /^(?:[a-f0-9]{1,4}:)(?::[a-f0-9]{1,4}){1,4}:(?:\d{1,3}\.){3}\d{1,3}(?:\/\d{1,3})?$/i,
            /^(?:[a-f0-9]{1,4}:){2}(?::[a-f0-9]{1,4}){1,3}:(?:\d{1,3}\.){3}\d{1,3}(?:\/\d{1,3})?$/i,    
            /^(?:[a-f0-9]{1,4}:){3}(?::[a-f0-9]{1,4}){1,2}:(?:\d{1,3}\.){3}\d{1,3}(?:\/\d{1,3})?$/i,
            /^(?:[a-f0-9]{1,4}:){4}(?::[a-f0-9]{1,4}):(?:\d{1,3}\.){3}\d{1,3}(?:\/\d{1,3})?$/i
        var validIPv4Addresses = [
            //IPv4
            /^(\d{1,3}\.){3}\d{1,3}$/i
        var validAddresses = [];
        if (format == 'ipv6' || format == 'ipv6_ipv4') {
            validAddresses = validAddresses.concat(validIPv6Addresses);
        if (format == 'ipv4' || format == 'ipv6_ipv4') {
            validAddresses = validAddresses.concat(validIPv4Addresses);
        var ret = false;
        for (var i=0; i<validAddresses.length; i++) {
            if (validAddresses[i].test(value)) {
                ret = true;
                break;
        if (ret && value.indexOf(".") != -1) {
            //if address contains IPv4 fragment, it must be valid; all 4 groups must be less than 256
            var ipv4 = value.match(/:?(?:\d{1,3}\.){3}\d{1,3}/i);
            if(!ipv4) {
                return false;
            ipv4 = ipv4[0].replace(/^:/, '');
            var pieces = ipv4.split('.');
            if (pieces.length != 4) {
                return false;
            var regExp = /^[\-\+]?\d*$/;
            for (var i=0; i< pieces.length; i++) {
                if (pieces[i] == '') {
                    return false;
                var piece = parseInt(pieces[i], 10);
                if (isNaN(piece) || piece > 255 || !regExp.test(pieces[i]) || pieces[i].length>3 || /^0{2,3}$/.test(pieces[i])) {
                    return false;
        if (ret && value.indexOf("/") != -1) {
            // if prefix-length is specified must be in [1-128]
            var prefLen = value.match(/\/\d{1,3}$/);
            if (!prefLen) return false;
            var prefLenVal = parseInt(prefLen[0].replace(/^\//,''), 10);
            if (isNaN(prefLenVal) || prefLenVal > 128 || prefLenVal < 1) {
                return false;
        return ret;
    Spry.Widget.ValidationTextField.onloadDidFire = false;
    Spry.Widget.ValidationTextField.loadQueue = [];
    Spry.Widget.ValidationTextField.prototype.isBrowserSupported = function()
        return Spry.is.ie && Spry.is.v >= 5 && Spry.is.windows
            ||
        Spry.is.mozilla && Spry.is.v >= 1.4
            ||
        Spry.is.safari
            ||
        Spry.is.opera && Spry.is.v >= 9;
    Spry.Widget.ValidationTextField.prototype.init = function(element, options)
        this.element = this.getElement(element);
        this.errors = 0;
        this.flags = {locked: false, restoreSelection: true};
        this.options = {};
        this.event_handlers = [];
        this.validClass = "textfieldValidState";
        this.focusClass = "textfieldFocusState";
        this.requiredClass = "textfieldRequiredState";
        this.hintClass = "textfieldHintState";
        this.invalidFormatClass = "textfieldInvalidFormatState";
        this.invalidRangeMinClass = "textfieldMinValueState";
        this.invalidRangeMaxClass = "textfieldMaxValueState";
        this.invalidCharsMinClass = "textfieldMinCharsState";
        this.invalidCharsMaxClass = "textfieldMaxCharsState";
        this.textfieldFlashTextClass = "textfieldFlashText";
        if (Spry.is.safari) {
            this.flags.lastKeyPressedTimeStamp = 0;
        switch (this.type) {
            case 'phone_number':options.format = Spry.Widget.Utils.firstValid(options.format, 'phone_us');break;
            case 'currency':options.format = Spry.Widget.Utils.firstValid(options.format, 'comma_dot');break;
            case 'zip_code':options.format = Spry.Widget.Utils.firstValid(options.format, 'zip_us5');break;
            case 'date':
                options.format = Spry.Widget.Utils.firstValid(options.format, 'mm/dd/yy');
                break;
            case 'time':
                options.format = Spry.Widget.Utils.firstValid(options.format, 'HH:mm');
                options.pattern = options.format.replace(/[hms]/gi, "0").replace(/TT/gi, 'AM').replace(/T/gi, 'A');
                break;
            case 'ip':
                options.format = Spry.Widget.Utils.firstValid(options.format, 'ipv4');
                options.characterMasking = Spry.Widget.ValidationTextField.ValidationDescriptors[this.type].characterMaskingFormats[ options.format];
                break;
        //retrieve the validation type descriptor to be used with this instance (base on type and format)
        //widgets may have different validations depending on format (like zip_code with formats)
        var validationDescriptor = {};
        if (options.format && Spry.Widget.ValidationTextField.ValidationDescriptors[this.type].formats) {
            if (Spry.Widget.ValidationTextField.ValidationDescriptors[this.type].formats[options.format] ) {
                Spry.Widget.Utils.setOptions(validationDescriptor, Spry.Widget.ValidationTextField.ValidationDescriptors[this.type].formats[options.format]) ;
        } else {
            Spry.Widget.Utils.setOptions(validationDescriptor, Spry.Widget.ValidationTextField.ValidationDescriptors[this.type]);
        //set default values for some parameters which were not aspecified
        options.useCharacterMasking = Spry.Widget.Utils.firstValid(options.useCharacterMasking, false);
        options.hint = Spry.Widget.Utils.firstValid(options.hint, '');
        options.isRequired = Spry.Widget.Utils.firstValid(options.isRequired, true);
        options.additionalError = Spry.Widget.Utils.firstValid(options.additionalError, false);
        if (options.additionalError)
            options.additionalError = this.getElement(options.additionalError);
        //set widget validation parameters
        //get values from validation type descriptor
        //use the user specified values, if defined
        options.characterMasking = Spry.Widget.Utils.firstValid(options.characterMasking, validationDescriptor.characterMasking);
        options.regExpFilter = Spry.Widget.Utils.firstValid(options.regExpFilter, validationDescriptor.regExpFilter);
        options.pattern = Spry.Widget.Utils.firstValid(options.pattern, validationDescriptor.pattern);
        options.validation = Spry.Widget.Utils.firstValid(options.validation, validationDescriptor.validation);
        if (typeof options.validation == 'string') {
            options.validation = eval(options.validation);
        options.minValue = Spry.Widget.Utils.firstValid(options.minValue, validationDescriptor.minValue);
        options.maxValue = Spry.Widget.Utils.firstValid(options.maxValue, validationDescriptor.maxValue);
        options.minChars = Spry.Widget.Utils.firstValid(options.minChars, validationDescriptor.minChars);
        options.maxChars = Spry.Widget.Utils.firstValid(options.maxChars, validationDescriptor.maxChars);
        Spry.Widget.Utils.setOptions(this, options);
        Spry.Widget.Utils.setOptions(this.options, options);
    Spry.Widget.ValidationTextField.prototype.destroy = function() {
        if (this.event_handlers)
            for (var i=0; i<this.event_handlers.length; i++) {
                Spry.Widget.Utils.removeEventListener(this.event_handlers[i][0], this.event_handlers[i][1], this.event_handlers[i][2], false);
        try { delete this.element; } catch(err) {}
        try { delete this.input; } catch(err) {}
        try { delete this.form; } catch(err) {}
        try { delete this.event_handlers; } catch(err) {}
        try { this.selection.destroy(); } catch(err) {}
        try { delete this.selection; } catch(err) {}
        var q = Spry.Widget.Form.onSubmitWidgetQueue;
        var qlen = q.length;
        for (var i = 0; i < qlen; i++) {
            if (q[i] == this) {
                q.splice(i, 1);
                break;
    Spry.Widget.ValidationTextField.prototype.attachBehaviors = function()
        if (this.element) {
            if (this.element.nodeName == "INPUT") {
                this.input = this.element;
            } else {
                this.input = Spry.Widget.Utils.getFirstChildWithNodeNameAtAnyLevel(this.element, "INPUT");
        if (this.input) {
            if (this.maxChars) {
                this.input.removeAttribute("maxLength");
            this.putHint();
            this.compilePattern();
            if (this.type == 'date') {
                this.compileDatePattern();
            this.input.setAttribute("AutoComplete", "off");
            this.selection = new Spry.Widget.SelectionDescriptor(this.input);
            this.oldValue = this.input.value;
            var self = this;
            this.event_handlers = [];
            this.event_handlers.push([this.input, "keydown", function(e) { if (self.isDisabled()) return true; return self.onKeyDown(e || event); }]);
            this.event_handlers.push([this.input, "keypress", function(e) { if (self.isDisabled()) return true; return self.onKeyPress(e || event); }]);
            if (Spry.is.opera) {
                this.event_handlers.push([this.input, "keyup", function(e) { if (self.isDisabled()) return true; return self.onKeyUp(e || event); }]);
            this.event_handlers.push([this.input, "focus", function(e) { if (self.isDisabled()) return true; return self.onFocus(e || event); }]);
            this.event_handlers.push([this.input, "blur", function(e) { if (self.isDisabled()) return true; return self.onBlur(e || event); }]);
            this.event_handlers.push([this.input, "mousedown", function(e) { if (self.isDisabled()) return true; return self.onMouseDown(e || event); }]);
            var changeEvent =
                Spry.is.mozilla || Spry.is.opera || Spry.is.safari?"input":
                Spry.is.ie?"propertychange":
                "change";
            this.event_handlers.push([this.input, changeEvent, function(e) { if (self.isDisabled()) return true; return self.onChange(e || event); }]);
            if (Spry.is.mozilla || Spry.is.safari) {
                //oninput event on mozilla does not fire ondragdrop
                this.event_handlers.push([this.input, "dragdrop", function(e) { if (self.isDisabled()) return true; self.removeHint();return self.onChange(e || event); }]);
            } else if (Spry.is.ie){
                //ondrop&onpropertychange crash on IE
                this.event_handlers.push([this.input, "drop", function(e) { if (self.isDisabled()) return true; return self.onDrop(e || event); }]);
            for (var i=0; i<this.event_handlers.length; i++) {
                Spry.Widget.Utils.addEventListener(this.event_handlers[i][0], this.event_handlers[i][1], this.event_handlers[i][2], false);
            // submit
            this.form = Spry.Widget.Utils.getFirstParentWithNodeName(this.input, "FORM");
            if (this.form) {
                // if no "onSubmit" handler has been attached to the current form, attach one
                if (!this.form.attachedSubmitHandler && !this.form.onsubmit) {
                    this.form.onsubmit = function(e) { e = e || event; return Spry.Widget.Form.onSubmit(e, e.srcElement || e.currentTarget) };
                    this.form.attachedSubmitHandler = true;                
                if (!this.form.attachedResetHandler) {
                    Spry.Widget.Utils.addEventListener(this.form, "reset", function(e) { e = e || event; return Spry.Widget.Form.onReset(e, e.srcElement || e.currentTarget) }, false);
                    this.form.attachedResetHandler = true;                
                // add the currrent widget to the "onSubmit" check queue;
                Spry.Widget.Form.onSubmitWidgetQueue.push(this);
    Spry.Widget.ValidationTextField.prototype.isDisabled = function() {
        return this.input && (this.input.disabled || this.input.readOnly) || !this.input;
    Spry.Widget.ValidationTextField.prototype.getElement = function(ele)
        if (ele && typeof ele == "string")
            return document.getElementById(ele);
        return ele;
    Spry.Widget.ValidationTextField.addLoadListener = function(handler)
        if (typeof window.addEventListener != 'undefined')
            window.addEventListener('load', handler, false);
        else if (typeof document.addEventListener != 'undefined')
            document.addEventListener('load', handler, false);
        else if (typeof window.attachEvent != 'undefined')
            window.attachEvent('onload', handler);
    Spry.Widget.ValidationTextField.processLoadQueue = function(handler)
        Spry.Widget.ValidationTextField.onloadDidFire = true;
        var q = Spry.Widget.ValidationTextField.loadQueue;
        var qlen = q.length;
        for (var i = 0; i < qlen; i++)
            q[i].attachBehaviors();
    Spry.Widget.ValidationTextField.addLoadListener(Spry.Widget.ValidationTextField.processLoa dQueue);
    Spry.Widget.ValidationTextField.addLoadListener(function(){
        Spry.Widget.Utils.addEventListener(window, "unload", Spry.Widget.Form.destroyAll, false);
    Spry.Widget.ValidationTextField.prototype.setValue = function(newValue) {
        this.flags.locked = true;
        this.input.value = newValue;
        this.flags.locked = false;
        this.oldValue = newValue;
        if (!Spry.is.ie) {
            this.onChange();
    * save the state of the input (selection and value) so we can revert to it
    * should call this just before modifying the input value
    Spry.Widget.ValidationTextField.prototype.saveState = function()
        this.oldValue = this.input.value;
        this.selection.update();
    Spry.Widget.ValidationTextField.prototype.revertState = function(revertValue)
        if (revertValue != this.input.value) {
            this.input.readOnly = true;
            this.input.value = revertValue;
            this.input.readOnly = false;
            if (Spry.is.safari && this.flags.active) {
                this.input.focus();
      if (this.flags.restoreSelection) {
        this.selection.moveTo(this.selection.start, this.selection.end);
        this.redTextFlash();
    Spry.Widget.ValidationTextField.prototype.removeHint = function()
        if (this.flags.hintOn) {
            this.input.value = "";
            this.flags.hintOn = false;
            this.removeClassName(this.element, this.hintClass);
            this.removeClassName(this.additionalError, this.hintClass);
    Spry.Widget.ValidationTextField.prototype.putHint = function()
        if(this.hint && this.input && this.input.type == "text" && this.input.value == "") {
            this.flags.hintOn = true;
            this.input.value = this.hint;
            this.addClassName(this.element, this.hintClass);
            this.addClassName(this.additionalError, this.hintClass);
    Spry.Widget.ValidationTextField.prototype.redTextFlash = function()
        var self = this;
        this.addClassName(this.element, this.textfieldFlashTextClass);
        setTimeout(function() {
            self.removeClassName(self.element, self.textfieldFlashTextClass)
        }, 100);
    Spry.Widget.ValidationTextField.prototype.doValidations = function(testValue, revertValue)
        if (this.isDisabled()) return false;
        if (this.flags.locked) {
            return false;
        if (testValue.length == 0 && !this.isRequired) {
            this.errors = 0;
            return false;
        this.flags.locked = true;
        var mustRevert = false;
        var continueValidations = true;
        if (!this.options.isRequired && testValue.length == 0) {
            continueValidations = false;
        var errors = 0;
        var fixedValue = testValue;
        //characterMasking - test if all characters are valid with the characterMasking (keyboard filter)
        if (this.useCharacterMasking && this.characterMasking) {
            for(var i=0; i<testValue.length; i++) {
                if (!this.characterMasking.test(testValue.charAt(i))) {
                    errors = errors | Spry.Widget.ValidationTextField.ERROR_FORMAT;
                    fixedValue = revertValue;
                    mustRevert = true;
                    break;
        //regExpFilter - character mask positioning (additional mask to restrict some characters only in some position)
        if (!mustRevert && this.useCharacterMasking && this.regExpFilter) {
            if (!this.regExpFilter.test(fixedValue)) {
                errors = errors | Spry.Widget.ValidationTextField.ERROR_FORMAT;
                mustRevert = true;
        //pattern - testValue matches the pattern so far
        if (!mustRevert && this.pattern) {
            var currentRegExp = this.patternToRegExp(testValue.length);
            if (!currentRegExp.test(testValue)) {
                errors = errors | Spry.Widget.ValidationTextField.ERROR_FORMAT;
                mustRevert = true;
            } else if (this.patternLength != testValue.length) {
                //testValue matches pattern so far, but it's not ok if it does not have the proper length
                //do not revert, but should show the error
                errors = errors | Spry.Widget.ValidationTextField.ERROR_FORMAT;
        if (fixedValue == '') {
            errors = errors | Spry.Widget.ValidationTextField.ERROR_REQUIRED;
        if (!mustRevert && this.pattern && this.useCharacterMasking) {
            var n = this.getAutoComplete(testValue.length);
            if (n) {
                fixedValue += n;
        if(!mustRevert && this.minChars !== null  && continueValidations) {
            if (testValue.length < this.minChars) {
                errors = errors | Spry.Widget.ValidationTextField.ERROR_CHARS_MIN;
                continueValidations = false;
        if(!mustRevert && this.maxChars !== null && continueValidations) {
            if (testValue.length > this.maxChars) {
                errors = errors | Spry.Widget.ValidationTextField.ERROR_CHARS_MAX;
                continueValidations = false;
        //validation - testValue passes widget validation function
        if (!mustRevert && this.validation && continueValidations) {
            var value = this.validation(fixedValue, this.options);
            if (false === value) {
                errors = errors | Spry.Widget.ValidationTextField.ERROR_FORMAT;
                continueValidations = false;
            } else {
                this.typedValue = value;
        if(!mustRevert && this.validation && this.minValue !== null && continueValidations) {
            var minValue = this.validation(this.minValue.toString(), this.options);
            if (minValue !== false) {
                if (this.typedValue < minValue) {
                    errors = errors | Spry.Widget.ValidationTextField.ERROR_RANGE_MIN;
                    continueValidations = false;
        if(!mustRevert && this.validation && this.maxValue !== null && continueValidations) {
            var maxValue = this.validation(this.maxValue.toString(), this.options);
            if (maxValue !== false) {
                if( this.typedValue > maxValue) {
                    errors = errors | Spry.Widget.ValidationTextField.ERROR_RANGE_MAX;
                    continueValidations = false;
        //an invalid value was tested; must make sure it does not get inside the input
        if (this.useCharacterMasking && mustRevert) {
            this.revertState(revertValue);
        this.errors = errors;
        this.fixedValue = fixedValue;
        this.flags.locked = false;
        return mustRevert;
    Spry.Widget.ValidationTextField.prototype.onChange = function(e)
        if (Spry.is.opera && this.flags.operaRevertOnKeyUp) {
            return true;
        if (Spry.is.ie && e && e.propertyName != 'value') {
            return true;

Maybe you are looking for