TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

window.open

Page: 1 Reply
Jul 27th 2001#10148 Report
Member since: Mar 28th 2001
Posts: 5
erm.. hi.

i need some help with the window.open syntax.

ok this is my "problem". i want to open a new window, and i've already done that.. but not the way i want to.

my page (still under construction) is @ http://wastedtalent.idleplay.net

my original code was

head
script language="JavaScript"
!--
function popYouThree()
{
window.open 'http://www.glassdog.com/u3/index.html', 'winU3', 'width=650,height=400,links=0,scrollbars=1,toolbar=0,location=0,status=1,top=20,left=0');
return;
}
// --
!--
function popSmarTags()
{
window.open 'http://www.glassdog.com/smarttags/index.html', 'winU3', 'width=650,height=400,links=0,scrollbars=1,toolbar=0,location=0,status=1,top=20,left=0');
return;
}
// --
/script

and in the body part of the document i'd just call the function with a href=javascript : popYouThree()

this was fine.. but i was using 2 javascripts to open the same kind windows (same features) for 2 different urls. i needed to cut down on the code.

then i tried another way.. calling the javascript directly.
a href="javascript:void(window.open 'http://www.glassdog.com/u3/index.html', 'winU3', 'width=650,height=400,links=0,scrollbars=1,toolbar=0,location=0,status=1,top=20,left=0'))"

what i need is a "generic" js to open up a new window which allows me to enter the url and window variables in the tag. i don't know if i can get any clearer than that. thanks to anyone who can help.
Reply with Quote Reply
Jul 31st 2001#11006 Report
Member since: Jul 31st 2001
Posts: 2
Do you mean like this?

function PopupWindow(URL,WindowName,width,height )
{
window.open(URL , WindowName, width, height, links=0, scrollbars=1, toolbar=0, location=0, status=1, top=20, left=0);
return;
}
Reply with Quote Reply
Aug 1st 2001#11106 Report
Member since: Mar 28th 2001
Posts: 5
thanks .DM . i'll try it out..
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum