I have a ready made page and I just wanted to disable the maximize option of internet explorer and want to make the size of my wish of that page like a popup how I do it?
I have a ready made page and I just wanted to disable the maximize option of internet explorer and want to make the size of my wish of that page like a popup how I do it?
if this is an initial window then its usually not very well advised to mess with the width options like that.
put below in your <head> tags
Code:<script type="text/javscript"> function resizeWin(var width = 0, var height = 0) { if(width <= 0) { width = screen.availWidth; } if(height <= 0) { height = screen.availHeight; } self.resizeTo(width,height); self. } </script>where 760 is the desired width that you want and 600 is the desired height that you want.Code:<body onload = "resizeWin(760, 600)">
note the script allows for 1 or both arguments to be omitted which will cause window to use the available width / height of the screen.
I am not sure other than using the window.open method of disabling those features but if that is what you would like, then i suggest you do not use the script above, but rather
Code:function resizeWin(var url = '', var width = 0, var height = 0) { var newWin = window.open(url, newWin, "width="+width+",height="+height+",resize=0"); newWin.focus(); } </script>
Not all browsers will allow it to be non-resizable. IE will, though.Code:<a href="my_page.htm" onclick="window.open(this.href,'_new','width=300, height=350');return false;">Link Text</a>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
I have to put this code in body or in head?
If you are referring to my response no, it is an ordinary link.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
What's your msn id sir?
It goes in the body... like the rest of the page stuff.
http://www.dynamicdrive.com/forums/s...d.php?p=114338
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide
Bookmarks