Click to See Complete Forum and Search --> : Popup Image?
RegData
12-02-2003, 03:28 AM
I've got a group of images on my site that i would like to popup once clicked. Im using Dreamweaver MX but don't know how to do this.
I've tried using some Javascripts but the code is wrong everytime i enter it into the <body> of my page.
Any useful advice/help on the above would be greatful.
Thanks in advance.
clairec666
12-02-2003, 05:17 AM
Do you mean 'popup' as in 'popup window'?
Create a new HTML page with each picture on.
<a href="javascript:window.open('page.html')">Popup picture</a>
RegData
12-02-2003, 07:21 AM
Yes i meant popup window.
How would i be able to alter that script to open the popup window to the exact dimensions of the picture as opposed to a whole new page?
Thanks again.
clairec666
12-02-2003, 07:23 AM
<a href="javascript:window.open('page.html','','width=#; height=#')">Open window</a>
This should work!! I can never be sure...........
(Replace # with the width in pixels)
RegData
12-02-2003, 07:43 AM
Worked like a charm.
Thankyou very much.
RegData
12-02-2003, 10:04 AM
Slight problem has occured.
As i click to open the popup window im left with a blank page with [object] written on the blank page.
How can i avoid this?
clairec666
12-02-2003, 10:06 AM
Damn, I came up with that [object] thing a while ago....... not sure. If it was working originally, you must have changed something that messed it up. Not sure what though!
RegData
12-02-2003, 10:16 AM
<a href="java script:window.open('page.html','','width=#; height=#')">Open window</a>
All i changed was the gap between "java script" & added the sizes in pixels.
I must have not noticed the [object] with the blank page at the start.
Is there any other method for popup window as opposed to Javascript?...bearing in mind im using Dreamweaver MX.
Thanks