Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Get Height and Width of Module in javascript
Previous Previous
 
Next Next
New Post 5/13/2008 10:44 AM
User is offline weldonr30
11 posts
10th Ranked


Get Height and Width of Module in javascript 

I have a classic ASP page that I need to display a DNN Event calendar in an IFRAME.  I was able to get the calendar on the classic asp page by inserting anchor tags in the header and footer of the event calendar DNN module settings. 

<a name="starthere> in the header

</a> in the footer setting

Then in the classic asp page using

<iframe id="Calendar" name="Calendar"
src="/dnn2/Events/tabid/56/Default.aspx#starthere"
marginheight=0
marginwidth=0
frameborder="0"
scrolling="no"
ALLOWTRANSPARENCY="TRUE"
style="border:0px;"
>

</iframe>

 

Now I am trying to pass up from the dnn calendar page the size of the module to set the size of the IFRAME in javascript.

I tried wrapping the dnn calendar module in a div tag named dnncalendar and using document.getElementById('dnncalendar').offsetHeight but this give me error document.getElementById("dnncalendar") has no properties  on the DNN page in Firefox and "object required" in IE.

I was able to get the entire page height by using document.height in Firefox but in IE it returns 'undefined'

Any help much appreciated in advance!

 

 

 

 
New Post 5/13/2008 11:54 AM
User is offline weldonr30
11 posts
10th Ranked


Re: Get Height and Width of Module in javascript 

Ok dumb mistake I had my javascript running before I defined the div tag.  It now works in Firefox but not in IE.  IE returns all 0's  There must be another syntax for IE.

<script type="text/javascript">

document.write(document.getElementById('dnncalendar').offsetWidth);

document.write('</br>');

document.write(document.getElementById('dnncalendar').clientWidth);

document.write('</br>');

document.write(document.getElementById('dnncalendar').offsetHeight);

document.write('</br>');

document.write(document.getElementById('dnncalendar').clientHeight);

document.write('</br>');

</script>

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Get Height and Width of Module in javascript
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Icthus Technologies
Building Faith on the Internet
www.icthustech.com
Efficion Consulting
A premier DotNetNuke consulting firm providing complete DNN services including: custom module development, skinning and design, installation and integration services.
www.efficionconsulting.com
DotNetNuke Training by Engage Software
Specializing in customized training, architecture and module solutions for large scale implementations lead by DNN Core Team Member Christopher Hammond.
engagesoftware.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP