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  |  

AspDotNetStoreFront
  Ads  
Iron Speed Designer is a software development tool for building database, reporting, and forms applications for .NET without hand-coding.
 


  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  General DotNetN...  Configure It! (...  How to add an onLoad JavaScript Event to the DNN Body Tag?
Previous Previous
 
Next Next
New Post 8/12/2008 9:56 AM
Unresolved
User is offline Jonathan Smith
4 posts
viux.com
10th Ranked


How to add an onLoad JavaScript Event to the DNN Body Tag? 

I wish to add the following onload event to the <body> tag of DNN; however I cannot figure out how to do so.

<body onload="MM_preloadImages('/Portals/0/images/icons/icon-login-red.gif','/Portals/0/images/icons/icon-system-red.gif','/Portals/0/images/icons/icon-order-red.gif','/Portals/0/images/icons/icon-chat-red.gif','/Portals/0/images/icons/icon-email-red.gif','/Portals/0/images/icons/icon-phone-red.gif')">

This code is added to my skin; however it results in my live pages having two body tags.

Is there a method to pass parameters to the DNN body tag?

 
New Post 8/19/2008 3:03 PM
User is offline cathal connolly
2829 posts
www.cathal.co.uk
5th Ranked










Re: How to add an onLoad JavaScript Event to the DNN Body Tag? 

the body tag exists in the default.aspx page, so you would need to make the edit there. If you only want this to exist within your skin and don't want to edit core files, then as the body tag is a server control you can add it programmatically e.g. in your skin's ascx.vb file in the page_load add code such as

Dim bodyctl As HtmlGenericControl = TryCast(FindControl("Body"), HtmlGenericControl)

If bodyctl IsNot Nothing Then

bodyctl.Attributes("onload") = "MM_preloadImages('/Portals/0/images/icons/icon-login-red.gif','/Portals/0/images/icons/icon-system-red.gif','/Portals/0/images/icons/icon-order-red.gif','/Portals/0/images/icons/icon-chat-red.gif','/Portals/0/images/icons/icon-email-red.gif','/Portals/0/images/icons/icon-phone-red.gif')">

End If

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Configure It! (...  How to add an onLoad JavaScript Event to the DNN Body Tag?
 


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.

 


DNNSpired.com
Inspired to extend DotNetNuke®, everyday.
www.DNNSpired.com
TMA Resources
TMA Resources is a software company providing eBusiness solutions for the Association market.
www.tmaresources.com
DotNetNuke Hosting Provider UK
UK leading DotNetNuke Hosting provider. Owned and operated by a Microsoft Gold Certified Partner.
www.DNN-Portals.co.uk

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