Iframe in an xhtml page

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Iframe in an xhtml page

Vancheri, Alessandro

I have an iframe in an xhtml page. I need to modify the value of the src attribute of the iframe tag based on the value of an instance variable. Any idea? Thanks.

 

Alessandro



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Iframe in an xhtml page

David McIntyre
Do you want the src to change based on a click on a trigger?  If so, perhaps something like

<xf:trigger>
	<xf:label>Change src</xf:label>
	<xxf:script ev:event="DOMActivate">
		document.getElementById('myIframe').src = ORBEON.xforms.Document.getValue('myHiddenInput');
	</xxf:script>
</xf:trigger>

Note that you can't directly point to instance data, you have to point to the value of an input, which you can hide using css.

If you want it to change without the user clicking a trigger, you could try putting that same script inside the hidden input, and responding to xforms-value-changed rather than DOMActivate.  But this is just speculation, I haven't actually tried that to see if it would work.

Cheers,

Dave Mc


Vancheri, Alessandro wrote:

I have an iframe in an xhtml page. I need to modify the value of the src attribute of the iframe tag based on the value of an instance variable. Any idea? Thanks.

 

Alessandro


--
Orion Signature

Dave McIntyreSoftware Developer
[hidden email]
P: +64 9 638 0600
M: +64 21 123 456
F: +64 9 638 0699
S: <a href="callto:dave.mcintyre">dave.mcintyre
www.orionhealth.com


This e-mail and any attachments are intended only for the person to whom it is addressed and may contain privileged, proprietary, or other data protected from disclosure under applicable law. If you are not the addressee or the person responsible for delivering this to the addressee you are hereby notified that reading, copying or distributing this transmission is prohibited. If you have received this e-mail in error, please telephone us immediately and remove all copies of it from your system. Thank you for your co-operation.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws