/    Sign up×
Community /Pin to ProfileBookmark

Open a page with another page in a frame

Hey

First off, I hope this is the right place to ask this.

I’ve been looking around for a way to open a webpage and open a specific page in a frame in that original page. The page to open in this frame isn’t the ‘default’ page that’s opened when the original page is opened. I have the original page, the page that needs to be opened in the frame and the name of the frame (the target). Is there a way to do this?

Let’s call the original page “thedomain.com/main.html”, the frame in question in that page “bodyframe” , and the page I’d like to open inside the frame “content5.html”.

Using that above example, I’m aware that using
<a href=thedomain.com/content5.html target=bodyframe>
hasn’t got a hope in hell of working as it is since main.html hasn’t been opened in which to find the frame. I just don’t know how to link all three parts together.

Any ideas?

Thanks in advance ?

-Nut

to post a comment
HTML

6 Comments(s)

Copy linkTweet thisAlerts:
@timdAug 15.2009 — Hi Nut

If I understand well; I thing you can solve this problem with an Iframe. An Iframe you can place wherever you want on your page en refer to it as a new target.

For example:

<iframe name="iframechanger" height="600" align="center" width="483" frameborder="0" src="home.html"> iframe </iframe>

You can chose the height and width of the iframe and select the default page that's in it (in this example home.html).

Now if you want to change the page in the iframe you do te same as always, but with the iframe as target:

<a href=thedomain.com/content5.html target=iframechanger>

I hope this will help you further.

Greetings,

timd

(sorry for spellingmistakes; english is not my native language)
Copy linkTweet thisAlerts:
@swnutauthorAug 15.2009 — Just so I'm clear about it, I'm looking to open an [U]external[/U] webpage using a hyperlink and in that external webpage's frame I'd like to have a page displayed - one that you can normally open when using that external page but will take a few extra clicks. I'd like to have a hyperlink on [U]my[/U] page that provides a shortcut to that webpage with the specific page in the frame already.

I'm not sure an iframe will solve it, though I am of course open to persuasion.

Thank you very much for posting, timd! It's much appreciated.
Copy linkTweet thisAlerts:
@timdAug 16.2009 — Sorry for the misunderstanding. I don't directly know a solution for this, but will think about it. Good luck!
Copy linkTweet thisAlerts:
@tracknutAug 16.2009 — Presumably you have a page with your frameset described, that has your "normal" layout of frames in it? Just copy that page over, and replace the normal referenced file for that particular frame with this new external referenced file. Seems to me that's all you need, but then I haven't done frames since the last millennium...

Dave
Copy linkTweet thisAlerts:
@donatelloAug 17.2009 — There is a resource page I happen to be building at this minute... please, no flames as it is under construction as we speak... still two pages to go... maybe tonight...

Anyway, see here:

http://www.iframeHTML.com/iframe-samples.html#iframe-menu

I've built a bunch of things using iframes over the years, and this little piece of code does what I think you are asking... otherwise poke around on the page, I have a bunch of samples and scripts just for iframes.

How you would do it:

If I properly understand your explanation - you might be able to do this by putting two iframes in one page. The iframe containing your target page could be an 'invisible' iframe, that is no frameborders. The second one, can contain the framed page you choose. This solution would entail three pages. As shown in the demo above, links in your daughter iframe can also control content in the other iframe on the same page.

This gets confusing... but I think this might be useful... ?
Copy linkTweet thisAlerts:
@swnutauthorAug 26.2009 — Sorry for the late reply.

Thanks for that Tracknut and Donatello ? I'll look into those avenues.
×

Success!

Help @swnut spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...