
485 So.2d 1088 (1986)
Stanley H. LESLEY
v.
The CITY OF MONTGOMERY, et al.
84-706.
Supreme Court of Alabama.
February 14, 1986.
Rehearing Denied March 21, 1986.
*1089 Timothy C. Halstrom of Riggs, Nesmith & Halstrom, Montgomery, for appellant.
J. Bernard Brannan, Jr., Montgomery, for appellee The City of Montgomery.
Jack F. Norton, Chief Counsel and Jerry L. Weidler, Asst. Counsel, for appellees Ray D. Bass and Alabama Highway Dept.
Thomas T. Gallion III of Hooper, Gallion & Wilkerson, Montgomery, for appellee William B. Goodwyn, Inc.
Richard B. Garrett of Rushston, Stakely, Johnston & Garrett, Montgomery, for appellee The Central of Georgia Ry., Inc.
MADDOX, Justice.
This is an appeal by plaintiff Stanley H. Lesley from a motion to dismiss granted in favor of all defendants, namely the City of Montgomery, Central of Georgia Railway, Inc., W.D. Goodwyn, Inc., and Ray D. Bass, the Alabama State Highway Director.
Lesley claims $300,000 damages from defendants for interfering with his right of access to his property by building a three-foot-high retaining wall in front of his property. The lower court held that this action is barred by Lesley's earlier suit seeking to enjoin construction of the wall. We agree.
Lesley is the owner of Griffin Radio and Television, an electronics repair shop on Highland Avenue in Montgomery. He also owns the property upon which the building is located. The building covers almost the entire area of the property.
Immediately adjacent to and west of this property is a railroad track owned and operated by the Central of Georgia Railway. Sometime prior to July 28, 1983, the City of Montgomery announced plans to raise the height of an existing bridge on Highland Avenue, which spans the railroad track, in order to comply with federal regulations. In order to raise the bridge, construction plans required building a retaining wall in front of Lesley's business. It is undisputed that this wall was to be built entirely within the city's right-of-way and 10 to 12 feet from the front of Lesley's business.
On July 28, Lesley filed a complaint with the Circuit Court of Montgomery County requesting a preliminary injunction to halt the construction, alleging that the construction would interfere with his right of access to his business and amount to a taking of his property without compensation. After a full hearing on this complaint on August 17, 1983, Lesley's request was denied. As we indicate in part II of this opinion, we find the judgment to have been an adjudication as to an essential element of this second action.
Lesley filed a notice of appeal of this order, but subsequently moved to dismiss the appeal. This Court dismissed the appeal on January 6, 1984.
By October 12, 1984, construction was complete. On that date, Lesley filed the current action with the Circuit Court of Montgomery County, seeking damages for interference with his right of access to his business. The defendants in this second action were the same as those in the first action, except that Highway Director Ray D. Bass was added as a party.
The defendants filed individual motions to dismiss, raising the defense of res judicata. On March 4, 1985, all defendants except W.D. Goodwin, Inc., were dismissed. On March 19, 1984, W.D. Goodwin was dismissed also. Lesley appeals from those judgments.
In its first order granting the motions to dismiss, the trial court stated:
"The same issues presented here have previously been presented in the case of *1090 Lesley v. City of Montgomery, Case No. CV-83-1056-TH., in the Circuit Court of Montgomery County, Alabama. The plaintiff therein requested the court grant a preliminary injunction based upon the taking of property without just compensation. The court was required in that case to determine that there was not a taking without the payment of compensation in denying the plaintiff's request for injunctive relief. The plaintiff alleged that the defendants would take his property and that they had failed to comply with the statutory requirements for the power of eminent domain and because of such should be enjoined. The court determined that because the defendants only acted upon their own right-of-way there was no taking and there was no violation of the law of eminent domain. That case involved the same facts and issues which are presented in the instant case, and the court ruled contrary to the plaintiff. The plaintiff appealed and subsequently dismissed his appeal. This previous trial and judgment in favor of the defendant[s] involving the same facts and circumstances as herein alleged operates as res judicata."
In Wheeler v. First Alabama Bank of Birmingham, 364 So.2d 1190, 1199 (Ala. 1978), we set out the elements of res judicata as follows:
"(1) [P]rior judgment rendered by court of competent jurisdiction; (2) prior judgment rendered on the merits; (3) parties to both suits substantially identical; and (4) same cause of action present in both suits."
The doctrine of res judicata prohibits the relitigation of all matters which were or could have been litigated in the prior action. Century 21 v. Alabama Real Estate Comm'n, 401 So.2d 764 (Ala.1981). This doctrine is based on the notion that:
"A party ... is not at liberty to split up his demand and prosecute it by piecemeal, or present only a portion of the grounds upon which special relief is sought, and leave the rest to be presented in a second suit, if the first fails. There would be no end to litigation if such a practice were permissible."
Century 21, 401 So.2d at 768, citing Baltimore Steamship Co. v. Phillips, 274 U.S. 316, 320, 47 S.Ct. 600, 602, 71 L.Ed. 1069 (1927).

