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  |  

Affordable ASP.NET Hosting Service
  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Iframe Module [...  Add This to the new IFrame code while you're in there
Previous Previous
 
Next Next
New Post 11/7/2005 4:51 PM
User is offline Glenn Miller
1 posts
www.convergencehealth.com
10th Ranked




Add This to the new IFrame code while you're in there  

Hi:

Here's a piece of code that will force the iframe page to go to the top of the site when a link inside of an iframe page is clicked. This really helps when you scroll down an iframe page, and then click on a link within the page. Normally the page in the iframe updates but the "portal" will not return to the top of the page. This helps fix that problem.

Add this piece of javascript to the ascx page of the iframe module.

<script language="javascript" type="text/javascript">
function chi_setiframepagetotop() {
try {
if (document.body && document.body.scrollTop) document.body.scrollTop=0;
if (document.documentElement && document.documentElement.scrollTop) document.documentElement.scrollTop=0;
if (window.pageYOffset) window.pageYOffset=0; 
   }
catch(e)
{}
}
</script>
<asp:Label id="lblIFrame" Runat="server" Enablev13wstat3=False></asp:Label>

 

Chane this in the code behind file. To add in the :

onload=chi_setiframepagetotop()

code to the frame string builder. such as:

Dim FrameText As New StringBuilder
                        FrameText.Append("<iframe onload=chi_setiframepagetotop() frameborder=""")
                        FrameText.Append(CType(Settings("border"), String))
                        FrameText.Append(""" src=""")
                        FrameText.Append(AddHTTP(src))
                        FrameText.Append(""" height=""")
                        FrameText.Append(CType(Settings("height"), String))
                        FrameText.Append(""" width=""")
                        FrameText.Append(CType(Settings("width"), String))
                        FrameText.Append(""" title=""")
                        FrameText.Append(CType(Settings("title"), String))
                        FrameText.Append(""" scrolling=""")
                        FrameText.Append(CType(Settings("scrolling"), String))
                        FrameText.Append(""">Your Browser Does Not Support Frames</iframe>")
                        lblIFrame.Text = FrameText.ToString

 

Hope this helps someone out.

 

 
New Post 11/25/2005 9:38 AM
User is offline Michael Flanakin
994 posts
www.michaelflanakin.com
7th Ranked




Re: Add This to the new IFrame code while you're in there  
This will have to be an optional inclusion. Some sites may want their page requests to stay internal (to the iframe).

Michael Flanakin | Microsoft Consulting Services
www.michaelflanakin.com
 
New Post 2/8/2006 11:36 AM
User is offline Dwayne Baldwin
520 posts
8th Ranked




Re: Add This to the new IFrame code while you're in there  

Is there any way to incorporate this functionality without rebuilding the core?

 

 


Dwayne J. Baldwin
 
New Post 2/8/2006 11:42 AM
User is offline Michael Flanakin
994 posts
www.michaelflanakin.com
7th Ranked




Re: Add This to the new IFrame code while you're in there  
If you get a copy of the source for this module, there is a solution and a project file. Use these to make any changes and recompile to get your mods into DNN. There is no need to recompile the DNN core for module changes.

Michael Flanakin | Microsoft Consulting Services
www.michaelflanakin.com
 
New Post 2/8/2006 12:01 PM
User is offline Dwayne Baldwin
520 posts
8th Ranked




Re: Add This to the new IFrame code while you're in there  

Sorry, I meant without rebuilding the dll.

I have a 3.1 installation needing this fix, but I'm not in the mood to reinstall a working version of DNN 3.1 and reinstall VS 2003, especially when I'm setup for 4.x with VS 2005.

I was just hoping for a faster alternative.


Dwayne J. Baldwin
 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Iframe Module [...  Add This to the new IFrame code while you're in there
 


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.

 


Customer Connect
Customer Connect provides cutting edge solutions that deliver sales, marketing and customer service results.
www.customer-connect.com
TechNexxus
Business process and technology sourcing solutions delivering superior people, process and value. We have used, and continue to use, DNN successfully in numerous client projects to deliver exceptional value. We are proud to support the DNN team and community.
www.technexxus.com
PartnerPoint | Community of Microsoft Partners
PartnerPoint is one of the largest and most active online communities of Microsoft Partners worlwide with over 8,000 members.
www.PartnerPoint.com

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