Hi Pamela,
pa***********@libero.it wrote:
>>Since you are a ASP.NET 2.0 user (me too BTW), you should really take a
close look at ATLAS, which is Microsoft's AJAX implementation.
http://atlas.asp.net
Yes Laurent. That is beautiful. I also think that the future will see a
big development of these techniques to improve the user experience on
the client side. Probably, right now they are still not mature enough,
as, from what I can get, even a few recent samples which one can find
on the web do not work with the latest versions of Atlas. This suggests
that the development rate of this stuff is quite high.
ATLAS is still in development, but they will be releasing soon. As with
their other technologies in development (the amazing Windows
Presentation Foundation, for instance), the release date, though
unknown, should be sometimes this year. The monthly CTPs (community
technology previews) are more and more stable, and most of the time you
don't need to modify the code anymore to be able to recompile.
Sorry to the group for that paragraph, which is off-topic.
Probably
Microsoft's effort is that of making converge everything towards a
unified kind of programming. After all, ASP.NET talks clear. My
learning curve for ASP.NET was practically flat, although I never had
ASP before: just because they have well managed to unify the
programming environment. Probably, the same will happen for the client
side tools, even tough it is probable that there they will have hard
time, due to the browser limitations. I expect they will put a lot of
stuff in IE7, as to transform it into a programming enviroment that
unify everything (winform/webform/client side). This will also probably
cause a further and unstoppable expansion of egemony, which many people
may not regard as a good thing.
Actually, never before has Microsoft worked on a technology as
cross-platform compatible as this one. I was in Mix06 earlier this year,
and I saw them demonstrate new web technologies (ATLAS, mash-ups,
infocards, etc...) using all kinds of computers. In most of the events,
there was at least one Mac on stage, and often also a Unix-based server
to show that ASP.NET 2.0 based features can easily be used on other systems.
ATLAS is documented to work on IE, Firefox and other Mozilla browsers,
Opera, and also on Safari for Mac. IIRC it will also work on Linux
platforms. I think that this shows that Microsoft is changing slowly to
a more open approach, which is also confirmed by the recent development
of WPF/E, which will also run on all these platforms. There is really a
wind of change in that firm, with developers communicating quite openly
and publishing demos, source code, etc... on their blogs.
I came to OOP through Java and I had a Mac before. I was never an
extremist in any technology, and cannot be qualified as pro Windows or
pro Mac, pro Firefox or pro IE (I use both anyway). But I must say, I
was impressed by what I saw since I started working with .NET 1.0.
Back to my particular problem, note that, in this specific instance
case, I am actually working with a *plain* HTML/CSS page. This page is
generated directly writing the HTML to a stringbuilder. So it is not an
ASP.NET page, where one could use Atlas or similar tools. It is also so
complex (might contains several grids with several thousands cells,
interactive charts, pictures, textboxes, etc.) that could not
practically be done with ASP.NET or any attempt could take ages. I use
an external ASP.NET page only to the purpose of passing the user action
from the html page to the server (a do a GET using an hidden field of a
form in the html page, to pass the javascript variable to the ASP.NET
page which does the server side processing). As I explained in my first
post, this has also the advantage that the report will be portable and
will work without ASP. In fact, thanks to Your beautiful function to
check URL existence, it will continue to work seamlessy even in stand
alone mode.
I understand. Some parts of ATLAS are client-side only, so you could
select only some of the JavaScript files and use this as standalone, I
suppose. I never did that though. I think that the simple AJAX request
you describe has better chances, and it will be fun to develop anyway.
So what I am now looking for is a simple Ajax way to do the html
substitution within the html page, so that one can avoid the whole page
reload. This could be a good chance to see how this things actually
work.
-Pam
Tom explained to you how to do that. I am not a fan of innerHTML to
update node values, because of compatibility issues (which might be
solved now though). I prefer to use nodeValue.
Anyway, once you have the HTML result of your request, the idea is to
use DOM Level 2 methods to access the container node and the to replace
the content with something else. This will fail in older browsers, but
the modern ones will automatically update the display.
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering:
http://www.galasoft-LB.ch
PhotoAlbum:
http://www.galasoft-LB.ch/pictures
Support children in Calcutta:
http://www.calcutta-espoir.ch