• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1772
  • Last Modified:

open and maximize a new window when clicking a link

I'm placing a web document as a desktop item in Windows XP.  It is supposed to be an automated background, if you will.  This way i can control things without clicking around XP.  I'm trying to create a link to a website, and when you click on it you get a traditional internet explorer window, maximized, with the intended location.  I tried the javascript:window.open('url') but i get a new window with the address bar saying just the code and not going to the intended location.  I also tried just using html and using target="_blank" and it works, but again the window isn't maximized.  How do i do this?  Thanks!
0
dartfrogs404
Asked:
dartfrogs404
  • 5
  • 4
1 Solution
 
devicCommented:
<a href=http://www.google.com onclick="window.open( this.href,'','width='+screen.width+',height='+screen.height);return false;">google</a>
0
 
dartfrogs404Author Commented:
I get a window in the bottom half of the screen, not maximized, no toolbars or anything.
0
 
devicCommented:
for example this:

<script>
function openWin(theHREF)
{
      var myWin=window.open(theHREF,'','width='+screen.width+',height='+screen.height+ ',top=0,left=0,scrollbars=1,toolbar=1,staus=1');
}
</script>
<a href=http://www.google.com onclick="openWin(this.href);return false;">google</a>


http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/open_0.asp


0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
dartfrogs404Author Commented:
i added menubar=1 and addressbar=1 to fix those missing, that makes the window do the same thing as before.  Even without those, the window is in an odd position on the screen and the maximize button is disabled!
0
 
devicCommented:
resizable=1
location=1

here is decription for all possible options:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/open_0.asp
0
 
dartfrogs404Author Commented:
i can do that, but still, there is no code to have the window automatically maximized.  Plus if i add the code for the menubars and the addressbars to what you suggested, it shrinks back down to 1/4 of the screen.  Question still unanswered :-/
0
 
devicCommented:
do not forget to refresh your desktop ;)
============================
<script>
function openWin(theHREF)
{
      var myWin=window.open(theHREF,'','width='+screen.width+',height='+screen.height+ ',top=0,left=0,scrollbars=1,toolbar=1,staus=1,resizable=1,location=1');
}
</script>
<a href=http://www.google.com onclick="openWin(this.href);return false;">google</a>
0
 
fritz_the_blankCommented:
You may need to do this (building on Devic's code)

window.moveTo(x, y)
function openWin(theHREF)
{
     var myWin=window.open(theHREF,'','width='+screen.width+',height='+screen.height+ ',top=0,left=0,scrollbars=1,toolbar=1,staus=1,resizable=1,location=1');
myWin.moveTo(0,0)
}
</script>
0
 
devicCommented:
also you can use VBS:

=============================VBS=====================================
<script language=vbscript>
Function openWinVBS(theHREF)
      Set ie = CreateObject("InternetExplorer.Application")
      ie.height = Screen.AvailHeight
      ie.width = Screen.AvailWidth
      ie.left = 0
      ie.top = 0
      ie.menubar = True
      ie.toolbar = True
      ie.statusbar = True
      ie.resizable = True
      ie.navigate theHREF
      ie.visible = True
End Function
</script>

<a href=http://www.google.com onclick="javascript:openWinVBS(this.href);return false;">google</a>


=============================JS=====================================


<script language=javascript>
function openWin(theHREF)
{
    var myWin=window.open(theHREF,'','width='+screen.availWidth+',height='+screen.availHeight+ ',top=0,left=0,scrollbars=1,toolbar=1,staus=1,resizable=1,location=1');
}
</script>
<a href=http://www.google.com onclick="javascript:openWin(this.href);return false;">google</a>

0
 
dartfrogs404Author Commented:
It's not exactly maximized, but it shows all the bars i want and fills the screen.  Thanks to all!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now