Click to See Complete Forum and Search --> : maping


davis_s
11-30-2003, 06:02 AM
i am trying to make a pop up win...i have an image n inserted as table bagroung pictuer...how could i close the screen by clicking on close in the image?....i repeate ive put that image as table background....please help.


ive posted the image here www.m-kop.com/popup.gif

Pittimann
11-30-2003, 06:07 AM
Hi!

Can you post the code of the page in the popup or a link to it??

Afaik, mapping is not possible with background images...

Cheers - Pit

davis_s
11-30-2003, 06:33 AM
actually i am tring to make chromeless win...but that is really confusing..so i tried this


<script type="text/javascript">
function openwin(url) {
var name = "popup"; // popup name
var width = "690"; // popup width
var height = "327"; // popup height
var left = (screen.width - width) / 2 ;
var top = (screen.height - height) / 2;
var windowproperties = "fullscreen=1, scrollbars=0 ";
newwin = window.open(url, name, windowproperties);
newwin.resizeTo(width, height);
newwin.moveTo(left, top);
}
</script>

Pittimann
11-30-2003, 06:40 AM
Hi!

I didn't mean the code of the opening function, but the code of the page displayed in the popup (containing the table and the popup.gif).

Unfortunately, my machine is getting weak - have to restart it, after that I'll post you an alternative to the function you want to open the popup with...

Cheers - Pit

davis_s
11-30-2003, 06:55 AM
Actually i am not inserting in any table....i am doing that as page backgound

Pittimann
11-30-2003, 06:59 AM
Ok - let me do it like that:

I changed your function (you cannot attempt to open a popup of a specific size and then - contradictory to that - add "fullscreen" to its' attributes; the height and width you specified were also both too small for the image.)

And to avoid this background image stuff I put some document.write to the function. This will put the image, the map you were eager to get and a div for text you might want to appear into the popup.

Here's some example code you can play with:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script type="text/javascript">
function openwin() {
var imagePath="";//put the path to your popup.gif image file here
var wintitle = "popup"; // popup title
var width = "707"; // popup width
var height = "350"; // popup height
LeftPosition = (screen.width) ? (screen.width-width)/2 : 0;
TopPosition = (screen.height) ? (screen.height-height)/2 : 0;
windowproperties =
'height='+height+',width='+width+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no';
newwin = window.open('', wintitle, windowproperties);
newwin.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Untitled</title></head><body><Map Name=MyMap><AREA href="#" onclick="window.close()" shape="poly" COORDS="521,288,523,284,526,280,530,279,611,279,615,281,618,284,619,286,619,312,616,315,614,318,610,320,529, 320,526,318,523,315,521,311"></Map><img src="'+imagePath+'popup.gif" USEMAP="#MyMap" width="687" height="350" border=0><div style="position: absolute;left:345;top:27;width:320;height:245">Your text here...<div></body></html>');
}
</script>
</head>
<body>
<a href="#" title="&nbsp;&nbsp;" onclick="openwin()">open window</a>
</body>
</html>

Cheers - Pit

Pittimann
11-30-2003, 07:06 AM
Sorry - our posts crossed each other...

You're making me confused: In your very first post to this thread you mentioned twice that the popup.gif is the background image of a table.

Now - no more table :confused:

To me it was logical, that the page to be displayed in the popup contains a table (probably for some text) and the image (an area of which should serve for closing the window when clicking on it).

What do you actually want and where does the action have to take place??