
10 Cal.App.2d 730 (1935)
JOSEPH PROVENCHER et al., Respondents,
v.
THE CITY OF LOS ANGELES (a Municipal Corporation) et al., Defendants; LOS ANGELES CITY SCHOOL DISTRICT OF LOS ANGELES COUNTY et al., Appellants.
Civ. No. 9681. 
California Court of Appeals. Second Appellate District, Division One.  
December 19, 1935.
 Everett W. Mattoon, County Counsel, and W. B. McKesson, Deputy County Counsel, for Appellants.
 Manley C. Davidson and E. H. Delorey for Respondents.
 Shinn, J., pro tem.
 This is an action brought by the plaintiffs for damages alleged to have been caused to the real property of plaintiffs by the construction of a pedestrian subway across the highway upon which plaintiffs' property abuts. At the time of trial on September 18, 1933, the court sustained a general demurrer of one defendant to the amended complaint, and also sustained an objection of another defendant to the introduction of any evidence upon the ground that the amended complaint failed to state a cause of action. In so ruling the court made the following statement: "At this time I will sustain the demurrer and I will sustain the objections to the introduction of any evidence under this amended complaint; but I will continue the matter one week--if that is sufficient time for you; if not, take whatever reasonable time you think is necessary--for the purpose of enabling you to prepare and serve upon counsel and present to the Court a proposed amendment, if you desire to amend; that is, a proposed second amended complaint; at which time the Court will then determine whether or not to grant you leave to file it or to deny you the permission and let the ruling stand without leave to amend." The minutes of the court show that the matter was continued for the purpose of affording *732 plaintiffs' counsel an opportunity to present a proposed second amended complaint. On September 23, 1933, counsel for plaintiffs filed with the clerk a written request for dismissal of the action. On September 25th, when the matter came on for hearing, plaintiffs' counsel did not appear and the case was marked off calendar. On September 29th, the court signed a judgment in favor of the defendants. On November 29th, on motion of plaintiffs' counsel this judgment was vacated. Defendants Los Angeles City School District of Los Angeles County and the Board of Education of the City of Los Angeles appealed from this order.
 Appellants base their appeal upon the following propositions: That plaintiffs could not dismiss their case because (a) the hearing on the demurrer was a trial, and (b) that the ruling on the demurrer was a decision of the court. For these reasons they contend that the attempted dismissal was ineffectual, that the judgment in their favor was properly entered, and that the court was without power to set aside the same.
 If the described proceedings amounted to a trial plaintiffs thereafter had no right to dismiss the action, but if they did not amount to a trial plaintiffs had such right. (Code Civ. Proc., sec. 581, subd. 1.) [1] The words "before trial" are construed to mean before final submission of the case, that is to say, before the case is taken under advisement at the close of the evidence and argument, and up to this time a plaintiff may dismiss his action. (9 Cal.Jur. 510; MacDermot v. Grant, 181 Cal. 332 ]184 P. 396[; Strupelle v. Strupelle, 59 Cal.App. 526 ]211 P. 248[.) [2] There may be a trial on the law as well as on the facts. A judgment entered after an order sustaining a demurrer without leave to amend is a judgment after trial. (Goldtree v. Spreckels, 135 Cal. 666 ]67 P. 1091[.)
 [3] As we construe the remarks of the court in sustaining the demurrer, the court did not order the demurrer sustained without leave to amend. Leave was granted to serve and present to the court a second amended complaint. The court did not decide that an amendment would not be allowed, and until that point was decided there was no refusal to allow an amendment. The rules of the Superior Court of Los Angeles County provide that when a demurrer to a pleading is sustained ten days are allowed for amendment unless it is otherwise *733 ordered by the court. Plaintiffs therefore had a right to amend unless the order of the court deprived them of that right. From the remarks of the court which we have quoted an intention was manifested not to rule finally in the matter until plaintiffs' counsel had had an opportunity to cure the defects in the pleading. Whether the court believed that could be done is not material. The important thing is that plaintiffs' counsel were granted another opportunity to draw their complaint so that it would state a cause of action for the recovery of damages from the defendants.
 Plaintiffs are not in the position of having elected to stand upon their complaint after a demurrer thereto had been sustained. By the dismissal of the action they relieved themselves of the necessity of making a choice between standing upon the complaint to which the demurrer had been sustained or presenting a further amended complaint. The action was therefore effectually dismissed by the act of plaintiffs in filing their written dismissal with the clerk. (Strupelle v. Strupelle, supra.)
 [4] The court was without power to render a judgment in favor of the defendants after the action had been dismissed. This judgment was void and was properly set aside. (Code Civ. Proc., sec. 473; Home Real Estate Co. v. Winnants, 39 Cal.App. 643 ]179 P. 534[.)
 The order vacating the judgment in favor of defendants is affirmed.
 Houser, P. J., and Doran, J., concurred.
