Solved

Open a link in IFRAME

Posted on 2006-11-29
15
222 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
Comment Utility
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
Comment Utility
==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
Comment Utility
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
 
LVL 19

Expert Comment

by:DreamMaster
Comment Utility
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
Comment Utility
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
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 2

Expert Comment

by:score_under
Comment Utility
<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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
it means there is no way?
0
 
LVL 19

Expert Comment

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

Expert Comment

by:DreamMaster
Comment Utility
Thanks Computer101

Regards,
Max.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
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 …
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

743 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

18 Experts available now in Live!

Get 1:1 Help Now