473,804 Members | 3,250 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Navigate from href in Iframe

I have an <a href=url> inside an Iframe.... when I click it, the url is
navigated inside the frame... what do I need to do in order to navigate the
url on the browser window and NOT the iframe??

Thanks ,

Jeronimo
Nov 18 '05 #1
5 3980
You could use Javascript to pass a reference to the outside window to the
inside, and use that reference to navigate the outer window's URL.

- Sahil Malik
You can reach me thru my blog at
http://www.dotnetjunkies.com/weblog/sahilmalik
"Jeronimo Bertran" <je******@bertr an.com> wrote in message
news:Xn******** *************** ********@207.46 .248.16...
I have an <a href=url> inside an Iframe.... when I click it, the url is
navigated inside the frame... what do I need to do in order to navigate the url on the browser window and NOT the iframe??

Thanks ,

Jeronimo

Nov 18 '05 #2
Sahil,

An example of how to retrieve the reference of the outside window and how
to use that reference to navigate would be GREAT...

Thanks...

"Sahil Malik" <co************ *****@nospam.co m> wrote in news:uvXr
$q**********@tk 2msftngp13.phx. gbl:
You could use Javascript to pass a reference to the outside window to the
inside, and use that reference to navigate the outer window's URL.

- Sahil Malik
You can reach me thru my blog at
http://www.dotnetjunkies.com/weblog/sahilmalik
"Jeronimo Bertran" <je******@bertr an.com> wrote in message
news:Xn******** *************** ********@207.46 .248.16...
I have an <a href=url> inside an Iframe.... when I click it, the url is
navigated inside the frame... what do I need to do in order to navigate

the
url on the browser window and NOT the iframe??

Thanks ,

Jeronimo



Nov 18 '05 #3
Typically, I would just use the onclick of the hyperlink as seen below:

<a onclick="parent .document.locat ion='some_url'; " style="cursor:h and;"...

The only problem here is you have to specify the cursor style to display the
hand onmouseover.

"Jeronimo Bertran" wrote:
Sahil,

An example of how to retrieve the reference of the outside window and how
to use that reference to navigate would be GREAT...

Thanks...

"Sahil Malik" <co************ *****@nospam.co m> wrote in news:uvXr
$q**********@tk 2msftngp13.phx. gbl:
You could use Javascript to pass a reference to the outside window to the
inside, and use that reference to navigate the outer window's URL.

- Sahil Malik
You can reach me thru my blog at
http://www.dotnetjunkies.com/weblog/sahilmalik
"Jeronimo Bertran" <je******@bertr an.com> wrote in message
news:Xn******** *************** ********@207.46 .248.16...
I have an <a href=url> inside an Iframe.... when I click it, the url is
navigated inside the frame... what do I need to do in order to navigate

the
url on the browser window and NOT the iframe??

Thanks ,

Jeronimo



Nov 18 '05 #4
Thanks... worked very well.
Nov 18 '05 #5
no script required:

<a href=url target="_top">

-- bruce (sqlwork.com)
"Jeronimo Bertran" <je******@bertr an.com> wrote in message
news:Xn******** *************** ********@207.46 .248.16...
I have an <a href=url> inside an Iframe.... when I click it, the url is
navigated inside the frame... what do I need to do in order to navigate the url on the browser window and NOT the iframe??

Thanks ,

Jeronimo

Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
21634
by: Soren Vejrum | last post by:
I am working on a web-based html editor using MSIE's designmode and iframes. Everything works just fine, but MSIE changes all my relative "a href" and "img src" links (i.e. "/index.asp") to absolute links (i.e. "http://localhost/index.asp") when I set the iframe's innerHTML. This is bad as the links are supposed to be relative. How can I avoid this? Any solutions/suggestions are much appreciated.
4
8559
by: Robert Oschler | last post by:
I have a comparison web page that has several iframes that contain documents from external domain web sites. Some of the web sites are "trusted". If they want to change the top level document location (document.location.href) via Javascript or using "_TOP" as the target for a SUBMIT operation, etc., then I want to allow it. The other web sites I want to block if they try to do that. I would do the blocking in the top level document...
1
4348
by: Christian Radermacher | last post by:
Hi, the following code has the mentioned behaviour: <html> <head> <script type="text/javascript"> function newA() { for (i=0;i<3;i++) { var a = window.frames.document.createElement("a");
2
5007
by: Steve - DND | last post by:
There has to be an answer out there somewhere for this, but I couldn't find it in Google anywhere. I have a page with two IFrames. In IFrame#1 I have a link that looks like so: <a href="javascript:EditDatabase(3);">Edit</a> When this link is clicked it fires the EditDatabase() function which finds IFrame#2 by going up to the parent and getting IFrame#2 from there. It then does IFrame2.Src = "Database.aspx?ID=3"; This part of the...
2
5615
by: June Moore | last post by:
I have a page with an IFRAME. When I tried to dynamically set the location.href of the IFRAME to a URL address, the Internet Explorer browser loads the page onto the IFRAME correctly but a very strange thing usually happens, i.e. the progress bar shows that the page is loading in progress. e.g. <iframe name="test" width="100" height="100"></iframe> ....
5
6407
by: JohnSouth | last post by:
Hi I'm constructing a web page that previews data as it is entered by the user. One of the fields is a link, and the user is entering the url that will go in the href property. I'd like to update the href of the previewed link as the user enters the url text. I.e. dynamically update the href. I can't see how to do this. Is it possible? Assuming IE6.
1
2253
by: John | last post by:
Hi var poster="<html><head..... etc .... </html>"; var animal='dog'; The string contains images and text that changes. Originally I wanted to do something like print "<a href=" + poster + ">Choose Poster of a " + animal + "</a>";
3
8800
by: stephen.cunliffe | last post by:
Hi all, This may sound real strange, but I'm curious what the "official" answer is. In my JS, I want to redirect/navigate to a url... In Mozilla, document.location.href = '{my_url}'; //works in Moz, IE6, IE7, Opera,
1
2284
by: Dudely | last post by:
Not sure if this is the right place to post, but here goes anyway. I pull out "javascript:__doPostBack('ctl01$ContentPlaceHolderMain $Page_SearchResults$Results','LID_2076923')" from an href in an object I'm parsing and set URLaddress to be that string On a whim, I then plug it into obIe.navigate (URLaddress) and miracle of miracles, it actually brought me to the right web page, which I didn't think it would do and have no idea why it...
0
9708
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9588
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10589
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10327
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2999
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.