Hey Lostinbeta, hope you’re doing well. I saw a thread at ozzu.com where you were helping a kid with a marginless window problem. Well, I wanted to get clear on something. I have this image viewer that I’ve been working on
for my buddie’s band ---->http://www.thezplane.com/test/new.htm
And I’m supposing the users may want to download some of the pictures from the show. I have a button that opens a window supposedly the size of the the jpeg but there is a white margin on the top and left. Any input on how to get rid of it? I’d appreciate any advise you may have.
on (release) {
getURL("javascript:NewWindow=window.open('Arra/"+_root.count_lv.Pics+"/pic"+_root.picNum+".jpg','newWin','width="+_root.wide+",height="+_root.high+",left=0,top=0,toolbar=0,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
}
And thanks for the help earlier in this thread in regards to the loadVars(). It didn’t work the way I had it, but it headed me in the right direction.
Well given this is a completely different topic, you probably should have created a new thread for it. Either way, the problem is because you are calling the JPG directly and the browser puts that in it’s own default defined page and you cannot control the margins.
There are 2 options here…
Create a .html page for each image that has the HTML margins removed and load that in the pop-up.
Create a PHP page that uses a query string to load in the correct image, then call that page (with the right query string identifier) to load in the pop-up window. I personally prefer this method because it is one page that is used for all images.
Wow, I was right in the middle of typing up another post saying that I was copying this to a new thread so that someone else may benefit from it and you beat me to it!
Yeah unfortunately I’m not well versed in php. Would it be a fairly simple script that I could find if I did some tutorial searching?
It’s not horrible the way it is but I’m kind of a stickler for little things like this.
good point. this was a small chunk of a larger script i wrote… you probably don’t even need that whole list/$attr crap in there either… I needed that for javascript purposes… but it is always good to have that defined in the HTML anyway IMO.
on (release) {
getURL("popup.php?img=Arra/"+_root.count_lv.Pics+"/pic"+_root.picNum+".jpg")
}
I tried it in conjunction with the javascript as well and that didn’t work either. The above works, but it opens a full size window and not a separate one either.
with the new line… since that is the URL to the file you are opening. You replaced your whole getURL code, including the window.open() function required to open the pop-up.
Ok, I got it worked out. I apologize for being such a bonehead here. I started with learning Flash so I’m almost a complete novice with other languages including html.
So what I didn’t know was that I had to create a page in dreamweaver with all margins set to 0 and put the php script in it and save that with a php extension.
I just had a plain text file saved with a php extension.
Thanks for everything Lostinbeta. You too ol4pr0. Have a great weekend!