Page 1 of 1

2 iframe's 1 form

Posted: Wed Feb 04, 2009 3:39 pm
by killbaz
Hello to all...

I have like 4 iframe's . How can i make a form to know the inputs from those iframes?

i have something like this:

Code: Select all

 
<form id="creeaza" name="creeaza" method="post" action="creeaza_tot.php">
<iframe src="creeaza_baza1.php" width="510" height="330" scrolling="No" frameborder="0" ></iframe>
<iframe src="creeaza_baza2.php" width="510" height="330" scrolling="No" frameborder="0" ></iframe>
<iframe src="creeaza_baza3.php" width="510" height="330" scrolling="No" frameborder="0" ></iframe>
<iframe src="creeaza_baza4.php" width="510" height="330" scrolling="No" frameborder="0" ></iframe>
<input name="creeaza_submit2" type="reset" class="creeaza1" id="creeaza_submit2" value="RESETEAZA" />
<input name="creeaza_submit" type="submit" class="creeaza1" id="creeaza_submit" value="CREEAZA" />
</form> 
 
thanks

Re: 2 iframe's 1 form

Posted: Wed Feb 04, 2009 5:19 pm
by pickle
You can't - each of those frames is a unique document & can't be accessed from simple XHTML. You'll need Javascript to collect the data.

Re: 2 iframe's 1 form

Posted: Wed Feb 04, 2009 7:15 pm
by JAB Creations
There are exceptionally few instances where it's ok to use frames, beyond the reason I use them it only means you haven't correctly learned CSS1 layouts. For my reason well, massive AJAX complications. Raise your understanding of CSS1 and remove the need for frames and your issue will be resolved.

Re: 2 iframe's 1 form

Posted: Wed Feb 04, 2009 8:28 pm
by Eran
He is talking about an iframe not frames. iframes have several usages in advanced web applications, though they will probably be deprecated soon.

Re: 2 iframe's 1 form

Posted: Wed Feb 04, 2009 10:22 pm
by killbaz
okay , i understood all the answers ... but , somebody knows for sure how can i make this?
any idea , i have more than 12 hours from when i started to search on google.
thank again ... and thanks for your answers ///// IM NOT ALONEEEE :drunk:

Re: 2 iframe's 1 form

Posted: Sat Feb 07, 2009 2:07 pm
by JAB Creations
On my site if I want to access the value of the music player's select element (if you enter with audio enabled) I would do this from another frame...

Code: Select all

<div><span onclick="alert(parent.mplayer.document.getElementById('mplayermenu').value)">what is the value of music player's select menu?<span></div>
parent.mplayer = the frame name. If you have a frame nested two levels deep you'd do parent.parent.frame_name.

I can only presume this works with iframes.