Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: Listings Manager (Realty Manager & Auto Manager):
Picture POPUP Problem...help needed...urgent

 

 


Joey
User

Jan 8, 2003, 4:07 PM

Post #1 of 2 (1812 views)
Shortcut
Picture POPUP Problem...help needed...urgent Can't Post

Hi Joey from Used-CarLots.com here....I am needing to pop up the actual listing pics in a popup window, centered and resized to the actual picture...I found this script below but it is not working no matter how i try it...it keeps throwing "object expected error" at varying lines...


******************script**********
<script>

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var

optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+Pos

itionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}

</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=

(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=documen

t.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no"

onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no"

onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();
}}

</script>



*************DEFAULT LINK FOR IMAGE:************

<a href="javascript:popImage('http://SomeSite.com/SomeImage.gif','Some Title')">
<img src="YourImage.gif" border="0">
</a>

i have tried every combination ...it is pulling in the thumbnail to the picture....but can't click......


<a href=
"javascript:popImage('http://www.used-carlots.com/am/listngs/images/$file$','Used Cars')"><img src="./images/$file$" border=2 width=150 alt="Photo" STYLE="border-style: solid; border-color: #000000"></a>

<a href=
"javascript:popImage('./images/$file$','$lfield1$')"><img src="./images/$file$" border=2 width=150 alt="Photo" STYLE="border-style: solid; border-color: #000000"></a>

****included info******************
Calling the Image Popup from Links in Your Page

This is the form of the function:

imagePop("url_of_image","title_of_image")

Use the relative or absolute path of the image where we show
url_of_image. This is the url of the image you wish to show
in the auto-sizing popup window.

Use any text you wish where we show title_of_image. This is
the title that will appear in the titlebar of the popup. (Note:
do not use single- or double-quotes within a title.)

Caution: Be careful to place both values within quotes.
See the samples below.


PLease help I will try to leave the live listing pages with errors up for as long as possible......

HERE'S One to check:

http://www.used-carlots.com/am/listings/l0011.html

Thanks,
Joey Stubblefield

Joey Stubblefield
http://Used-CarLots.com
Powered By Auto Manager!

http://1000Cars.com
Powered By Auto Manager!

http://MeetingStreetMotors.com
Powered By Used-CarLots.com Via Auto Manager!


Damon
Staff / Moderator


Jan 9, 2003, 11:16 AM

Post #2 of 2 (1789 views)
Shortcut
Re: [Joey] Picture POPUP Problem...help needed...urgent [In reply to] Can't Post

Hi Joey,

OtownAutos posted his javascript solution for an image popup that seems to work quite nicely. He also included a link to his site to see it in action.

Here is the link to his post: http://www.interactivetools.com/forum/forum.cgi?post=1565

Hope that helps. :)

Cheers
Damon Edis
interactivetools.com

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4