Solved

Button to load page in frame

Posted on 2001-06-19
6
199 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

786 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