This is probably a silly question, but I'm new to jQuery. Anyway, I have a thickbox iframe with a form in it. I'm also submitting the form using the Form Plugin. Everything works great, it spits out the response text just fine, and I'm pretty much floored at how clean things are.
What I'm trying to do now is to get the thickbox to close if the responseText doesn't contain the word "error." So if there are no errors, the thickbox will close itself automatically, and if there are, the box will remain open and print the responseText. I believe what I need to do is have some sort of conditional statement, and then use self.parent.tb_remove() if it's true to close the box. I'm just not sure how to implement it. Could someone please steer me in the right direction? Thanks.