Current time: 04-24-2014, 04:44 PM Hello There, Guest! (LoginRegister)


Post Reply 
Need to run a script when user logs in
06-08-2008, 04:44 PM (This post was last modified: 06-08-2008 04:51 PM by dastaten.)
Post: #1
Need to run a script when user logs in
I need this script to run only once at the time of login. Can someone tell me how to do this?

<script type="text/javascript">
if (confirm("Sign in to Instant Messenger?") )
{
newwindow=window.open('php121/php121im.php','name','height=500,width=240,left=20,top=20,toolbar=no,menubar=no,​directori es=no,location=no,scrollbars=yes,status=no,resizable=yes,fullscreen=no'); if (window.focus) {newwindow.focus()};
}
</script>



Thanks!
DAStaten

http://iTalkStephenville.com
Find all posts by this user
Quote this message in a reply
06-09-2008, 04:44 AM
Post: #2
RE: Need to run a script when user logs in
Anybody? I just need that script to run when a user first logs on. I just don't know where to put it so that it will only run that one time. Any help is greatly appreciated.

Thanks.

http://iTalkStephenville.com
Find all posts by this user
Quote this message in a reply
06-09-2008, 05:08 AM
Post: #3
RE: Need to run a script when user logs in
It's very odd to get it to run automatically.

I'd suggest sticking a link next to the Buddy List or something, to open the page.


Your request is a little tricky.
Visit this user's website Find all posts by this user
Quote this message in a reply
06-09-2008, 05:14 AM
Post: #4
RE: Need to run a script when user logs in
Yeah, I know hehe. I already have the link next to the buddy list. But I'm afraid people won't realize that logging into the forum isn't enough to be able to be contacted by IM. You have to sign into IM as well as the board for people to be able to contact you. Otherwise, the board shows you online but IM doesn't. So I want to be able to give people the option to log onto IM as soon as they lgo onto the board.
Ok, I've given up on the alert box. I just want this window to open when a user first logs in. I know I can't directly open the window with member.php, but is there a workaround? Is there a template that only runs when first logging in? Can member.php call a new template on login where I can place this code? Something like that?

<script type="text/javascript">
window.open('php121/php121im.php','name','height=500,width=240,left=20,top=20,toolbar=no,menubar=no,​directories=no,location=no,scrollbars=yes,status=no,resizable=yes,fullscreen=no'​);
</script>

Thanks in advance.

http://iTalkStephenville.com
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication