Jump to content

iframe refresh


Nandini

Recommended Posts

I am doing on register form.

the register form contain one iframe . I want to display user count from my mysql table. So i want to refresh that iframe. But the total page was refreshing. But i want to refresh iframe only.

 

hjere is my code

 

<IFrame Src="frame.php" Scrolling=No Frameborder=0 Marginheight=0 Marginwidth=0 Width=120 Height=140>

 

frame.php

 

<?

include "../../includes/admin_functions.php";

$sql=mysql_query("select * from users");

echo mysql_num_rows($sql);

?>

<meta http-equiv="refresh" content=3">

 

what is the problem here. Or is there any ajax script to refresh iframe only.

 

Help me out

 

Link to comment
Share on other sites

i guess your have to move onto javascript then

try this *untested*

function automatic(delay) {
document.frames["myframe"].location.href = "frame.php";
document.frames["myframe"].location.reload;
setTimeout("automatic("+delay+")", delay);
} 
//<IFrame name="myframe" Src="frame.php" Scrolling=No Frameborder=0 Marginheight=0 Marginwidth=0 Width=120 Height=140>

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.