Go to URL after form

Go to URL after form

From a list view, I have a custom action which leads to a form:

void Company.AddCalendarEvents(int CoID)
{
    openUrl("#Form:Calendar?Company=" + input.CoID + "", "same window");
}


Once I enter values, and hit submit, the form re-loads, but it's not useful to me as the Company Value is not pre-loaded.

I would like to either:
- have the form reload with the same CoID value
OR
- re-direct to a different url

what do I do?