Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6022613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:52:57+00:00 2026-05-23T03:52:57+00:00

I am trying to get the dimensions of my browser window using java script.

  • 0

I am trying to get the dimensions of my browser window using java script. The function I am using to do this is:

function getDimensions(){
    var myWidth = document.documentElement.clientWidth; 
    var myHeight = document.documentElement.clientHeight; 
    var returnstring = myWidth+','+myHeight;
    document.applets[0].postDimensions(returnstring); 
}

But the width and the height returned are both zero. I don’t understand why.

The source is listed below.

<html>
<head>
    <title>Emscribe Dx Review Screen</title>
<style type="text/css">
body {

    text-align: left; /* for IE */
}
#container {

    text-align: left; /* counter the body center */
    /*width: 1250px; */
}

</style>




</head>
<BODY id="App1" style=" height:50%;" BGCOLOR="#3D59AB">
<div id="container" style="height:75%">
    <div name= "buttonbar" id = "buttonbar" style="cursor:wait;" style="width:100%;   
height:5%;">
      <SCRIPT LANGUAGUE = "JavaScript" src="scripts/ingenix.js"></SCRIPT>


<SCRIPT LANGUAGE="JavaScript">

function getDimensions(){
var myWidth = document.documentElement.clientWidth; 
var myHeight = document.documentElement.clientHeight; 
var returnstring = myWidth+','+myHeight;
document.applets[0].postDimensions(returnstring); 

}

</SCRIPT>



<FORM NAME="CODINGFORM">         
   <TABLE cellpadding=5 cellspacing=3 border=2 width="100%" height="10%" Align="left">
 <tr width="100%">
<td width="15%" align="center">

      <input type="text" name="AccountNumber" id="AccountNumber" size="12" title="Enter   
 the account to be downloaded here."
        onkeypress="keydownpress(this.form)" style="cursor:wait; font-weight: bold; "  
disabled=true  /> 
      <font style="display:block;" color="white" size="2" face="arial">Account</font>

  <div style="display:inline;">
    <div style="display:inline; float:left;">
      <button name="download" value="download" type="button" disabled=true
        style="background-color:white; color:black;  cursor:wait;"
        title = "Click here to download an account." onClick="doDownload(this.form)">
        <img src="picts/down.gif" alt="" width="20" height="20" name="downimage"/> 
      </button>
      <font  style="display:block; font-size: 11px;" color="white" face="arial" 
id="downfont"> Download</font>
    </div>
     <div style="display:inline; float:right; margin-right: 5px;">
                    <button name="save" value="save" type="button" 
style="background-color:white; color:black; cursor:wait;" disabled=false  
                      onClick="doSave()"
                      title = "Click here to save your work.">
                      <img src="picts/save.png" alt="" width="20" 
height="20" id="saveimage"/>
                  </button>

                  <font style="display:block; font-size: 11px;" 
color="white"   face="arial" id="savefont"> Save</font>
                </div>
  </div>
<div style="display:inline; float:none; margin-right: 5px;">
      <button name="upload" value="upload" type="button" style="background-color:white; 
 color:black; cursor:wait;" disabled=true  
        onClick="doUpload()"
        title = "Click here to return account to database.">
        <img src="picts/gup.gif" alt="" width="20" height="20" id="upimage"/>
      </button>

      <font style="display:block; font-size: 11px;" color="gray"   face="arial" 
id="upfont"> Upload</font>
    </div>
  </div>


</td>




<td width="7%" height="75" align=center>
  <button name="encode" value="encode" type="button"  style="background-color:white; 
color:black; cursor:wait;" disabled=true  title = "Click here when ready to   send 
entries to encoder." onClick="doEncoding()">
    <img src="picts/e.gif" alt="" width="20" height="20" />  
  </button>

<br><font color="white" size="2" face="arial"> Encoder</font></td>


<td width="10%" align="center">
  <div style="text-align:center;">