I
Lesley first contends that the same cause of action was not present in both suits because the first suit sought injunctive relief pending a final determination of the legal rights of the parties, while the second suit sought damages for the diminution of the value of the property, for lost profits, and for the loss in value of his business. We disagree.
In discussing whether two separate suits were based on the same cause of action, this Court wrote in Geer Brothers, Inc. v. Crump, 349 So.2d 577, 581 (Ala.1977):
"What is a cause of action? Commenting on that very point in Sessions [v. Jack Cole Co., 276 Ala. 10, 12, 158 So.2d 652, 654 (1963)], this Court quoted from Chappell v. Boykin, 41 Ala.App. 137 [140], 127 So.2d 636 [638] (1960):
"`In a majority of jurisdictions in the United States, the rule is that a single act causing simultaneous injury to the physical person and to property of one individual gives rise to only one cause of action, and not to separate causes based on the one hand on personal injury, and on the other on property damage. The basis of the rule is that a `cause of action' grows out of the wrongful act and not the various forms of damages that may flow from the single wrongful act.'
and then quoted from Birmingham Southern Ry. Co. v. Lintner, 141 Ala. 420 [428], 38 So. 363 [365] (1904):
"`It may be stated as a very general if not universal proposition that one who is entitled to sue at all for the consequences of a wrongful act may recover all the damages that such act has proximately inflicted upon him. His cause *1091 of action is the one wrongful act of the defendant.'"
Further, the Court stated:
"The test for determining this question is whether the issues in the two suits are the same and whether the same evidence would support a recovery in both suits.... There is no doubt that the issues in the instant action would be identical with the issues in the wrongful death action and would be supported by the same evidence save for proof of each element of damage. This latter circumstance is not grounds for distinguishing the issues of each cause. (Emphasis supplied.)"
Geer Brothers, 349 So.2d at 580, citing Sessions, 276 Ala. at 13, 158 So.2d at 655.
Thus, whether the same cause of action is presented in successive suits depends on whether the act of the defendant is the same in each case, and whether the same evidence would support a recovery in both suits.
Clearly, the defendants' act that Lesley contends is wrongful, namely, constructing a retaining wall, is the same in both suits. Further, in his action for an injunction, Lesley alleged that his right of access to his business would be interfered with if the wall was built. In his second suit, he contends that this same act of interference has caused him damages. The mere fact that the relief sought varies in the two cases, one injunctive and the other monetary, does not mean that there are separate causes of action in the two cases.
Admittedly, there is a division of opinion among the jurisdictions that have considered this question. As one court has stated:
"`This presents a question upon which there is a sharp division of authority, particularly where the second suit is one at law for damages. A statement by the textwriter in 28 Am.Jur., Injunctions, Sec. 309, indicates that most courts favor the proposition that, where damages are not sought as incidental to an injunction, the decree granting the injunction is not a bar to an action at law for past damages on account of the thing enjoined. However, other courts hold that an injunction decree is a bar to an action at law for past damages regardless of whether the plaintiff in the injunction suit pleaded damages, and regardless of whether there was an attempt to recover damages in that suit. The textwriter's statement as to the majority rule is based upon an annotation in 14 A.L.R. 543. A more recent annotation on the question in 26 A.L.R.2d 446 indicates that most courts, including our own, hold that a decree deciding an injunction suit is res judicata in a subsequent action for damages of all issues determined in the injunction proceeding. Our own cases go further and hold that the decree in the injunction suit is also res judicata of all issues in a subsequent action for damages which could have been interposed in the injunction suit.'"
Kettelhut v. Porter, 433 F.Supp. 295, 299 (W.D.Ark.1977), quoting Olmstead v. Rosedale Building & Supply, 229 Ark. 61, 63, 313 S.W.2d 235, 237 (1958).
We are of the opinion that this issue turns upon whether damages may be claimed in an action seeking equitable relief. Clearly, in Alabama, this is permissible.
Rule 2, Ala.R.Civ.P., states that "[t]here shall be one form of action to be known as `civil action.'" It is axiomatic that, in jurisdictions where there has been a merger of law and equity, such as Alabama, damages may be sought in actions requesting what is traditionally equitable relief. See, Wischmann v. Raikes, 168 Neb. 728, 740, 97 N.W.2d 551, 561 (1959), citing Restatement, Judgments, § 66 comment a (1980).
In discussing the exact issue before us, the Restatement (Second) of Judgments § 25 comment i (1980) states:
"i. `legal' and `equitable' phases of a claim. When `law' and `equity' with their distinctive remedies were separately administered, a plaintiff had to choose between the two `sides' when he brought his action, and the choice could be difficult, *1092 as the dividing line was not exact. Also, it was sometimes impossible to dispose completely in a single action of an entire transaction or controversy, since it might require a combination of legal and equitable remedies. The difficult remedial situation created by the law-equity division naturally had important restrictive effects on the operation of the doctrines of merger and bar. These are overcome when law and equity are `merged' or unified into the `one form of action' so that a pleader may and is expected to demand in a single action any and all remedies suited to the case. The point is emphasized by the customary provision in modern rules or codes of procedure that, except where judgment is by default, `every final judgment shall grant the relief to which the party in whose favor it is rendered is entitled, even if the party has not demanded such relief in his pleadings.'
"(1) Remission from `law' to `equity' or `equity' to `law' unnecessary and improper. Formerly if the plaintiff brought an action at law in which judgment was given for the defendant because the plaintiff's remedy was solely by a suit in equity, the plaintiff was not precluded from maintaining a suit in equity. Conversely, if the plaintiff brought a suit in equity that was dismissed because his remedy was solely by an action at law, the plaintiff was not precluded from maintaining an action at law; this was true, for example, where the suit in equity was dismissed because the plaintiff had an adequate remedy at law, or on the ground of such delay or hardship or impropriety of the plaintiff's conduct as barred a suit in equity but not an action at law.
"In a unified system of procedure, the plaintiff in the situations mentioned would ordinarily be entitled to be awarded in the first action any remedy called for by the facts, whether the remedy would formerly have been denominated legal or equitable; hence one action should suffice." [Citations and references to illustrations omitted.]
Nothing prohibited Lesley from asserting his claim for damages in his suit for the preliminary injunction. Since the act complained of is the same in both suits, and the evidence presented would be the same, the trial court was correct in holding that the cause of action was the same in both actions.

