Right, dont tell me the actual question is hidden within an image which i must firstly decipher to find.
How can i use javascript popup window for this...???
Originally posted by dreaddlord
How can i use javascript popup window for this...
By using javascript to make it popup.
Welcome to the PHP forum.
<SCRIPT LANGUAGE="JavaScript">
function winpop(url)
{
window.open(url,'name','height=500,width=580');
}
</script>
</head>
<td bgcolor=\"#000080\"><a href="#" onclick="javascript:winpop('./page2.php?variable2=$variable1);"><font face=Arial size=2>$variable1</font
</a></td>
why do i get page error when i create javascript popup window like this...
Because you need to \" your double quotes?
What kind of error message do you get?
yep your right...and i tried to use single quote and just the same when i click on the hyperlink...it says "done, but error on page"
<td bgcolor=\"#000080\"><a href='#' onclick='javascript:winpop('./page2.php?variable2=$variable1);'><font face=Arial size=2>$variable1</font
</a></td>
do you have any idea why?
I think the problem is that you are trying to pass a variable now in single quotes - not going to work. Which explains why the popup works but it's url doesn't (check the url and I bet it ends with '$variable'.
echo = "<td bgcolor='#000080'><a href='#' onclick=\"javascript:winpop('./page2.php?variable2=$variable1);\"><font face=Arial size=2>$variable1</font
</a></td";
actually the this is what happens...
when i am testing this to my localhost...javascript pop up window is working but when i upload this in a webserver it doesnt...and all i get is an "error in the page" does it have something related to the server configuration???
It's really hard to say since you aren't posting enough code for me to see the problem. I still don't know exactly what you are echoing out there.
onClick=\"javascript:winpop('./page2.php?variable2=$variable1');\"
You are missing the single quote after the url
<td bgcolor=\"#000080\"><a href=\"#\" onclick=\"javascript:winpop('./page2.php?variable2=".$variable1."');return false;
\"><font face=Arial size=2>$variable1</font></a></td>
thanks to all who have given their ideas and suggestions...
more power to this forum.....
just a follow-up question here....
how do i keep the popup window ontop of other windows?
how do i open a new popup window while there is already one that is open?
thanks....
windowName.focus();
You can open as many pop-up windows as you please; each pop-up window has its own name.
Keep in mind that many users have pop-up blocker, and that this fascility is now built into most recent browsers.
I personally hate pop-up windows, and never use them on my sites.