0
   

Javascript - How to resize new window?

 
 
echi
 
Reply Fri 8 Feb, 2008 09:23 pm
I have a JavaScript link that opens another site in a new window. How can I specify the size of the new window?
Thanks!
[edit]
I found out that you can't mess with javascript code. I must be the last to know.
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 0 • Views: 6,039 • Replies: 2
No top replies

 
Robert Gentel
 
  1  
Reply Wed 18 Jun, 2008 08:20 pm
Well here's the info anyway:

Code:<script language="javascript" type="text/javascript">
<!--
function popitup(url) {
newwindow=window.open(url,'name','height=600,width=800');
if (window.focus) {newwindow.focus()}
return false;
}

// -->
</script>


Code:
<a href="destinationURL.html" onclick="return popitup('popupex.html')">Link</a>
0 Replies
 
gkumar
 
  1  
Reply Fri 21 Aug, 2009 02:53 am
@echi,
this code helps to resize the new windows.

<html>
<head>
<script type="text/javascript">
function resizeWindow(){
window.resizeTo(500,300)
}
</script>
</head>

<body>
<form>
<input type="button" onclick="resizeWindow()" value="Resize window">
</form>
</body>

</html>

0 Replies
 
 

Related Topics

Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » Javascript - How to resize new window?
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 04/18/2024 at 06:00:16