lee_huei Posted November 4, 2005 Share Posted November 4, 2005 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 More sharing options...
MadPotato Posted November 4, 2005 Share Posted November 4, 2005 javascript can't access databases, you'll need a server-side script. like PHP or ASP Link to comment Share on other sites More sharing options...
Chocolate570 Posted November 4, 2005 Share Posted November 4, 2005 Do you want to display it on the same page? That's possible. Link to comment Share on other sites More sharing options...
lee_huei Posted November 5, 2005 Author Share Posted November 5, 2005 Do you want to display it on the same page? That's possible.<{POST_SNAPBACK}> hehe....ok...mind to show me??really really...thanks... Link to comment Share on other sites More sharing options...
Chocolate570 Posted November 5, 2005 Share Posted November 5, 2005 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 More sharing options...
F-Man Posted November 6, 2005 Share Posted November 6, 2005 Though you should use names in forms, not ids. Link to comment Share on other sites More sharing options...
lee_huei Posted November 6, 2005 Author Share Posted November 6, 2005 Though you should use names in forms, not ids.<{POST_SNAPBACK}> why should use names in forms not ids??can it be work if use ids?? Link to comment Share on other sites More sharing options...
lee_huei Posted November 6, 2005 Author Share Posted November 6, 2005 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.<{POST_SNAPBACK}> thanks alot for ur guidance!! Link to comment Share on other sites More sharing options...
Chocolate570 Posted November 6, 2005 Share Posted November 6, 2005 No problem, don't hesitate to ask with the function writing. Or if you pm me what you want, i'll try to make it for you. Link to comment Share on other sites More sharing options...
Jack McKalling Posted November 6, 2005 Share Posted November 6, 2005 Don't forget to store the data of the hidden inputs in variables before you use them, and only save the values into the variables when the user hit a certain button. Else it won't work Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now