Saturday, July 29, 2006

Bad news for office 2007 beta testers. Due to a high demand for the beta Microsoft is going to charge 1.50$ for the download beginning next Wednesday at 6 p.m. Now that`s really bad news and the worst thing is that it creates a precedent and large corporations may start asking for small fees when you download their beta. On the other hand...I`ve been using the office 2007 beta for some months now and I`ve been really satisfied with it(I didn`t use office 2003 at all). The best feature that the beta has(in my opinion) is Save As PDF, unfortunately the full version won`t have this feature built-in and you`ll have to download it as an add-on....

This is a teaser that I found on Youtube...It certainly has done it`s job as it really got my interest :)...I don`t know what it`s all about...It is not for Vista since it says summer 2006...and it`s something about entertainment...maybe that Zune player but I think it`s too early for that...any ideas?

Today I installed the newest browser from Microsoft(IE Beta 3)..I did not try any of the previous beta versions.Also I installed the newest version of Mozilla Firefox, the 2.0 Beta.So...I tryed to compare the two....and overall I think the two browsers made some big advances when it comes to user interface...and I really enjoy this war.What I like at the new IE:-Tabs (Finally)-That they added search...and most of all that it started with google as the default search engine(might be from settings in IE 6..)-That you can change the search provider really fast in case you get bored.-That they added a lot of tools.-Also I think it`s faster than any of the previous IE versions...but that`s only my opinion-RSS feeds (Finally)-That it works fine with my Windows X64 Professional

What I like at the new Firefox:-That it`s Mozilla FIREFOX :)-That it has the same features that my old firefox had.-That the number of addons is getting larger and larger.-You can change search providers.-RSS Feeds...-Almost everything that IE 7 has :)

Overall the big change is on the Microsoft side...and mostly the change is good. I really enjoyed browsing with IE 7...Surf`s Up...

Tuesday, July 04, 2006

This will show a way to get data on the site dynamically without the need to update the whole content of the page, updating just part of the website, in our example just a simple div on a asp page.First thing noted here: the page will be an asp page(not .NET) that will be hosted on IIS.

Creating the site`s design. In other words what I would like this thing to do.The site will be composed of 3 pages: test.asp, first.html and second.html .The pages first.html and second.html will just contain a div that we will eventually show on the test.asp page and will just contain the following text:

First.html

<div id="Content"> here is the first page content</div>

Second.html

<div id="Content"> here is the second page content</div>

Our main concern from now on will be the test.asp page. The first thing we will do is build the JavaScript that will handle our requests. This script can be anywhere on the page but usually it is either in the Head portion or after the end of the body. So, this is the JavaScript:

Our main function is GetContent(Location,TheDiv,event) (line 3). The function takes 3 parameters: Location – The location of the data that will be requested by the function. TheDiv – The div that will be changed every time the function is used.(in our case this will be ‘TestDiv’)

On line 3 we simply copy the TheDiv variable to a ChangecDiv variable that will be used further in the script.The try..catch statement the comes next is the part where we create the Xml Request object and in order for the script to work cross-browser this part of the script is harder to understand.xmlhttp = window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP");This is actually a compressed if statement that should be like this:

The script is like this because Microsoft did not natively implement the Xml Request object and just implemented it as an ActiveXObject while all the other browsers(that deserve attention) implement it natively. So what the if really does is this:

If this is true then create a new XMLHttpRequest object(native object)

Otherwise create a new ActiveXObject that is almost the same as a native object.

Lines 8,9 and 10 just handle the request itself, so it first(8) creates an event handler that will handle the onreadystatechange that occurs when the state of the request changes. Then(9) it creates the request itself using the GET method and the Location from where the date will be retrieved. The next thing to do(10) is to actually send the request that will be handled by the server.

When the request is sent our next job is to handle the data that will be retrieved by the request. Our handler will be FinnishedRequest() that will just check the state and the status of the request and will display the date in the given div. This is accomplished this way:

Line 13 – test the state of the request and if it is 4 then the request state is ok. Then test the status of the request that can be any status code known from the request object. We will only accept the request if the status if 200(OK).

Line 14 – we simply get the object that will be updated and write the received content in the innerHTML.