Dave Anderson wrote:
[color=blue]
> How can I make an onchange event update the src for an IFRAME? I would like
> to do it without reloading the page, is this possible?[/color]
Bonjour à Martin Honnen <mahotrash@yaho o.de> qui nous a écrit :[color=blue]
> Dave Anderson wrote:
>[color=green]
>> How can I make an onchange event update the src for an IFRAME? I
>> would like to do it without reloading the page, is this possible?[/color]
>
> <iframe name="iframeNam e" src="whatever.h tml"></iframe>
>
> <select onchange="if (window.frames && window.frames.i frameName) {
> window.frames.i frameName.locat ion.href =
> this.options[this.selectedIn dex].value;
> }">[/color]
"Cenekemoi" <tbaudessonENLE VER@harrysoftwa re.ENVELERcom> wrote in
message news:bv88hj$47f $1@news-reader4.wanadoo .fr...
<snip>[color=blue][color=green][color=darkred]
>>> How can I make an onchange event update the src for an IFRAME? I
>>> would like to do it without reloading the page, is this possible?[/color]
>>
>> <iframe name="iframeNam e" src="whatever.h tml"></iframe>
>>
>> <select onchange="if (window.frames && window.frames.i frameName) {
>> window.frames.i frameName.locat ion.href =
>> this.options[this.selectedIn dex].value;
>> }">[/color]
>
>or:
> <iframe id="iframeId" src="whatever.h tml"></iframe>
>
> <select onchange="if (document.getEl ementById) {
> document.getEle mentById('ifram eId').src =
> this.options[this.selectedIn dex].value;
> }">[/color]
No, Martin's formulation is the most cross-browsers code for the task
and will work on significantly more browsers than attempting to re-set
the SRC of an IDed IFRAME by assigning to its src property.
Comment