Link to home
Start Free TrialLog in
Avatar of sharizod
sharizodFlag for Canada

asked on

Refresh a page in a frameset after login (on another form)

I have a site that has a few pages protected by a login.
The site has three frames. The problem I am having is that
after trying to access a link to a page that is protected,
and after logging in, either the framed page gets duplicated
in the "main" frame or it simply displays a duplicate of
the main page (depending on whether  I specify "main" as
the target or _top, _blank).

What I want to be able to do after the user logs in
successfully is to simply dismiss or close the login
form and refresh the main page (calling page).  Does anyone
know a way of doing this?

TIA
Avatar of arbert
arbert

you can only close the browser if you opened it.  So, if you open a child window, you can close that window without the user being prompted.  However, if the user just opened your login page (the parent) and you try and close it, they will be asked if they really want to close it.

This is how you would do it on the client side with javascript:

<script language=javascript>

window.close()

</script>


A better alternative, might be after they login (probably a form post I'm guessing), have the ASP page that handles the login issue a response.redirect to the page that contains all your <frameset> settings.

brett
ASKER CERTIFIED SOLUTION
Avatar of gladxml
gladxml

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi sharizod,

instead of using the window.open method or document.open method of client side scripts, try using the response.redirect method of the response object after user login has ben confirmed.

in this way, you will prevent internet explorer from reusing an already open window or document and instead process a request on the server side to create a new instance of the window.
pls elaborate ur question
Avatar of sharizod

ASKER

I'll get a bit more specific....  Thanks to all who
replied thus far.

I have a 3 frame main page (header, side menu and main
window).  The user clicks on a link to register and
register.asp gets called.  The user is then presented with
a form.  Upon clicking submit, registeruser.asp is called
which validates the user-entered info and then applies
it to a database if there are no errors.  After hitting
submit, it there is a response.redirect statement in
Registeruser.asp that points back to default.htm.  When
that happens, the entire 3 frame page is duplicated in
the "main" frame!  How can I prevent this from happening?

I tried the suggestion that said to try to enter a target
in the submit button (did not work).  I am using vbscript
as the asp language.

TIA,
Shar

Oh Boy!  I think it is time for bed!  The reason I was
having so many problems is because I was doing a
reponse.redirect to my main page (with the frames).  No
wonder it was duplicating the entire main page - frames
and all!!!!!  D'oh!

Gladxml,

Although none of the suggestions in the link you gave me,
helped (never would have due to my snafu) they got me on
the right track, so you get the points.  

Thx to all!

Goodnight,
Shar