?
Solved

open and maximize a new window when clicking a link

Posted on 2004-04-23
10
Medium Priority
?
1,771 Views
Last Modified: 2009-07-29
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
Comment
Question by:dartfrogs404
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 25

Expert Comment

by:devic
ID: 10904775
<a href=http://www.google.com onclick="window.open( this.href,'','width='+screen.width+',height='+screen.height);return false;">google</a>
0
 

Author Comment

by:dartfrogs404
ID: 10904908
I get a window in the bottom half of the screen, not maximized, no toolbars or anything.
0
 
LVL 25

Expert Comment

by:devic
ID: 10904941
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:dartfrogs404
ID: 10904983
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
 
LVL 25

Expert Comment

by:devic
ID: 10905010
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
 

Author Comment

by:dartfrogs404
ID: 10905028
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
 
LVL 25

Expert Comment

by:devic
ID: 10905083
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
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 10905146
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
 
LVL 25

Accepted Solution

by:
devic earned 1000 total points
ID: 10905299
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
 

Author Comment

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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question