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