Hi Cesar,

> Jon, thanx for the fast response, but the problem is 
> that the link is made dynamically from a DB and the varvalue 
> changes on every link... if it helps, I make this link 
> list with a FOR loop in PHP and the varvalues
> I want to pass are the IDs of a table elements.

You probably need to do it along these lines:

// assume ids are in $id[1...10]
for ($i = 1; $i <= 10; $i++) { 
  echo '<a href="javascript:lauchinfopage(';
  echo $id[$i];
  echo ')">click for more info</a><br />";

and, in your JS function:

function launchinfopage(id)
  url = "infopage.php?id=" + id;
  // open url however you like

I imagine you have your url hardcoded in your launchinfopage() function...
this makes it less portable, you may want to consider passing the complete
url to a generic "open new window" function.


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

Reply via email to