C
Cazpa
Guest
Hi
I am trying to use a javascript that I have got from dynamicdrive and incorporate it into an exsisting website.
I want to take content from a database and then display it with the Javascript but it needs a unique id for the Javascript to work (please see http://www.dynamicdrive.com/dynamicindex1/navigate2.htm
each record on the database has an id [id] and I tried to add it into the javascript <?php echo $row['id'],"\n"; ?> but it only allowed the first one to work, it displayed all the titles fine though just not the drop down thing.
Could someone please help me with the correct way to do this and a sample. many thanks
Thank you "iam"
I have fixed it now, I just done this:
{
$id = $row[id];
?>
<h3 onClick="expandcontent('sc<?php echo "$id"; ?>')" style="cursor:hand; cursor
ointer"><?php echo $row['title'],"\n"; ?></h3>
It seems to work perfect now, many thanks
I am trying to use a javascript that I have got from dynamicdrive and incorporate it into an exsisting website.
I want to take content from a database and then display it with the Javascript but it needs a unique id for the Javascript to work (please see http://www.dynamicdrive.com/dynamicindex1/navigate2.htm
each record on the database has an id [id] and I tried to add it into the javascript <?php echo $row['id'],"\n"; ?> but it only allowed the first one to work, it displayed all the titles fine though just not the drop down thing.
Could someone please help me with the correct way to do this and a sample. many thanks
Thank you "iam"
I have fixed it now, I just done this:
{
$id = $row[id];
?>
<h3 onClick="expandcontent('sc<?php echo "$id"; ?>')" style="cursor:hand; cursor

It seems to work perfect now, many thanks