Jump to content

the iframe does not display the updated data


fekaduw

Recommended Posts

i have an iframe that will allow users to type and edit texts like a text editor. When i try to add some data, it works fine. but the iframe does not update itself when i try to view the data inserted. it displays an old data that has been there before the update. Here is the code for the iframe:

 

<script language="javascript">
//Create an iframe and turn on the design mode for it
document.write ('<iframe src="message2.php?id=<?php echo($vid); ?>" id="message" width="440" height="220" name="mess1"></iframe>')
frames.message.document.designMode = "On";
</script>

 

the content of message2.php is:

<?php 
require("../includes/dbconn.php");

    if(isset($_GET["id"]))
{
  		$vid=$_GET["id"]; 
}
else
{
  		$vid=NULL;
}

if(($vid!="")&&($vid!=0))
{
	$SQL="select * from tblhome where topicid=".$vid;
	$result=mysql_query($SQL);
	$row=mysql_fetch_array($result);
  	$vdesc=$row["Description"];  
}
else
    $vdesc=""; 

            echo $vdesc;
?>

 

What could be the problem? any help is highly appreciated. thanks

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.