/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Sending requests from drop down menus to an iframe

[CODE]<form name=”jump”>
<select name=”menu” onChange=”location=document.jump.menu.options[document.jump.menu.selectedIndex].value;” value=”GO”>
<option value=”1.php”>1</option>
<option value=”2.php”>2</option>
</select>
</form>

<iframe src =”1.php” width=”100%” height=”300px” frameborder=”0″ id=”miniframe”>
<p>Your browser does not support iframes.</p>
</iframe>
[/CODE]

I have the following drop down menu for navigation, but instead of loading 1.php and 2.php as a new page, I want them loaded inside an iframe on the existing page. I guess I need to change the “onChange” event, but I have no clue what to put there? Any ideas? Thanks in advance! ?

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@FangJan 19.2009 — onchange="document.getElementById('miniframe').src=this.value;"
Copy linkTweet thisAlerts:
@xGrapeauthorJan 19.2009 — Thank you so much! Works like a charm ?
×

Success!

Help @xGrape 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.28,
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,
)...