You are confused. The lawsuit NEVER was denied, and they have now been served for the lawsuit. Outside of the lawsuit was a MOTION to STOP Obama from being able to accept the nomination. That motion was denied and they were able to go ahead with their convention.
You can't submit a motion to a court "outside" a lawsuit. The suit commences with the filing of a complaint with the court clerk. In this instance, the plaintiff probably filed his complaint to start the suit, then filed his motion papers (asking for a temporary restraining order and/or preliminary injunction) immediately thereafter - or, practically speaking, at the same time.