
631 P.2d 307 (1981)
96 N.M. 401
Tomey Jean MURPHY, aka Tomey Jean Swan, Petitioner-Appellee,
v.
William James MURPHY, Respondent-Appellant.
No. 12683.
Supreme Court of New Mexico.
July 21, 1981.
*309 Fred Standley, Santa Fe, Georgina Landman, Tulsa, Okl., for respondent-appellant.
Sigmund L. Bloom, Albuquerque, for petitioner-appellee.

OPINION
RIORDAN, Justice.
William Murphy (respondent) appeals from the trial court's order entered after a contempt proceeding was instituted by Tomey Jean Murphy (petitioner). We affirm in part and reverse in part.
The issues on appeal are: (1) whether the trial court had jurisdiction to conduct a contempt proceeding; (2) whether an Oklahoma divorce decree involving the parties is entitled to full faith and credit; (3) whether the trial court had the authority to enjoin the respondent from instituting visitation or child custody proceedings in any other jurisdiction; (4) whether the trial court erred in finding the respondent and his attorney in contempt of court and summarily sentencing each to twenty-five minutes in jail; (5) whether the trial court erred in temporarily suspending the respondent's visitation privileges; and (6) whether the court abused its discretion in ordering him to pay the petitioner's attorney fees and costs.
The parties were married in Oklahoma in 1969. In July 1976, the petitioner filed a petition in Colfax County for dissolution of marriage stating that both parties were bona fide residents of New Mexico for six months. The respondent filed a general entry of appearance and waiver of service. The district court entered a decree of divorce based upon the pleadings.
In September 1976, respondent filed a petition for modification of the final decree. After a hearing on this petition at which neither the respondent nor his attorney appeared, although both were notified of the date and time of the hearing, the trial court entered an order in December 1976 modifying the final decree. One of the findings made by the trial court was that the respondent, by filing his petition for modification, submitted himself to the continuing jurisdiction of the Colfax County District Court. There was no appeal from this order, which continued the custody of the parties' two minor children in the petitioner and provided for a property settlement, visitation rights and support. In addition, the court held the respondent in contempt of court for having failed to return the parties' son to the petitioner after exercising visitation as provided by the original decree. The respondent later purged himself of contempt by delivering the child.
In November 1976, respondent filed an action for divorce in Oklahoma. He obtained an ex-parte order granting him custody of his minor son who was visiting him at the time. On December 30, 1976, respondent obtained a default divorce from the Oklahoma court, granting custody of the minor son to respondent and finding that the New Mexico divorce was invalid, apparently for lack of jurisdiction. Shortly after being entered, this default divorce was set aside by agreement of the parties and the Oklahoma court agreed to rule on the question of whether it had jurisdiction to grant a divorce and custody or whether the New Mexico decree was entitled to full faith and credit. On April 14, 1977, the Oklahoma district court ruled that it was required to give full faith and credit to the New Mexico decree and that it could not look behind the *310 New Mexico decree to determine whether New Mexico had jurisdiction to grant the divorce. That case was appealed to the Oklahoma Court of Appeals, Murphy v. Murphy, 581 P.2d 489 (Okl.Ct.App. 1978) which reversed the trial court, stating that a hearing would have to be held to determine if in fact New Mexico had jurisdiction to grant the divorce.
The respondent then filed a motion in the District Court of Colfax County to set aside the dissolution of marriage decree entered in July 1976. On October 26, 1978, a hearing was held in New Mexico on the motion to set aside the New Mexico final divorce decree on the grounds that neither party met the six-month residency requirement of our divorce statute. At the hearing, the district court set aside the portion of the decree that granted a divorce as void for lack of jurisdiction. It was determined by the court that neither party had resided in New Mexico for the six months required by our divorce statute prior to the entry of this decree. The court, however, relying on Heckathorn v. Heckathorn, 77 N.M. 369, 423 P.2d 410 (1967), ruled that even though it had originally lacked subject matter jurisdiction to grant a divorce, it did have jurisdiction over the child custody, visitation rights and property settlement provisions contained in the original New Mexico decree. The court also stated that if either party had any objection to the ruling they could submit briefs in opposition within ten days. Neither party did so. Rather, shortly after the October 1978 hearing, the parties met in Denver, Colorado, and worked out a compromise hoping to bring this litigation to an end. An integral part of the settlement, in which petitioner stipulated to the parties being granted a divorce in Oklahoma, was the inclusion of a provision in the Oklahoma decree stating that the New Mexico court would have continuing jurisdiction over all issues of custody and visitation of the minor children of the parties. The agreement also provided that no portion of it would have force and effect unless the entire agreement was accepted by the parties and the court. However, when the divorce decree was presented to the court in Oklahoma, the judge struck the provision relating to custody and visitation. Neither petitioner nor her attorney were ever notified of this nor provided with a copy of the Oklahoma decree by respondent or his attorney until after May 25, 1979 when the pleadings that give rise to this appeal were filed.[1]
On May 25, 1979, petitioner filed a petition for an order to show cause in Colfax County District Court alleging that respondent had violated the previous order of the New Mexico district court and the stipulation that was attached to the Oklahoma divorce decree reserved jurisdiction over custody and visitation matters to the New Mexico court. Petitioner asked the court to find respondent in contempt; to enjoin him from pursuing any other custody or visitation proceedings other than those allowed in the signed stipulation; to suspend visitation; and to pay petitioner's attorney fees. The factor that prompted this action was respondent's obtaining a writ of habeas corpus from the Oklahoma court ordering petitioner to come to Oklahoma with the minor children on June 8, 1979 for a hearing.
The order to show cause was set for June 22, 1979 and notice of hearing was mailed to New Mexico counsel of record and the respondent's Oklahoma counsel that had previously been authorized to represent respondent in the New Mexico action. At the hearing, the court ordered the respondent's attorney to produce the stipulated order drawn up as a result of the October 1978 hearing and signed by the parties six months previously. The court also found both the respondent and his Oklahoma attorney in contempt of court and sentenced *311 each to twenty-five minutes in jail, which they served then and there. In addition the court permanently enjoined the respondent from bringing any proceedings involving child custody and visitation in any court not within its jurisdiction, awarded the petitioner $1,700.00 for attorney fees and costs, and temporarily terminated the respondent's visitation rights, pending a further hearing. It is from this decision that the respondent appeals.