II
Lesley also contends that his original request for a preliminary injunction and compensation was not heard on the merits, based on the fact that a trial court may deny a plaintiff's request for a preliminary injunction without making a judgment on the merits, or at least without making a judgment on the same "merits" that would be involved in a later suit for damages. Lesley lists five other possible reasons for such a ruling: (1) doubt as to the validity of plaintiff's right to preliminary injunction; (2) absence of a clear and unmistakable right to preliminary injunction; (3) balance of benefits, considering the degree of injury and benefit to each party; (4) absence of an irreparable injury; and (5) having an adequate legal remedy for damages. While Lesley is correct that in an appropriate case any of these reasons is adequate for denying a preliminary injunction, we feel that they have no application here because the trial court did deny the preliminary injunction on the same merits as would be involved in a later suit for damages.
In the hearing on Lesley's application for a preliminary injunction, the court took extensive testimony from Lesley, then heard testimony from Mr. James H. Sigler, the chief administrator for technical services for the City of Montgomery. Mr. Sigler was responsible for the construction of bridges in the City of Montgomery. After direct and cross-examination of these witnesses, the court issued its order denying plaintiff's request for preliminary injunction. The court ruled that:
"I'm going to deny the motion for preliminary injunction; however, for the *1093 record, the court finds, for the record, that based on the record as I have heard it here today, I don't think there's any doubt that the plaintiff's business as it has been operating is going to be affected by the fact that people cannot park in front of his store. The basis of my ruling is that there is no property right of the plaintiff in the parking spaces, and that's the reason I'm denying it.
"* * *
"It would appear to me that the issue is: Is the property right being taken one that should be expected by a businessman in a same and similar circumstance so that there would have to be an effective condemnation of the business? I'm holding today that as a matter of law, that, as I understand it and based on what's been given to me, that if this business community when the property was bought the business location takes up the whole thing, the whole amount of the lots that there is no driveway. I think that we would have a different matter if this gentleman had a drive on his property as opposed to ... and he had to get to the driveway through the right-of-way as opposed to just the parking places." (Emphasis added.)
The court clearly considered the merits of appellant's claim by taking testimony from pertinent parties and by deciding "as a matter of law" that the plaintiff was not entitled to relief for the alleged interference with access to his commercial property. While the judgment must be on the merits, Lesley's argument is misplaced. The lack of "merit" situation results when a party has not been given an opportunity to present his position on the relevant law or facts. Here, at the hearing on the motion for a preliminary injunction, the trial court held, as a matter of law, that Lesley had "no property right ... in the parking spaces"; this necessarily was an adverse adjudication on an element that would have been necessary to a later claim for damages; therefore, Lesley, at that time, had an adverse ruling on the merits of his claim for damages. He did not pursue his appeal from this adverse ruling of the trial court. Lesley also had an opportunity to present his arguments regarding the merits of his claim. He did not present evidence as to damages. We feel that the trial court was correct in finding the present action barred, and affirm.

III
Finally, while Lesley does not make the argument as one justifying reversal, he points out that the opinion of the trial court denying the preliminary injunction was not introduced before the court that heard the present motion to dismiss. When a party refers to another proceeding or judgment of a court in his pleading before that same court, the court on motion to dismiss may take judicial notice of the entire proceeding. Geer Bros., Inc. v. Crump, 349 So.2d 577 (Ala.1977).
The only issues presented by this appeal involve the question of whether the judgment in appellant's first lawsuit was res judicata as to this present action, and whether the defendants in the case below met their burden of establishing the plea of res judicata.
The judgment of the trial court is due to be affirmed.
AFFIRMED.
TORBERT, C.J., and JONES, SHORES and ADAMS, JJ., concur.