<span style="text-align:center; display:block;"><button name="warning" value="warning"    
type="button" disabled = true style="cursor:wait
  style="background-color:white; color:black;"
  onClick="displayDrgElements()">
<img src="picts/greywarning.gif" alt="" width="20" height="20"  name="warningimg"/> 
</button>
</span>
<span style="text-align:center; display:block;"><input type="text" align="center"   
name="RDRG" id="RDRG" size="10" disabled = true title="Running DRG."   
style="height:20px; font-size: 10px;  padding-bottom:0px; margin-bottom:0px;"   
readonly/></span>
<span style="text-align:center;  display:block;"><font id="runningD" color="white" 
size="2" face="arial" style="font-size: 11px; padding-top:0px; margin-top:0px; 
  display:block;">Running DRG</font></span>

</div>

  <div style="text-align:center;">
  <span style="text-align:center;  display:block;"><input type="text" align="center" 
 name="reimburse" id="reimburse" size="10" style="cursor:wait; height:20px; font-size: 
 10px;  padding-bottom:0px; margin-bottom:0px;" disabled = true title="Running DRG." 
 readonly/></span>
 <span style="text-align:center;  display:block;"><font id="EstReimburse" color="white" 
  size="2" face="arial" style="font-size: 11px; padding-top:0px; margin-top:0px; 
 display:block;">Est. Reimburse</font></span>
 </div>

 </td>


<td align=center>
 <div style="float:left; height: 100px;">
 <div id="bannerOption1Div" width="10%" align=center style="display:none">
   <input disabled=true type="text" name="bannerOption1Source" 
id="bannerOption1SourceId" size="20" style="height:20px; font-size: 12px;  padding-
bottom:0px; margin-bottom:0px;"/>
   <font id="bannerOption1TextId" color="white" size="2" face="arial" style="font-size: 
11px; padding-top:0px; margin-top:0px; display:block;">None</font>
 </div>
 <div id="bannerOption2Div" width="10%" align=center style="display:none">
   <input disabled=true type="text" name="bannerOption2Source" 
id="bannerOption2SourceId" size="20" style="height:20px; font-size: 12px; padding-  
bottom:0px; margin-bottom:0px;"/>

   <font id="bannerOption2TextId" color="white" size="2" face="arial" style="font-size: 
 11px; padding-top:0px; margin-top:0px; display:block;">None</font>
 </div>
 <div id="bannerOption3Div" width="10%" align=center style="display:none">
   <input disabled=true type="text" name="bannerOption3Source" 
id="bannerOption3SourceId" size="20" style="height:20px; font-size: 12px; padding-

bottom:0px; margin-bottom:0px;"/>

   <font id="bannerOption3TextId" color="white" size="2" face="arial" style="font-size:   
 11px; padding-top:0px; margin-top:0px; display:block;">None</font>
  </div>
 </div>
 <div style=" margin-left:10px; float:left;  height: 100px;">
 <div id="bannerOption4Div" width="10%" align=center style="display:none">
   <input disabled=true type="text" name="bannerOption4Source" 
  id="bannerOption4SourceId" size="20" style="height:20px; font-size: 12px;  padding-
  bottom:0px; margin-bottom:0px;"/>

   <font id="bannerOption4TextId" color="white" size="2" face="arial" style="font-size: 
11px; padding-top:0px; margin-top:0px; display:block;">None</font>
 </div>
 <div id="bannerOption5Div" width="10%" align=center style="display:none">
   <input disabled=true type="text" name="bannerOption5Source" 
id="bannerOption5SourceId" size="20" style="height:20px; font-size: 12px;  padding-
bottom:0px; margin-bottom:0px;"/>

   <font id="bannerOption5TextId" color="white" size="2" face="arial" style="font-size: 
11px; padding-top:0px; margin-top:0px; display:block;">None</font>
 </div>
 <div id="bannerOption6Div" width="10%" align=center style="display:none">
   <input disabled=true type="text" name="bannerOption6Source" 
