Avatar of lulu50
lulu50
Flag for United States of America

asked on 

Help!!!! Toggle Menu

Hi,

this is my site.
http://www.churchesbulletin.com/post.cfm?CHID=11

I am having problem with my left toggle menu.  

I am not sure why when I select "search by state" button I enter anything in the search text box and select michigan then click on the search button.

it does not submit the form and the search by state menu it closes.  

I want it to stay open and to be able to submit my selection.

Thanks,
lulu
<input id="BtnST" type="button" value="Search" name="BtnST" onclick="valState();"/>


	
function valState(){

var errorMsg = "";
var errorField = null;

var DcFrm = document.FRMAcc;

 if (DcFrm.TxtSearchST.value == ""){
      errorMsg += "Search for field is empty\n";
	if (errorField==null) errorField=FRMAcc.TxtSearchST;
  }
  
if (DcFrm.DispStateBoxST.selectedIndex == 0)
{
  errorMsg += "Select a state\n";
  if (errorField==null) errorField=FRMAcc.DispStateBoxST;
 }

  if (errorMsg != "") {
    errorMsg += "---------------------------------\n\n";
    errorMsg += "Please correct the problem(s)\n";
    alert(errorMsg );
    errorField.focus();
    return false;
  } 
  
	FRMAcc.method="post"; 
	FRMAcc.action="post.cfm?CHID=" + '<cfoutput>#URL.CHID#</cfoutput>';
	FRMAcc.submit(); 
 
}

Open in new window

AJAXJavaScriptJSP

Avatar of undefined
Last Comment
lulu50

8/22/2022 - Mon