Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. 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

1. 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.

2. 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.

3. 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To Database 2

Authors: Bruce L. Larson

1st Edition

0070232679, 978-0070232679

More Books

Students also viewed these Databases questions