chanchelkumar Posted September 21, 2007 Share Posted September 21, 2007 Hi friends, Am working with an iframe in Ajax window, But on submitting the form i am unable to get values in the iframe. I think this is a very basic thing. Anyone one please help me to pass the value from iframe to the parent window.. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/70101-get-value-from-iframe/ Share on other sites More sharing options...
448191 Posted September 21, 2007 Share Posted September 21, 2007 All you have to do is post to the right web address. Quote Link to comment https://forums.phpfreaks.com/topic/70101-get-value-from-iframe/#findComment-352097 Share on other sites More sharing options...
chanchelkumar Posted September 21, 2007 Author Share Posted September 21, 2007 Sorry, Could you please explain what you really mean?? Quote Link to comment https://forums.phpfreaks.com/topic/70101-get-value-from-iframe/#findComment-352124 Share on other sites More sharing options...
448191 Posted September 21, 2007 Share Posted September 21, 2007 Show me your code and I'll explain. Quote Link to comment https://forums.phpfreaks.com/topic/70101-get-value-from-iframe/#findComment-352645 Share on other sites More sharing options...
chanchelkumar Posted September 22, 2007 Author Share Posted September 22, 2007 Thank you for your response.... here it is.... My code... <tr> <td width="111" height="35" class="normaltext">Photo</td> <td width="352" height="35"> <input name="photo" id="photo" type="radio" value="image" onclick="selectimage1(1);" />Image <input name="photo" id="photo" type="radio" value="avthars" onclick="selectimage1(2)" />Avthars </tr> <tr><td colspan="2" align="center"><div id="selectimg"></div> </td></tr> Der in the div i call the ajax page.... the ajax page as follows...... <?php $opt=$_REQUEST['ct']; echo $img=$_REQUEST['rest']; if($opt==1) { ?> <input name="photo" type="file" id="photo" class="flat" /> <?php } if($opt==2) { ?> <iframe src="client/selectavthar.php" width="100%" name="avthars" id="avthars"> </iframe> <?php //echo $img=$_REQUEST['rest']; } ?> You can see the iframe der..... the page i called through iframe is as follows.... <?php include '../admin/function.php'; connect_to_db(); $sel="select * from cw_avthars"; $res=mysql_query($sel) or die(mysql_error()); ?> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr> <?php $i=0; while($row=mysql_fetch_array($res)) { $avithar=$row['av_name']; $image="../images/avthar/".$avithar; ?> <td><input type="radio" name="avthars" id="avthars" value="<?php echo $row['av_id'];?>"></td><td><img src="<?php echo $image;?>" width="50" height="50" border="0"></td> <?php $i++; if($i%4==0) { echo '</tr><tr><tr><td> </td></tr>'; } }?> </tr> </table> Hope you can under stand my situation.... thanks for you help.. Quote Link to comment https://forums.phpfreaks.com/topic/70101-get-value-from-iframe/#findComment-352818 Share on other sites More sharing options...
448191 Posted September 22, 2007 Share Posted September 22, 2007 Where's your <form> element? Quote Link to comment https://forums.phpfreaks.com/topic/70101-get-value-from-iframe/#findComment-352916 Share on other sites More sharing options...
chanchelkumar Posted September 24, 2007 Author Share Posted September 24, 2007 Sorry, could you please guide me to that? Quote Link to comment https://forums.phpfreaks.com/topic/70101-get-value-from-iframe/#findComment-353786 Share on other sites More sharing options...
chanchelkumar Posted September 24, 2007 Author Share Posted September 24, 2007 Any one please help me.............. Quote Link to comment https://forums.phpfreaks.com/topic/70101-get-value-from-iframe/#findComment-353841 Share on other sites More sharing options...
chanchelkumar Posted September 26, 2007 Author Share Posted September 26, 2007 Hi frnds,, Any idea about this?? Please :-[ :-[ Quote Link to comment https://forums.phpfreaks.com/topic/70101-get-value-from-iframe/#findComment-355447 Share on other sites More sharing options...
chronister Posted September 26, 2007 Share Posted September 26, 2007 448191 tried to help you. In your code you are not showing a <form> tag. In order for the form to be submitted properly, you have to have the following. <form action="http://www.yourpage.com" method="post" > The rest of the form goes here. </form> The action is what dictates where your form submits. The method dictates how it submits it. Post sends the data in the HTML Header, GET will send it in the URL. A little tip to getting help around here ..... if someone asks to see code or inquires about a particular part of the code, then give em what they want so they can help you. 448191 was simply inquiring about where your <form> tag was and you asked 448191 to guide you to it. I am sorry, but if your going to be playing with PHP you need to learn the in's and out's of HTML first. You may be well versed in HTML and it's a language barrier, but you must know HTML before you deal with PHP. Nate Quote Link to comment https://forums.phpfreaks.com/topic/70101-get-value-from-iframe/#findComment-355483 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.