StephaneFr, The proper spelling for the Onload handling call is _IG_RegisterOnloadHandler()
- capital "R", lowercase "L" in Onload On Apr 4, 11:37 pm, StephaneFr <[email protected]> wrote: > Hi everybody, > > What's wrong with this simple gadget ? It seems that the Javascript > code is never called ? > > <?xml version="1.0" encoding="UTF-8" ?> > <Module> > <ModulePrefs title="TEST GADGET" /> > <Content type="html"> > <![CDATA[ > <script type="text/javascript"> > <!-- > function changeColor() > { > flashText(); > setInterval("flashText", 1000); > document.getElementById("debug").innerHTML = "Interval set" + x + > "<BR>"; > } > _IG_registerOnLoadHandler(changeColor); > function flashText() > { > var elem = document.getElementById("my_box"); > if (elem.style.color == 'red') > { > elem.style.color = 'blue'; > } > else > { > elem.style.color = 'red'; > } > document.getElementById("debug").innerHTML = "Color changed<BR>"; > } > // --> > </script> > > <div id="my_box"> > <p>Hello World</p> > </div> > <P></P> > <div id="debug"> > </div> > > ]]> > </Content> > </Module> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "iGoogle Developer Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Gadgets-API?hl=en -~----------~----~----~----~------~----~------~--~---
