We help IT Professionals succeed at work.

ASP redirection

Asker
Asker asked
on
Medium Priority
269 Views
Last Modified: 2013-12-25
I have a page containing three frames.  One of them uses the ASP command Response.redirect("anotherpage.hml"). However this causes the new page to appear in that frame , where as I want anotherpage.html to appear at the top level (ie replace all the frames). How is this done??
Comment
Watch Question

Commented:
you can't do that using ASP only, you'' have to use Javascript for that.

Response.write "<script>window.location.href='anotherpage.html'</script>"




Author

Commented:
Didnt actually work but put me on the right track.  Solution above caused anotherpage.html to appear in the frame.  The way to do it is to use:
Response.write "<script>top.location='anotherpage.html'</script>"

Commented:
So what do you do with the question....delete it ? give me some points for putting you on the right track ?

Author

Commented:
Sorry, how can I do that?The page is giving me the option of grading etc.....

Author

Commented:
Ooops, I meant the page isnt giving me the option of grading etc...

Author

Commented:
You dont seem to have locked the question....
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
IF you include in the form tag ' target="_top" ' during the redirect you will blow away your frameset and have anotherpage.html at the top. I can send sample code if you would like. james@digitalfoundry.com

Author

Commented:
Thanks for the offer, but other solution was satisfactory.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.