Jump to content

how to use javascipt to store data ??


lee_huei
 Share

Recommended Posts

well,recently i am doing with my java scipt assignment,it is a job vacancy application system.user are able to key in the company name,job title,job refernce no,salary and skill required and display in table form.this level i already done.the second level require the user to search for a particular job vacancy by entering a job reference number.so this would required a database,rite?can anyone show me how to use java scipt to store data in the database and come out with job vacancy once user enter a job reference number.THanks in advanced!!

Link to comment
Share on other sites

Ok, anywhere in the body section, insert this.<form><input type="hidden" id="companyname" value=""><input type="hidden" id="jobtitle" value=""><input type="hidden" id="jobreference" value=""><input type="hidden" id="salary" value=""><input type="hidden" id="skill" value=""></form>Ok. you've got that. Now, it would be nice to know how they will be keying in the stuff.For example.<form><table><tr><td>Company Name:</td><td><input type="text" value="" id="cname"></td></tr><tr><td>Job Title:</td><td><input type="text" value="" id="cname"></td></tr><tr><td>Job Reference?:</td><td><input type="text" value="" id="jobref"></td></tr><tr><td>Salary:</td><td><input type="number" value="" id="cname"></td></tr><tr><td>Skill:</td><td><input type="text" value="" id="cname"></td></tr></table><input type="button" value="Submit" onclick="submitthing()"></form>Then you write a javascript function with for loops through all of these, chekcs if they are filled out, and then puts their values into the hidden boxes. Then you can do whatever you want with them on the page.

Link to comment
Share on other sites

Ok, anywhere in the body section, insert this.<form><input type="hidden" id="companyname" value=""><input type="hidden" id="jobtitle" value=""><input type="hidden" id="jobreference" value=""><input type="hidden" id="salary" value=""><input type="hidden" id="skill" value=""></form>Ok. you've got that. Now, it would be nice to know how they will be keying in the stuff.For example.<form><table><tr><td>Company Name:</td><td><input type="text" value="" id="cname"></td></tr><tr><td>Job Title:</td><td><input type="text" value="" id="cname"></td></tr><tr><td>Job Reference?:</td><td><input type="text" value="" id="jobref"></td></tr><tr><td>Salary:</td><td><input type="number" value="" id="cname"></td></tr><tr><td>Skill:</td><td><input type="text" value="" id="cname"></td></tr></table><input type="button" value="Submit" onclick="submitthing()"></form>Then you write a javascript function with for loops through all of these, chekcs if they are filled out, and then puts their values into the hidden boxes. Then you can do whatever you want with them on the page.

thanks alot for ur guidance!!
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...