This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.
In order to help customer input information correctly and avoid error happen in uploading meter reading, we should prevent them from uploading a meter reading that is less than the previous reading and not allowing meter readings for invalid dates. In addition, the web page should be able to appear message to notify user what mistake being happen. Furthermore, user would not be able to submit their data before the mistake were clean.
XML(Extensible Markup Language) was design to improve data description, storing, and exchanging. It released in 1998 by W3C. Its node concept design and the hierarchical structure provide well support on data storing.
CSS(Cascading Style Sheets) is a Stylesheet language. It is used to separate the data layer and display layer in HTML. On other word, CSS could provide a fixable method to define and format the looking of the web page.
The most important usage of AJAX is using XHR (XMLHttpRequest) to play with web server. A XHR object will be created while user establish connection to web server. The XHR object will happen between web browser and web server. The XHR object will listen to the web servers' update for web page make a partly update. Then XHR will pass the update to the web browser to renew the part of web page. This mechanism successfully decreases the bandwidth using and data processing. AJAX was generally using on interactive web page, such as Google Map, Google search suggestion, and stock price quoting.
Pic 2.2 Create the variable
Firstly, the script in would create a lot of variables that we are going to use (Pic 2.2).
Pic 2.3 The validation function
Then, we will use the function to do the validation (Pic 2.3). On line 19, the code is used to start checking by if loop with the conditions. The code on line 22 alert user "Please select date for meter reading!", if they have not input the day. From line 25 to 41, the function is setup to alert user if they are not input the correct year, month, day, also the meter reading.
Pic 2.4 The validation to the meter reading
Pic 2.5 These code will disable the submit button
Pic 2.6 The submit button