
    CITY OF GARLAND, Petitioner, v. Bobby C. LOUTON and Garland Professional Firefighters Association, Respondents.
    No. C-3800.
    Supreme Court of Texas.
    June 12, 1985.
    
      Charles M. Hinton, Jr., City Atty., Her-mon L. Veness, Jr., Asst. City Atty., Garland, for petitioner.
    Wilson, Williams & Molberg, Kenneth H. Molberg, Dallas, for respondent.
   PER CURIAM.

The Garland Professional Firefighters Association sought a writ of mandamus to compel the City of Garland to hold a citywide referendum on the issue of increased pay for Garland firemen. The city counterclaimed for a declaratory judgment that TEX.REV.CIV.STAT.ANN. art. 1269q violates both the Texas and United States Constitutions. The trial court issued the writ of mandamus and held article 1269q to be constitutional. The city appealed and the court of appeals dismissed the appeal from the writ of mandamus and modified the declaratory judgment by deleting the words “on the merits.” 683 S.W.2d 725 (1984). We grant petitioner’s application for writ of error and, without hearing oral argument, reverse the judgment of the court of appeals and dismiss both causes. TEX.R.CIV.P. 483.

The first issue is whether the court of appeals properly disposed of the mandamus claim. We agree with the court of appeals that the election rendered the mandamus cause moot. City of West University Place v. Martin, 132 Tex. 354, 123 S.W.2d 638, 639 (1939). However, the court of appeals dismissed the appeal rather than dismissing the cause. The court of appeals’ disposition of the mandamus claim conflicts with Freeman v. Burrows, 141 Tex. 318, 171 S.W.2d 863 (1943) and International Association of Machinists v. Federated Association of Accessory Workers, 133 Tex. 624, 130 S.W.2d 282 (1939). In those cases, we held that when a cause becomes moot, the appellate court must dismiss the cause not merely dismiss the appeal.

The second issue is whether the court of appeals correctly disposed of the declaratory judgment counterclaim. When the trial court rendered judgment, the election had not been held. A declaratory judgment action to declare a referendum statute unconstitutional is not ripe if brought before the election is held. Coalson v. City Council of Victoria, 610 S.W.2d 744 (Tex.1980). A court has no jurisdiction to render an advisory opinion on a controversy that is not yet ripe. California Products, Inc. v. Puretex Lemon Juice, Inc., 160 Tex. 586, 334 S.W.2d 780, 782 (1960). The trial court rendered judgment that the city take nothing on the counterclaim and dismissed it upon the merits.

The court of appeals modified that judgment by deleting the words “upon the merits.” The disposition of the counterclaim by the court of appeals is in conflict with Perry v. Greer, 110 Tex. 549, 221 S.W. 931 (1920); Turnbow v. J.E. Bryant Co., 107 Tex. 563, 181 S.W. 686 (1916); Pecos & N.T.R. Co. v. Canyon Coal Co., 102 Tex. 478, 119 S.W. 294 (1909); Timmins v. Bonner & Long, 58 Tex. 554 (1883); Wadsworth v. Chick, 55 Tex. 241 (1881); and Roeser v. Bellmer, 7 Tex. 1 (1851). If the trial court lacks subject matter jurisdiction, the appellate court can make no order other than reversing the judgment of the court below and dismissing the cause.

We disapprove of the language in the court of appeals opinion that failure to join the Attorney General is fundamental error. Texas only requires substantial compliance with section 11 of the Declaratory Judgments Act. Wichita County v. Robinson, 155 Tex. 1, 276 S.W.2d 509 (1954).

We, therefore, grant petitioner’s application for writ of error and without hearing oral argument reverse the judgment of the court of appeals and dismiss the entire cause for failure to present a justiciable controversy. TEX.R.CIV.P. 483.  