Well the question thing was just an example. Let's keep it simple.
I want this link
PHP Code:
<a href='javascript:void(e);' id='a1'>Link</a>
to open a dialog containing a form with this hidden element
PHP Code:
<input type='hidden' name='id' value='a1' />
Each link is generated with a php-loop. Let's say like this:
PHP Code:
<?php
for($i=0; $i<10; $i++)
{
?>
<a href='javascript:void(e);' id='a<?php echo $i; ?>'>Link</a>
<?php
}
?>
... or something to that effect. Now, of course I could just include a
PHP Code:
<div id='a<?php echo $i; ?>'></div>
in the php-loop and then use that as the target for the dialog, but that just seems kind of a brute-force-sort-of-not-very-pretty way to do it.
So I was wondering if there is any way to just make one <div> with the <input type='hidden'>-element in it and then pass the ID-attribute of the clicked link to that.
I don't know if I'm making any sense