Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

Determining the height and width of a <div> dynamically

Question posted by: Frinavale (Forum Leader) on March 28th, 2008 03:23 PM
Hi there!

I've created a "message" box that consists of a <div> with a bunch of information in it and some buttons (which could be "ok", "yes", "no", "cancel"...). It's dynamically created with some .NET code on the server.

Because the message information that is within this <div> is dynamic, it can be several lines long...also the message box <div> can be variable widths wide as well. Therefore, I need a Dependable way to dynamically retrieve the width and height of the <div> in order to properly center it in the middle of the browser.

I have used:
Code: ( text )
  1. var panelHeight = document.getElementById(nameOfMessageBoxWindow).cl  ientHeight;
  2. var panelWidth = document.getElementById(nameOfMessageBoxWindow).cl  ientWidth;


However this code only seems to work in certain circumstances, and others doesn't work at all (using firebug I discovered that these two values were always 0 for some weird reason).

In order to find the width of the <div>, I set the <div>'s style width dynamically with my .NET code and then used the following code:
Code: ( text )
  1. var styleWidth = panel.style.width;
  2. var panelWidth = Number(styleWidth.replace(/px/,""));


This works, however it feels like a bit of a "workaround" to me. Also, this solution doesn't help me find the height of the <div>.

Does anyone know what might be the cause to the element.clientWidth to always be 0?
Does anyone know of another way to dynamically determine the height and width of the <div>?

Thanks for your time,

-Frinny
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
gits's Avatar
gits
Moderator
2,893 Posts
March 28th, 2008
03:42 PM
#2

Re: Determining the height and width of a <div> dynamically
hi frinny,

have a look whether this thread helps ... and here is another link ;)

kind regards

Reply
Frinavale's Avatar
Frinavale
Forum Leader
2,052 Posts
March 28th, 2008
03:58 PM
#3

Re: Determining the height and width of a <div> dynamically
Quote:
Originally Posted by gits
hi frinny,

have a look whether this thread helps ... and here is another link ;)

kind regards


Thanks Gits,
I'm looking into the offsetHeight and offsetWidth now.
I think I've tried this before, I'll get back to you to let you know if it helps.


-Frinny

Reply
Frinavale's Avatar
Frinavale
Forum Leader
2,052 Posts
March 28th, 2008
04:02 PM
#4

Re: Determining the height and width of a <div> dynamically
Quote:
Originally Posted by Frinavale
Thanks Gits,
I'm looking into the offsetHeight and offsetWidth now.
I think I've tried this before, I'll get back to you to let you know if it helps.


-Frinny


The offsetHeight and offsetWidth did not work.

Reply
gits's Avatar
gits
Moderator
2,893 Posts
March 28th, 2008
04:07 PM
#5

Re: Determining the height and width of a <div> dynamically
i just tested it in IE6 and FF and it worked without problems ... may be you could post a html-example that demonstrates your problem?

kind regards

Reply
Frinavale's Avatar
Frinavale
Forum Leader
2,052 Posts
March 28th, 2008
07:04 PM
#6

Re: Determining the height and width of a <div> dynamically
Quote:
Originally Posted by gits
i just tested it in IE6 and FF and it worked without problems ... may be you could post a html-example that demonstrates your problem?

kind regards


It's really complicated because of the auto generated stuff that the .NET code does.

Basically I have a control that handles uploading of pictures, if the picture is not uploaded properly a message window is supposed to be displayed in the middle of the page. This is the message window that does not center (because the clientHeight and offsetHeight of this <div> are 0).

The control that handles the uploading of the pictures is buried deep within nested <divs>.

I have other message box <div> windows as well on the page (which are also buried within other <div>s but not so deep) and they center properly.

I'll see what I can figure out to try and easily show you the problem....

The worst part is that it works in most cases, it's just this deeply buried message box that's the problem.

-Frinny

Reply
mmurph211's Avatar
mmurph211
Newbie
13 Posts
March 28th, 2008
07:17 PM
#7

Re: Determining the height and width of a <div> dynamically
Try these two functions out:
http://www.matts411.com/webdev/width_and_height_getter_functions_for_html_element s

Just wrote them. Should work but have yet to do enough testing to prove that they work 100% of the time.

Reply
Frinavale's Avatar
Frinavale
Forum Leader
2,052 Posts
March 28th, 2008
07:57 PM
#8

