PDA

View Full Version : How do I change the src of my iframe with ext?


DuGi
06-21-2007, 12:01 PM
Hey,

I know, this might be a very simple question. But since i fairly new to ext js, I hope you guys can help me out.

I have a iframe. When I click a row of my grid, I get an id. This id would I like to put into the iframe's source and then update the iframe with the id.

I have the id, but I can seem to update the iframe's src. Can someone tell me how I do this?

Thank you, and sorry for the newbie question.

Animal
06-21-2007, 12:46 PM
You don't use Ext, you just set it.

DuGi
06-21-2007, 12:56 PM
Ah okay, thought that maybe there were a cool way.
Thanks for the quick response :)

Nullity
06-21-2007, 02:59 PM
Either of these should work:

// Ext
Ext.get('iframe_id').dom.src = 'somefile.html';

or

// standard javascript
document.getElementById('iframe_id').src = 'somefile.html';

DuGi
06-21-2007, 03:03 PM
Thank you!
I'll use the Ext method, just because I can :b