previously cast your vote for xxx where xxx should be r eplaced by the value of

Previously cast your vote for xxx where xxx should be

This preview shows page 5 - 7 out of 7 pages.

previously cast your vote for xxx”, where xxx should be replaced by the value of the radio button that you checked when you voted for the first time within the current browser session. The web page will show up like Fig. 2 and Fig. 3, respectively. Note that this operation will not cause the page to reload. Fig. 2
Image of page 5
6 Fig. 3 Complete the following script.js and handlevote.php, to implement the above functionalities. Hints: (1) In script.js, in the event handler function to the click event on the “Cast my vote” button, you should retrieve the value of the checked radio button. Then use jQuery’s.load() function to send the value to the server for server-side processing by handlevote.php, receive the response sentence from the server and display it in the <div id="message"></div> division. The following properties of the HTML DOM radio object are provided for your reference. Property Description checked True if the radio button is checked; false otherwise value The value of the value attribute of the radio button (2) In handlevote.php, you should make use of a session to decide if a vote has been cast before within the same browser session, and output the corresponding sentence for display at the client. script.js $(document).ready(function(){ $("#b_vote").click(function(){
Image of page 6