Re: Determining the height and width of a <div> dynamically
Quote:
Originally Posted by mmurph211
Try these two functions out:
http://www.matts411.com/webdev/widt...html_element s

Just wrote them. Should work but have yet to do enough testing to prove that they work 100% of the time.


In the following code you check to see if the element (in my case the <div> that is my message box) has a current style display of "none.
Then you grab the offsetWidth of that element:

Code: ( text )
  1. if(el.currentStyle["display"] == "none")
  2.             return 0;
  3.         var widthCSS = el.currentStyle["width"];
  4.         var bRegex = /thin|medium|thick/; // regex for css border width keywords
  5.         width = el.offsetWidth; // currently the width including padding + border


In my code I simply set the display of the element to be "block"...because I discovered quickly that both the offsetWidth and the clientWidth will be 0 if the element's display value is none.

This is what I have right now:
Code: ( text )
  1. function ShowWindowAndInnerWindow(nameOfWindow,nameOfInnerW  indow)
  2. {
  3.    
  4.  
  5.     var panel = document.getElementById(nameOfWindow);
  6.     //**Originally I had set the panel to be hidden while I dealt with moving the message box to the middle of the screen... see **comment continuation at the bottom.
  7.     //panel.style.visibility = 'hidden';
  8.  
  9.     //Here I set the panel to have a display of 'block' because if the panel has a display of 'none' you cannot get the clientWidth or offsetWidth values
  10.     panel.style.display = 'block';
  11.  
  12.     //I make sure that the panel is positioned absolute
  13.     panel.position = 'absolute';
  14.    
  15.    //This inner stuff, just ignore...
  16.     var innerPanel = document.getElementById(nameOfInnerWindow);
  17.     innerPanel.style.display = 'block';
  18.    
  19.     //here I grab the offsetWidth...but it doesn't work all the time....
  20.     var widthOfPanel = panel.offsetWidth;
  21.     //sooo here I hard code a width value
  22.     widthOfPanel=400;
  23.  
  24.     //The offsetHeight doesn't work all the time either, but it isn't so apparent when it doesn't work, so I don't care about setting a hard coded value.
  25.     var heightOfPanel = panel.offsetHeight;
  26.  
  27.     //determining how far from the left and the top that the browser should be drawn at in order to center it.
  28.     var left = Number(BrowserWidth())/2 - (widthOfPanel/2);   
  29.     var top = Number(BrowserHeight())/2 - (heightOfPanel/2);
  30.        
  31.     //Centering
  32.     if(document.documentElement)
  33.     {   
  34.         var topOffset = document.documentElement.scrollTop + top;
  35.         var leftOffset = document.documentElement.scrollLeft + left;
  36.         panel.style.top = topOffset + "px";
  37.         panel.style.left = leftOffset + "px";
  38.     }
  39.     else if(document.body)
  40.     {
  41.         var topOffset = document.body.scrollTop + top;
  42.         var leftOffset = document.body.scrollLeft + left;   
  43.         panel.style.top = topOffset + "px";
  44.         panel.style.left = leftOffset + "px";
  45.     }
  46.     else
  47.     {
  48.        
  49.     }
  50.     //** comment continued from the above ** comment
  51.     //**Apparently when you set the panel to visibility of "hidden" then set it back to "visible", my buttons don't appear until I drag the message box
  52.     //panel.style.visibility = 'visible';
  53.     return false;
  54. }


Your code is much more complicated than mine, but you rely on the offsetWidth value as I do...this value is not working for me....it always returns 0 in the case that it is buried deep within other <divs>...............

Reply
mmurph211's Avatar
mmurph211
Newbie
13 Posts
March 28th, 2008
08:00 PM
#9

Re: Determining the height and width of a <div> dynamically
If has a display value of none I return 0. I don't check the offsetWidth unless it has a display value of block or something != none

Code: ( text )
  1. if(el.currentStyle["display"] == "none")
  2.             return 0;


also clientWidth will return 0 in IE when the div's width is not set or is set to 'auto'

try this with the functions I wrote:

