Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 pure JSP help..., validate time

views
     
TScanny
post Mar 4 2006, 07:06 PM, updated 20y ago

New Member
*
Junior Member
39 posts

Joined: Jan 2006



i got problem on time validation... i need to set a date for student to take their item. But i would like to validate the date so...the date wont set before the today's date. If they do so...then there will be a pop up message...


I am using dreamweaver...but i just using pure jsp...i dunno how to use servlet, bean, struts...
TheUrbNorm
post Mar 4 2006, 07:11 PM

On my way
****
Senior Member
557 posts

Joined: Apr 2005



if u know java...u can try to convert the time to native long. Then use a normal subtraction function to determine the difference of the time. Upon that, if the pop up meesage u can use javascript to manipulate base on the calculated time difference......
rukawa
post Mar 6 2006, 11:05 AM

::+::KukuKawa::+::
******
Senior Member
1,903 posts

Joined: Jan 2003
From: Wg Maju


As what T.U.N. said, java is essential, since you're using JSP, you can do the calculation by doing java codes in between to get the value. The javascript to compare the resulted value with the current date. If wrong, then you can pop up using javascript.
shinchan^^
post Mar 6 2006, 11:40 AM

K66
*********
All Stars
21,256 posts

Joined: Jan 2003
From: Pekopon


u can always use the server post back code

<%
// use substring split the date and check
%>

or client side javascript


 

Change to:
| Lo-Fi Version
0.0131sec    1.22    5 queries    GZIP Disabled
Time is now: 23rd December 2025 - 11:41 PM