Guest systech44 Posted August 26, 2006 Share Posted August 26, 2006 When I am using open() then I need to set the width and height. But I would not like to set them. What I want is to get the window's size is of my current window's size and I do not want that to open in a separate window. If I need to change the location of the file how should I make it. Please show me. Link to comment Share on other sites More sharing options...
skym Posted August 26, 2006 Share Posted August 26, 2006 I'm lost... I don't really understand what you want. Anyway, you don't need to set height/width when using open().To find out the current window size, I have some code, I'm not sure if it's working: // Simple Browser Check//var moz = (document.getElementById && !document.all) ? 1 : 0;var dom = (document.getElementById) ? true : false;var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;var ie4 = (document.all && !dom) ? true : false;if (ie5 && ie4) moz = true; else moz = false;// Browser Window Dimensionsfunction winWid(){ return (moz) ? window.innerWidth : document.body.clientWidth; }function winHei(){ return (moz) ? window.innerHeight : document.body.clientHeight; }<script>// Example Usevar displaywitdh = winWid();var displayheight = winHei();goodHeight = displayheight-181;//alert('Width = '+displaywitdh+' : Height = '+displayheight);// orig height=846 </script> I do not want that to open in a separate window. If I need to change the location of the file how should I make it.How about <a> ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now