View Full Version : Hide Adress AND Pop-up scripts
snfalcao
05-27-2002, 05:02 PM
I use a pop up script in my site, but it's not good, cause all it does it like show the exact pictire with no free spaces when you click on a picture. I need a pop-up script that I can choose the size of the window, and the window would be a separate html page. anyone know something like that?
Also, I need a script that hides my adress in the adress bar, no matter what page I am in. For example, my ste's name is http://www.mysite.com, and when I click on the CONTACT option in the menu, the adress will be kept the same, and NOT http://www.mysite.com/contact.html. So...anyone?
Thanks for your attention, Ill talk to you all soon, I hope.
Stefano
quietstorm
05-27-2002, 05:55 PM
Pop-up:
<a href="#" onClick="window.open('url','','height=x,width=y');"> Text </a>
That will give you a window with no address bar, no status bar, none of the buttons....nothing but the border, the top bar, and the page (image).
scoutt
05-27-2002, 05:57 PM
first you can't hide the url with any script. you have to use frames.
second the popup you have, what is the code?
I need a pop-up script that I can choose the size of the window, and the window would be a separate html page.
make up your mind, do you want a popup or a seperate window. if you adjust your size of teh window than it is a popup and not a seperate html page. you could of course load a html page in a popup but that will be a lot of html pages for each individual image. say you have 100 images and now you haev to make a 100 html pages. a lot of work for nothing.
snfalcao
05-27-2002, 09:44 PM
Are you sure you cant hide the url? I'm almost sure I've seen it somewhere... well...
Here's my po-up, anyways. Btw, dont be scared, I'm a newbie with these things, I got it from some site, I don't even remember where. I have to put this in the Head:
SCRIPT LANGUAGE="JavaScript">
<!-- Original: Anders Jennerberg (anders@katedral.se) -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function ViewImage(ifile,ix,iy,ititle) {
var win;
var sWidth;
var sHeight;
var NS = (document.layers) ? 1 : 0;
win = window.open("","imageviewer","width="+ix+",height="+iy+",menubar=no,toolbar=no");
if (NS) {
sWidth = win.innerWidth;
sHeight = win.innerHeight;
} else {
sWidth = win.document.body.clientWidth;
sHeight = win.document.body.clientHeight;
}
if(sWidth!=ix || sHeight!=iy) {
win.close();
setTimeout("ViewImage('"+ifile+"',"+ix+","+iy+",'"+ititle+"')", 250);
return;
}
win.document.open();
win.document.write("<html><head><title>"+ititle+"</title>");
win.document.write("</head><body>");
win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
win.document.write("<img src="+ifile+"></div></body></html>");
win.document.close();
}
// End -->
</script>
And this (for example) in the BODY:
<a href="javascript:ViewImage('http://www.mysite.com/img/pic01.jpg',480,360,'Nightclub')"><img src="pic01small.jpg" width=120 height=90 border=1></a>
Well, actually, all I need is something that I can put somw things after the picture, like "Send this pic to a friend" or something. But this one here fits exactly on the size of the pic, and I can't add anything else but the pic.
It would be a lot of work to do 100 html pages, but it would be good if I just could add something else.
Man, what I actually need is to learn some of those languages like asp, cfm, coldfusion, cgi, etc... it would be much less work. Well........
scoutt
05-27-2002, 10:56 PM
if all you want ot do is change the size then just change thses values
<a href="java script:ViewImage('http://www.mysite.com/img/pic01.jpg',480,360,'Nightclub')"><img src="pic01small.jpg" width=120 height=90 border=1></a>
to the size you want.
and no you have not seen it any where before. I'm talking about hiding the url. you have to use frames for that
you can have a frame that is not viewable.
snfalcao
05-30-2002, 07:06 AM
I checked out the site I thought I saw the hide url.. but those were really frames.
well, if there is any way to go around this, doing it another way, or maybe if something comes up with time... be sure to tell me, cause I WONT use frames.
well.. thanks anyways.
See ya
scoutt
05-30-2002, 08:42 AM
I don't blame you for not using frames. I wish I could tell you of another way to do it, but I don't know any.
Willy Duitt
04-30-2004, 08:19 PM
There is no need to make a whole bunch of pages. You are already creating a new document with your popup's win.document.open() codes.
If you want to add more content, just add it somewhere within the popup code.
eg:
win.document.open();
win.document.write("<html><head><title>"+ititle+"</title>");
win.document.write("</head><body>");
win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
win.document.write("<img src="+ifile+"></div><div>This is some descriptive text</div></body></html>");
win.document.close();
And if you would like to add a different descriptive text for each image. Search the Clientside Forum. This has been discussed many times and I have posted at least 4 different methods to do this.
.....Willy
agent002
05-01-2004, 10:56 AM
Willy... why did you dig up this old thread?
Willy Duitt
05-01-2004, 03:08 PM
Heck if I know. :confused:
It appeared on my list of Recent Threads and
I merely responded to it without looking at the date.
Must have been another hiccup or my cookies had spoiled.
.....Willy
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.