| Home • Tips • Tutorials • Forums • Certification Q's • Interview Q's • Jobs • Testimonials • Contact Us | ||
Document Categories:
What's New?
Contribute?Sample SpecsWhat's Hot? |
Simple BSP Application to validate the date fields in Front end using JAVASCRIPTIn
Layout Code:- <script for="sd" event=onchange type="text/javascript"> In
Event-handler – on Initialization. w_sd = sy-datum. In
Type Definition: w_ed TYPE
SY-DATUM w_eedate TYPE CHAR10 w_eIN TYPE
C w_sd TYPE
SY-DATUM w_sin TYPE
C OUTPUT
Whenever
an invalid date is provide this JavaScript will get triggered. Date
here is in DD.MM.YYYY Format. Case 1. Here the
starting day field contains 00.which is invalid.
Once you
press ok the input field color will change to Red.
Once the
valid date is provided it revert back to original color
This above
condition will work for day as well as month values. Case 2. Here if
the total length of month is less than 4 the following error is triggered.
Once you
press ok the input field color will change to Red.
Once the
valid date is provided it revert back to original color
Case 3. If the
starting date field is blank.
Once you
press ok the input field color will change to Red.
Again, as
above once the valid date is provided it revert back to original color. This is all about the date validations that can be done on front-end using Java scripts. |
|
|
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG. Graphic Design by Round the Bend Wizards |
||