chzumbrunnen
11-05-2004, 02:07 AM
I list the resultset from a db query and want to link to the detail page.
Of course I have to pass the id as an URL parameter to the detail page.
Now because I want to open the detailpage in a separate window I use JavaScripts window.open function.
I tried it with a function to which the Id is given as a parameter but I can't reuse it or append the variable value to the pagename.
What is wrong?
My function looks like this:
function handydetails(Id)
{
window.open("handydetails.php?Id=" + Id + "\", \"Handydetails\", \"location=no, directories=no, menubar=no, scrollbars=yes, toolbar=no, status=no, width=786\"");
}
and its called like this:
<a href="javascript:handydetails(<?php echo urlencode($rchandys->Fields('nr')) ?>);"><?php echo $rchandys->Fields('marke'); ?></a>
Of course I have to pass the id as an URL parameter to the detail page.
Now because I want to open the detailpage in a separate window I use JavaScripts window.open function.
I tried it with a function to which the Id is given as a parameter but I can't reuse it or append the variable value to the pagename.
What is wrong?
My function looks like this:
function handydetails(Id)
{
window.open("handydetails.php?Id=" + Id + "\", \"Handydetails\", \"location=no, directories=no, menubar=no, scrollbars=yes, toolbar=no, status=no, width=786\"");
}
and its called like this:
<a href="javascript:handydetails(<?php echo urlencode($rchandys->Fields('nr')) ?>);"><?php echo $rchandys->Fields('marke'); ?></a>