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

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...(advanced) skinning with javascript ??(advanced) skinning with javascript ??
Previous
 
Next
New Post
11/16/2007 6:47 AM
 

Hello All,

I have a bit problem w/ skinning. I've created custom skin and my ascx file renders output based on browser type. For MSIE6 I need to add extra client side script that starts on page load. I've found that dnncore.js contains window.onload=blabla (spending few hours w/ why onload attribute don't work...).. so in my custom.js file I use Body.onload, but this is may be a bit unstable construction for inserting custom scripts for skins (may be dnn team can use Body.onload in future too)

Can anybody tell me whether there exists another more appropriate way to handle described task ?

Reason why I am doing such think is that MSIE6 can't process top, bottom element position anchoring (mozila, opera, MSIE7 works ok) so only way to keep page without scrolling and full size is to hookup to onresize after onload...

also is there any roadplan to switch from obsolete codebehind to codeFile syntax ? I have no idea why eg. defult dnn gray skin ascx file contains link to non-existing codebehind file... can anybody please explain it ?

thanx Adam

 
New Post
11/16/2007 7:58 AM
 

There is some info about this in this thread

 
New Post
11/19/2007 6:11 AM
 

Timo thanx for link, but there is no usefull conclusion..

window.addEventListener is not exist for MSIE

using window.onload = myFunction can override original dnn core function, depending o

Can we made change request for such functionality ?

I can imagine that skin object will contain method

skin.RegisterStartupSkinFunction()

w/ similar syntax to asp.net RegisterStartupScript() that will register my function in core.js and run it onload.

may be someone can suggest even better solution but I think that this change is simple and open solution

Adam

 
New Post
11/19/2007 7:12 AM
 

huh, seems that I found what I needed...

by adding this into skin ascx file you can attach custom function to skin and run it on pageload

 

{

//this is my browser test

protected void Page_Load(object sender, EventArgs e)

 

{

 

 

 

}

if (Request.Browser.Browser == "IE" && Request.Browser.MajorVersion == 6)this.Page.ClientScript.RegisterClientScriptInclude(typeof(Page), "resize", SkinPath + "skin-resize.js");DNNClientAPI.AddBodyOnloadEventHandler(Page, "uhulSkinResize()");}

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...(advanced) skinning with javascript ??(advanced) skinning with 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