javascript - How to set height and width of a new window from code behind -


i have been trying hours opening new window , bound launch code behind not opening in new tab. want adjust height , width of window, unable set same. tried calling javascript function code behind , writing same in aspx page, no luck.

i posting code: code behind:

page.clientscript.registerstartupscript(typeof(string), scriptkey, "<script type='text/javascript'>window.open('../reportwebform.aspx?reporttype=report','height=50,width=2000,left=0px,top=0px,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');</script>"); 

if launch server calling aspx page javascript:

 function openwindow() {         window.parent.open('../reportwebform.aspx?reporttype=report', 'width = 100%, height = 100%');     } 

try this

note 2nd parameter name of window. height , width need give in 3rd parameter

 function openwindow() {         window.open('../reportwebform.aspx?reporttype=report','', 'width = 100, height = 100');     } 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -