
    [Civ. No. 123.
    First Appellate District.
    November 10, 1905.]
    JOHN R. McDonald, Respondent, v. CALIFORNIA TIMBER COMPANY, Appellant.
    Dismissal of Action bt Plaintiff—Construction of Code—Order of Court.-—The provision of section 581 of the Code of Civil Procedure for the dismissal of an action by plaintiff upon his written request filed with the clerk before trial, where defendant has not filed a counterclaim, or asked for affirmative relief, is not mandatory or exclusive. The plaintiff may move for a dismissal in open court, and have its order made and entered with the same effect as though made by an entry in the clerk’s register.
    Id.—Motion for Change of Venue—Eight of Dismissal Before Hearing—Ex Parte Proceeding—Jurisdiction of Court.—A demand and motion upon notice by defendant for a change of the place of trial, at the time of filing and serving a demurrer to the complaint, cannot deprive the plaintiff of the right to dismiss the action before the hearing of the motion, or oust the court of jurisdiction to hear an application for such dismissal. The rule that no judicial action can be taken while defendant’s demand and motion is pending does not apply to an ex parte proceeding to dismiss the action, upon which the defendant is not entitled to be heard, and which may be made and granted without notice to him.
    Id.—Effect of Dismissal—No Place of Trial to be Changed.— After judgment dismissing the action, there is no cause to be tried, and no place of trial to be changed.
    APPEAL from an order of the Superior Court of Santa Cruz County, denying a motion to change the place of trial. Lucas F. Smith, Judge.
    The facts are stated in the opinion of the court.
    Charles B. Younger, Jr., for Appellant.
    Charles M. Cassin, and Benjamin K. Knight, for Respondent.
   HARRISON, P. J.

The plaintiff brought this action in the superior court of the county of Santa Cruz to recover damages from the defendant sustained by reason of a personal injury caused by the negligence of the defendant. September 12, 1903, the defendant filed and served a demurrer to the complaint, together with an affidavit of merits, and a demand in writing that the cause be transferred for trial to the city and county of San Francisco, and on the same day gave notice to the plaintiff that on September 21, 1903, it would move the court to change the place of trial to the city and county of San Francisco upon the grounds, set forth in the affidavits annexed to said notice of motion, that the residence of the defendant is in that city and county by reason of that being the place designated in its articles • of incorporation as its principal place of business, and that the injuries sustained by the plaintiff were not received in the county of Santa Cruz. September 19, 1903, upon motion of the plaintiff, the court made an order dismissing the action, and judgment thereon was rendered on September 21st. Upon the hearing of the motion to change the place of trial the court denied the same upon the ground that the action had been dismissed before the motion was brought on for hearing. From this order the defendant has appealed.

Section 581 of the Code of Civil Procedure declares that an action may be dismissed: “1. By the plaintiff himself by written request to the clerk filed among the papers in the case at any time before trial upon payment of costs; provided a counterclaim has not been made or affirmative relief asked by the cross-complaint or answer of the defendant.” Under these provisions the only limitation upon the right of the plaintiff to dismiss his action is that the defendant has filed a counterclaim or asked for affirmative relief. The provision in the section that the plaintiff file a written request with the clerk is not mandatory or exclusive. The plaintiff could move for the dismissal in open court, and have its order made and entered with the same effect as though made by an entry in the clerk’s register. (Richards v. Bradley, 129 Cal. 670, [62 Pac. 316].)

The defendant cannot, by making a demand for a change of the place of trial and giving notice thereof, deprive the plaintiff of the right thus given to dismiss the action, or oust the court of jurisdiction to hear an application therefor. If his demand be well founded and his motion granted, any judicial action of the court affecting his rights adversely would be set at naught, and for this reason it is held that under a proper exercise of its discretion the court is required to hear and determine the motion before taking any other judicial action in the cause; but this rule has no application to an ex parte proceeding at the instance of the plaintiff, or to any proceedings in which the rights of the defendant are not adversely affected, or upon which he is not entitled to be heard. An application of the plaintiff to dismiss his action is ex parte, upon which the defendant is not entitled to be heard, and may be made or granted without any notice to him. The motion of the defendant was therefore properly denied.^ After the judgment dismissing the action there was no cause to be tried, and, consequently, there was no place of trial to be changed.

The order is affirmed.

Hall, J., and Cooper, J., concurred.  