Gossamer Forum
Home : Products : DBMan : Installation :

Pop-up window conatining image

Quote Reply
Pop-up window conatining image
I am using the "clickable links" mod and went in and set up to display "image Here" instead of the complete URL. also i added into the script to add in HARD CODE to display the link in a pop up window. That works fine .. So here is my question. If i add 2 new fields i.e Image Width and Image Height in the record How can i call these fields into the script.

<td width=80%><a href="$url" TARGET="popup" ONCLICK="window.open('$url', 'popup', 'width=300,height=300'); return false"><$font>Image File</font></a></td></tr>~;

Quote Reply
Re: Pop-up window conatining image In reply to
Unfortunately, you can't with the pop-up codes you are using...What you should do is create a blank html file or create a sub in DBMAN to show the Image, like the following:

Code:

sub html_show_image {
# --------------------------------------------------------
# Shows Image

my (%rec) = @_; # Load any defaults to put in the VALUE field.
($db_auto_generate and print &build_html_record(%rec) and return);

&html_print_headers;
print qq|
<html>
<head>
<title>$html_title: $rec{'Title'}</title>
</head>

<body bgcolor="#FFFFFF">
<center>
<img src="$rec{'Image'}" width="$rec{'Width'}" height="$rec{'Height'}" border="0">
</center>
</body>
</html>
|;
}


Then add the following codes in your elsif statements in the sub main routine:

Code:

elsif ($in{'show_image'}) { if ($per_view) { &html_show_image; } else { &html_unauth; } }


Then change your javascript codes to the following:

Code:

<td width=80%><a href="$db_script_link_url&ID=$rec{'ID'}&show_image=1" TARGET="popup" ONCLICK="window.open('$db_script_link_url&ID=$rec{'ID'}&show_image=1', 'popup', 'width=300,height=300'); return false"><$font>Image File</font></a></td></tr>~;


That should do it.

Good luck!

Regards,


Eliot Lee
Quote Reply
Re: Pop-up window conatining image In reply to
You might find this thread interesting and it may provide a solution for you.

http://www.gossamer-threads.com/scripts/forum/resources/Forum12/HTML/000158.html

I think that this post may be useful:

stumbles posted April 07, 1999 06:22 AM PST

Hope this helps

Quote Reply
Re: Pop-up window conatining image In reply to
Which is not much if any different than the suggestions I provided!

Tongue

Regards,

Eliot Lee