davehaz
05-30-2006, 09:54 PM
howdy,
I have written a little script that I need to pass a variable to can this be done, if so how? below is the script and the way I am calling it thanks.
btw, this is the first actual js script I have ever written if it is messy please forgive.
<script language="javascript">
function sendto()
{
window.open('<? echo "../merchants/".$sento; ?>','newwin' ,'toolbar,scrollbars,resizable, width=640 , height=480');
}
</script>
Here is how I am calling it.
echo "<tr><td><a href='$url' onClick='sendto()'>$value</a>-$max $z available</td></tr>";
I am in fact trying to send a php variable by using echo, I have done this successfully in other js scripts that I have used.
I have written a little script that I need to pass a variable to can this be done, if so how? below is the script and the way I am calling it thanks.
btw, this is the first actual js script I have ever written if it is messy please forgive.
<script language="javascript">
function sendto()
{
window.open('<? echo "../merchants/".$sento; ?>','newwin' ,'toolbar,scrollbars,resizable, width=640 , height=480');
}
</script>
Here is how I am calling it.
echo "<tr><td><a href='$url' onClick='sendto()'>$value</a>-$max $z available</td></tr>";
I am in fact trying to send a php variable by using echo, I have done this successfully in other js scripts that I have used.