Hi Bogdan, in your class you have import javascriptSupport and request object
public class MyPage { @Environmental private JavaScriptSupport javaScriptSupport; @Import private Request request; void afterRender(){ String userAgent = request.getHeader("User-Agent"); //Your logic if(userAgent.contains("MSIE")){ javaScriptSupport.importStylesheet(...); }else ..... } } regards Taha On Tue, Apr 5, 2011 at 7:27 AM, bogdan_cm <bogdan.iva...@rbccm.com> wrote: > Hi, > There is one post regarding this here: > > http://tapestry.1045711.n5.nabble.com/Using-conditional-comments-with-Import-stylesheet-quot-quot-td3827508.html#a3887176 > > http://tapestry.1045711.n5.nabble.com/Using-conditional-comments-with-Import-stylesheet-quot-quot-td3827508.html#a3887176 > > but I find myself unable to figure out how it's done. Is there a working > demo somewhere, or can anyone post a bare bones class-template example > please? > > Thank you, > Bogdan. > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Using-Environmental-and-JavaScriptSupport-Object-to-dynamically-load-css-based-on-browser-tp4283102p4283102.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >