
I decided to do an application in which the text would change when the button is clicked without refreshing the page. To do so, I uploaded two text files to the server and then I called the xmlhttp request object as in window.XMLHttpRequest to check the compatibility with Internet Explorer and FireFox browsers. after that, I added the onreadystatechange function to receive the data from the server when clicked. Finally, I called the state-change function to get the actual data from the server and uploaded into my page automatically.
As for my HTML document, I could have used CSS file to design the presentation of the elements on my page but i did not since the page was really simple. I created a text box using the div element along with style attributes. In addition, I have used the onload to display the first text instantly once the page is visited. After that, I used the onclick to get the server to display my second text. That was a summary of my individual project. In conclusion, I have enjoyed doing it and I hope the next individual project would be even more interesting.
Hey Ahmed,
ReplyDeleteI have almost had the same idea. I made a schedular that gets the date and appointments from a php file. I kept everythink very simple and I hope that a simple site, without nice design,is ok.
I hope too cuz my page looks waaaaay too simple!!
ReplyDeleteAhmed,
ReplyDeleteI had the same trouble with my project. I have very limited knowledge of JavaScript and AJAX so I have been getting really frustrated trying to understand what it is I am doing right and wrong to be able to make my page work.