Outline ·
[ Standard ] ·
Linear+
pure JSP help..., validate time
|
TScanny
|
Mar 4 2006, 07:06 PM, updated 20y ago
|
New Member
|
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
|
Mar 4 2006, 07:11 PM
|
|
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
|
Mar 6 2006, 11:05 AM
|
|
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^^
|
Mar 6 2006, 11:40 AM
|
|
u can always use the server post back code
<% // use substring split the date and check %>
or client side javascript
|
|
|
|
|