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

lulu50Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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?
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">
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

lulu50Author Commented:
AielloJ:

you are correct it should be this.

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

Thank you
lulu50Author Commented:
Thank you
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.