3 messages in com.googlegroups.google-mashup-editorRe: [gme] Include external JS code in...
FromSent OnAttachments
Stephan29 Jun 2007 10:03 
Paul McDonald29 Jun 2007 10:16 
Stephan29 Jun 2007 11:12 
Subject:Re: [gme] Include external JS code in <head></head>?
From:Paul McDonald (pmcd@google.com)
Date:06/29/2007 10:16:29 AM
List:com.googlegroups.google-mashup-editor

There is a onload attribute that you can use in the gm:page tag. Load the external script using a standard script tag and then call the onload function using the onload attribute.

<gm:page title="myApp" onload="onload()">

<script src="http://www.externalscript.com/js/script.js"/>

<script> function onload() { ...do something here... } </script>

</gm:page>

On 6/29/07, Stephan <step@gmail.com> wrote:

How can I include external Javascript code in the <head> section of my webapp? Some libraries such as Timeline from http://simile.mit.edu require this (AFAICT). And maybe it's cleaner, anyway.