After many many hours of trying to code this , i am still VERY stuck. Any help would be greatly appriciated.
I am trying to use a DHTML script to make my image open in a new layer , instead of having them images open in a new browser window.
It's for user's profiles , so the image locations and names vary , this isnt statik images.
This is the code i used to call the images
//img_src = the php file image.php which calls the image.
$img_src = $base_url."/image.php?id=" . $a_row["user_id"] . "&p=" . $a_row['total_file_count'];
$imgsrc = "id=" . $a_row["user_id"] . "&p=" . $a_row['total_file_count'];
// STARTS the Table for The Thumbnails
$return .= "<td width=\"33%\" align=\"center\">
// Code that turns the Thumbnail's into a Click able image for enlargment ( This is whats making the smaller images open in a new browser window.
<a href=\"user_viewimage.php?$imgsrc\" target=\"_blank\">
// The code that re-sizes the images into thumbnails and displays them in the table.
<img src=\"$img_src\" width=100 height=100 border=0 alt=\"x" title=\"x"></a>";
Full Code from above without Comments
$img_src = $base_url."/image.php?id=" . $a_row["user_id"] . "&p=" . $a_row['total_file_count'];
$imgsrc = "id=" . $a_row["user_id"] . "&p=" . $a_row['total_file_count'];
$return .= "<td width=\"33%\" align=\"center\"><a href=\"user_viewimage.php?$imgsrc\" target=\"_blank\"><img src=\"$img_src\" width=100 height=100 border=0 alt=\".: $array[username] :.\" title=\".: $array[username] :.\"></a>";
Now , What im trying to do , is when a user clicks on a thumbnail i want it to get passed to this dhtml code to open in a new layer , instead of in a new browser.
Code for the DHTML Image Layer
<a href="photo1.jpg" onClick="return enlarge('photo1.jpg',event)">
<img src="thumbnail.gif" border="0"></a>
The full image layer code can be seen here
http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm
Ive tried every possible code combo i c an think of for the last 4 hours and nothing i do works. So i need some help.
How can i get php to pass this info to the dhtml code , and where do i put the dhtml code?
Do i need a javascript pop up ( I dont know javascript)
Any help on this would be GREATLY appriciated
Regards,