Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Button to load page in frame

Posted on 2001-06-19
6
Medium Priority
?
241 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 19

Accepted Solution

by:
DreamMaster earned 200 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

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!

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

636 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