<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>Re: [Seaside] How to get the value of a javascript variable?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Doesn't your email client know how to show them in plain text by default? :)<BR>
<BR>
Cheers!<BR>
<BR>
-Boris<BR>
(Sent from a BlackBerry)<BR>
<BR>
----- Original Message -----<BR>
From: seaside-bounces@lists.squeakfoundation.org &lt;seaside-bounces@lists.squeakfoundation.org&gt;<BR>
To: Seaside - general discussion &lt;seaside@lists.squeakfoundation.org&gt;<BR>
Sent: Mon Apr 23 07:23:08 2007<BR>
Subject: Re: [Seaside] How to get the value of a javascript variable?<BR>
<BR>
Hi Joseph<BR>
<BR>
First of all, please stop using HTML emails, this is very annoying.<BR>
<BR>
2007/4/18, Joseph Blatter &lt;josephblatter62@yahoo.com&gt;:<BR>
&gt;<BR>
&gt; Hi Michel. Your example works great, thanks for your help on this, I<BR>
&gt; *really* think that should be added to the main Seaside package because it's<BR>
&gt; very usefull<BR>
<BR>
For all the JavaScript hackery we have JavaScript hackery frameworks<BR>
like Scriptaculous that do XMLHttpRequest and stuff in a halfway<BR>
probable way (way more portable than if you would write it yourself,<BR>
this isn't meant offensive, that's just how it is).<BR>
<BR>
&gt; (I bet not everybody out there could make 100% liquid css<BR>
&gt; designs ;).<BR>
<BR>
<BR>
You use JavaScript to make CSS designs? This sounds a bit strange.<BR>
<BR>
&gt; I have some problem integrating this into my application. I've customized<BR>
&gt; the #updateRoot: in my WAMainComponent. From there I add headings<BR>
&gt; ((WAHtmlElement named: 'link') ... attributeAt: 'rel' put: 'stylesheet';)<BR>
&gt; for multiple css's scripts according to the resolution found from your code.<BR>
<BR>
In 2.7 we have the new header api that should make stuff like this<BR>
easier but diffrent CSS according screen resolution doesn't sound<BR>
good.<BR>
<BR>
&gt; With your code, WAMainComponent&gt;&gt;initialRequest is executed first, and a new<BR>
&gt; WAResponse is sent (from WAMyMainComponentSession) with the current scripts<BR>
&gt; plus the javascript call to the get browser's info function (self session<BR>
&gt; refreshAfterScript: ...). I don't understand why you cannot use<BR>
&gt; &quot;aCurrentWAResponse&quot; and attached or #nextPutAll: to there instead of<BR>
&gt; creating a new response in #refreshAfterScript:. The problem is: It seems I<BR>
&gt; cannot &quot;attach&quot; my custom WAMainComponent headings to the response (or they<BR>
&gt; are attached later?), because the new WAResponse was sent before (?),<BR>
&gt; resulting in my WAMainComponent class displayed without css's styling at<BR>
&gt; all.<BR>
&gt;<BR>
&gt; However, to verify this, I've included some anchors inside WAMainComponent<BR>
&gt; to change the css's dynamically. Reloaded the page, the content is there but<BR>
&gt; &quot;raw&quot; (no style applied), clicked the anchor and....and it worked fine, the<BR>
&gt; style was applied. I deduced the headings are sent, but somewhat after the<BR>
&gt; browser info things...since the respond: method seems a little bit<BR>
&gt; complicated to me, I ask again, is there a way to fix this behavior so the<BR>
&gt; proper headings are included and then the component is showed for the right<BR>
&gt; resolution?<BR>
<BR>
<BR>
Cheers<BR>
Philippe<BR>
<BR>
&gt; Thanks<BR>
&gt;<BR>
&gt; ----- Mensaje original ----<BR>
&gt; De: Michel Bany &lt;michel.bany@gmail.com&gt;<BR>
&gt; Para: Seaside - general discussion<BR>
&gt; &lt;seaside@lists.squeakfoundation.org&gt;<BR>
&gt; Enviado: sábado, 7 de abril, 2007 6:40:55<BR>
&gt; Asunto: Re: [Seaside] How to get the value of a javascript variable?<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; On 13 Apr 2007, at 19:19 , Joseph Blatter wrote:<BR>
&gt;<BR>
&gt; &gt; Can you show me a simple example code of how to use the<BR>
&gt; &gt; XMLHttpRequest from Javascript?<BR>
&gt;<BR>
&gt; Hi Joseph,<BR>
&gt; I posted an example at<BR>
&gt; <A HREF="ftp://ftp.bany.fr/seaside/GetBrowserInfo-mb.1.mcz">ftp://ftp.bany.fr/seaside/GetBrowserInfo-mb.1.mcz</A><BR>
&gt; The example explicitely supports IE, Mozilla and Safari. May work<BR>
&gt; with other browsers.<BR>
&gt; HTH<BR>
&gt; Michel<BR>
&gt;<BR>
&gt;<BR>
&gt; &gt; I just want to detect the screen resolution of the clients to set<BR>
&gt; &gt; the right css configuration (from multiple css's). How to get this<BR>
&gt; &gt; value from XMLHttpRequest from Smalltalk?<BR>
&gt; &gt; thanks<BR>
&gt; &gt;<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; _______________________________________________<BR>
&gt; Seaside mailing list<BR>
&gt; Seaside@lists.squeakfoundation.org<BR>
&gt; <A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR>
&gt;<BR>
&gt;<BR>
&gt; __________________________________________________<BR>
&gt; Correo Yahoo!<BR>
&gt; Espacio para todos tus mensajes, antivirus y antispam ¡gratis!<BR>
&gt; Regístrate ya - <A HREF="http://correo.espanol.yahoo.com/">http://correo.espanol.yahoo.com/</A><BR>
&gt; _______________________________________________<BR>
&gt; Seaside mailing list<BR>
&gt; Seaside@lists.squeakfoundation.org<BR>
&gt; <A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR>
&gt;<BR>
&gt;<BR>
</FONT>
</P>

</BODY>
</HTML>