Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java script to open new browser maximized or aligned top 1

Status
Not open for further replies.

terrahawk

Technical User
Dec 16, 2001
53
US
Hi, can someone help me with this code below. This code is for a page that opens another page with a flash file on it. What code do I have to add here to have the page with the flash file (QuickStart.htm) open maximized or aligned to the top of the screen (if that's possible). At the moment, the page opens kind of in the middle or a little to low on some screens and you have to manually move the page up to see the whole flash movie.
Thanks,
Tony
************************************************

<html>
<head>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>

<script language=&quot;JavaScript&quot;>

function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}

//-->
</script>
<title>Analyzer Demo</title>
</head>

<body>
<p><font color=&quot;#0033FF&quot; size=&quot;+2&quot;>Analyzer</font></p>

<a href=&quot;javascript:MM_openBrWindow('QuickStart.htm','Interactive_Demo','status=yes,menubar=no,scrollbars=no,resizable=no,width=900,height=680')&quot;><em><b>Start the demo</b></em></a>

</body>
</html>
************************************************
 
YOu might want to post this in the JavaScript forum, Terrahawk
 
it's a legit DW question!

......width=900,height=680,left=50,top=100')&quot;

All the best!

> need more info?
:: don't click HERE ::
 
Great, thanks for that lebisol. I do the work in Dreamweaver, but I would have asked in the Java group if I knew about it. I looked at the left hand side menu before posting but didn't see a Java group.
 
LOL @luds!
to JS or not to JS...

> need more info?
:: don't click HERE ::
 
I'd also like the original page above to close once a user has clicked to open the link leading to the Flash file. How should I do this? Thanks again, Peter.
 
try - top.window.close():

Code:
<a href=&quot;#&quot; onClick=&quot;MM_openBrWindow('Index.html','','scrollbars=yes,width=1000,height=730,top=0,left=8');top.window.close();&quot;>CLICK HERE </a>

All the best!

> need more info?
:: don't click HERE ::
 
Thanks lebisol,

I receive this prompt then:

&quot;The Web page you are viewing is trying to close the window. Do you want to close this window?&quot;

So I guess I should just leave the original code alone and let the user close the page then.

Peter
 
sorry ..try this: { parent.close}

<a href=&quot;#&quot; onClick=&quot;MM_openBrWindow('Index.html','','scrollbars=yes,width=1000,height=730,top=0,left=8');parent.close();&quot;>CLICK HERE </a>


All the best!

> need more info?
:: don't click HERE ::
 
I still get the warning prompt asking if I'd like to close the Window lebisol (top.window.close OR window.close).

Thanks,
Peter
 
You cannot close the parent window without the user agreeing.

[Peace][Pipe]
If you don't stand up for something, you'll fall down. Toke it Easy.
Howard Marks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top