Monday, May 4, 2009

Character Creation Step 2 complete

Page: ccstep2.asp

After a lot of time spent trying to figure out how to make the second step of character creation work I got a great idea: just have the form control content.

The biggest issue was making sure that all the changes got entered correctly into the database. I was using a bunch of tricks to compare data to the db, update the entries that needed updating...etc. When it occurred to me: I already have the form validating the data and comparing to the database why do I need to compare to the DB during SQL submission. I changed all the dynamic text to dynamic form fields, restored their names and then processed all the fields as if they had good data. This could bite me in the ass, but I think I have enough controls to make it work. The best part was that I already had most of the code I needed on page 1. Now I also have almost all the code I need for page two. The javascript validations are bunk because there is a whole new set of validation but less fields to check. Fields like gen are moot. I still have to put clan advantages into the DB, but it's getting there.

No comments:

Post a Comment