How I can validate input on form before upload file?

How to validate a HTML form with javascript?

  • See this is what I made. Now I wanna validate it with java script --------------------------------------… <html> <head> <title> Form </title> </head> <body bgcolor="pink"> <form method="get" name="form" action="url.php"> <fieldset> <legend> Log in information </legend> Enter Your Name:        <input type="text"> Enter Your Password: <input type="password"> <p> Gender:                            Male <input type="radio" value="Male" name="sex"> Female <input type="radio" value="female" name="sex"> </fieldset> <p> <fieldset> <legend> Information </legend> Programing You Know : <p> <input type="checkbox" value="c" name="c"> c <input type="checkbox" value="c#" name="c#"> c# <input type="checkbox" value="java" name="java"> java <p> Upload Your CV: <input type="file"> </fieldset> <p> <fieldset> <legend> Action </legend> <p>         <input type="submit" name="submit" value="Submit">         <input type="reset" value="Reset"> </fieldset> <p> <fieldset> <legend> Message </legend> Please Leave Message: <p> <textarea rows="4" cols="50"> </textarea> <p> Number of line you woroat: <p> <select name="nooflines"> <option value="1"> 1 </option> <option value="2"> 2 </option> </select> </fieldset> </form> </body> </html>

  • Answer:

    I haven't touched it for years.. I wish I could help. Anyway, why do u use HTML? You can use PHP with the "Switch" function what works as a 'Frame' only cooler and more proffesional :P

Himanshu Gajwani at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.