Re: Run javascript functions from Java String

2009-06-11 Thread Ganael Jatteau
Thanks I didn't thought of just doing an eval. That does the job.

Ganael

On Wed, Jun 10, 2009 at 6:49 PM, Ian Bambury ianbamb...@gmail.com wrote:

 Create a jsni method which takes a string and just does an 'eval' - as long
 as you are sure that the JS is safe
 Ian

 http://examples.roughian.com


 2009/6/10 Ganaga ganael.jatt...@gmail.com


 Hello,

 I have a Java object (client side) that contains a snippet of
 Javascript.

 Example:  String s = window.alert();

 Is there a way to execute the content of that String ? I mean is there
 a way to generate Javascript code on the fly ?

 Thanks

 Ganael



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Work around for Element.setAttribute(style, value) in IE ?

2009-06-03 Thread Ganael Jatteau
Thanks for the answers !

Actually I tried: Element.getStyle().setProperty(blablabla) and it works
fine !

On Wed, Jun 3, 2009 at 6:37 PM, Adam T adam.t...@gmail.com wrote:


 Try

 DOM.setStyleAttribute(Element, backgroundColor, #ff)

 (you also need to use camelCase for the style you are changing).

 //Adam

 On 3 Juni, 18:15, Ganaga ganael.jatt...@gmail.com wrote:
  Hi,
 
  Doing a Element.setAttribute(style, background-color: #ff)
  works fine in Firefox but has no effect in IE.
 
  Is there any work around for changing dynamically a style in IE ?
 
  The post:
 http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
  provides a way to load a css file dynamically for IE, but how to
  change just an attribute ?
 
  Thanks !
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---