Jump to content

HTML5


anr241193

Recommended Posts

A form is something that you use to enclose and identify a set of inputs that are going to be submitted to the server. A div is merely an enclosing block element that can be used for structure and/or to identify a certain part of a page.

  • Like 1
Link to comment
Share on other sites

You need a form element to initiate a submit, the usual way is to use a form identifier such as id ref and apply .submit() to it, in JavaScript.

 

The form tag identifies type of form such as encryption type, request type GET or POST, action url to go to once submitted, are you planning to recreate this for a div? why, when form tag already exist.

 

I suppose you could submit it as ajax request, but you would have to gather all the information, to send to php page to process and redirect to landing page? seem long winded way of doing it, when the form tag is made for this type of process.

  • Like 1
Link to comment
Share on other sites

As Dsonesuk says, in the traditional webpage operation you would submit a form to the server and then load another page with the results obtained from the server. A newer approach is to not use a form, but instead to use Javascript to communicate with the server in a background operation generally known as AJAX. Then there are the people who say that both methods should be used, with the form being the fallback method if Javascript has been turned off by the user.

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...