View Full Version : Hi...problems displaying value from one frame into another
krish
06-20-2006, 04:26 AM
Hi friends,
i am using two frames in a page. in one frame i have the drop down box....
i am not able to display the selected item from the drop down box (which is in first frame) into another frame....
eg....if the combo box containe three values name,age,location.....and if i select name from the box the name should be displayed in the other frame....... i am able to implement that without using frames... but with frames its creating some problem......
.... can anyone help me in doing this.... its very urgent....plzzzzzzzz...........
pj_anf
06-20-2006, 11:12 AM
do you have any code as of right now for this? If not, you'll need to name the frames and then use some sort of javascript command to switch the content of the 1 frame by clicking in the other. This can be done by something similar to:
Pseudo-code:
parent.document.object.style='something';
depending on which direction your traveling with the content. Iframes are the most common these days, so I would assume your going from the parent to a child, in which case:
PseudoCode:
framename.document.object.style.value='something';
If you could maybe share a link to the current page your working on or some of the code I could possibly provide some real code to solve this.
krish
06-21-2006, 03:30 AM
Hi thank u .....
here is the code....
the main frame is
<html>
<frameset cols="30%,*">
<frame name="one" src="one.jsp" target="two">
<frame name="two" src="two.jsp">
</frameset>
</html>
first frame is:
<html>
<body>
<form name="frm" action="two.jsp">
<select name="slt" onChange="frm.submit()">
<option value="one" target="two">one
<option value="two">two
</select>
</form>
</body>
</html>
the second frame name is two.html.... i want to display the value in two.html when i select any value from the above html file which contains the select box...
_Aerospace_Eng_
06-21-2006, 03:34 AM
So you want the form to submit to the frame with two.html in it?
krish
06-21-2006, 08:14 AM
I cant understand what u r asking but i want the selected value from the combo box (in one frame) to be displayed in another frame... this is exactly what i want.......
krish
06-21-2006, 09:58 AM
Can anyone help me in this issue which i am facing...plzzzzzzzz itzzz very urgent.........
pj_anf
06-21-2006, 12:26 PM
you appears to have 2 frames side by side... i'm not sure how you can make these frames talk to each other since they are only connected by their parent. This would be a matter of doing something like:
pseudo code:
parent.document.frame2.objectID.value='somevalue';
also, why are you using jsp for this? if your using jsp i'd suggest just using a post method or something and having a cookie carry the values around?
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.