Solved

Button to load page in frame

Posted on 2001-06-19
6
216 Views
Last Modified: 2010-04-09
hi,

does anyone knows how to open a new frame in the same browser on click of a button. i could use the target="_top" for a href link to achieve this but, problem is..this is a button. How can i achieve the same result?

pls advise.

thanks.
0
Comment
Question by:osiruz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 19

Expert Comment

by:DreamMaster
ID: 6206017
just do this:

<input type=button name="somebutton" onClick="document.location.href='thepageyouwanttolinkto.html'">

Cheers,
Max.
0
 

Author Comment

by:osiruz
ID: 6206035
hi..
thanks for the reply..
but i forgot to mention that..this page where the button sits is in a child frame. i need to load the new page in the top most frame of the browser window.
Is the method still applicable to this scenario?

0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 6206042
In that case use: top.location.href='yourpage.html' as far as I remember that is the right syntax....but there are several other possibilities...

Cheers,
Max.
0
Technology Partners: 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!

 
LVL 19

Accepted Solution

by:
DreamMaster earned 50 total points
ID: 6206154
Did that work for you osiruz?

Max.
0
 

Author Comment

by:osiruz
ID: 6208889
thanks.it works!
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 6209416
Glad I was helpfull...thanks for the grade A..:-)

Cheers,
Max.
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Find out what you should include to make the best professional email signature for your organization.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question