Question: Create and XHTML page with a form. The form will contain a text box for the user's name and a submit button. Create a function

Create and XHTML page with a form. The form will contain a text box for the user's name and a submit button. Create a function in the section of the document that will set a cookie to the user's name submitted via the text box. Add JavaScript code to the

tag. Use the onsubmit event handler to call the function that creates the cookie. Create code that informs the user if the name field is left blank. If the name field has a value, pass the user's name in the call. In both the if clause and the else clause, use a return false statemet to negate the submission of the form. The setting of the cookie is all that should occur for the submit event. Add another button to the XHTML form. Use an onclick event handler with this scriptable button to open a new window. Write code that will display the user's name (extracted from the cookie) in a welcome message in the document of the new window.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!