Code: ( text )
  1. function ShowWindowAndInnerWindow(nameOfWindow,nameOfInnerW    indow)
  2.       {
  3.        
  4.           var panel = document.getElementById(nameOfWindow);
  5.           //**Originally I had set the panel to be hidden while I dealt with moving the message box to the middle of the screen... see **comment continuation at the bottom.
  6.           //panel.style.visibility = 'hidden';
  7.        
  8.           //Here I set the panel to have a display of 'block' because if the panel has a display of 'none' you cannot get the clientWidth or offsetWidth values
  9.           panel.style.display = 'block';
  10.        
  11.           //I make sure that the panel is positioned absolute
  12.           panel.position = 'absolute';
  13.          
  14.          //This inner stuff, just ignore...
  15.           var innerPanel = document.getElementById(nameOfInnerWindow);
  16.           innerPanel.style.display = 'block';
  17.          
  18.           var widthOfPanel = getWidth(panel, true, true);
  19.           var heightOfPanel = getHeight(panel, true, true);
  20.        
  21.           //determining how far from the left and the top that the browser should be drawn at in order to center it.
  22.           var left = Number(BrowserWidth())/2 - (widthOfPanel/2);   
  23.           var top = Number(BrowserHeight())/2 - (heightOfPanel/2);
  24.              
  25.           //Centering
  26.           if(document.documentElement)
  27.           {   
  28.               var topOffset = document.documentElement.scrollTop + top;
  29.               var leftOffset = document.documentElement.scrollLeft + left;
  30.               panel.style.top = topOffset + "px";
  31.               panel.style.left = leftOffset + "px";
  32.           }
  33.           else if(document.body)
  34.           {
  35.               var topOffset = document.body.scrollTop + top;
  36.               var leftOffset = document.body.scrollLeft + left;   
  37.               panel.style.top = topOffset + "px";
  38.               panel.style.left = leftOffset + "px";
  39.           }
  40.           else
  41.           {
  42.              
  43.           }
  44.           //** comment continued from the above ** comment
  45.           //**Apparently when you set the panel to visibility of "hidden" then set it back to "visible", my buttons don't appear until I drag the message box
  46.           //panel.style.visibility = 'visible';
  47.           return false;
  48.       }

Reply
Frinavale's Avatar
Frinavale
Forum Leader
2,052 Posts
March 28th, 2008
08:48 PM
#10

Re: Determining the height and width of a <div> dynamically
Quote:
Originally Posted by mmurph211
If has a display value of none I return 0. I don't check the offsetWidth unless it has a display value of block or something != none

Code: ( text )
  1. if(el.currentStyle["display"] == "none")
  2.             return 0;


also clientWidth will return 0 in IE when the div's width is not set or is set to 'auto'

try this with the functions I wrote:
...


I do not set the width or height values of my <div>s because are adjusted according to the content...in other words, they have a style="width:auto;height:auto;" by default in order to fit according to the content requirements.

