Solved

Open a link in IFRAME

Posted on 2006-11-29
15
247 Views
Last Modified: 2007-01-25
i want to open a link in iframe in such a way that page display the information from the middle of the page. Mean a specific portion of a website.
0
Comment
Question by:pak_slm
15 Comments
 
LVL 19

Expert Comment

by:DreamMaster
ID: 18043859
Hi pak_slm,

I'm not really sure I understand your question, but to open a page in the iframe you need to set the target of your link to the name of your iframe.

The iFrame will have no layout of its own (by default) so you can alter a page to show it in any way you like...unless its an external page you have no control over.

Regards,
Max.
0
 
LVL 10

Expert Comment

by:ADSLMark
ID: 18044104
==test.html==
<html>
<head></head>
<body>
<a href="frame.html#top" target="iName">Open page (top)</a><br/>
<a href="frame.html#middle" target="iName">Open page (middle)</a><br/>
<a href="frame.html#bottom" target="iName">Open page (bottom)</a><br/>
<iframe name="iName" />
</body>
</html>

==frame.html==
<html>
<head></head>
<body>
<a name="top">Top</a>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<a name="middle">Middle</a>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<a name="bottom">Bottom</a>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
</body>
</html>

Like this?

Mark
0
 
LVL 1

Author Comment

by:pak_slm
ID: 18066489
actually i want to display a specific area of a website. i.e.

there are some 3 rows and 4 column in the middle of the page, i want to display that are in an ifram width=200 and height=200
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 19

Expert Comment

by:DreamMaster
ID: 18067651
pak_slm,

Well, if the content fits that size you will have absolutely no problem, however if the columns or rows exceed your width and height, you will need scrollbars.

Regards,
Max.
0
 
LVL 1

Author Comment

by:pak_slm
ID: 18074564
the page is full with information, the problem is i want to display a particular area from that page.
for example a stock exchange display rates of different companies on website. I want to display only rate portion from that page.

0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 18075157
pak_slm,

In that case in that page place an anchor and link to that anchor, make sure you set scrolling to no for the iframe and the scrollbars to off. you could then make sure only that content which you need is displayed inside the iframe, make take some moving though.

Regards,
Max.
0
 
LVL 2

Expert Comment

by:score_under
ID: 18080458
<A href="THE LINK ADDRESS GOES HERE" target="ifr"> TESTING</a>
<iframe src="about:blank" width=200 height=200 name=ifr id=ifr></iframe>
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 18083488
score_under,

pak_slm wants to link to a specific place inside the document that is loaded within the iFrame, hence my suggestion for using an anchor.

Regards,
Max.
0
 
LVL 1

Author Comment

by:pak_slm
ID: 18092072
but i want to view website which is not in my control.

i.e. from http://www.kse.com.pk/ i want to display only Market HeighLights area in my page in an iframe.
0
 
LVL 19

Accepted Solution

by:
DreamMaster earned 50 total points
ID: 18095196
You're simply out of luck there...unless they have been so kind to provide you with an anchor in exactly the spot you need...but somehow I highly doubt that...

Regards,

Max.
0
 
LVL 1

Author Comment

by:pak_slm
ID: 18164165
it means there is no way?
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 18166566
No, because you don't control the page you are linking to...
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 18402560
Thanks Computer101

Regards,
Max.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
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…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

856 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