[Javascript] Changing an Objects ID and Name

tedd tedd at sperling.com
Wed Sep 6 17:10:52 CDT 2006


At 9:05 AM -0700 9/6/06, Brian L. Matthews wrote:
>>1. With ajax you can change the html between divs.
>
>No. Ajax is the client communicating with a server, usually using 
>XMLHttpRequest. While lots of applications manipulate the DOM in the 
>client based upon the result of the request, the two are completely 
>independent. A page can make XMLHttpRequests and then not change the 
>page in any way, and JavaScript (or other client side scripting 
>languages) can modify the page using DOM methods without talking to 
>a server at all.

Well maybe I just don't know any better.

I used ajax to send a XMLHttpRequest that changes the html without 
reloading the entire page.

The poster said he wanted to swap html from this:

<img src="image1.jpg" width="100" height="200" name="abc" id="abc">
<img src="image2.jpg" width="120" height="180" name="def" id="def">

to this:

<img src="image2.jpg" width="120" height="180" name="def" id="def">
<img src="image1.jpg" width="100" height="200" name="abc" id="abc">

So, using *his* code, I did the following with ajax:

http://xn--ovg.com/ajax2

Does this not solve the problem? If so, what am I not understanding?

Thanks.

tedd
-- 
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com



More information about the Javascript mailing list