I am working on a bowling scoring system for a non-profit. They would like to be able to enter up to 9 games worth of scores into a form and have the shot results and game scores captured in a database. I have accomplished the scoring part with an html table/form combination. The last row of the table for each column is a Submit button for the user to click and send the shot results to the database using an Ajax call and then return a calculated score. Works very slick except....

On the Ajax return, I would like to replace the last column in the row with the calculated score and another button like "Verify". The idea being that the user could change any of the frames on the form if the calculated score did not match the score from the lanes and then resubmit. And then perform another final replace that would then show only the score and no button, thus locking the score.

I have this all working except that the replaces go to the top of the column of the table rather than replacing the bottom row. It is so close, what am I missing?

Recommended Answers

All 2 Replies

Your post is missing some code. If you've not found the bug yet, post the part of the code that does the replace. Sounds easy.

As Martin suggested, the solution was simple. I was attempting to replace just a single row in a table. Once I rewrote the page to include a div section at the bottom of the table, the replace works fine.

I also experimented with replacing the entire table with div elements, but decided to keep the table for the top portion and only use divs for the bottom.

The whole page is quite a lot of code so I won't post it, but if anyone is interested what it looks like, just send me a PM and I can send you the code I used.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.