Skip navigation
Currently Being Moderated

How to place Onload script in body section of Muse

Jul 15, 2012 2:43 AM

Please can someone kindly help where or how I can place this codes with Muse(Is this supported?).  I have tried the arbitrary HTML but it is behaving funny!

 

<body onload="hideLoadingLayer();">

 

<div id="loading_layer"><img src="images/loading.gif" alt="preloader" width="64" height="64" border="0" /></div>

 

 

Thanks.

 
Replies
  • Currently Being Moderated
    Jul 16, 2012 9:36 AM   in reply to topelovely

    You seem to be trying to call a function that does not exist. In order to call that function, you need to write a script for it. Incorporating these kinds of actions in Muse is pretty difficult and tricky. You'll have to edit the code manually outside of Muse, and it might make it hard to go back into Muse to update the site later on...

     

    Regards,

    Julia

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 16, 2012 9:38 AM   in reply to jgrummel

    <script type="text/javascript">
    function hideLoadingLayer(){
    document
    .getElementById("loading_layer").style.visibility="hidden";
    }
    </script>

    You need a script that looks like this in your header.

     

    *Please remember that altering the code can cause Muse to act really funny when you try to come back to the site in Muse

     

    Julia

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 16, 2012 11:06 AM   in reply to jgrummel

    Hi Julia and toplovely,

     

    Editing the codes generated by Muse after publishing/exporting is not a supported work flow as the changes made are not reflected in Muse and you will have to edit the codes everytime after you publish.

    Better alternative would be to insert the codes in .muse file itself.

    For, <body onload="hideLoadingLayer();">

    You can use the Object -> Insert HTML menu option.

     

    For the script like the one Julia provided, you can go to Page Properties->Metadata.

     

    Let me know if you need more clarification.

     

    Regards,

    Abhishek Maurya

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 18, 2012 9:54 AM   in reply to topelovely

    Hey toplovely,

     

    Check this,

     

    http://project02.businesscatalyst.com/Jing/2012-07-18_2218.png http://project02.businesscatalyst.com/Jing/2012-07-18_2219.png

     

    Hope this helps.

     

    Regards,

    Abhishek Maurya

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points