1. Jurisdiction.

The respondent challenges the Colfax County District Court's order on jurisdictional grounds. The respondent contends that the court had no personal jurisdiction over him because: (1) the contempt proceeding was a new proceeding requiring issuance and personal service of process, and that the certificate of mailing to both of his attorneys did not satisfy due process requirements; and (2) the respondent and his attorney's "special appearance" and participation at the hearing did not constitute a general appearance as such, and the trial court did not acquire personal jurisdiction over the respondent on that basis.
We reject both contentions. The New Mexico court's jurisdiction over respondent, if defective, became complete when he appeared and participated in the hearing on the merits on the order to show cause. Csanyi v. Csanyi, 82 N.M. 411, 483 P.2d 292 (1971). Here, despite continuous warnings by the court that such participation may waive jurisdictional objections, the respondent's attorney cross-examined witnesses and called the respondent to testify. New Mexico courts have jurisdiction over custody matters if the parties disputing custody are personally subject to the jurisdiction of the court. Montoya v. Collier, 85 N.M. 356, 512 P.2d 684 (1973). See Wallace v. Wallace, 63 N.M. 414, 320 P.2d 1020 (1958). In the present case, the trial court had personal jurisdiction over the respondent not only under the case law established in Csanyi, supra, but also because the respondent had previously invoked the jurisdiction of and submitted himself to the New Mexico court's jurisdiction in this case. See Matter of Johnson, 94 N.M. 491, 612 P.2d 1302 (1980).
At the October 1978 hearing on the respondent's motion to set aside the divorce decree, the New Mexico district court specifically ruled that the court had acquired jurisdiction over the child custody, visitation and property settlement provisions contained in the July 1976 final decree by the respondent's acceptance of service and later filing motions in this case. Although the court did not have subject matter jurisdiction over the divorce, it did acquire jurisdiction over both of the parties. The trial court relied on Section 22-7-2, N.M.S.A. 1953 (Supp. 1975), now Section 40-4-3 N.M.S.A. 1978, which reads:
Whenever the husband and wife have permanently separated and no longer live or cohabit together as husband and wife, either may institute proceedings in the district court for a division of property, disposition of children or alimony, without asking for or obtaining in the proceedings, a dissolution of marriage.
This statute gives the court subject matter jurisdiction over such matters when it has acted in a proceeding, whether a dissolution of marriage is requested or not, as long as the parties are personally subject to the jurisdiction of the court. There is no residence or domicile requirement under this statute. In addition, the respondent's motion of October 1978 sought to set aside only the divorce decree. The respondent did not challenge the child custody and visitation provisions of the original New Mexico decree. The trial court had jurisdiction under Section 40-4-3 and under Wallace, supra. See Heckathorn v. Heckathorn, supra.

2. Oklahoma Decree.

