I don't know if I catch the idea... but I try.
Let assume that we have this little script:
<script>
function showHello() {
window.alert("Hello");
}
</script>
we put it in the host html.
then... we create the HTMLPanel:
public void onModuleLoad() {
String htmlString= "<html><body>Hola mundo <input type=\"button
\" onclick=\"javacript:showHello();\"/></body></html>";
HTMLPanel htmlgwt = new HTMLPanel(htmlString);
Viewport viewport = new Viewport(htmlgwt);
}
That works...
Or perhaps your needs could fit with native javascript stuff...
http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideJavaScriptNativeInterface
Let me know if I'm right... (I am not an english speaker :( )
Leo
On Oct 22, 5:02 am, "Rawand H" <[EMAIL PROTECTED]> wrote:
> Thanx for answering Leo,
> what i want todo is to change the content of one HTMLPanel among other
> panels by jscript, lets say for the sample code in first post
>
> String htmlString= "<html><body><script type=\"text/javascript
> \">document.write(\"Hello World!\");</script></body></html>";
> HTMLPanel htmlgwt = new HTMLPanel(html);
>
> then if i move the javascript code to the html hosting file so how to call
> it for htmlgwt panel?
>
> I will appreciate any ideas/ Rawand
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"GWT-Ext 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/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---