raphaeld
07-05-2005, 06:10 PM
In my code I would like to append a $_GET)-variable (an id) to a link.
the variable looks like this id='".$id."' this shoud be appended to a link. When the link is clicked the next page can get the id out of the url.
The links and the id's are generated with a while-loop.
The while-loop generates this:
echo "<a href=\"javascript:PopupPic('".$bestandsnaam."')\">"
echo "<img src='".$bestandsnaam."' border='0' height='60'></a>"
Because each link has a unique id I would like the unique id to be appended somewhere in it's appropriate link. The problem that the link refers to a javascript somewhere in the code. You can check the javascript here:
<script language="Javascript"> function PopupPic(sPicURL) { window.open( "../../lib/php/popup.inc.php?"+sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=200"); } </script>
I don't want the id appended in this piece of javascript-code :
When the id is appended in this code, the value of the id is the last value that came out the while-loop and that's not what I need.
So I need the id to be in the link generated by the while-loop
Can somebody help me with the issue.
the variable looks like this id='".$id."' this shoud be appended to a link. When the link is clicked the next page can get the id out of the url.
The links and the id's are generated with a while-loop.
The while-loop generates this:
echo "<a href=\"javascript:PopupPic('".$bestandsnaam."')\">"
echo "<img src='".$bestandsnaam."' border='0' height='60'></a>"
Because each link has a unique id I would like the unique id to be appended somewhere in it's appropriate link. The problem that the link refers to a javascript somewhere in the code. You can check the javascript here:
<script language="Javascript"> function PopupPic(sPicURL) { window.open( "../../lib/php/popup.inc.php?"+sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=200"); } </script>
I don't want the id appended in this piece of javascript-code :
When the id is appended in this code, the value of the id is the last value that came out the while-loop and that's not what I need.
So I need the id to be in the link generated by the while-loop
Can somebody help me with the issue.