<!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 <seaside-bounces@lists.squeakfoundation.org><BR>
To: Seaside - general discussion <seaside@lists.squeakfoundation.org><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 <josephblatter62@yahoo.com>:<BR>
><BR>
> Hi Michel. Your example works great, thanks for your help on this, I<BR>
> *really* think that should be added to the main Seaside package because it's<BR>
> 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>
> (I bet not everybody out there could make 100% liquid css<BR>
> designs ;).<BR>
<BR>
<BR>
You use JavaScript to make CSS designs? This sounds a bit strange.<BR>
<BR>
> I have some problem integrating this into my application. I've customized<BR>
> the #updateRoot: in my WAMainComponent. From there I add headings<BR>
> ((WAHtmlElement named: 'link') ... attributeAt: 'rel' put: 'stylesheet';)<BR>
> 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>
> With your code, WAMainComponent>>initialRequest is executed first, and a new<BR>
> WAResponse is sent (from WAMyMainComponentSession) with the current scripts<BR>
> plus the javascript call to the get browser's info function (self session<BR>
> refreshAfterScript: ...). I don't understand why you cannot use<BR>
> "aCurrentWAResponse" and attached or #nextPutAll: to there instead of<BR>
> creating a new response in #refreshAfterScript:. The problem is: It seems I<BR>
> cannot "attach" my custom WAMainComponent headings to the response (or they<BR>
> are attached later?), because the new WAResponse was sent before (?),<BR>
> resulting in my WAMainComponent class displayed without css's styling at<BR>
> all.<BR>
><BR>
> However, to verify this, I've included some anchors inside WAMainComponent<BR>
> to change the css's dynamically. Reloaded the page, the content is there but<BR>
> "raw" (no style applied), clicked the anchor and....and it worked fine, the<BR>
> style was applied. I deduced the headings are sent, but somewhat after the<BR>
> browser info things...since the respond: method seems a little bit<BR>
> complicated to me, I ask again, is there a way to fix this behavior so the<BR>
> proper headings are included and then the component is showed for the right<BR>
> resolution?<BR>
<BR>
<BR>
Cheers<BR>
Philippe<BR>
<BR>
> Thanks<BR>
><BR>
> ----- Mensaje original ----<BR>
> De: Michel Bany <michel.bany@gmail.com><BR>
> Para: Seaside - general discussion<BR>
> <seaside@lists.squeakfoundation.org><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>
><BR>
><BR>
> On 13 Apr 2007, at 19:19 , Joseph Blatter wrote:<BR>
><BR>
> > Can you show me a simple example code of how to use the<BR>
> > XMLHttpRequest from Javascript?<BR>
><BR>
> Hi Joseph,<BR>
> I posted an example at<BR>
> <A HREF="ftp://ftp.bany.fr/seaside/GetBrowserInfo-mb.1.mcz">ftp://ftp.bany.fr/seaside/GetBrowserInfo-mb.1.mcz</A><BR>
> The example explicitely supports IE, Mozilla and Safari. May work<BR>
> with other browsers.<BR>
> HTH<BR>
> Michel<BR>
><BR>
><BR>
> > I just want to detect the screen resolution of the clients to set<BR>
> > the right css configuration (from multiple css's). How to get this<BR>
> > value from XMLHttpRequest from Smalltalk?<BR>
> > thanks<BR>
> ><BR>
><BR>
><BR>
><BR>
> _______________________________________________<BR>
> Seaside mailing list<BR>
> Seaside@lists.squeakfoundation.org<BR>
> <A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR>
><BR>
><BR>
> __________________________________________________<BR>
> Correo Yahoo!<BR>
> Espacio para todos tus mensajes, antivirus y antispam ¡gratis!<BR>
> Regístrate ya - <A HREF="http://correo.espanol.yahoo.com/">http://correo.espanol.yahoo.com/</A><BR>
> _______________________________________________<BR>
> Seaside mailing list<BR>
> Seaside@lists.squeakfoundation.org<BR>
> <A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR>
><BR>
><BR>
</FONT>
</P>
</BODY>
</HTML>