
250 Cal.App.2d 232 (1967)
LEWIS AVENUE PARENT TEACHERS' ASSOCIATION, Cross-complainant and Appellant,
v.
GEORGE HUSSEY, Cross-defendant and Respondent.
Civ. No. 24203. 
California Court of Appeals. First Dist., Div. Four.  
Apr. 20, 1967.
 Kinkle, Rodiger, Graf & Dewberry, William B. Rodiger and Joe A. Austere for Cross-complainant and Appellant.
 Robert A. Bolton and Richard H. Abraham for Cross-defendant and Respondent.
 CHRISTIAN, J.
 Defendant and cross-complainant, Lewis Avenue Parent Teachers' Association (hereinafter called "the PTA") appeals from an order dismissing its sixth amended cross-complaint for failure to amend further after a general demurrer was sustained. The cross-complaint sought a declaration that if the PTA is held liable for the personal injuries of plaintiff Barbara Obenshain that liability should be indemnified by the PTA's codefendants. We hold that the dismissal was error.
 Plaintiff's complaint alleges: (1) Atascadero Business Men's Association, Atascadero School District, the PTA (cross-complainant and appellant here) and other defendants invited the general public to a fair conducted by the defendants; (2) after paying an admission fee to enter the "Spook House," one of the concessions at the fair, plaintiff suffered injuries in descending a chute or slide which was used in the entertainment; (3) defendants knew the chute was negligently constructed, and defendants and their agents used excessive force in propelling plaintiff into the device. The PTA's answer admits only that it was a "sponsor" of the fair and that plaintiff was injured while using the slide.
 The PTA cross-complained for indemnity against the other *235 defendants. Demurrers to the cross-complaint and to six successive amended cross-complaints were sustained for failure to state a cause of action. The PTA declined to amend further and, upon motion of cross- defendant Hussey, a judgment of dismissal was entered.
 After reciting the allegations in the Obenshain complaint, the PTA in the sixth amended cross-complaint denied (1) that it owned, operated, maintained or constructed the "Spook House" or the chute therein, (2) that it either propelled plaintiff down the chute or failed to use due care, (3) that any person who propelled plaintiff down the chute was its agent. The cross- complaint then alleges that the chute was owned, operated, maintained and constructed by the cross-defendants who personally propelled patrons into the device and controlled its use. The PTA alleges the existence of an actual controversy in that it maintains, and the cross-defendants deny, that if plaintiff recovers judgment against the PTA it will have been upon the theory that despite the PTA's contrary contention the cross-defendants were its agents for whose tortious acts the PTA is responsible in damages.
 [1] No question is raised as to the PTA's right to cross-complain for indemnity against a cross-defendant who is not a party to the main action. (Code Civ. Proc.,  442; Roylance v. Doelger (1962) 57 Cal.2d 255, 258-259 [19 Cal.Rptr. 7, 368 P.2d 535].) Such a cross-complaint properly takes the form, adopted by the PTA in the present case, of an action for declaratory relief. (Sattinger v. Newbauer (1954) 123 Cal.App.2d 365, 368 [266 P.2d 586]; Code Civ. Proc.,  1060.)
 Respondent asserts that the cross-complaint does not state a cause of action in that (1) it fails to allege an express or implied contract of indemnity, (2) under the allegations of the original complaint it is possible that the PTA will be held liable for its own fault independent of any imputed negligence on the part of its alleged agents, (3) both in its answer and in its cross-complaint the PTA has denied that the cross-defendants were its agents. These arguments are without avail.
 [2] The right of indemnity may rest upon any of several alternative grounds including an express or implied contract to indemnify, the difference between primary and secondary liability of two persons (as in our case, where a principal's liability flows from the acts of his agent), the existence of a *236 special relationship between the parties, or other facts indicating that in equity and good conscience the burden of the judgment should be shifted. (City & County of San Francisco v. Ho Sing (1958) 51 Cal.2d 127 [330 P.2d 802]; Cahill Bros., Inc. v. Clementina Co. (1962) 208 Cal.App.2d 367 [25 Cal. Rptr. 301]; American Can Co. v. City & County of San Francisco (1962) 202 Cal.App.2d 520 [21 Cal.Rptr. 33]; Alisal Sanitary Dist. v. Kennedy (1960) 180 Cal.App.2d 69 [4 Cal.Rptr. 379].) Thus, failure to allege the existence of an agreement of indemnity or a special relationship is not fatal to the cross- complaint if another basis for relief is shown.
 [3] It is well established that when a judgment has been rendered against a principal for damages caused by the unauthorized tortious act of his agent, the principal is entitled to bring an action against the agent to recoup his losses. (Walsh v. Hooker & Fay (1963) 212 Cal.App.2d 450, 462 [28 Cal.Rptr. 16].) [4] "The right depends upon the principle that everyone is responsible for the consequences of his own wrong, and if others have been compelled to pay damages which ought to have been paid by the wrongdoer, they may recover from him." (Herrero v. Atkinson (1964) 227 Cal.App.2d 69, 74 [38 Cal.Rptr. 490, 8 A.L.R.3d 629].)
 [5] Respondent correctly points out that if all the allegations of the original complaint are proven the PTA will be held liable as a result of its own fault independent of any imputed negligence on the part of its alleged agents. In that event the PTA as a joint tortfeasor would not be entitled to be indemnified by the other defendants (Byron Jackson Co. v. Woods (1940) 41 Cal.App.2d 777 [107 P.2d 639]), although under appropriate facts the statutory right of contribution might be available. (Code Civ. Proc.,  875 et seq.) For purposes of this appeal, however, that possibility does not assist respondent; we must accept the allegations of the cross-complaint as true and at this stage of the case they exclude the possibility that the PTA may be held independently liable. (Alisal Sanitary Dist. v. Kennedy (1960) 180 Cal.App.2d 69, 73 [4 Cal.Rptr. 379].)
 [6] Respondent asserts that any right of indemnity which the PTA might have is defeated by the fact that both in its answer and in its cross- complaint the PTA denies that the cross-defendants were its agents. This argument implies that in order to be able to claim indemnification, the PTA must waive its potential factual defense that its codefendants were *237 not its agents. Under this theory, if the PTA desired to preserve the agency issue, it would apparently be required to seek indemnity in a separate action brought after the codefendants had been adjudged to be its agents. There is no reason to require such a cumbersome procedure. It is generally held that alternative or contingent theories of recovery may be joined where causes of action are separately stated. (1 Chadbourn, Grossman & Van Alstyne, California Pleading (1961)  772, p. 676.) In the present case the PTA's cross-complaint, after reciting a denial that any agency relationship existed, makes the claimed right of indemnity dependent upon the contingency that despite that denial the other codefendants are held to be agents of the PTA. This form of pleading can have had no tendency to mislead the other parties or the court. It has the practical effect of making it possible for the court to determine all the rights and liabilities of these parties arising from the single occurrence in one action as contemplated by Code of Civil Procedure section 442.
 [7] Appellant asks us to direct the court below to overrule the demurrers of the several cross-defendants who are not parties to this appeal. Each cross-defendant, including respondent, demurred separately; a separate order sustained each demurrer. However, only respondent Hussey moved to dismiss; appellant itself could have moved for dismissals as regards the other cross-defendants (Code Civ. Proc.,  581, subd. 3) but did not do so. Therefore the court entered a judgment of dismissal only as to respondent. An appeal lies only from a judgment of dismissal and not from an order sustaining a demurrer. (Bell v. City of Palos Verdes Estates (1964) 224 Cal.App.2d 257, 262 [36 Cal.Rptr. 424].) Consequently, we lack jurisdiction to direct that the demurrers of the other cross-defendants be overruled. (See 2 Chadbourn, Grossman & Van Alstyne, California Pleading (1961)  1170, pp. 397- 399.)
 [8] The respondent's demurrer was sustained upon the ground that the cross-complaint failed to state a cause of action. Thus respondent's special demurrers on the grounds of uncertainty and ambiguity have not been passed upon. In Stowe v. Fritzie Hotels, Inc. (1955) 44 Cal.2d 416, 425 [282 P.2d 890], the Supreme Court held "When a demurrer based upon both general and special grounds is sustained and the order mentions only the general ground, impliedly the ruling was made either without consideration of the special grounds *238 or upon a determination that they are not well taken. If the general demurrer was sustained erroneously, the trial judge should be directed to consider the special grounds."
 The judgment of dismissal is reversed with directions to rule upon the special demurrers.
 Devine, P. J., and Rattigan, J., concurred.
