Hi Mori, A textarea in the configuration/setting view doesn't exist afaik. Your method requires a reload of the page everytime you want to try some new code. That would be a huge drawback for me. Therefore I thougt of this workaround. (btw I'm not sure I'm aware of all coding restrictions).
Why do not want a textarea on the page and want it explicitly in the configuration/setting view? "Editting in settings->reload->show result" is as much work as "editting in textarea in gadget->save to userpref (json.stringify, automatically)->reload->show result" and you don't have to open the settings pane. On Jun 15, 1:15 pm, Mori <[email protected]> wrote: > Dear Rik, > > Thanks for the answer! However, it seems I need to give some more > explanation. > As you probably know there are some coding restrictions on Google > Sites and that's why you need to wrap your embed codes, e.g. a music > player HTML code, in gadgets. The above gadget enables you to embed > almost any code and execute it. But unfortunately it uses a text input > field and therefore puts codes in one line. As a result you cannot add > some Javascript. For example: > __________________________________________ > > <html> > <head> > <script type="text/javascript"> > function startTime() > { > var today=new Date() > var h=today.getHours() > var m=today.getMinutes() > var s=today.getSeconds() > // add a zero in front of numbers<10 > m=checkTime(m) > s=checkTime(s) > document.getElementById('txt').innerHTML=h+":"+m+":"+s > t=setTimeout('startTime()',500) > > } > > function checkTime(i) > { > if (i<10) > { > i="0" + i > } > return i} > > </script> > </head> > > <body onload="startTime()"> > <div id="txt"></div> > </body> > </html> > __________________________________________ > > By "gadget properties" I mean gadget configuration/setting view, where > you see the text input field. If I can change it into a textarea, the > problem gets resolved and there will be no problem with poorly > constructed JavaScript codes that don't have semicolons or the ones > that use comments. The input forces everything into a single line. The > textarea, though it forces the text to wrap, sends it with the line > breaks intact. > > You code shows a textarea when the gadget is saved on the page, not in > the configuration view. -- 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.
