PDA

View Full Version : Need Help.



chrisgocrazyH
06-02-2008, 03:46 AM
Heyy all i have this nav.php..

now i want to make it ajax i know how but when eva i do it it dosent show the website :S

okay original code..:

<table width="150">
<?php
database_connect();
$query = "SELECT * from content
WHERE status = 1
ORDER by position;";
$error = mysql_error();
if (!$result = mysql_query($query)) {
print "$error";
exit;
}

while($rij = mysql_fetch_object($result)){
$title = $rij->title;
$id = $rij->id;
print("<tr>
<td>
<a href=\"page.php?id=$id\" target=\"centerframe\"><strong>$title</strong></a>
</td>
</tr>
");
}
?>
</table>


and what im trying to do is this:

<table width="150">
<?php
database_connect();
$query = "SELECT * from content
WHERE status = 1
ORDER by position;";
$error = mysql_error();
if (!$result = mysql_query($query)) {
print "$error";
exit;
}

while($rij = mysql_fetch_object($result)){
$title = $rij->title;
$id = $rij->id;
print("<tr>
<td>
<a href=\"javascript:ajaxpage('page.php?id=$id\', 'mainarea');"><strong>$title</strong></a>
</td>
</tr>
");
}
?>
</table>


WHAT i mean by blank and it dosent show = http://fallin-angels-fanatic.org/

?? please respond i need to get it working ??

Independent
06-02-2008, 02:12 PM
It shows, but is there any need

To Type Like This Everywhere On Your Content?

Invent
06-02-2008, 03:10 PM
<table width="150">
<?php

database_connect();

$query = "SELECT * FROM `content`
WHERE `status` = '1'
ORDER BY `position`;";

$error = mysql_error();

if (!$result = mysql_query($query))
{

die $error;
exit; // Not needed really.

}

while( $rij = mysql_fetch_objects( $result ) )
{

$title = $rij->title;
$id = $rij->id;
print("<tr>
<td>
<a href=\"javascript:ajaxpage('page.php?id=". $id ."', 'mainarea');\"><strong>". $title ."</strong></a>
</td>
</tr>
");

}

?>
</table>

chrisgocrazyH
06-02-2008, 09:33 PM
invent it dosent work sorry :(

MrCraig
07-02-2008, 02:15 PM
have you included the functions files for your ajaxpage() functions?

Want to hide these adverts? Register an account for free!