Solved

Open a link in IFRAME

Posted on 2006-11-29
15
254 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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 …
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
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 learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

762 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