Hi Mori,

Sounds like a nice idea. I think you should try a more complicated
approach, the basis you now use will probably be to small to build on.
Below I put something together off the top of my head, without syntax
checking, so it may not (probably) work correctly. You probably also
want to put in some buttons to test and save stuff. Other stuff you
might need are "eval()" to put the javascript in the textarea to work.
I don't know if it will work this way with the resultarea, otherwise
you may try something with an iframe.

Good luck! Let me know when you got it to work.

Regards,
Rik


<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs
  title="Embed Code Gadget"
  height="0"
  width="0"
  />
<UserPref name="html" datatype="hidden" />
<Content type="html"><![CDATA[
<div id="editarea"><textarea id="editfield"></textarea></div>
<div id="resultarea"></div>

<script type="text/javascript">
  var prefs = new _IG_Prefs();

  function loadPref() {
 
document.getElementById("editfield").innerHTML=prefs.getString("html");
  }
  function testCode() {
 
document.getElementById("resultarea").innerHTML=document.getElementById("editfield").innerHTML;
  }
  loadPref();
  testCode();
</script>

]]></Content>
</Module>




On 14 jun, 22:18, Mori <[email protected]> wrote:
> Google Gadget Experts,
>
> In the following gadget properties, how can I replace the single-line
> text input field with a textarea:
> ________________________________________
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Module>
> <ModulePrefs
>   title="Embed Code Gadget"
>   height="0"
>   width="0"
>   />
> <UserPref name="html" display_name="HTML Code" required="true" />
> <Content type="html"><![CDATA[
> <script type="text/javascript">
>   var prefs = new _IG_Prefs();
>   document.write(prefs.getString("html"));
> </script>
>
> ]]></Content>
> </Module>
> ________________________________________
>
> At the end of the day I would like to have a gadget that can execute
> any code (HTML/CSS/JavaScript) -- something I've been everywhere
> looking for but to no avail.
>
> Your kind help is greatly appreciated!
> Regards
> Mori

-- 
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.

Reply via email to