<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Hi Michel. Your example works great, thanks for your help on this, I *really* think that should be added to the main Seaside package because it's very usefull (I bet not everybody out there could make 100% liquid css designs ;).<br><br>I have some problem integrating this into my application. I've customized the #updateRoot: in my WAMainComponent. From there I add headings ((WAHtmlElement named: 'link') ... attributeAt: 'rel' put: 'stylesheet';) for multiple css's scripts according to the resolution found from your code.<br>With your code, WAMainComponent&gt;&gt;initialRequest is executed first, and a new WAResponse is sent (from WAMyMainComponentSession) with the current scripts plus the javascript call to the get browser's info
 function (self session refreshAfterScript: ...). I don't understand why you cannot use "aCurrentWAResponse" and attached or #nextPutAll: to there instead of creating a new response in #refreshAfterScript:. The problem is: It seems I cannot "attach" my custom WAMainComponent headings to the response (or they are attached later?), because the new WAResponse was sent before (?), resulting in my WAMainComponent class displayed without css's styling at all.<br><br>However, to verify this, I've included some anchors inside WAMainComponent to change the css's dynamically. Reloaded the page, the content is there but "raw" (no style applied), clicked the anchor and....and it worked fine, the style was applied. I deduced the headings are sent, but somewhat after the browser info things...since the respond: method seems a little bit complicated to me, I ask again, is there a way to fix this behavior so the proper headings are included and then the component is showed for the right
 resolution?<br><br>Thanks<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Mensaje original ----<br>De: Michel Bany &lt;michel.bany@gmail.com&gt;<br>Para: Seaside - general discussion &lt;seaside@lists.squeakfoundation.org&gt;<br>Enviado: sábado, 7 de abril, 2007 6:40:55<br>Asunto: Re: [Seaside] How to get the value of a javascript variable?<br><br><div><br>On 13 Apr 2007, at 19:19 , Joseph Blatter wrote:<br><br>&gt; Can you show me a simple example code of how to use the&nbsp;&nbsp;<br>&gt; XMLHttpRequest from Javascript?<br><br>Hi Joseph,<br>I posted an example at ftp://ftp.bany.fr/seaside/GetBrowserInfo-mb.1.mcz<br>The example explicitely supports IE, Mozilla and Safari. May work&nbsp;&nbsp;<br>with other browsers.<br>HTH<br>Michel<br><br><br>&gt; I just want to detect the screen resolution of the clients to set&nbsp;&nbsp;<br>&gt; the right css configuration (from multiple css's). How to get this&nbsp;&nbsp;<br>&gt; value
 from XMLHttpRequest from Smalltalk?<br>&gt; thanks<br>&gt;<br><br><br><br>_______________________________________________<br>Seaside mailing list<br>Seaside@lists.squeakfoundation.org<br><a target="_blank" href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br></div></div><br></div></div><br>__________________________________________________<br>Correo Yahoo!<br>Espacio para todos tus mensajes, antivirus y antispam ¡gratis! <br>Regístrate ya - http://correo.espanol.yahoo.com/ </body></html>