The respondent claims that the New Mexico trial court's order should be set aside because full faith and credit should be given to the Oklahoma divorce decree. However, the first Oklahoma court's default decree was set aside by stipulation of the parties. When the parties later appeared *312 for trial on the merits, the Oklahoma district court found that the New Mexico divorce decree was entitled to full faith and credit in Oklahoma and refused to entertain the action. This decision was later reversed by the Oklahoma Court of Appeals which stated that it was unclear whether the New Mexico divorce decree was entitled to full faith and credit because of the possible lack of jurisdiction on the part of the New Mexico court which issued the decree. The Oklahoma Court of Appeals remanded the case for further proceedings to determine whether either party met the domiciliary and residency requirement for divorce in New Mexico.
Thereafter, on October 26, 1978, a hearing was held in New Mexico on respondent's motion to set aside the New Mexico divorce decree. As stated previously, the district court announced that it would set aside the provision of the divorce decree on the grounds that the parties did not meet the residency requirements in June 1976 when the court granted the divorce.
After the October 1978 hearing in New Mexico, the parties met and drew up a stipulated order in accordance with the district court decision. The stipulation was signed by all parties but was not filed until June 22, 1979.
At the time the second Oklahoma decree was entered in December 1978, the original divorce decree in New Mexico had not been formally set aside and no order had been entered on the question of the New Mexico court's jurisdiction as required by the decision of the Oklahoma Court of Appeals. Since the second Oklahoma divorce was granted without such a determination first being made, it would not be entitled to full faith and credit.
Even if the December 19, 1978, Oklahoma decree were valid in Oklahoma, the New Mexico district court would not be deprived of jurisdiction to further consider custody and visitation matters. The New Mexico court had in personam jurisdiction over both parties and subject matter jurisdiction over both parties and therefore could determine the custody of their children. Worland v. Worland, supra. As long as the court continues to have jurisdiction over either the children or both parents, it has continuing jurisdiction to hear all matters relating to custody.
At the hearing on the order to show cause, the respondent argued that the New Mexico court must give full faith and credit to the second Oklahoma decree. This court has held as a general rule that
a judgment of a sister state awarding custody is entitled to full faith and credit on the state of facts then existing but if subsequent thereto a substantial change of conditions has occurred calculated to affect the child's welfare, the court may in a later hearing render such decree as the child's welfare requires.
Terry v. Terry, 82 N.M. 113, 114, 476 P.2d 772, 773 (1970) (citing Evens v. Keller, 35 N.M. 659, 6 P.2d 200 (1931).
The Oklahoma court which entered the 1978 divorce decree and determined custody did not hear the evidence which the New Mexico court considered at previous hearings and at the time it entered the order of June 26, 1979. Because of the consideration of additional evidence, the district court was not required to give full faith and credit to the Oklahoma decree.
Oklahoma statutes, as well as case law, establish a principle that child custody matters may continue to be reexamined even after an original custody decree is entered. Not only will Oklahoma reexamine its own decrees awarding custody, but will also reexamine foreign decrees. Okla. Stat. tit. 12, § 1277 (Supp. 1980); Lee v. Lee, 579 P.2d 1284 (Okl.Ct.App. 1978). There is no reason why a New Mexico court should be bound by an Oklahoma decree which itself would be subject to reexamination in an Oklahoma court.

3. Injunction Against the Respondent.

The respondent claims that the district court had neither the jurisdiction nor the authority to enjoin him from bringing any proceeding involving child custody and visitation matters in any other jurisdiction. *313 The request for the injunction was based upon the petitioner's belief that the trial court's previous order and the Oklahoma court's order reserving jurisdiction in the New Mexico court had been signed by the parties and approved by the respective courts. In fact, the previous order of the New Mexico court had not been signed by the court or filed. The Oklahoma order that had been agreed to by the parties was entered, but had the provision stricken that related to the New Mexico court having continuing jurisdiction over custody. In light of this, the trial court should not have entered the injunction. We hold the trial court erred in issuing the injunction given the status of the pleadings upon which it was based.

4. Contempt.

The respondent claims that the New Mexico trial court erred in finding the respondent and his counsel in contempt of court and in summarily sentencing each to a twenty-five minute jail term. He claims that the trial court failed to meet the requirements for exercising its criminal contempt powers spelled out in a recent decision by this Court. Matter of Klecan, 93 N.M. 637, 603 P.2d 1094 (1979). Klecan provides that before criminal contempt may be imposed and enforced, the following requirements must be met:
(1) Except in cases of flagrant contemptuous conduct, the trial court should not exercise the power of summary contempt in the absence of a prior warning;
(2) There must be an opportunity to explain; and
(3) There must be a hearing on the matter.
It is not clear from the record in this case whether the trial court was holding the respondent and his attorney in criminal or civil contempt of court. The distinction between the two was made in Klecan:
Civil contempts are those proceedings instituted to preserve and enforce the rights of private parties to suits and to compel obedience to the orders, writs, mandates and decrees of the court; whereas criminal contempt proceedings are instituted to preserve the authority and vindicate the dignity of the court. (Citations omitted.)
93 N.M. at 638, 603 P.2d at 1095.
The trial court said that it was sending the respondent to jail for twenty-five minutes as an expression of the court's displeasure with what the respondent was trying to do in this case. The court also held the respondent in contempt for "his obstruction of justice insofar as the Court Order is concerned and for his actions toward the Petitioner and the minor children." The judge commented that he had "[n]ever seen such flagrant abuse of an ex-wife."
With respect to respondent's attorney, the court stated that it was sending her to jail "because of her willful holding of this Court Order after signed by all the parties and never presenting it to the Court."
The trial court erred if it was holding the respondent or his attorney in criminal contempt for failing to file the stipulation. At the October 1978 hearing, the court did not order the respondent or his attorney to file the order. After the court announced its decision, the following colloquy took place:
MR. DAVIDSON (previous Attorney for Respondent): As I understand it, your Honor, you have announced a tentative decision subject to submission of briefs.
THE COURT: Yes.
MR. DAVIDSON: And if neither party submits a brief, then the Court will enter an order prepared by one of the parties consistent with announcement of the Court.
THE COURT: That's right.
No order was ever made by the court directing or commanding the respondent or his attorney to submit the stipulated order for signature. Nor did the court ever issue a prior warning as required by Klecan that the respondent would be held in contempt if he did not file the stipulated order. Therefore, we hold that the respondent or his attorney could not be held in criminal contempt for failing to file the stipulated order.
*314 Punishment for civil contempt is remedial and for the benefit of one of the parties. There can be no doubt that the court could hold respondent in civil contempt of court for violating a court order that previously directed him to take certain action or that prohibited certain conduct. Nor is there any doubt that the judge could enforce such orders by fine or by a coercive or remedial jail sentence or both. Since neither the respondent nor the attorney were ordered to file the court order, neither could be held in civil contempt for failure to file the stipulated order.
Another reason which the court articulated for holding the respondent in contempt was the respondent's actions toward the petitioner and the minor children.
However, assuming that the court intended to hold the respondent in civil contempt, he could not be held in contempt for violation of the stipulated order because it was not signed or entered by the New Mexico court. If the court's intention was to hold the respondent in contempt for the abuse of the petitioner, such action must also fail. There was no court order entered that was violated. Further, the petitioner was not given notice of any other alleged violations of previous court orders in the order to show cause.
It appears from the record that the New Mexico court may have based the contempt on the actions of the respondent and his attorney in failing to notify the petitioner of the change in the Oklahoma decree or in failing to provide the petitioner with a copy of the decree. Again, no order of the New Mexico court was alleged to have been violated. Before the court could have found respondent in civil contempt, it would have to find that the respondent failed to perform a previously ordered affirmative act, or performed an act previously prohibited. In looking at the original divorce decree and at the order of June 22, 1979, we do not see where the court prohibited the respondent from doing any act or compelled the respondent to act in some specific way which respondent later failed to do.

5. Order Suspending Visitation Privileges.

The respondent claims that the trial court erred in temporarily suspending his visitation privileges and in ordering him to pay the petitioner's attorney fees and costs. Since we have already held that the trial court had jurisdiction over child custody and visitation matters, it clearly had the authority to temporarily suspend the father's visitation privileges. Given the record in this case, the trial court did not abuse its discretion in doing so.

6. Order to Pay Attorney's Fees and Costs.

Pursuant to Section 40-4-7, N.M.S.A. 1978 the trial court has the authority to designate which party in such proceedings will bear the expenses of those proceedings. We hold that the court did not abuse its discretion.
The respondent is ordered to pay petitioner $3,000.00 in attorney fees for this appeal as well as costs.
While this case was before us on appeal, we issued a writ in our Cause Number 12,643 prohibiting the trial judge from taking future actions in this case. In view of the result we reach on appeal, we modify the writ of prohibition to the extent it is inconsistent with this opinion.
The actions of the trial court are affirmed with the exception of the findings of contempt against the respondent and his Oklahoma counsel and the injunction that was entered.
IT IS SO ORDERED.
SOSA, Senior Justice, PAYNE, J., and DOUGHTY, District Judge, concur.
EASLEY, C.J., dissenting.
FEDERICI, J., not participating.
NOTES
[1]  When the petitioner did learn of the deletion of that provision by the judge, she filed a motion in Oklahoma to vacate the divorce decree on the grounds that the change nullified the entire agreement and that the mother was denied due process when the Oklahoma court changed the stipulation without notice to her and without her presence and an opportunity to be heard. The record reflects that a hearing on this motion was held in Oklahoma in March 1980, but no order has ever been entered ruling on her motion.
