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


sergoy
03-12-2004, 09:26 AM
Hello
On a web page, I have an image with some localization (mappe area). When the mouse passes over, I would like to be able to open a popup window different for each localization to give a description of this part of the image.
It are possible?
Otherwise, where may I find Java script to open a new window which has the appearance of a popup window? (no scroll bar, no title, non rezises

sergoy
03-12-2004, 09:33 AM
Sorry I made a error. I want the popup appears if I CLICK on the map area

Pittimann
03-12-2004, 09:34 AM
Hi!

To your first question: it's possible, what why do you want to do that? Instead of popping up a window on overing each of the areas you could just use the title attribute to display information about that part of the image.

To the second one: you can only achieve the appearance of a popup (no scrollbar etc.), if the window is a popup - otherwise no!

Cheers - Pit

Pittimann
03-12-2004, 09:38 AM
Hi!

Sorry - I hadn't seen your last post! Can you post a link? Then I could give you some code based on that...

Cheers - Pit

sergoy
03-12-2004, 10:47 AM
Before all, I want to thank for your help.

http://www.cslaval.qc.ca/RessMat/Divisions/AutoFinance/formulaire_soumission.html

The image is an invoice. I must be able to show the description of certain element of the invoice. Example (contingency), (taxes), ( budgetary code), etc....

I have to make the map area for each element. I have frontPage 2000 to do it.

Pittimann
03-12-2004, 11:10 AM
Hi!

Would it be ok if I made just an example with one area (I'll put it for "Coût des matériaux"). There will be an onMouseOver title and an onClick popup window.

Please tell me, if that would be sufficient...

Cheers - Pit

sergoy
03-12-2004, 11:24 AM
Yes no problem.
But the popup has to display on a click and not on a mouse over. If you are to make tests, it would be necessary to make it on 2 different area (It want to say 2 different popup). For example(Coût des matériaux and Coût de la main-d'oeuvre)

Pittimann
03-12-2004, 11:28 AM
Hi!

I just made it with the elements you mentioned. You can pass the content of the popup as an argument like shown in my example (Please note: this code will not work, if you put quotes in the text!).

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script language="JavaScript" type="text/javascript">
<!--
function openPop(contents){
newWin=window.open('','blank','width=400,height=200');
newWin.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Invoice</title></head><body>');
newWin.document.write(contents);
newWin.document.write('</body></html>');
newWin.document.close();
newWin.document.focus();
}
//-->
</script>
</head>
<body>
<Map Name="myMap">
<AREA href="#" onClick="openPop('This element shows you blah blah blah...')" title="This element shows you blah blah blah..." shape="rect" COORDS="50,475,241,505">
<AREA href="#" onClick="openPop('This element shows you another blah blah blah...')" title="This element shows you another blah blah blah..." shape="rect" COORDS="50,505,241,535">
</Map>
<img src="formulaire_soumission.jpg" USEMAP="#myMap" width="590" height="795"></body>
</html>

Cheers - Pit

sergoy
03-12-2004, 11:34 AM
Wow you'r fast...
I am going to try this evening and give you news.
Thank you very much

Pittimann
03-12-2004, 11:38 AM
Hi!

You're welcome :)!

If you need further assistance, just let me know. I have never used frontPage or progs like that and I don't know, whether you can comfortably create areas with it. If this it not the case: I've written a js script for that and I could map the image for you if you like ...

Salut - Pit

steelersfan88
03-12-2004, 06:04 PM
If you really want a good program for image maps, try MapEdit: here (http://www.boutell.com/mapedit/download.html).

Pit, you know French too? or just some, we should speak foreign (of course, language translators would mess up privacy)!

Au revoir à vous (if I remember correctly!)