Click to See Complete Forum and Search --> : how do i associate data with an html file, and use that data in another html file
brickfield
12-05-2002, 02:45 AM
yah basically the subject is my question =] but specifically, when it is the source of an iframe sending info to the parent page
im pretty noobish atm, so if it's cool can i just cut and paste an answer? i *am* assuming that javascript is the best method to solve this.
-brickfield
Rick Bull
12-05-2002, 05:38 AM
What exactly do you want to do with the data? Using JavaScript is not really a good idea as it will break in some browsers, so if you can it's best to avoid it for essential things.
brickfield
12-06-2002, 06:42 PM
what i intend is for an iframe on one page to reload different pages on my site, and to resize them according to what looks best...i would work out what dimensions look best beforehand, and put them in the page, and main page would use those numbers to resize the iframe...from what i can gather by just tinkering around with it myself, the parent can relay information to the iframe, but not the other way around......
Rick Bull
12-07-2002, 06:26 AM
I think the iframe should be able to send/recieive data from the parent with the parent property, like parent.property, and the parent should be able to access the iframe's data by window.frames['iframe_id_name_or_index'].property
So if you wanted to change an iframe's src you should be able to do it something like window.frames['id'].location.href = 'new_page.htm'