Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Get Height and Width of Module in javascriptGet Height and Width of Module in javascript
Previous
 
Next
New Post
5/13/2008 1:44 PM
 

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 2:54 PM
 

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
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Get Height and Width of Module in javascriptGet Height and Width of Module in javascript


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out