Jump to content

log in, log out and a remember me button


survivor
 Share

Recommended Posts

heey I need a log in form and a log off button but i dont know how to make itI already have a log off button but my site is in two frames and the log off butten just changes the frame its in and it is surposed to change the whole window...the log in form i got some idies from other sites but none off them works in my site because og too many other links and surport files and other things in it...I hope someone in here have the correckt codes

Link to comment
Share on other sites

You need to use a javascript function to change the URL of the other frame at the same time as you send the new request from the main frame. You can refer to the other frame via the window objects frames array. It depends upon how deep you are inside of various frames, but if you just have one frameset and two frames, then its probably something like this parent.frames[0].location="url"In this, parent is the window object that contains the frame you are executing from ( the one that you are submitting the logout request from ), and the frames[0] refers to the first frame in the frameset. I assume that you are currently in the second frame ( which would probably be the case if you have a menu frame and a content frame ). Then, the location property of the object is set to the desired URL, which causes it to automatically load that url. This code should go in an event handler such as a form's onsubmit(). this assumes you are submitting the logout request from a form. Hope this gets you started!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...