如何设置window.open的高度和宽度? [英] how to set height and width of window.open?

查看:1166
本文介绍了如何设置window.open的高度和宽度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用window.open对象为在android平板电脑的webkit浏览器上运行的Web应用程序开发查找.现在的问题是该对象未显示到给定的高度&.平板电脑在Windows桌面上显示良好时的宽度.以下是我的代码.

Well I am developing a lookup using window.open object for the web apps which runs on the webkit browser of android tablet.Now the problem is the object is not displaying to its given height & width on the tablet while it is displaying good on the windows desktop.Following is my code.

function ADShowLookup(Title,For,Obj,ObjDesc,Text,WeDate, Focus,FunName,Height,Width,UserGroup)
    {
        URL = "Height="+Height+"&hObject=" + Obj + "&hObjDesc=" + ObjDesc + "&hFor=" + For + "&Text=" + Text;
        if(Focus != undefined)   URL += "&nextfocus=" + Focus ;
        if(FunName != undefined)   URL += "&hFunName="  + FunName ;        
        if(UserGroup != undefined)   URL += "&hUserGroup="  + UserGroup ; 
        if(WeDate != undefined)   URL += "&WeDate=`dtWeDate`" ;
        doOpenWin('calltc2?title=' + Title + '&report=showLookup¶ms=' + escape(URL),Height,Width);
    }

    function doOpenWin(URL, Height, Width)
    {
        Att = "dialogWidth:" + Width + "px; dialogHeight:" + Height + "px; status:no; center:yes;scroll:no";
        //showModalDialog(URL,window,Att);
        var hwin;
        hwin = window.open(URL,'win1','toolbar=no,statusbar=yes,width=400,height=600');
        hwin.moveTo(300, 400);
    }





<img src="/michel/lookup.gif"  önclick=" ADShowLookup('CC Search','cc16','CcCode','CcDesc','`cJobNo`','County','',600,300)" style="cursor:pointer">



有人可以帮我吗?

您的帮助将不胜感激.

在此先感谢!!!!!

问候,

Arvind



So can anyone help me in this?

Your help will surely appreciated.

Thanks in Advance!!!!!

Regards,

Arvind

推荐答案

您从何处获得了dialogWidth, dialogHeight?必须为width, height.在此处找到正确的示例: http://www.javascript-coder.com/window-popup /javascript-window-open.phtml [ ^ ].

有数以百万计的文档描述了此类Javascript功能,为什么不查看它们呢?当您问这个问题时,您就可以访问Internet.

—SA
Where did you get your dialogWidth, dialogHeight? Must be width, height. Find correct samples here: http://www.javascript-coder.com/window-popup/javascript-window-open.phtml[^].

There are million of documents describing such Javascript function, why not looking at them? As you asked this question, you have Internet access.

—SA


这篇关于如何设置window.open的高度和宽度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