Jump to content

Get value from iframe


chanchelkumar

Recommended Posts

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

 

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.