Jump to content

multiple navigation tables on one page (master - slave)


sayedsohail

Recommended Posts

Hi everone, I just wanted to refresh only part of the page, i.e., table2 on my php page.

 

here is my javascript code which performs the refresh it works fine and my php file display all the records. the only problem is: I have got two tables on the same page and i only want to refresh the second table when i click the a row of my first table rows.

 

$query = "SELECT id, name, address_1, p_code, city, l_line, mobile FROM clients WHERE member_id="1" order by name LIMIT $offset, $rowsPerPage";

 

<table1>

while {

echo "<tr onclick=\"javascript:void(location.href='{$self}?cid=$id')\">";

<td>

....

</td>

</tr>

}

</table>

 

 

 

if(isset($_GET['cid'])) 

{

$pid=$_GET['cid'];

 

$query2 = "SELECT id, name, address_1, p_code, city, l_line, mobile FROM sites WHERE client_id='$pid' order by name LIMIT $offset2, $rowsPerPage2";

 

<table2>

while {

<tr><td>

....

</td>

</tr>

}

</table>

}

 

please help.

Archived

This topic is now archived and is closed to further replies.

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