id="bannerOption6SourceId" size="20" style="height:20px; font-size: 12px;  padding-
bottom:0px; margin-bottom:0px;"/>

   <font id="bannerOption6TextId" color="white" size="2" face="arial" style="font-size: 
11px; padding-top:0px; margin-top:0px; display:block;">None</font>
 </div>
</div>
<div style=" margin-left:10px; float:left;  height: 100px;">
 <div id="bannerOption7Div" width="10%" align=center style="display:none">
   <input disabled=true type="text" name="bannerOption7Source" 
id="bannerOption7SourceId" size="20" style="height:20px; font-size: 12px;  padding-
bottom:0px; margin-bottom:0px;"/>

   <font id="bannerOption7TextId" color="white" size="2" face="arial" style="font-size: 
11px; padding-top:0px; margin-top:0px; display:block;">None</font>
 </div>
 <div id="bannerOption8Div" width="10%" align=center style="display:none">
   <input disabled=true type="text" name="bannerOption8Source" 
id="bannerOption8SourceId" size="20" style="height:20px; font-size: 12px;  padding-
bottom:0px; margin-bottom:0px;"/>

   <font id="bannerOption8TextId" color="white" size="2" face="arial" style="font-size: 
11px; padding-top:0px; margin-top:0px; display:block;">None</font>
 </div>
  <div id="bannerOption9Div" width="10%" align=center style="display:none">
   <input disabled=true type="text" name="bannerOption9Source" 
   id="bannerOption9SourceId" size="20" style="height:20px; font-size: 12px;  padding- 
   bottom:0px; margin-bottom:0px;"/>

   <font id="bannerOption9TextId" color="white" size="2" face="arial" style="font-size: 
    11px; padding-top:0px; margin-top:0px; display:block;">None</font>
    </div>
  </div>
  <div style=" margin-left:10px; float:left;  height: 100px;">
    <div id="bannerOption10Div" width="10%" align=center style="display:none">
   <input disabled=true type="text" name="bannerOption10Source" 
   id="bannerOption10SourceId" size="20" style="height:20px; font-size: 12px;  padding-
   bottom:0px; margin-bottom:0px;"/>

   <font id="bannerOption10TextId" color="white" size="2" face="arial" style="font-
  size: 11px; padding-top:0px; margin-top:0px; display:block;">None</font>
  </div>
  <div id="bannerOption11Div" width="10%" align=center style="display:none">
   <input disabled=true type="text" name="bannerOption11Source" 
  id="bannerOption11SourceId" size="20" style="height:20px; font-size: 12px;  padding-
   bottom:0px; margin-bottom:0px;"/>

   <font id="bannerOption11TextId" color="white" size="2" face="arial" style="font-
   size: 11px; padding-top:0px; margin-top:0px; display:block;">None</font>
 </div>
 <div id="bannerOption12Div" width="10%" align=center style="display:none">
   <input disabled=true type="text" name="bannerOption12Source" 
   id="bannerOption12SourceId" size="20" style="height:20px; font-size: 12px;  padding-
   bottom:0px; margin-bottom:0px;"/>

   <font id="bannerOption12TextId" color="white" size="2" face="arial" style="font-
   size: 11px; padding-top:0px; margin-top:0px; display:block;">None</font>
   </div>
  </div>


  <div style=" margin-left:10px; float:left;  height: 100px;">
 <div id="bannerOption13Div" width="10%" align=center style="display:none">
   <input disabled=true type="text" name="bannerOption13Source" 
  id="bannerOption13SourceId" size="20" style="height:20px; font-size: 12px;  padding-
  bottom:0px; margin-bottom:0px;"/>

   <font id="bannerOption13TextId" color="white" size="2" face="arial" style="font-
