PDA

View Full Version : spawn new window


craig
11-10-2002, 07:41 PM
I would like to be able to open a new window from a link that sizes itself to the monitor size and resolution.

I use Copernic Agent as a search engine.
Copernic (http://www.copernic.com)
When I open a result from the search it opens in a new broswer window that sizes itself to my screen.

When ever I use tag target="_new: or target="_blank" it opens a window that needs to be resized.
How can I aviod this.

I notice in Netscape it will open a full size window but in explorer the window needs to be resized.

I have tried the table method but due to the graphic nature of my site it destorts everything.

x_goose_x
11-10-2002, 08:39 PM
<a href="pop=window.open('page.htm','','top=0,left=0');pop.resizeTo(screen.width,screen.height);">popup</a>

joh6nn
11-10-2002, 09:07 PM
could make that even a little bit simpler:

<a href="window.open('page.htm','','top=0,left=0').resizeTo(screen.width,screen.height);">popup</a>

i've always wondered if that could be done, and i finally just tried it now, and it works in Moz, and IE6.

craig
11-11-2002, 12:47 AM
I tried both sets of tag <a href> code and it would not display the page. It just gave error message.

Here is the source code.
<HTML>
<HEAD>
<TITLE></TITLE>
<META name="description" content="">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">
<a href="window.open('http://www.prohosting.com','','top=0,left=0').resizeTo(screen.width,screen.height);">Version1</a>
<a href="pop=window.open('http://probe.prohosting.com','','top=0,left=0');pop.resizeTo(screen.width,screen.height);">Version2</a>
</BODY>
</HTML>

What am I doing wrong?

x_goose_x
11-11-2002, 01:48 AM
Sorry, put
<a href="javascript: window.open(...

craig
11-11-2002, 02:04 AM
Thank will try.

craig
11-11-2002, 02:17 AM
Tried it.
used javascript:window
Got java error.
Window displayed but with a 1/4 screen display and no resizing enabled in top right hand corner.
What am I doing wrong here?

joh6nn
11-11-2002, 04:26 AM
whats the code that you're using now?

craig
11-11-2002, 04:54 AM
This is the code I am using now.
<HTML>
<HEAD>
<TITLE></TITLE>
<META name="description" content="">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">
<a href="javascript:window.open('http://www.proamrodeo.com','','top=0,left=0').resizeTo(screen.width,screen.height);">Version1</a>
<a href="javascript:pop=window.open('http://probe.prohosting.com','','top=0,left=0');pop.resizeTo(screen.width,screen.height);">Version2</a>
</BODY>
</HTML>

I know how to add the attributes to resize, scroll etc.
What I would like to be able to do is to have the new window resize to the screen size automatically.

glenngv
11-11-2002, 06:03 AM
is the new window from another domain? That will breach the cross-domain security (http://msdn.microsoft.com/workshop/author/om/xframe_scripting_security.asp)