Hi !
I can give U some advise, i hope it helps.
The first problem about closing the window can be done including in the body
tag like this:
<body
onUnload="self.location.href='http://www.somewhere.com/servlet/YourServlet?p
aram=1' ">
BUT i don't understand why to use it.
If i am right (please someone correct me if i am not) if U use session
tracking the session
will AUTOMATICALLY be invalidated and all objects related to that session
unbounded when
you CLOSE THE WINDOW.
About te second question i don't know if U can prevent the user about seeing
the html source.
So i advise U not to think about a JavaScript solution.
As i understand your problem is when the user doesn't want to accept
cookies.
There is another way to do the session tracking:
URL rewriting. I don't know much about it either.
I don't know about accepting cookies does your client has diceded not to use
them or
U are thinking about when accepting cookies is disabled in the browser.
I have seen many pages with messages like this:
"Something not working ? Set your browser to accept cokkies. "
Best wishes,
Andras
-----Original Message-----
From: Shashank Phadke <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Sunday, May 16, 1999 7:31 AM
Subject: OFFTOPIC : Javascript question
>Hi --
>
>Sorry for this little offtopic posting .. but I am sure many of us must be
>playing around with Javascript to get my answers :-)
>
>How do I do the following in Javascript, if possible :
>
>1.
>Handle close of window event when the user closes the window. This will be
>useful for many servlet based apps to 'unbound' sessions.
>
>2.
>Can I stop the user from viewing the source code ? Typically this gets
>important when wanting to hide the session id and at the same time CANNOT
>USE COOKIES (end user requirement !!).
>
>In case 2, a potential hacker can make use of the session id to 'generate'
>HTML for his/her own benefit. Lets assume SSL not used !
>
>Anyone having played with this trivial tasks in Javascript ? Any pointers
>would be highly appreciated ..
>
>Thanks
>Shashank
>
>
>_______________________________________________________________
>Get Free Email and Do More On The Web. Visit http://www.msn.com
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html