Since I do not have a style set for my <div>...
Code: ( text )
  1. var height;
  2.     el = (typeof(el) == "string") ? document.getElementById(el) : el;
  3.    
  4.     if(window.getComputedStyle) {
  5.         var style = document.defaultView.getComputedStyle(el, null);
  6.         if(style.getPropertyValue("display") == "none")
  7.             return 0;
  8.         height = parseInt(style.getPropertyValue("height"));
  9. //height will always be 0

height will always be 0......

Reply
Frinavale's Avatar
Frinavale
Forum Leader
2,052 Posts
March 28th, 2008
08:51 PM
#11

Re: Determining the height and width of a <div> dynamically
Quote:
Originally Posted by Frinavale
I do not set the width or height values of my <div>s because are adjusted according to the content...in other words, they have a style="width:auto;height:auto;" by default in order to fit according to the content requirements.

Since I do not have a style set for my <div>...
Code: ( text )
  1. var height;
  2.     el = (typeof(el) == "string") ? document.getElementById(el) : el;
  3.    
  4.     if(window.getComputedStyle) {
  5.         var style = document.defaultView.getComputedStyle(el, null);
  6.         if(style.getPropertyValue("display") == "none")
  7.             return 0;
  8.         height = parseInt(style.getPropertyValue("height"));
  9. //height will always be 0

height will always be 0......


Actually, running it through FireBug, height is set to "auto"...

Reply
mmurph211's Avatar
mmurph211
Newbie
13 Posts
March 28th, 2008
09:41 PM
#12

Re: Determining the height and width of a <div> dynamically
That's not what I'm getting. Are you in quirks mode?


I made a test file:
Code: ( text )
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html>
  3. <head>
  4. <title>Get width/height - Test Page</title>

Code: ( text )
  1. <script type="text/javascript">
  2. //<![CDATA[
  3.  
  4. function getWidth(/* Object */ el, /* boolean */ includePadding, /* boolean */ includeBorder) {
  5.     var width;
  6.     el = (typeof(el) == "string") ? document.getElementById(el) : el;   
  7.    
  8.     if(window.getComputedStyle) { // FF, Safari, Opera
  9.         var style = document.defaultView.getComputedStyle(el, null);
  10.         if(style.getPropertyValue("display") == "none")
  11.             return 0;
  12.         width = parseInt(style.getPropertyValue("width"));
  13.        
  14.         if(navigator.userAgent.toLowerCase().indexOf("opera") != -1) {
  15.             // opera includes the padding and border when reporting the width/height - subtract that out
  16.             width -= parseInt(style.getPropertyValue("padding-left"));
  17.             width -= parseInt(style.getPropertyValue("padding-right"));
  18.             width -= parseInt(style.getPropertyValue("border-left-width"));
  19.             width -= parseInt(style.getPropertyValue("border-right-width"));
  20.         }
  21.        
  22.         if(includePadding) {
  23.             width += parseInt(style.getPropertyValue("padding-left"));
  24.             width += parseInt(style.getPropertyValue("padding-right"));
  25.         }
  26.        
  27.         if(includeBorder) {
  28.             width += parseInt(style.getPropertyValue("border-left-width"));
  29.             width += parseInt(style.getPropertyValue("border-right-width"));
  30.         }
  31.     } else { // IE
  32.         if(el.currentStyle["display"] == "none")
  33.             return 0;
  34.         var widthCSS = el.currentStyle["width"];
  35.         var bRegex = /thin|medium|thick/; // regex for css border width keywords
  36.         width = el.offsetWidth; // currently the width including padding + border
  37.        
  38.         if(!includeBorder) {
  39.             var borderLeftCSS = el.currentStyle["borderLeftWidth"];
  40.             var borderRightCSS = el.currentStyle["borderRightWidth"];
  41.             var temp = document.createElement("DIV");
  42.             if(!bRegex.test(borderLeftCSS)) {
  43.                 temp.style.width = borderLeftCSS;
  44.                 el.parentNode.appendChild(temp);
  45.                 width -= Math.round(temp.offsetWidth);
  46.                 el.parentNode.removeChild(temp);
  47.             } else if(bRegex.test(borderLeftCSS)) {
  48.                 if(el.offsetWidth > el.clientWidth && el.currentStyle["borderLeftStyle"] != "none") {
  49.                     temp.style.width = "10px";
  50.                     temp.style.border = borderLeftCSS + " " + el.currentStyle["borderLeftStyle"] + " #000000";
  51.                     el.parentNode.appendChild(temp);
  52.                     width -= Math.round((temp.offsetWidth-10)/2);
  53.                     el.parentNode.removeChild(temp);
  54.                 }
  55.             }
  56.             if(!bRegex.test(borderRightCSS)) {
  57.                 temp.style.width = borderRightCSS;
  58.                 el.parentNode.appendChild(temp);
  59.                 width -= Math.round(temp.offsetWidth);
  60.                 el.parentNode.removeChild(temp);
  61.             } else if(bRegex.test(borderRightCSS)) {
  62.                 if(el.offsetWidth > el.clientWidth && el.currentStyle["borderRightStyle"] != "none") {
  63.                     temp.style.width = "10px";
  64.                     temp.style.border = borderRightCSS + " " + el.currentStyle["borderRightStyle"] + " #000000";
  65.                     el.parentNode.appendChild(temp);
  66.                     width -= Math.round((temp.offsetWidth-10)/2);
  67.                     el.parentNode.removeChild(temp);
  68.                 }
  69.             }
  70.         }
  71.        
  72.         if(!includePadding) {
  73.             var paddingLeftCSS = el.currentStyle["paddingLeft"];
  74.             var paddingRightCSS = el.currentStyle["paddingRight"];
  75.             var temp = document.createElement("DIV");
  76.             temp.style.width = paddingLeftCSS;
  77.             el.parentNode.appendChild(temp);
  78.             width -= Math.round(temp.offsetWidth);
  79.             temp.style.width = paddingRightCSS;
  80.             width -= Math.round(temp.offsetWidth);
  81.             el.parentNode.removeChild(temp);
  82.         }
  83.     }
  84.    
  85.     return width;
  86. }
  87.  
  88. function getHeight(/* Object */ el, /* boolean */ includePadding, /* boolean */ includeBorder) {
  89.     var height;
  90.     el = (typeof(el) == "string") ? document.getElementById(el) : el;
  91.    
  92.     if(window.getComputedStyle) { // FF, Safari, Opera
  93.         var style = document.defaultView.getComputedStyle(el, null);
  94.         if(style.getPropertyValue("display") == "none")
  95.             return 0;
  96.         height = parseInt(style.getPropertyValue("height"));
  97.        
  98.         if(navigator.userAgent.toLowerCase().indexOf("opera") != -1) {
  99.             // opera includes the padding and border when reporting the width/height - subtract that out
  100.             height -= parseInt(style.getPropertyValue("padding-top"));
  101.             height -= parseInt(style.getPropertyValue("padding-bottom"));
  102.             height -= parseInt(style.getPropertyValue("border-top-width"));
  103.             height -= parseInt(style.getPropertyValue("border-bottom-width"));
  104.         }
  105.        
  106.         if(includePadding) {
  107.             height += parseInt(style.getPropertyValue("padding-top"));
  108.             height += parseInt(style.getPropertyValue("padding-bottom"));
  109.         }
  110.        
  111.         if(includeBorder) {
  112.             height += parseInt(style.getPropertyValue("border-top-width"));
  113.             height += parseInt(style.getPropertyValue("border-bottom-width"));
  114.         }
  115.     } else { // IE
  116.         if(el.currentStyle["display"] == "none")
  117.             return 0;
  118.         var heightCSS = el.currentStyle["height"];
  119.         var bRegex = /thin|medium|thick/; // regex for css border width keywords
  120.         height = el.offsetHeight; // currently the height including padding + border
  121.        
  122.         if(!includeBorder) {
  123.             var borderTopCSS = el.currentStyle["borderTopWidth"];
  124.             var borderBottomCSS = el.currentStyle["borderBottomWidth"];
  125.             var temp = document.createElement("DIV");
  126.             if(!bRegex.test(borderTopCSS)) {
  127.                 temp.style.width = borderTopCSS;
  128.                 el.parentNode.appendChild(temp);
  129.                 height -= Math.round(temp.offsetWidth);
  130.                 el.parentNode.removeChild(temp);
  131.             } else if(bRegex.test(borderTopCSS)) {
  132.                 if(el.offsetHeight > el.clientHeight && el.currentStyle["borderTopStyle"] != "none") {
  133.                     temp.style.width = "10px";
  134.                     temp.style.border = borderTopCSS + " " + el.currentStyle["borderTopStyle"] + " #000000";
  135.                     el.parentNode.appendChild(temp);
  136.                     height -= Math.round((temp.offsetWidth-10)/2);
  137.                     el.parentNode.removeChild(temp);
  138.                 }
  139.             }
  140.             if(!bRegex.test(borderBottomCSS)) {
  141.                 temp.style.width = borderBottomCSS;
  142.                 el.parentNode.appendChild(temp);
  143.                 height -= Math.round(temp.offsetWidth);
  144.                 el.parentNode.removeChild(temp);
  145.             } else if(bRegex.test(borderBottomCSS)) {
  146.                 if(el.offsetHeight > el.clientHeight && el.currentStyle["borderBottomStyle"] != "none") {
  147.                     temp.style.width = "10px";
  148.                     temp.style.border = borderBottomCSS + " " + el.currentStyle["borderBottomStyle"] + " #000000";
  149.                     el.parentNode.appendChild(temp);
  150.                     height -= Math.round((temp.offsetWidth-10)/2);
  151.                     el.parentNode.removeChild(temp);
  152.                 }
  153.             }
  154.         }
  155.        
  156.         if(!includePadding) {
  157.             var paddingTopCSS = el.currentStyle["paddingTop"];
  158.             var paddingBottomCSS = el.currentStyle["paddingBottom"];
  159.             var temp = document.createElement("DIV");
  160.             temp.style.width = paddingTopCSS;
  161.             el.parentNode.appendChild(temp);
  162.             height -= Math.round(temp.offsetWidth);
  163.             temp.style.width = paddingBottomCSS;
  164.             height -= Math.round(temp.offsetWidth);
  165.             el.parentNode.removeChild(temp);
  166.         }
  167.     }
  168.    
  169.     return height;
  170. }
  171.  
  172.  
  173.       function ShowWindowAndInnerWindow(nameOfWindow,nameOfInnerW  indow)
  174.             {
  175.  
  176.                 var panel = document.getElementById(nameOfWindow);
  177.  
  178.                 //**Originally I had set the panel to be hidden while I dealt with moving the message box to the middle of the screen... see **comment continuation at the bottom.
  179.  
  180.                 //panel.style.visibility = 'hidden';
  181.      
  182.                 //Here I set the panel to have a display of 'block' because if the panel has a display of 'none' you cannot get the clientWidth or offsetWidth values
  183.                 panel.style.display = 'block';
  184.              
  185.                 //I make sure that the panel is positioned absolute
  186.  
  187.                 panel.position = 'absolute';
  188.  
  189.                //This inner stuff, just ignore...
  190.                 var innerPanel = document.getElementById(nameOfInnerWindow);
  191.                 innerPanel.style.display = 'block';
  192.  
  193.                 var widthOfPanel = getWidth(panel, true, true);
  194.                 var heightOfPanel = getHeight(panel, true, true);
  195.                
  196.                 // for testing
  197.                 alert("getWidth(panel, true, true): " + getWidth(panel, true, true) + " \n getHeight(panel, true, true): " + getHeight(panel, true, true));
  198.            
  199.             /*
  200.                 //determining how far from the left and the top that the browser should be drawn at in order to center it.
  201.                 var left = Number(BrowserWidth())/2 - (widthOfPanel/2);   
  202.                 var top = Number(BrowserHeight())/2 - (heightOfPanel/2);
  203.                    
  204.                 //Centering
  205.                 if(document.documentElement)
  206.                 {   
  207.                     var topOffset = document.documentElement.scrollTop + top;
  208.                     var leftOffset = document.documentElement.scrollLeft + left;
  209.                     panel.style.top = topOffset + "px";
  210.                     panel.style.left = leftOffset + "px";
  211.                 }
  212.                 else if(document.body)
  213.                 {
  214.                     var topOffset = document.body.scrollTop + top;
  215.                     var leftOffset = document.body.scrollLeft + left; 
  216.                     panel.style.top = topOffset + "px";
  217.                     panel.style.left = leftOffset + "px";
  218.                 }
  219.                 else
  220.                 {
  221.                    
  222.                 }
  223.                 //** comment continued from the above ** comment
  224.                 //**Apparently when you set the panel to visibility of "hidden" then set it back to "visible", my buttons don't appear until I drag the message box
  225.                 //panel.style.visibility = 'visible';
  226.                 return false;
  227.                 */
  228.             }
  229.            
  230. //]]>
  231. </script>[/javascript]
  232. [code=html]
  233. </head>
  234. <body>


Code: ( text )
  1. <script type="text/javascript">
  2. //<![CDATA[
  3.  
  4. var testMsgs = ["OK", "Yes", "No", "Cancel"];
  5.  
  6. function dynamicFunction() {
  7.  
  8.     for(i=0; i<testMsgs.length; i++) {
  9.         var outerDiv = document.createElement('DIV');
  10.         outerDiv.id = "outer";
  11.        
  12.         var innerDiv = document.createElement('DIV');
  13.         innerDiv.id = "inner";
  14.         innerDiv.innerHTML = testMsgs[i];
  15.        
  16.         outerDiv.appendChild(innerDiv);
  17.         document.body.appendChild(outerDiv);
  18.         ShowWindowAndInnerWindow("outer", "inner");
  19.         document.body.removeChild(outerDiv);
  20.     }
  21.    
  22. }
  23.  
  24. window.onload = dynamicFunction;
  25.  
  26. //]]>
  27. </script>

Code: ( text )
  1. </body>
  2. </html>

Last edited by Frinavale : March 29th, 2008 at 03:21 PM. Reason: added [code] tags
Reply