English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

what I'm trying to do
is I got a dynamic list of links in iframe b
and I want it so when link is clicked on I can have a function change the url iframe a points to.

2006-10-30 15:35:34 · 3 answers · asked by snowcloud_dreamer 2 in Computers & Internet Programming & Design

I tried that. didn't work.
parent doc:


control.htm
yes

still get errors.

2006-10-30 16:00:39 · update #1

Shine
not

2006-10-30 16:03:58 · update #2

document.player.src - not an object
window.player.src - not an object
player.src - player is undefined

what am I dooing wrong still?

2006-10-31 02:52:50 · update #3

3 answers

It's not innerHTML. InnerHTML is for actually defining the HTML. Use the .src property as in

youriframehere.src = "http://www.bob.com";

Good luck, hun! :D

EDIT:

I was being dumb, sorry! You can't reference it directly like that unless it's declared as a variable. Try document.getElementByID( 'elementname' ).src = "url";

Also, set an 'id="player"' tag in the HTML definition of the iframes, too.

That should do it.

2006-10-30 20:08:19 · answer #1 · answered by Kalemika 1 · 0 0

in basic terms type it into your HTML website as text textile. JavaScript code will in basic terms be finished by capacity of the browser if it incredibly is interior a script component. If it incredibly is not any longer wrapped in script tags, it incredibly is in basic terms text textile and could be displayed as such.

2016-10-21 00:53:56 · answer #2 · answered by ? 4 · 0 0

use obj.innerHTML property to change the iframe contents

2006-10-30 15:39:38 · answer #3 · answered by ovlnmurty 1 · 0 0

fedest.com, questions and answers