Frick, C. J.
[40]*40The plaintiff brought this action to cancel a deed of conveyance which she alleged was made without authority by her husband, who, in making the same, acted as her attorney in fact under a certain power of attorney. §he prayed for relief as follows:
“That the deed hereinbefore described, and the record thereof, be declared fraudulent and void by this court, and that said deed be required to be delivered up for cancellation.”
The plaintiff obtained judgment canceling the deed, but the district court also entered judgment against her and in favor of the Matthews-MeCulloeh Company, hereinafter called company. That company was given judgment against the plaintiff and granted a lien on the premises in question for moneys alleged to have been expended by the company for the alleged use and benefit of the plaintiff. Plaintiff’s appeal is upon the judgment roll, and is only from that part of the judgment against her.
Plaintiff’s counsel insists that the findings of the court in favor of said company and the conclusions of law and judgment based on said findings are erroneous, for the reason that they are not supported by the pleadings. The court’s findings that are complained of here are as follows:
“That in pursuance of said exchange of property the said Matthews-MeCulloeh Company paid out for the use and benefit of the plaintiff the following sums:
On February 16, 1916, as interest on the herein-before mentioned $2,500 mortgage on said premises. $ 20.85
On March 17,1916, as interest on the hereinbefore mentioned mortgage on the said premises. '50.00
At the time of said exchange, as interest on the hereinbefore mentioned mortgage on said premises . 127.75
At the time of said exchange, as taxes on aforesaid premises of said plaintiff. 50.16
On September 18, 1915, for fixing headgate in irrigation system on aforesaid premises of plaintiff . 10.00
Total $258.76”
[41]*41As conclusions of law the court found as follows:
“That the defendant Matthews-McCulloeh Company is entitled to have judgment against the plaintiff, Lovina W. Rosenthyne, for the aforesaid sum of $258.76, advanced by the said Matthews-McCulloeh Company for the use and benefit of said Lovina W. Rosenthyne as hereinbefore set forth; that said Matthews-McCulloeh Company are entitled to a lien upon the hereinbefore described premises of the said Lovina W. Rosenthyne, and the said hereinbefore described premises of the said Lovina W. Rosenthyne be, and they are hereby, impressed with a lien in favor of the Matthews-McCulloeh Company, for the aforesaid sum of $258.76, paid out and expended by the said Matthews-McCulloeh Company on the said premises for the use and benefit of the aforesaid Lovina W. Rosenthyne, as hereinbefore set forth.”
The court, in addition to entering judgment canceling the deed as before stated, also entered judgment establishing a lien on the premises in question in favor of said company for the reasons stated in the findings and conclusions of law. The only allegations in the answer of the company upon which the findings, conclusions of law, and judgment complained of could be based are the following:
“That by the terms of said trade the said eodefendants Frank D. Smith and his wife, Rose Smith, actually assumed the mortgage incumbrance of $2,500' aforesaid, and in addition paid $405.40 in cash to discharge the taxes, which were over one year past due, and also discharge the interest, which was in default for two quarters, and other obligations and debts outstanding against said property.”
In addition to what has been said it is only necessary to state the relationship of the parties and how that relationship' arose, as those matters are disclosed by the pleadings. It is there made to appear that the plaintiff was the owner of certain real estate in Ogden City, and that she executed a power of attorney to her husband with respect thereto. Her husband, through the defendant company, entered into an agreement with the defendants Frank D. Smith and Rose Smith, his wife, whereby said company, with the consent of the plaintiff’s hus[42]*42band, exchanged her real estate for real estate owned by said Frank D. Smith. There was a mortgage for $2,500 on plaintiff’s real estate which said Smith assumed and agreed to pay as part of the consideration and as part of the difference in value between plaintiff’s premises and the premises of said Smith. There was some interest due on the said mortgage, and the taxes were unpaid on plaintiff’s premises, as appears from that portion of title company’s answer we have quoted.
The court construed the power of attorney, and found that the husband of the plaintiff had exceeded his authority in exchanging the premises owned by the plaintiff for those owned by said Smith, and hence the deed of conveyance made by the husband by virtue of said power of attorney 1, 2 was, as against the plaintiff, held void. As we have seen, the court, however, also found that in making the exchange of premises the said company had advanced certain money for the use and benefit of the plaintiff which she should be required to repay the said company as a condition precedent to canceling the deed aforesaid. Plaintiff’s counsel however, insists that the court’s findings, conclusions' of law, and judgment in that regard are, to say the least, erroneous, for the reason that there is nothing in the pleadings to support said findings, conclusions of law, and judgment. We have carefully read the pleadings, and it must be conceded that there is nothing contained therein upon which such findings, conclusions of law, and judgment could legally be based. We have set forth all of the allegations respecting the expenditure of the money for the use of the plaintiff, and there is nothing in those allegations authorizing any such findings, conclusions of law, or judgment in favor of the company. That the company had no such right must also have been the theory of the pleader who drew the answer of the company, since in the prayer no affirmative relief is asked for. The prayer is as follows:
"Wherefore these defendants, having answered plaintiff’s complaint, ask that plaintiff take nothing by this complaint, and that these defendants have their costs.”
[43]*43If the company therefore had paid out any money for the use of the plaintiff, she in equity and good conscience, should repay as a condition precedent to having the deed set aside and canceled; and if the company was entitled to a lien on plaintiff’s premises for the amount so paid out for her use and benefit, the facts in that regard should have been alleged, and the company should have prayed for such relief. Under our jurisprudence no court has the power to transcend the pleadings in granting relief, although the evidence may be abundant to sustain the findings and judgment; yet if the pleadings do not support them, the judgment cannot prevail. The law in that regard is correctly and tersely stated in 23 Cyc. 816, in the following words :
“A judgment must accord with and be warranted by the pleadings of the party in whose favor it is rendered; if it is not supported by the pleadings, it is fatally defective.”
To the same effect are the rulings of this court in Fillmore City v. Roller Mill Co., 36 Utah, 339, 103 Pac. 967; Florence Mfg. Co. v. Express Co., 36 Utah, 346, 103 Pac. 966.
Counsel for the company, however, insist that the ruling of the district court, in so far as the plaintiff was required to repay the money expended for her use and benefit in making the exchange of the premises aforesaid, is right, and is based upon the fundamental principle that he who comes into a court of equity must do equity. Counsel contend, therefore, that the court was authorized to require the plaintiff to repay the company the amount it had expended for her benefit as a condition precedent to her right to have the deed canceled.
The difficulty with that contention, however, is that there is absolutely nothing in the pleadings showing that the company expended any money for the use and benefit of the plaintiff. It is quite true that ordinarily courts of equity, before rescinding deeds, contracts, or other instruments for 3 fraud or otherwise, always aim to place the parties to the transaction in statu quo, and will not permit one of them, whether innocent or not, to reap a benefit from the illegal transaction he would not have reaped if the transaction had not taken place, if such a result can be prevented. The [44]*44doctrine which controls in such cases is fully discussed in 9 C. J., commencing on page 1207, and continuing to page 1219. Numerous illustrations are given in the notes which show the application of the maxim.
The following excerpt from R. C. L. Section 341, p. 558, is also relied on, namely:
“A defendant is not, as a general rule, entitled to affirmative relief, unless he files a cross-bill. This rule is subject to exception in a case where the plaintiff is equitably bound to do equity as a condition precedent to the obtaining of equitable relief. In shaping its decree in such a case, the court has the power to protect the equitable rights of both parties, and if it sees fit to give affirmative relief to the defendant by enforcing an equitable claim in his behalf, it will do so.”
Section 141, p. 392, same volume, is also cited.
The text quoted above is based on the following cases, namely: Walden v. Bodley, 14 Pet. (U. S.) 156, 10 L. Ed. 398, Hubbard v. Tod, 171 U. S. 474, 19 Sup. Ct. 14, 43 L. Ed. 246, and Owings’ Case, 1 Bland (Md.) 370, 17 Am. Dec. 311. An examination of the foregoing eases will disclose that the decisions are in perfect harmony with what is said hereinabove. In the ease cited from Maryland the question decided was whether affirmative relief could properly be granted to the defendant upon the bill of the plaintiff without the filing of a cross-bill by the defendant. The court, in passing on the question, after some discussion, in the course of the opinion, says:
"In such cases there can be no danger of surprise, or want of opportunity to adduce proof, because the indirect, inverted, or constructive decree is confined to that subject alone, which the parties themselves have by their pleadings spread before the court. Here the bill and answer disclose the whole matter in dispute, relative to the promise of the plaintiff, as fully as it could be done by a cross-bill. The defendant not only sets out and relies upon the promise of the plaintiff, but attempts to sustain the deed of the 15th of June, upon the ground of its being a mere fulfillment of that promise, thus representing the promise as the original contract. This allegation of the defendant has been put in issue as a material part of the subject in controversy, and, like every other part of the matter hi issue, it may, without the unnecessary circuity and expense of a cross-bill, be met by such a decree as justice requires, either in favor of or against the plaintiff. Harding v. Handy, [45]*4511 Wheat. 120 [6 L. Ed. 429]; Stuart v. Mechanics’ & Farmers’ Bank, 19 Johns. [N. Y.] 505.”
The case of Walden v. Bodley, supra, is to the same effect, and. language in effect like that quoted from the Maryland case is used in the opinion. The other case cited, namely, Hubbard v. Tod, is a proceeding in certiorari, and has no application to the principle now under discussion.
The case of Farmers’ Loan & T. Co. v. Denver, L. & G. R. R. Co., 126 Fed. 46, 60 C. C. A. 588, is, however, also relied on. It is sufficient to say that in that case the plaintiff commenced its action to foreclose a trust deed which was given on certain premises which, it was claimed, were covered by said trust deed and on a portion of which premises one Hutchison also held a trust deed to secure a certain indebtedness. The plaintiff, in its complaint, alleged that its trust deed was superior and paramount to the Hutchison trust deed, and prayed judgment that the court in which the action was commenced so find and declare. Mr. Justice Sanborn who writes the opinion, in his statement of facts, in referring to the issues, says:
“The defendant James B. Hutchison, who claimed under a trust deed upon these seven acres, dated February 1, 1894, hereafter termed the 'Hutchison mortgage/ made to secure a. note for $50,000 signed by the railroad company and the Jefferson Investment Company, payable to him, answered that his equity was superior to that of the trustee of the first mortgage.” (Italics ours.)
Upon those issues the trial court held that Hutchison had a superior equity to that of the plaintiff to a part of the $50,000 to secure which the Hutchison trust deed was given. ‘The plaintiff appealed, and, among other things, contended that the trial court erred in awarding Hutchison affirmative relief because he had not filed a cross-bill in the action. It needs no argument to show that the pleadings and issues in that case are vastly different from those in the ease at bar. There the plaintiff in its complaint alleged that its trust deed was superior to Hutchison’s, and prayed judgment to that effect. Upon the other hand, Hutchison, in his answer, claimed that his trust deed was superior, and the court found and decreed [46]*46that to the extent of $21,049 his trust deed was superior. The plaintiff insisted that the court erred in allowing Hutchison anything, and Hutchison contended that it erred because it did not allow him $6,279.62 in excess of what was allowed. The appellate court reversed the judgment, and remanded the ease to the trial court, with directions to amend its findings and decree by allowing Hutchison the additional $6,279.62 claimed by him as being superior to plaintiff’s claim under its trust deed. The relief there granted, however, was not only based upon pleadings, but it is strictly in conformity thereto. In the case at bar the plaintiff prayed judgment that the deed which it was claimed was executed without authority be canceled, and the defendant company made no claim whatever against the plaintiff in its answer. Indeed, whatever claim it made was in favor of its codefendant. The judgment in favor of the company is therefore not only not supported by any pleading, but it is in the very teeth of the allegations of the pleadings.
It therefore is not decided in the cases referred to that relief may be granted in any case without proper pleadings, but what is there decided is that, where the facts upon which the affirmative relief in favor of the defendant is based sufficiently appear in the pleadings, no particular form of pleading is necessary, and the relief may be granted on the pleadings as they stand. This court has affirmed that doctrine in the case of Welsh, Driscoll & Buck v. Buck, 48 Utah, 653, 161 Pac. 455, where we held that, where the facts are sufficiently stated in the answer, and the evidence is sufficient to justify a finding in favor of the defendant, affirmative relief may be granted to him, although ordinarily the matters more properly should have been set forth in a counterclaim. That, however, is not the question in this case. Here the party to whom the relief is granted does not even claim in its pleadings that it paid out or expended any money for the benefit of the plaintiff. What it in effect alleges is that some one else did so. Judgment is, however, awarded to the company for the identical money that it alleged some one else paid for the use and benefit of the plaintiff. Can it truthfully be said that under any system [47]*47of pleading a defendant may support a judgment in his favor against the plaintiff - upon an allegation that some one else pa-id out money for the benefit of the plaintiff in the action ? Moreover, may the court, upon such a pleading, create a lien on plaintiff’s property in favor of the defendant without any allegation whatever to support such a judgment! That is precisely what the district court did in this case, and, in the judgment of the writer, no authority for such an act can be found under any system of jurisprudence where the pleadings must be in writing and where any judgment rendered must be based on the evidence which must conform to and follow the allegations contained in the pleadings. Nor does it appear in plaintiff’s pleading that any moneyt was paid out for her benefit on which a finding could be based.
So far we have assumed the ease at bar to be one where the company, as a matter of right, may invoke the maxim that “he who seeks equity must do equity.” In this connection it must not be overlooked that the company is a stranger to the contract which was the subject-matter of plaintiff’s 4 action and which was annulled by the district court’s judgment. Whatever relief the company may obtain in this action, therefore, cannot be based upon any contractual relations existing between it and the plaintiff. She, as the court held, cannot be bound by anything her husband did regarding the exchange of her property, and hence the company is a mere volunteer in so far as the contract entered into by her husband with the Smiths is concerned. As pointed out in 10 R. C. L., Section 141, pp. 394, 395, the company cannot invoke the maxim in question as a matter of strict legal right. The rule is there tersely stated in the following words:
“Moreover, this maxim of equity jurisprudence applies only when the relief sought by plaintiff and the right demanded by defendant belong to or grow out of the same transaction. It has no application where the demand of the defendant is based on a contract separate and distinct from that which forms the subject of the plaintiff’s action.”
The company was not even a necessary party to this action so far as concerns plaintiff’s right to have the deed made by her husband and the contract with defendants Frank D. [48]*48Smith and Rose Smith annulled. True, plaintiff made the company a party to the action, and in doing that 5 she could not prevent it from setting up any claim it may have against her which relates to or grows out of the cause of action set up in her complaint. For the purpose of obtaining relief the company must however, set forth its claim in its pleading the same as other defendants would be required to do unless the claim sufficiently appears from plaintiff’s pleading. The only exception when a party to an action need not in some form set forth his claim is when he can as a matter of right invoke the maxim that “he who seeks equity must do equity,” and that the right to invoke that maxim sufficiently appears from the pleadings in the case. To that effect are the authorities. It is true that expressions are found in some of the cases, like those in the case of Farmers’ Loan & T. Co. v. Denver, L. & G. R. R. Co., supra, from which one might infer courts in certain cases grant relief without pleadings. When the cases in which such expressions are found are examined, however, it will be found that in all of them the pleadings contain the necessary allegations to support the relief therein granted. Such was the case in all of the cases referred to, and in none of them so far as the writer is aware, has relief been granted contrary to or without sufficient allegations in some of the pleadings which were filed in the action, although it is frequently held that under certain conditions particular forms of pleadings or prayers for relief are not necessary. In the case at bar the district court, however, not only made findings and entered judgment granting affirmative relief, but it also created a lien on plaintiff’s property in favor of one who, without any authority from the plaintiff, paid money for her benefit, and without pleading, and without any prayer for relief, not even a prayer for general relief. The findings and judgment in favor of the company can therefore not be sustained, because: (1) It was not a party to the contract that was annulled by the court, but was a stranger to it, and is therefore not entitled to invoke the maxim aforesaid as a matter of strict legal right: (2) because nothing appears in plaintiff’s complaint, or in any [49]*49other pleading in the ease, on which such relief could be based; and (3) because it is averred in its own answer that its codefendants, the Smiths, paid out the money, and not that it had paid any or had any right thereto.
The findings and judgment are therefore not only not supported by the pleadings in the case, but they are directly contrary to the averments contained in the company’s own pleading. If, however, the company paid out the money, as found by the court, there is no good reason why the 6 whole matter may not be adjusted in this proceeding. That may, however, not legally or properly be done until the facts are made to appear in some pleading filed in the action. Under proper conditions pleadings may, however, be amended as well after as before the evidence is received. The findings and judgment must, however, be based on and find support in the pleadings, and unless the findings and judgment are thus supported they are erroneous and cannot be sustained. We are of the opinion, therefore, that if the evidence is sufficient (a matter concerning which we have no knowledge, since the appeal is on the judgment roll alone) to support the findings made by the district court, that court may permit the pleadings to be amended to conform to the evidence and make findings and enter judgment accordingly; and all that may be done without a new trial or rehearing of the case. It should, however, be done in the court of original jurisdiction and in which court the judgment must at all events be enforced.
The company, however, also assigns cross-errors in which it asserts that the district court erred in ruling that the power of attorney executed by the plaintiff in favor of her husband did not authorize the latter to trade or exchange her property for the property of the defendant Smith. As 7 pointed out, however, plaintiff only appeals from that part of the judgment which was in favor of the company. That part of the judgment which was in her favor, therefore, was not appealed from by her, and in view that neither of the defendants appealed therefrom, that portion of the judgment was not brought up for review. In this jurisdiction it has repeatedly been held that, in case a judgment is divisible, [50]*50either party who feels himself aggrieved may appeal from the whole or any part thereof. To that effect is the statute (Comp. Laws, 1907, Section 3305), which in part provides:
“An appeal is taken by tiling with the clerk of the court in which the judgment or order appealed from is entered a notice stating the appeal from the same, or some specific part thereof.” (Italics ours.)
The plaintiff complied with the statute by specifically stating in the notice of appeal that she appealed only from that part of the judgment which was in favor of the company and against her. The company was thus notified that the plaintiff did not bring up the whole judgment for review, and if the company desired to have any other part of the judgment reviewed, it should have brought it up to this court by cross-appeal. While in this jurisdiction the respondent may for certain purposes, and within certain limitations, assign cross-errors, and thus review certain alleged errors without taking a cross-appeal, yet he may not, on such assignments, review matters not included in the appeal. The rule in that regard is stated in the headnote to the case of Big Cottonwood Tanner Ditch Co. v. Shurtliff, 49 Utah, 569, 165 Pac. 856, in the following words:
‘ ‘ To- modify an independent portion of the decree not touched by the appeal is not the office of mere cross-assignments, but the peculiar province of a cross-appeal."
To the same effect is McCornick & Co. v. National Copper Bank, 49 Utah, 296, 163 Pac. 1097.
In view, therefore, that the defendant’s cross-assignments all relate to that portion of the judgment not appealed from, we are powerless to consider them.
The only question remaining is: what disposition should be made of this appeal 1 This being an equity case, we have the power to finally dispose of the case as well as of the appeal. We may, however, also remand the case with directions. In view of what has been said, however, if we now end the case, we might give the appellant an advantage to which she is not entitled by permitting her to escape from the payment of the [51]*51accrued interest on her mortgage and the taxes that were paid on her property. The payment of the interest and taxes, although voluntarily made, was nevertheless for the benefit of plaintiff’s property, and in equity and good conscience she should be required to pay those to the company or to the person who paid them. In a court of equity the plaintiff should not be permitted to reap where she has not sown. For the purpose, therefore, of preserving and furthering justice between the parties, we have concluded to reverse the judgment and to remand the case to the district court for further proceedings. In view, however, that neither party has appealed from that part of the judgment canceling the deed, that, part must remain intact and cannot now be assailed. The findings of fact, conclusions of law, and judgment in favor-of the company are, however, reversed and set aside, and the ease is remanded to the district court of Weber county, with directions to permit the parties to amend their pleadings, if they are so advised, to conform to the views herein expressed, and in case the pleadings are so amended, then, in addition to the evidence, which is already in the record, to hear such further and additional, proper and material, evidence as the parties, or either of them, may present respecting the payment of taxes, interest, etc., which the company claims to have made for the use and benefit of the plaintiff, and which affect her property, and make findings of fact and conclusions of law in favor of the company for the amount so expended and paid, and to enter judgment in its favor requiring the plaintiff to pay the same; and, in case she fails, refuses, or neglects to do so within a time fixed by the court, then to declare the amount a lien against the premises in question and order the same, or so much thereof as may be necessary, sold to pay the company’s claim, and to apply the proceeds of such sale to pay said claim together with the costs incident to such sale; plaintiff to recover costs on this appeal.
CORFMAN and THURMAN, JJ'., concur.