javascript window open problem in PHP Script..
Posted: Mon Mar 23, 2009 5:28 am
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:
Posting Code in the Forums to learn how to do it too.
hii..
i've a javascript function open_window which opens a new window..
i wrote it in php script when clicked reads an image file and echos it on the window..
now when i'm trying to add another href link i'm getting syntax error..
here is my JavaScript open window function:
My PHP Code
i would like to replace the above HREF link with this link :
"./products_pictures/resizethumb.php?img={$product_info.picture}"
can anyone give me ideas?
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:
Posting Code in the Forums to learn how to do it too.
hii..
i've a javascript function open_window which opens a new window..
i wrote it in php script when clicked reads an image file and echos it on the window..
now when i'm trying to add another href link i'm getting syntax error..
here is my JavaScript open window function:
Code: Select all
function open_window(link,w,h) //opens new window
{
var win = "width="+w+",height="+h+",menubar=no,location=no,resizable=yes,scrollbars=yes";
wishWin = window.open(link,'wishWin',win);
}Code: Select all
<?php
if ( file_exists("./products_pictures/".$picture["filename"])
&& trim($picture["filename"]) != "" ){
echo $picture["filename"]."<br />
<a class=small href='javascript:open_window(\"products_pictures/".$picture["filename"]."\",".GetPictureSize($picture["filename"]).")'>".ADMIN_PHOTO_PREVIEW."</a>
| <a class=small href=\"javascript:confirmDelete('".QUESTION_DELETE_PICTURE."', 'products.php?delete_one_picture=1&filename=".$picture["photoID"]."&productID=".$_GET["productID"]."')\">".DELETE_BUTTON."</a>
";
}else
echo ADMIN_PICTURE_NOT_UPLOADED;
?>"./products_pictures/resizethumb.php?img={$product_info.picture}"
can anyone give me ideas?
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: