stinkysGTI
Programmer
ok, I have a decent sized mail form. It's in 4 sections.
There's 3 variables I need to complete on each section:
1. check that all fields are completed
2. if all fields are completed, change graphic in section header from 'not completed' to 'completed'
3. hide current section and show next section
I can get it to validate the required fields and change the graphic, but can't get it to also hide and show proper sections.
I can when that is all I do, I just can't get all 3 at the same time. I'm not a javascript pro by any means, so my current code is needlessly extensive.
I don't know enough to consolidate and make a general function to use for all. I tried nesting other functions at the end of my validation, but I guess I'm not doing it right. I keep getting errors. So I instead dropped a section-specific function at the end [not efficient at all].
Like I said, the code is rather extensive, so I don't want to drop it in this post. Hopefully someone will get the idea. I can post the files on my site, if that'll help.
There's 3 variables I need to complete on each section:
1. check that all fields are completed
2. if all fields are completed, change graphic in section header from 'not completed' to 'completed'
3. hide current section and show next section
I can get it to validate the required fields and change the graphic, but can't get it to also hide and show proper sections.
I can when that is all I do, I just can't get all 3 at the same time. I'm not a javascript pro by any means, so my current code is needlessly extensive.
I don't know enough to consolidate and make a general function to use for all. I tried nesting other functions at the end of my validation, but I guess I'm not doing it right. I keep getting errors. So I instead dropped a section-specific function at the end [not efficient at all].
Like I said, the code is rather extensive, so I don't want to drop it in this post. Hopefully someone will get the idea. I can post the files on my site, if that'll help.