Oct 6, 2009

Individual Project

So it is officially time to submit our first individual project and thank god I'm done with mine. I'm not even sure if I did it right but it took me a long time to figure this whole JavaScript thing out. I had to go through the tutorials and Drake's code more than three times to get a sense of understanding of how this thing works. To be quiet honest, i enjoyed doing it. The one thing to say is how simple it looked when I uploaded it into my page. It took me a while until I settled on what i want to do; that wasn't really because i had too many ideas or anything. It was mainly due to my limited understand of AJAX.

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.

3 comments:

  1. Hey Ahmed,
    I 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.

    ReplyDelete
  2. I hope too cuz my page looks waaaaay too simple!!

    ReplyDelete
  3. Ahmed,
    I 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.

    ReplyDelete