Custom Module Images & JavaScript & CSS

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
6/13/2010 1:25:10 PM
Gravatar
Total Posts 156

Re: Custom Module Images & JavaScript & CSS

Joe,

When I place them in code-behind in either OnInit or Page_Load, they end up getting loaded prior to jquery and, therefore, fail.

6/13/2010 6:01:10 PM
Gravatar
Total Posts 156

Re: Custom Module Images & JavaScript & CSS

No more suggestions on this one here? I'm somewhat stuck. Not quite sure how to get those two to load after jQuery.  I found a thread, which suggests using UserControl in the layout.Master, but I would like get this to work within the module and not have to rely on a skin's layout.Master.

6/14/2010 6:40:12 AM
Gravatar
Total Posts 18439

Re: Custom Module Images & JavaScript & CSS

Sorry, I should have said to register your script in OnPreRender

protected override void OnPreRender(EventArgs e)
{
    base.OnPreRender(e);
 Page.ClientScript.RegisterClientScriptBlock(typeof(Page),
                    "noblecount", "\n<script src=\""
                    + Page.ResolveUrl("~/HelloWorld/js/jquery.NobleCount.min.js") + "\" type=\"text/javascript\" ></script>");


}

6/14/2010 9:47:59 AM
Gravatar
Total Posts 156

Re: Custom Module Images & JavaScript & CSS

Thank you so much Joe, that worked.

You must sign in to post in the forums. This thread is closed to new posts.