• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 311
  • Last Modified:

My form is not submitting when I click on submit.

Hi,

the search criteria on the left side menu is not submitting my form in Firefox but it is working fine in IE.

I am not sure how to solve it.

http://www.churchesbulletin.com/post.cfm?stid=22&ctid=3956&chid=1676
<div align="center" class="BtnSearchByChurchhere" style="text-align:center;padding: 6px 0px 0px 0px;" >    
	<input id="BtnCh" type="submit" value="" name="BtnCh" onclick="valChurch();"/>
	</div>
________________________________________________


function valChurch(){

var errorMsg = "";
var errorField = null;
var objFromDate = document.getElementById("dateFromCh").value; 
var objToDate = document.getElementById("dateToCh").value; 

var date1 = new Date(objFromDate); 
var date2 = new Date(objToDate); 

var DcFrm = document.getElementById("FRMAcc");
DcFrm.method="post"; 

   
 if (DcFrm.PriceFromCh.value != "")
 {
	if(parseInt(DcFrm.PriceFromCh.value) > parseInt(DcFrm.PriceToCh.value))
	{
		errorMsg += "Price FROM Less than price TO\n";
		if (errorField==null) errorField=FRMAcc.PriceFromCh;
	}
 }
 
 if(date1 > date2) 
  { 
		errorMsg += "From Date should be less than To Date\n";
		if (errorField==null) errorField=FRMAcc.dateFromCh;
  } 
 
  if (errorMsg != "") {
    errorMsg += "---------------------------------\n\n";
    errorMsg += "Please correct the problem(s)\n";
    alert(errorMsg );
    errorField.focus();
    return false;
  }
 
	FRMAcc.action="post.cfm?s=CH&CHID=" + '<cfoutput>#cookie.CHID#</cfoutput>';
	FRMAcc.submit(); 
}

Open in new window

0
lulu50
Asked:
lulu50
  • 4
1 Solution
 
AielloJCommented:
lulu50:

What is FRMAcc that you are trying to execute the submit method on.  It appears your form is named DcFrm.  Have you tried DcFrm.submit()?

AielloJ
0
 
AngryBinaryCommented:
It is working fine for me in IE, FireFox, and Chrome. What are the values that you've entered into your form when it fails?
0
 
lulu50Author Commented:
in Firefox

I am working on the left menu if I just select michigan and click on "Click here to search" button

I am not getting the correct result.
it should  Found 14 records

it should list all post that are in michigan I do see the correct result in IE but not in Firefox.

var DcFrm = document.getElementById("FRMAcc");
DcFrm.method="post";

<form name="FRMAcc" id="FRMAcc" action="" method="post" enctype="multipart/form-data">
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
lulu50Author Commented:
AielloJ:

you are correct it should be this.

DcFrm.submit()
0
 
lulu50Author Commented:
it's working now!!!!

Thank you
0
 
lulu50Author Commented:
Thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now