AboutAnthony Levensalor Experience I have been programming in Java and Javascript since 1998. I run a web development company that specializes in Ajax front ends with PHP/MySQL back ends. I am a Sun Certified Java 2 Developer, and have done nothing but web applications for the last two years in my business
Past/Present clients Monster.com, Compuware Corporation, Flextronics International, Pragmatech Software, Open Travel Software, The Loss Mitigation Institute, Raw Story Media, Page One News Media.
i need an answer from u guys. I have a free form which part of the question is a mandatory field. I use submit button to pass a value to save new input to database. Before that, i have a checking where system not save data untill all mandatory fields are inserted. The problem is, when there's unfill field for mandatory it goes back to previous page. I want maintain the previous data, so that user dont have to fill in all the questions. I used history.go(-1), but i can't retain the previous data (which is i not save yet!)
Answer Put your checking in the same page as the form, and use onsubmit in the form tag. That way, you can cancel the submission instead of going ahead and losing your data.