Jump to content

Recommended Posts

hi guys, i have a problem hope you can help me.. i have a site that uses an iframe to autorefresh the table inside it. i used an <a href> tag to redirect the page, but instead of redirecting the whole page to another site, it only reloads inside the iframe..

 

here is my code:

 

from my parent page:

 

 

</div>

<Iframe src="tabs/constable.php" width="990" height="600"></Iframe>

</div>

 

from my constable.php file inside the iframe:

 

 

<head>

<script type="text/javascript">

function followLink(o) {

var a = o.getElementsByTagName('a');

if (a.length > 0) {

document.location = a[0].href;

}

}

</script>

</head>

 

<table id="table">

<thead>

<tr>

<th scope="col" class="idnumber">ID Number</th>

<th scope="col" class="name">Name</th>

<th scope="col" class="gender">Gender</th>

<th scope="col" class="timedate">Date of Consultation</th>

<th scope="col" class="type">Student/Employee</th>

<th scope="col" class="type">annual/walkin</th>

</tr></thead><tbody><tr>

<tfoot>

<tr>

<td colspan="6"></td>

</tr>

</tfoot>

<?php

 

$min = 0;

include '../init.php';

 

$quey1="//somequery here";

 

$result=mysql_query($quey1);

 

mysql_close($connect);

$row1 = mysql_num_rows($result);

 

while($row=mysql_fetch_array($result))

{

$dd = "../info.php?pid=".$row['idnumbers']."&&nid=".$row['idnurse']."&&type=".$row['type'];

 

echo "<tr><td onclick='followLink(this);'><a href='".$dd."'></a>{$row['idnumbers']}</td>

<td onclick='followLink(this);'><a href='".$dd."'></a>{$row['name']}</td>

<td onclick='followLink(this);'><a href='".$dd."'></a>{$row['Sex']}</td>

<td onclick='followLink(this);'><a href='".$dd."'></a>{$row['date']}</td>

<td onclick='followLink(this);'><a href='".$dd."'></a>{$row['Occupation']}</td>

<td onclick='followLink(this);'><a href='".$dd."'></a>{$row['type']}</td></tr>";

}

echo' </table></br></br>';

 

include '../init.php';

$quey2="select count(*) from nurse where status = 'notdone'";

$res=mysql_query($quey2);

mysql_close($connect);

$rowcounter;

 

while($row=mysql_fetch_array($res))

{

$rowcounter = $row['count(*)'];

}

if($rowcounter > 10)

{

echo '<form action = "next.php" method = "POST">';

echo ' <input type = "image" src="images/Next.png" name = "next" value = "Next">';

echo ' <input type = "hidden" name = "xx" value = "'.$min.'">';

echo ' <input type = "hidden" name = "gg" value = "patientonqueue">';

echo ' <input type = "hidden" name = "num" value = "'.$rowcounter.'">';

echo '</form>';

}

$eto = $rowcounter + 10;

 

if($rowcounter >= 10)

{

echo "<label name = 'dd'> 10 out of ".$rowcounter."</label>";

}

 

?>

 

 

 

hope you guys understand my code and my problem.. thanks in advance! :D

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.