473,413 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

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 3965
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******@bertran.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.com> wrote in news:uvXr
$q**********@tk2msftngp13.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******@bertran.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.location='some_url';" style="cursor:hand;"...

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.com> wrote in news:uvXr
$q**********@tk2msftngp13.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******@bertran.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******@bertran.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
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...
4
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...
1
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
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...
2
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...
5
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...
1
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=" +...
3
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}'; ...
1
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.