size: 11px; padding-top:0px; margin-top:0px; display:block;">None</font>
 </div>
 <div id="bannerOption14Div" width="10%" align=center style="display:none">
   <input disabled=true type="text" name="bannerOption14Source" 
  id="bannerOption14SourceId" size="20" style="height:20px; font-size: 12px;  padding-
   bottom:0px; margin-bottom:0px;"/>

   <font id="bannerOption14TextId" color="white" size="2" face="arial" style="font-
  size: 11px; padding-top:0px; margin-top:0px; display:block;">None</font>
   </div>
 <div id="bannerOption15Div" width="10%" align=center style="display:none">
   <input disabled=true type="text" name="bannerOption15Source" 
id="bannerOption15SourceId" size="20" style="height:20px; font-size: 12px;  padding-
 bottom:0px; margin-bottom:0px;"/>

   <font id="bannerOption15TextId" color="white" size="2" face="arial" style="font-
size: 11px; padding-top:0px; margin-top:0px; display:block;">None</font>
 </div>
 </div>



  </td>


   <td id="emDropDownContainer" width="9%" align=center style="display:none">
 <font color="white" size="2" face="arial">CPT Code</font>
 <br>
 <div id="cptDiv">
     <select id='selCptId' name='selectedCptId'>
      <option  value="-1">--None--</option>
 </select>
</div>
</td>

</tr>
</table>
</FORM>
 </div>

 <div style="width:100%; height:89%; margin-left:0px;>
 <TABLE cellpadding=0 cellspacing=0 border=0 width="100%" height="90%">
<tr style="height:100%;">   
    <td VALIGN="TOP">   
       <div  style="visibility:visible; background:white; foreground:black; font-   
size:200%; width:100%; height:10%; margin-left:100px; margin-top:5px; margin- 
right:100px; text-align:center; cursor:wait;" id="msgdiv">
            <p> Please wait while Fusion CAC Loads </p>
        </div>
        <div align="center" style="cursor:wait; height:100%;"  id="divapp" 
name="divapp" >
            <APPLET NAME="RevApp2" CODE="RevApp2.class" id="myapplet" name="myapplet" 
style="visibility:hidden;"
              ARCHIVE ="CoderDx.jar,xpp3-1.1.3.4.C.jar,xml-apis.jar,jcommon-
1.0.16.jar,jfreechart-1.0.13.jar,MultiSplit.jar,balloontip-1.1.1.jar,artificialmed.jar" 
WIDTH=99% HEIGHT=100%>
                <PARAM NAME = USERID VALUE = "#DxWebTemplate" />
                <PARAM NAME = URL VALUE = "#IPAddress" />
                <PARAM NAME = PATHNAME VALUE = "#PathName" />
                <PARAM NAME = SessionID VALUE = "#SessionID" />
                <PARAM NAME = Role VALUE = "#Role" />
            </APPLET>
    </div>  
    </TD>
</TR>  

</table>

</div>
</div>
</BODY>
</HTML>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:52:58+00:00Added an answer on May 23, 2026 at 3:52 am

    The original code was obtained by doing a Google search. As we know, Google searches do not always provide the correct answer. I am aware that there is antiquated code in this html but that is not a priority right now. To the point, the answer was found on another web page. I post for others benefit:

    function getDimensions()
    {
      var myWidth = document.documentElement.offsetWidth;
      var myHeight = document.documentElement.offsetHeight;
      var returnstring = myWidth+','+myHeight;
      document.applets[0].postDimensions(returnstring);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get the dimensions (width) of image elements which are scaled using
I'm trying get values from a GridView using the following code: foreach (GridViewRow row
Trying to get my css / C# functions to look like this: body {
Trying to get this example working from http://www.munna.shatkotha.com/blog/post/2008/10/26/Light-box-effect-with-WPF.aspx However, I can't seem to get
Trying to get parameters from a PUT request using HttpServlet#doPut: public void doPut(HttpServletRequest request,
Trying to get this to work, with no luck: [DataMember] public Type ParameterType {
I’m trying to get an image (dynamically placed, with no restrictions on dimensions) to
I am trying to get this in MATLAB, however I am not successful !
I'm trying to work out why this function isn't working by placing a few
I'm trying to build a video thumbnailer using gst-python, it looks like this. from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.