Question: I'm using the jQuery validation plugin for a form contained in a colorbox. I want to close the colorbox and open a second colorbox (saying thank you) if the validation is successful, and then send the user to their original destination.

The script captures the destination of the user and puts it in a variable, then opens a colorbox. Users can exist the colorbox in four different ways, clicking off the bock, clicking the x in the upper right corner, clicking the close button, or a successful submit. Then they continue on their way.

What I need is something like an if submit successful, then open thank you colorbox. What I've tried so far just breaks everything.

```
$('#lookUpSubmit').unbind('click').click(function(){
    $form.submit();
});

$("#lookUpCancel").unbind('click').click(function(){
    $.colorbox.close();
});

$(document).bind('cbox_closed', function() {
    window.location = destination_url;
});

$form.validate({
    submitHandler: function(form) {
        form.submit();
    },
//some stuff
});

```

Answer: 
This will create an object from the type that your `MethodInfo` is, and will invoke it for you on that new object.

```
void CallMethod(MethodInfo m)
{
    Object o = Activator.CreateInstance(m.ReflectedType);
    m.Invoke(o, null);
}

```
You can determine the type which defines the method by accessing the DeclaringType property of the MethodInfo object.