Need some HTML / JavaScript help with forms

Status
Not open for further replies.

westy159

In Runtime
Messages
182
Location
United Kingdom
Hey there, its been yonks since ive been here.

Ive hit a snag while creating a website for my IT course. Ive made a form for the user to submit their details. Each text field and drop box is functioning, and when the user clicks submit they are redirected to the home page (which is fine as im not required or intending to actually collect any info).

But what i would like the form to do is to disable the submit if any text fields are left blank, with new text or an alert box appearing telling the user what they have missed. Im not quite sure how to do this.

Looking at the source for other websites it appears most do this with Javascript, a language i am not required to use for this section ( and i have little experience with it). If possible I would like to use HTML to create these conditions for submitting the form. Can anyone show me how?

Thank you.
 
Just to follow up with what joelm3103 said think of it like this.

HTML is for the structure.
CSS is for the look.
Javascript is for dynamics.

If you want anything to happen after the page load or have dynamics when the page loads Javascript is your bet.
 
Status
Not open for further replies.
Back
Top Bottom