/    Sign up×
Community /Pin to ProfileBookmark

linking to a specific ifame page

I have an iframe set on my home page. There are three links on the home page to open pages in the iframe. They are page 1, page 2, and page 3.

How do I create a link to my home page so that any of the iframe pages I choose (1, 2, or 3) will be displayed in the iframe. (this is different than <iframe src=”page 1″>)

Basically, I want to click on a link to my home page with page 3 displayed in the iframe even if page 1 is set to be the iframe src.

Hope this is clear.

Thanks,

cmotor

to post a comment
HTML

1 Comments(s)

Copy linkTweet thisAlerts:
@phpnoviceJan 23.2005 — If you have server-side code that you can use to accomplish this, then all the better. As a last resort, you can accomplish this with JavaScript. In either case, the links would look something like this:
<i>
</i>&lt;a href="/?url=page1.htm"&gt;Home 1&lt;/a&gt;
&lt;a href="/?url=page2.htm"&gt;Home 2&lt;/a&gt;
&lt;a href="/?url=page3.htm"&gt;Home 3&lt;/a&gt;

This would load the default page for your site. That page would either need to have server-side code to interpret and handle the attached querystring, or you would use JavaScript in that page to do the same thing.
×

Success!

Help @cmotor 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 5.24,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...