Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 166
  • Last Modified:

Check if input is saved before moving to next one

I have form where user can fill out the information. The form is very long and for each of the row there is an insert button (plz see the image). Sometimes a user will fill out something in the text box but forget to save the value(click insert in this form) and move to the next one. In this case I want to change the color of that td to something else. How can I do that?
1 Solution
put the following in the head section of your page :
<script language="javascript" type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.js"></script>
<script language="javascript" type="text/javascript">
    $(document).ready(function() {
        $(":text","td").change(function() {
        $("input[value*='Insert']").click(function() {
            $(this).closest("tr").find("td :text").css("background","");

Open in new window

PranjalShahAuthor Commented:
Thanks a lot...

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now