rcleon
asked on
Open image on a new window
All I'm trying to do is open an image on a new window. Here is my code:
print "\n<tr>";
print "<td rowspan='2'>" . "<a href='#' onclick=\'window.open
('img src=$Row[SP1],directories= no,locatio n=no,menub ar=no,scro llbars=no, status=no, toolbar=no ,resizable =no');retu rn false\' target=\"_blank\">" . "</a></td>";
print "\<\tr>";
I do not get an error but the image dose not show up.
So 2 thing I want my image to show up as a link and went the usser clicks on the link I want the image to show up on a new window.
Thanks
Rafael
print "\n<tr>";
print "<td rowspan='2'>" . "<a href='#' onclick=\'window.open
('img src=$Row[SP1],directories=
print "\<\tr>";
I do not get an error but the image dose not show up.
So 2 thing I want my image to show up as a link and went the usser clicks on the link I want the image to show up on a new window.
Thanks
Rafael
ASKER
Thanks,
It is almost there linkname is a small image of SP1 Now the image does not show but the name linkname does and went I click the new window opens with the large picture the small picture is SP1 and the large picture is LP1.
print "\n<tr>";
print "<td rowspan='2'>" . "<a href='#' onclick=\"window.open('" . $Row['LP1'] ."','NameOfTheWindow', 'width=100,height=200,dire ctories=no ,location= no,menubar =no,scroll bars=no,st atus=no,to olbar=no,r esizable=n o');return false\">" . "this should be $row['SP1']</a></td>";
print "<tr>";
Or something like that.
Thanks for you quick responce.
Rafael
It is almost there linkname is a small image of SP1 Now the image does not show but the name linkname does and went I click the new window opens with the large picture the small picture is SP1 and the large picture is LP1.
print "\n<tr>";
print "<td rowspan='2'>" . "<a href='#' onclick=\"window.open('" . $Row['LP1'] ."','NameOfTheWindow', 'width=100,height=200,dire
print "<tr>";
Or something like that.
Thanks for you quick responce.
Rafael
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OK almost
print "<td rowspan='2'>" . "<a href='#' onclick=\"window.open(' ."<img src=\"$Row[LP1]\">" . ','NameOfTheWindow', 'width=100,height=200,dire ctories=no ,location= no,menubar =no,scroll bars=no,st atus=no,to olbar=no,r esizable=n o');return false\">" . "<img src=\"$Row[SP1]\" border='0'>" ."</a></td>";
I get an error
Parse error: parse error, unexpected T_STRING in /home/mendoc2/public_html/ content/mo reinfo.php on line 253
Thanks fir the reference
Rafael
print "<td rowspan='2'>" . "<a href='#' onclick=\"window.open(' ."<img src=\"$Row[LP1]\">" . ','NameOfTheWindow', 'width=100,height=200,dire
I get an error
Parse error: parse error, unexpected T_STRING in /home/mendoc2/public_html/
Thanks fir the reference
Rafael
You seen to have a little bit of confused coding there, perhaps:
print "<td rowspan='2'><a href='#' onclick=\"window.open('".$ Row['LP1'] ."','NameO fTheWindow ', 'width=100,height=200,dire ctories=no ,location= no,menubar =no,scroll bars=no,st atus=no,to olbar=no,r esizable=n o');return false\"><img src=\"".$Row['SP1']."\" border='0'></a></td>";
print "<td rowspan='2'><a href='#' onclick=\"window.open('".$
ASKER
Almost
print "<td rowspan='2'><a href='#' onclick=\"window.open('".< img src=\"$Row['LP1']\">."','N ameOfTheWi ndow', 'width=100,height=200,dire ctories=no ,location= no,menubar =no,scroll bars=no,st atus=no,to olbar=no,r esizable=n o');return false\"><img src=\"".$Row['SP1']."\" border='0'></a></td>";
.$Row['LP1'] is an image also LP1 is a large image and SP1 is a small image went I click on sp1 the small image I want LP1 the large image to open on a new window.
Thanks
Rafael
print "<td rowspan='2'><a href='#' onclick=\"window.open('".<
.$Row['LP1'] is an image also LP1 is a large image and SP1 is a small image went I click on sp1 the small image I want LP1 the large image to open on a new window.
Thanks
Rafael
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys I made it work after reading the article on quotes the you guys reference about.
Thanks for all your help
Thanks for all your help
ASKER
Guys I made it work here is the final code.
print "<td rowspan='2'><a href='#' onclick=\"window.open('".$ Row['LP1'] ."','NameO fTheWindow ', 'width=500,height=240,dire ctories=no ,location= no,menubar =no,scroll bars=no,st atus=no,to olbar=no,r esizable=n o');return false\"><img src=\"".$Row['SP1']."\" border='0'></a></td>";
Both of the images url are part of the MySQL database a small image apears on the page went you click on the small image a new page is loaded with the large image.
This is just what I wanted.
Once again Thanks you for all your help.
Rafael
print "<td rowspan='2'><a href='#' onclick=\"window.open('".$
Both of the images url are part of the MySQL database a small image apears on the page went you click on the small image a new page is loaded with the large image.
This is just what I wanted.
Once again Thanks you for all your help.
Rafael
print "\n<tr>";
print "<td rowspan='2'>" . "<a href='#' onclick=\"window.open('" . $Row['SP1'] ."','NameOfTheWindow', 'width=100,height=200,dire
print "<tr>";