Click to See Complete Forum and Search --> : javascript / jsp to get time off client


rory
01-23-2003, 05:53 AM
hello there im underprssure i need to be able to get the time off the client machine not the server. i have javascript that does this but its is difficult to manipulate it with jsp any ideas

khalidali63
01-23-2003, 08:10 AM
Originally posted by rory
its is difficult to manipulate it with jsp any ideas .

As long as nobody know what exactly you mean by manipulation of the date,its almost impossible to do it for you,
in Java there are several classes you can use to manipulate dates.
Look in the packages
java.text
and java.util

Java API has an extensive discussion on date manipulations
The link below should be a best starting point.

http://java.sun.com/j2se/1.4.1/docs/api/java/util/Date.html

cheers

Khalid

rory
01-23-2003, 08:13 AM
sorry in better english i mean how would i pass the year month and date from the javascript to the jsp without using html forms thanks

khalidali63
01-23-2003, 09:18 AM
I don't think that will be possible,since JSP resides and processes on web server and JavaScript is on client side.
The only possible solution I see is using HTTP to forward your data to jsp page and then retrieve values in jsp using Http requests.
You may have to use forms/forms hiden fields

Khalid

rory
01-24-2003, 03:47 PM
Thanks a lot Dave

Rory

rory
01-25-2003, 01:11 PM
I have encountered a problim with the above code.
The page loads, but it keps on reloading. Eventually it crashes the webserver. Is it because it links to itself so keeps reloading? or am i doing something wrong

rory
01-26-2003, 10:28 AM
thanks again its working perfectly appreciate your help thanks again rory