/    Sign up×
Community /Pin to ProfileBookmark

iFrames – Link won’t jump to frame window

I have an iframe on a page.

The links on the page open fine in the assigned frame (located far down the page) but do not take the user (jump) to the frame. So they may not know that the link has just been opened further down the page. I just want it to go to the top of the iframe.

This is probably very easy but I am not good at working with iframes.

[CODE]
<a href=”thelink.html” target=”framename”>
[/CODE]

[CODE]<div id=”frame”>
<iframe name=”framename” width=”1000″ height=”1000″></iframe>
</div>
[/CODE]

Thanks.

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@donatelloJun 19.2008 — I think you're going to need to use JavaScript.

You want to have two actions on one click.

1.) Open a new page in an iframe <a href="thelink.html" target="framename">

2.) Move to an anchor on the page. <a href="thelink.html/#framename">

Javascript can do this.

I cheated on my page and put a mini menu right above the iFrame to make it obvious. You can see it on my webcam search engine.

Notice that when you navigate through the content, the page inside the iframe has a tab under the navigation link... this could have been a color bar, or an arrow... I just kept it simple.

?

I don't know if that helps.

I've looked for this before myself, and always worked around another way. They say that some Google crawling algorithms do not like links in javascript and this can affect your pagerank. ?

[B]PS-[/B]

While I was searching for this, I found one poor guy's cry for help:

http://www.lincolnnet.net/members/wwwboard/messages/54.html

He posted this back in 1999 and nobody has answered him yet. ?
Copy linkTweet thisAlerts:
@ray326Jun 20.2008 — I'd start with something like:

<a href="#theframe" onclick="setTheIframeSrc()">

...

<a name="theframe">

<iframe></iframe>
×

Success!

Help @Charlotte 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.18,
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,
)...