PHP Dynamic data in CSS Pop Up got but just one.
| From: | Chris Carter | Date: | Wed, 21 Feb 2007 08:22:04 +0000 |
| Subject: | PHP Dynamic data in CSS Pop Up got but just one. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-249163@lists.php.net to get a copy of this message | ||
Hi,
I am trying to create a dynamic table. Which is working fine. On the onclick
event of one of the hyperlink in a field (called Details) a small css pop up
opens. THis works fine when I have just one row. But in case I have more
than one rows the Details link comes Hyperlinked but when I click on the
link it opens the css pop up at just one location. You can try this here.
<html>
<head>
<title>A Test</title>
<script language="javascript">
function toggleLayer(whichLayer)
{
if (document.getElementById)
{
// this is the way the standards work
var style2 = document.getElementById(whichLayer).style;
style2.display = style2.display? "":"block";
}
else if (document.all)
{
// this is the way old msie versions work
var style2 = document.all[whichLayer].style;
style2.display = style2.display? "":"block";
}
else if (document.layers)
{
// this is the way nn4 works
var style2 = document.layers[whichLayer].style;
style2.display = style2.display? "":"block";
}
}
</script>
<style>
div#commentForm
{
margin: 0px 20px 0px 20px;
display: none;
}
</style>
<body><table><tr><td>
<div id="commentForm">Beti
</div> javascript:toggleLayer('commentForm');
Add a comment
<input type="reset" name="reset" value="Cancel"
onclick="javascript:toggleLayer('commentForm');"
/></td><td><div
id="commentForm" >Beti
</div> javascript:toggleLayer('commentForm');
Add a comment
<input type="reset" name="reset" value="Cancel"
onclick="javascript:toggleLayer('commentForm');"
/></td></tr></table>
</body>
How to open separate window for separate rows with the data specific to that
row only. I am using the Id in php to retrieve the data.
Thanks in advance.
--
View this message in context: http://www.nabble.com/PHP-Dynamic-data-in-CSS-Pop-Up-got-but-just-one.-tf3265410.html#a9076992
Sent from the PHP - General mailing list archive at Nabble.com.