Posts filed under 'Web 2.0'

How-To: Adding JavaScript to GooglePages

Google Page Creator no longer removes JavaScript from GooglePages. Useful tools and active content, such as, Google Analytics, StatCounter, AdSense, Flash animation, and various JS widgets can now be added to any GooglePage (including the default home page) without resorting to hacks or manually uploaded HTML.

GPX-Files Homepage Screenshot

The detailed description of this new feature is too long to be posted here, so it is presented on GooglePage eXplorer website, including tutorials with specific instructions for adding JavaScript code for:

The following how-to briefly describes the suggested procedure for adding JS content to GooglePages. This procedure is generally safe for creating or editing any GooglePage, but it is strongly recommended to read the associated warnings and caveats before editing any functionally-important GooglePages, especially the default “home” page.

  • use Firefox to avoid the GPC browser bugs in IE
  • prepare the HTML code for each of the GooglePage fields in an external editor (Notepad will do, but something more powerful, e.g., PSPad, will be more convenient for editing many HTML files)
  • create a new empty GooglePage in Google Page Creator
  • use HTML Editor window to paste the prepared HTML code into each field
  • do not use the WYSIWYG interface to edit any fields with JS code or custom formatting options
  • note that most of the active JS content (e.g., AdSense) will not be actually displayed in the WYSIWYG window, which is normal, in fact, desirable behavior (see GPC JS execution bug description for details)
  • “Publish” the GooglePage, but do not go “Back to Page Manager”
  • use the “View Live” link (not “Preview”) to look at the published page
  • make any changes in the external text editor and paste the revised HTML code into the appropriate fields using the HTML Editor window
  • “Publish” the page and “View Live” to examine it again
  • repeat the last two steps until the published page looks as desired
  • use “Back to Page Manager” when finished
  • the GooglePage with JS code has been created!

Do not open a GooglePage with active JS elements for editing in GPC, because JS code may become corrupted. If such a page needs to be edited, delete the existing page and re-create it from scratch as described above (using the backup or revised HTML code). The default “home” page cannot be deleted, if it needs to be recovered after a JS bug, therefore it is critical to learn about the uneditable field bug before adding JS code to the homepage.

Comments or questions? Contact GPX-Files or leave a comment for this post.
Links and trackbacks will be appreciated.


4 comments July 15, 2006


Calendar

July 2008
M T W T F S S
« Aug    
 123456
78910111213
14151617181920
21222324252627
28293031  

POSTED Categories

Links

Blog Stats

Meta