2 iframe's 1 form

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
killbaz
Forum Newbie
Posts: 12
Joined: Mon Feb 02, 2009 4:44 pm

2 iframe's 1 form

Post 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
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: 2 iframe's 1 form

Post 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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: 2 iframe's 1 form

Post 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.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: 2 iframe's 1 form

Post 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.
killbaz
Forum Newbie
Posts: 12
Joined: Mon Feb 02, 2009 4:44 pm

Re: 2 iframe's 1 form

Post 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:
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: 2 iframe's 1 form

Post 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.
Post Reply