Solved

Button to load page in frame

Posted on 2001-06-19
6
176 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
  • 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now