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  |  

Engage Software - Training Partner for DotNetNuke
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
WebHostForAsp.net
 


  Sponsors  

Meet Our Sponsors

AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
Click here to go to dev.live.com for Windows Live developer resources
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
 


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.

 


Disgrafic
Diseño y creación de portales web dinámicos :: Desarrollo de módulos personalizados :: Soluciones a medida :: Imagen Corporativa :: Tu proveedor DNN en España
www.disgrafic.com
DM Analytics, LLC
DM Analytics, LLC provides software solutions that facilitate rapid development of independent or dependent datamarts and their associated web-based reporting.
www.dmanalytics.com
Integral Hosting | DNN only $14.95/month
Experienced .NET hosting on Windows 2003, ASP.NET 1.1 & 2.0, MSSQL with real technical support.
www.integralhosting.com

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