Re: PHP Dynamic data in CSS Pop Up got but just one.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Carter wrote:
> 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.
> 
> 

...

> <input type="reset" name="reset" value="Cancel"
> onclick="javascript:toggleLayer('commentForm');" /></td><td><div
> id="commentForm" >Beti

the 'id' attribute must be unique within your page - that is part of the
(x)HTML spec ... which provides you with a clue.

> </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.

I have no idea what 'Id' is exactly but it's another clue to your solution:

echo '<div id="commentForm',$Id,'">'; // etc
// etc
echo "onclick=\"javascript:toggleLayer('commentForm",$Id,"');\""; // etc

the value of $Id must change for every row of data you are outputting.
> 
> Thanks in advance.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux