Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with new window (php & asp)

Status
Not open for further replies.

mailerman

Technical User
Jan 2, 2007
29
0
0
SE
i have this asp/php script showing pictures on my page and wonder how i can make visabild.php open in a new window, i tryed putting in target_blank but that just makes the php code fail on me :/ so if anyone could help me make it open the imiage in a new window with a specific window higth & witdt i would be very thankfull.

Code:
    if ( $row['picture'] != '' ) {
        echo '<a href="visabild.php?id=' . $row['id'] . '">';
        echo '<img width="125" src="' . $row['picture'] . '"></a>';
    }
 
Since this is a PHP question it might be better served Asked in the PHP forum here: forum434

However i'm inclined to say,that you'll need to use Javascript to open a new window, with a specified height and width.
So you might want to go here and ask: forum216.

Just so we can wrap it up. i'll tell you the JS would look something like this:

Code:
 echo '<a href="#" OnClick="window.open([red]location[/red],"[red]width=XXX[/red],[red]height=YYY[/red]")>';
        echo '<img width="125" src="' . $row['picture'] . '"></a>';

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top