PDA

View Full Version : POP up Window


indianleo
12-04-2006, 09:30 AM
Hi Friends
I am getting problem in popup window I want to open an image, width is 500 and height is 650 but I want to show in an pop up window of 500X500 with scroll bar


I had used this script but it does not help me

on(press) {
getURL("javascript:NewWindow('FILENAME.html','','width=500 ,height=500,menubar=no,toolbar=no, scrollbars=yes,resizable=no')");
}

but the image doest not opens

davidj
12-04-2006, 10:07 AM
you need to call a javascript function from the flash movie

javascript function in page header...


<script language="javascript" type="text/javascript">

function popup(theURL,winName,features) {
window.open(theURL,winName,features);

}
</script>


then you action script on the button would look like ...
where 'example1.htm = your popup page

on (release){

getURL ("Javascript:popup('example1.htm','newWin','scrollba rs=yes,width=500,height=500')");

}

indianleo
12-04-2006, 10:22 AM
actually I got 1 index file in which i had inserted 1 swf file in which this button exits, when i will click on it I want to open 1 image so the script which u mentioned to insert in html can i insert in index file

indianleo
12-04-2006, 10:28 AM
the script is working but the image looks very small compare to the orignal size

davidj
12-04-2006, 10:32 AM
do you want to display the original size

If so you need to adjust your image tag accordingly

indianleo
12-04-2006, 10:34 AM
if suppose I m linking directly image i.e Jpeg

davidj
12-04-2006, 10:42 AM
if you do this the there is a big chance that some visitors might have JPG's associated with photoshop or fireworks. I, for one, would not want photoshop loading just to display an image from the web

you a better off inserting your image ina page and defining the size of the image from that

the reason that your image is smaller or looks the wrong size is that your function is specifying a size of 500 x 500 so thats what your going to get

use a blank page to display you image and call the page not the image

indianleo
12-04-2006, 10:47 AM
Sorry but understood please dont mind can u clarify

davidj
12-04-2006, 10:52 AM
you are currently loading a jpg. This is wrong, you should be loading a htm.

Put your image inside the htm page (popup)

indianleo
12-04-2006, 11:51 AM
Yes I got it thank you very much for giving ur precious time and helping me

davidj
12-04-2006, 12:07 PM
no problem

donations of bang & oulfsen accepted