An (unwilling) introduction to Ajax? [Solved]

An (unwilling) introduction to Ajax? [Solved]

I'm writing a Drupal module for work, and I thought I'd spice it up with some jQuery (in fact, I was here before with an issue with some jQuery code), namely showing and hiding some DIVs based on the value of a select element.

It's working great by the way, real slick. Looks nice.

My issue comes during form validation. If someone doesn't fill in one of the fields they got to using that spiffy slide animation, the php processor spits the form back at them, listing the errors at the top. Which is great!

What's not great is what happens to the DIV hide-n-seek. Namely, the div that was being shown is now not shown, because the first thing my JS does is hide all the DIVs. The show function is tied to the change event of the select box, so the only way to show the DIV again is to change the Select to another value, then back to the value the user selected when submitting the form.

That's a lot of work to do.

So my issue now is maintaining the correct DIV status through the validation process. Form values are sent through POST, and I don't even know what to Google at this point to try to fix this.

Thanks in advance for any assistance.