PDA

View Full Version : Creating popup windows in Dreamweaver



Andrej
June 4th, 2005, 11:27
I wonder how to make link images that would open in popup window after clicking on them in Macromedia Dreamweaver? Currently I'm creating my website and I'd like to include into it a photogallery.

Thanks,

Yojance
June 4th, 2005, 14:02
Set it to open in a new windows by selecting _blank in the target option. This can be found by clicking on the link or image you want to open in a new windows. Its right on the properties TAB.

Andrej
June 4th, 2005, 14:36
That I've done, but how could I dislay new window without any toolbars, scrollbars, set it to be not resizable and to set the width and height of the window?

Andrej
June 5th, 2005, 12:01
Could anyone advise me how to make my thumbnails images opening in new windows? I mean popup window with no toolbars, scrollbars, not resizable and custom width and height.

Is it possible to make this using javascript only? I'd like to avoid using it if not necessary. Please tell me quickly as I need to complete my site as soon as possible.

kabatak
June 5th, 2005, 12:30
<a href="#" onclick="open(page, win, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrol lbars=0,resizable=0,width=300, height=400'); return false;">click</a>

Yojance
June 5th, 2005, 12:58
There you go. I didnt know how to do that one neither. Thanks Kabatak.

Andrej
June 5th, 2005, 14:03
Thank you kabatak.
I wonder what these commands mean: page, win, directories, location, return false? Is the location used to set up the position of the window opened on the screen? How do I display it in the top left-hand corner of the browser?

kabatak
June 5th, 2005, 15:24
those are just the elements in the browser, want to position the window.
use this


<a href="#" onclick="open('yahoo.com', 'win', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrol lbars=0,resizable=0,width=300,height=400,top=10,left=10'); return false;">click</a>

change top and left for browser positioning

Andrej
June 6th, 2005, 12:52
It doesn't work. :cry2: Could anyone post an example of how to use it? Let's say I've 'smalllogo.gif' thumbnail image and want to open "logo.gif" image in a new window.

Thanks,

Wojtek
June 6th, 2005, 13:06
replace the variables:

<a href="#" onclick="open('http://www.URLTO.com/logo.gif', 'win', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrol lbars=0,resizable=0,width=300,height=400,top=10,left=10'); return false;"><img border="0" src="http://www.URLTO.com/smalllogo.gif"></a>

Andrej
June 6th, 2005, 13:30
Thank you very much Wojtek. It works now.

Do you think it's good to set up the position of the window on the screen? I would say it's not necessary as your site will be viewed by people using different resolutions.


And how can I set up all the margins of the new window to 0px?

Wojtek
June 6th, 2005, 15:14
well you can pop up the window at 100 top, 100 left, will work with all resolutions.

as for the margins, you'll have to link to an html page containing the logo.gif

--- logodisp.html ---
<body leftmaring="0" topmargin="0">
img src= logo.gif
</body>
-------------------

and in the link replace http://www.URLTO.com/logo.gif with http://www.URLTO.com/logodisp.html

Andrej
June 6th, 2005, 15:54
well you can pop up the window at 100 top, 100 left, will work with all resolutions.

as for the margins, you'll have to link to an html page containing the logo.gif

--- logodisp.html ---
<body leftmaring="0" topmargin="0">
img src= logo.gif
</body>
-------------------

and in the link replace http://www.URLTO.com/logo.gif with http://www.URLTO.com/logodisp.html

OK, you mean I should create a simple website for each image. Is it possible to make it easier e.g. like this:


<a href="#" onclick="open('http://www.URLTO.com/logo.gif', 'win', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrol lbars=0,resizable=0,width=300,height=400,top=10,left=10,left margin=0,topmargin=0'); return false;"><img border="0" src="http://www.URLTO.com/smalllogo.gif"></a>

However, I think I think I'll make it as you said. And I will even be able to set the name of the picture displayed - title of the window which I also intend to do.

Wojtek
June 7th, 2005, 07:53
OK, you mean I should create a simple website for each image.
It's called a 'page', an 'html page' :)
a website is made of multiple 'pages'

Andrej
June 7th, 2005, 16:49
It's called a 'page', an 'html page' :)
a website is made of multiple 'pages'

OK, thanks for that point. :-)

I've used what you advised me. Please look here (http://andrejpariza.atspace.com/trencin.htm) what happens. First open the logo and then the contact cards image and you'll see it doesn't open a new window, but the window remains and what's worst it's size remains the same as well.

Is it possible to make the windows always opening a new window?

kabatak
June 7th, 2005, 17:05
in the function open(), change the 2nd parameter so something else per thumbnail.
so in my code, change 'win' to 'somethingelse'

Andrej
June 7th, 2005, 17:21
change 'win' to 'somethingelse'

What should it be?

kabatak
June 8th, 2005, 03:42
anything you like, it can be 'andrej'

Andrej
June 8th, 2005, 10:12
anything you like, it can be 'andrej'
It doesn't work. The opened window still remains the same, only the image in it changes.
I use something like this:


--- logodisp.html ---
<body leftmaring="0" topmargin="0">
img src= logo.gif
</body>
-------------------
and in the link replace http://www.URLTO.com/logo.gif with http://www.URLTO.com/logodisp.html June 6th, 2005 20:30

kabatak
June 8th, 2005, 14:19
you didnt do what I said.

Wojtek
June 8th, 2005, 14:26
<a href="#" onclick="open('sk/es/finearts/trencin/images/variations.htm', 'pic1', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrol lbars=0,resizable=0,width=383,height=346,top=10,left=10,top= 100,left=100'); return false;">view more colour variations of the logo</a></p>


<a href="#" onclick="open('sk/es/finearts/trencin/images/example.htm', 'pic2', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrol lbars=0,resizable=0,width=446,height=331,top=10,left=10,top= 100,left=100'); return false;">view formal letter title example</a></p></td>

and continue with pic3, pic4 and so on. Each one must be unique.

Andrej
June 12th, 2005, 16:25
Thank you very much Wojtek. You've helped me a lot. I've already completed my site (andrejpariza.tk (http://andrejpariza.tk/) ). :-)

sandrodz
June 14th, 2005, 05:35
hello. pm me your email and I'll give you dreamweaver custom behaviour that will make popups without any intervention. Simply click button and add popup...

oh, I see you already figured it out... good luck