PDA

View Full Version : window.open() not working as expected


t_ravichandu
04-16-2004, 08:38 AM
hi,
lemme explain in detail
in my webapplication with a username only one can login at a time. so when a user logs in i insert that userid in backend so that when any one tries to login with the same name i can giv a msg sayin some one else has logged in with that userid. when the user logsout(clicks on logout link or closes the page) i'l remove the entry from backend. When the user clicks on logout link every thing works fine. But when he closes the window it's giving unexpected things. when the user closes the window i'm writing javascript for onUnload. In that i'm writing the following code
window.open('logout.jsp', '_blank');
this works well when the user closes the window after the first login but this is not working when the user relogins by using the relogin link(which i'm providing after the logout). The jsp which i'm opening is giving a msg saying login success but the row in backend table remains same and i found an enigmatic thing that the code in scriptlet is not working except the out.print.:confused:
pls help me
chandu

t_ravichandu
04-16-2004, 08:51 AM
some one pls help

agent002
04-16-2004, 09:16 AM
Asking somebody to please help, 13 minutes after posting is way too early. You shouldn't need to bump your thread before three-four days after posting it, if nobody still has replied to it.

Hmm, what if you tried
window.open('logout.jsp', '');
instead of opening it to _blank?

t_ravichandu
04-16-2004, 09:23 AM
hi justin,
i didn't get what u r asking in your reply
chandu

eRad
04-16-2004, 09:25 AM
t_ravichandu, Why did you call him Justin?

agent, Why did you post the exact code he shows in his original post?

:confused:

agent002
04-16-2004, 09:29 AM
whoopsiee :o
post edited :)

He probably calls me Justin because he knows me as Justin Case... ravichandu, are you possibly a member of a forum where my username is Justin Case?

t_ravichandu
04-16-2004, 09:36 AM
yap, i know you as justin case
u said that when i aske abt y u choose the name agent002 not agent007,hope u remember this.

agent002
04-16-2004, 09:37 AM
true, I remember that. But does my suggestion work?

t_ravichandu
04-16-2004, 09:45 AM
yap,it worked, this post is also regarding that suggestion
chandu