Hallo everyone, I'm interested on the status of this problem. I'm also required to load css dynamically for a work project. Even if i use the dom classes to create a <style> element, how do a activate the different stylesheets? just be removing them from the parent (the <head>) or by some other way?
@lex On Nov 10, 5:04 pm, Jason Essington <[EMAIL PROTECTED]> wrote: > There isn't a cross platform way to do this. > > But, In IE you can use JSNI and do something like: > > var ss = $doc.createStyleSheet(); > s.cssText = myCSS; > > and everywhere else, just use the DOM classes to create a style > element, set type to "text/css" and set the inner text to your CSS > then append it to the document head. > > -jason > > On Nov 7, 2008, at 8:13 AM, samsus wrote: > > > > > Hello everyone, > > > Im trying to do an app where the user can dynamically load a html and > > its respective stylesheet. (after ,say, clicking a button). How can > > this be done? > > im using RequestBuilder to load the html, however when i used to load > > the css, the stylesheet is not apllied, i also tryed: > > > private native void loadCSS(String cssHref) /*-{ > > document.write('<link rel="stylesheet" type="text/css" href="' + > > cssHref + '">'); > > }-*/; > > > without results. > > > Any ideas? --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---