Office Live Pages

...Tips and Tricks for Office Live!

Home     FREE Resources     Top 10 Websites     Link Exchange     Submit Tips/Tricks     Contact Us      

JavaScript with Office Live

 

How to add JavaScript to webpage?
External (Server side) JavaScript is not supported in Office Live so if you want to integrate JavaScript on your pages then there are three ways to do it.

 

A. Use Office Live HTML module for simple inline JavaScript.(for Simple JavaScript)

B. Use iFrame concept to integrate JavaScript on the pages.(for Server side JavaScript)
C. Create .htm/.html page using below procedure.(for Server side JavaScript/Complex JavaScript)


How to create .htm/.html page with Office Live?

 1. Create a normal .aspx webpage with Office Live.
 2. Design the webpage the way you want (Except adding JavaScript module)
 3. Once your are done, view page
 4. Save this page to your local hard disk, Go to Files -> Save as-> Web page complete (.htm or .html)
 5. Open saved page in IE (Eg: JavaScript_page.htm)
 6. Go to View -> Source; Source code will open in Notepad or Wordpad.
 7. Now Place JavaScript code wherever you want
 8. Refresh JavaScript_page.htm and see how it looks.
 9. Search for “JavaScript_page_files/” in the source code
10. Remove “JavaScript_page_files/” from the source code.
11. Refresh JavaScript_page.htm, You may see alignment is completelty gone; Don’t worry!!!
12. Close source code file.
13. Go to "JavaScript_page_files" folder which is along with JavaScript_page.htm.
14. You will find some JavaScripts and images in this folder, copy and paste along with JavaScript_page.htm
15. Open JavaScript_page.htm, now you will see your original page back!
16. Upload JavaScript_page.htm, JavaScript and images associated with to your Documents Gallery

     (www.YourOfficeLiveSite.com/Documents)
17. Open www.YourOfficeLiveSite.com/Documents/JavaScript_page.htm in new window and see how it looks.
18. Links this page wherever you want!

Note: Above procedure is applicable only for IE, we don’t know whether it works for other browsers or not but you can try.



This page is created using above procedure, you may be seeing nice clock on this page (that is Complex JavaScript) and bottom ads has server side script.