Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • Last Modified:

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?

1 Solution
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>



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.


Try to check out the link might help...

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.
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Sashi RachabattulaSCRUM Master, .NET Project LeadCommented:
pls elaborate ur question
sharizodAuthor Commented:
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.


sharizodAuthor Commented:
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!


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!


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now