/    Sign up×
Community /Pin to ProfileBookmark

dropdown iframe not working

I cant get this to work and I don’t know why. I want the links in the menu to load in the iframe. But i’m having many difficulties…

<form name=”dropdown”>
<select name=”menu1″>
<option value=”#”>SELECT:</option>

<option value=”blah/blah.jpg” target=”black”>blah 1</option>

</select> <input type=”button” value=”Go” onClick=”parent.black.location.href=document.dropdown.menu1.options[document.dropdown.menu1.selectedIndex].value”>
</form>
<br><hr><br>

<div id=”floatframe”>
<iframe width=”300″ height=”225″ src=”Old/black.html” name=”black” align=center frameborder=7> </iframe></div>
</center>

If you can help, please send answer or new script (in html plz, no css or java) to [email][email protected][/email] for a quicker response.

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@jordan_43authorOct 13.2005 — ok screw it. If anyone has a java answer that'll work. I need some help. Anyone?
Copy linkTweet thisAlerts:
@avaOct 14.2005 — Try using:
[CODE]<input value="Go!" type="button" onClick="document.frames[0].location.href(document.dropdown.menu1.options[document.dropdown.menu1.selectedIndex].value)">[/CODE]
for the button.
Copy linkTweet thisAlerts:
@konithomimoOct 14.2005 — Notice the parts in bold:

<input type="button" value="Go" onClick="parent.black.[B]location.href[/B]=document.dropdown.menu1.options[document.dropdown.menu1.selectedIndex].value">

And then:

<iframe width="300" height="225" [B]src="Old/black.html"[/B] name="black" align=center frameborder=7> </iframe>

SRC and HREF are not the same thing. Also, give your iframe an ID:

here are how the two lines should be:

<input type="button" value="Go" onClick="document.getElementById('black').src=document.dropdown.menu1.options[document.dropdown.menu1.selectedIndex].value">

and

<iframe name="black" id="black" width="300" height="225" src="Old/black.html" align=center frameborder=7> </iframe>
×

Success!

Help @jordan_43 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.16,
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,
)...