• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Creating popup windows in Dreamweaver

Andrej

New Member
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,
 
Last edited:
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.
 
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?
 
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.
 
<a href="#" onclick="open(page, win, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=300, height=400'); return false;">click</a>
 
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?
 
Last edited:
those are just the elements in the browser, want to position the window.
use this
Code:
<a href="#" onclick="open('yahoo.com', 'win', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=300,height=400,top=10,left=10'); return false;">click</a>
change top and left for browser positioning
 
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,
 
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>
 
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?
 
Last edited:
Wojtek said:
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,leftmargin=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 said:
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 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?
 
in the function open(), change the 2nd parameter so something else per thumbnail.
so in my code, change 'win' to 'somethingelse'
 
Back
Top