Click to See Complete Forum and Search --> : I need a script ...


!¡¤NiCeGuY¤¡!
03-17-2003, 09:05 PM
Ok guys, I was wondering if someone were to be nice enough to tell me how I can do this. I want to have a link that launches a pop up window with a certain size, like 400x400, which I would like to be able to edit. I know this is simple.


Thanks,
!¡¤NiCeGuY¤¡!

!¡¤NiCeGuY¤¡!
03-17-2003, 09:17 PM
Hmmm I came upon this one:

<script>
<!--
/*Full screen window opener script: Written by JavaScript Kit (www.javascriptkit.com) More free scripts here*/
function fullwin(){
window.open("../index.html","","fullscreen,scrollbars")
}
//-->
</script>
<form>
<input type="button" onClick="fullwin()" value="Open window">
</form>

How can I make instead of full screen like 400x400 or whatever, and i'd be able to edit it too.

Thanks,
!¡¤NiCeGuY¤¡!

Nedals
03-17-2003, 09:26 PM
var=window.open(URL,name,options);
URL Location of contents of window
name A unique name used to refer to this window.
options All options are assumed true unless any one
option is included, then all others are false.
width=xx,height=xx,top=xx,left=xx,
locationbar,menubar,scrollbars,status,toolbar

dabush
03-17-2003, 09:34 PM
function popupWindow()
{
var mypopup = window.open("url.html","description","width=400,height=400");
mypopup.write("You can add HTML to the popup in this string!");
}


NOTE: All other parts of the window will be taken away, such as scrollbars, statusbar, menubar, address bar, etc. to put them back, just add them to the 3rd parameter of the window.open() line

For example, to add back the menubar and statusbar, change the first line to this

var mypopup = window.open("url.html","description","width=400,height=400,menubar,status");