0 Comments

I know I promised this post a long time ago but thankfully I have been very busy.

img1

On the surface the HTML web part available on the public facing website appears to be a Swiss army knife for the site. If you can insert any HTML into the page then you can do just about anything. But… on closer examination you find that the HTML you insert into the part is placed in an Iframe and all script and content is loaded with the setTimeout JavaScript function. Currently it does appear that the base theme CSS is inserted into the Iframe but any custom CSS is not being applied. This is easily worked around if you either copy and paste your same CSS or use the same import statement I discussed in my previous post.

The reason I started looking at the HTML part was to insert JQuery and my own script into the page. Being asynchronously loaded into an Iframe meant no real help when it came to modifying elements on my page. So I started searching elsewhere. I then stumbled on the Site Options on the Site ribbon in SPD.

 

To Add JQuery:

  • Open SPD -> Site ribbon -> Click Site Options
  • I chose to edit wh_footertext

img2 

  • Added:
    <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script src="/Site%20Assets/startup.js" type="text/javascript"></script>
    
    
     

 

These values are really there for adding consistent information throughout the site but work very well for including anything as it does not appear to be validated in any way.