Solved

Button to load page in frame

Posted on 2001-06-19
6
188 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it 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 style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

929 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

13 Experts available now in Live!

Get 1:1 Help Now