I was hesitant to post this because it's a lot of code but here it is

<script language="javascript" type="text/javascript">

function GetXmlHttpObject()
{
  var objXMLHttp=null

  try {
    objXMLHttp = new ActiveXObject("Msxml2.XMLHTTP"); //later IE
  } catch (e) {
  try {
    objXMLHttp = new ActiveXObject("Microsoft.XMLHTTP"); //earlier IE
  } catch (e) {
  objXMLHttp = null;
  }
}

  if (objXMLHttp==null)
  {
    objXMLHttp=new XMLHttpRequest() //IE7, Firefox, Safari
  }
  return objXMLHttp
}

function stateChangedCharts()
{
  if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {
         createInterlocksGraph(<%=intid_company%>)
 }
}


function createCharts()
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Your browser does not support the XMLHttpRequest object.")
return
}

var url="/charts/CMChart_BA_static.php?CompID=<%=intid_company
%>&CEOTotSumComp=<%=intCEOTotSumComp%>"
xmlHttp.onreadystatechange=stateChangedCharts
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}


function createInterlocksGraph(id_company)
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Your browser does not support the XMLHttpRequest object.")
return
}

var url="/charts/interlocks_BA.php?type=co&ID="+id_company
xmlHttp.onreadystatechange=stateChangedInterlocks
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

</script>

On Jul 21, 2:55 pm, Glazz <brunofgas...@live.com.pt> wrote:
> And btw... there's any return false in createCharts(); ?
>
> On 21 Jul, 19:53, Glazz <brunofgas...@live.com.pt> wrote:
>
>
>
> > Hi,
>
> > Can you please post the function that is not working in Firefox
> > please?
>
> > Regards
>
> > On 21 Jul, 19:48, "evanbu...@gmail.com" <evanbu...@gmail.com> wrote:
>
> > > This is probably more of a basic javascript question than a specific
> > > jquery function.  I have this jQuery function named validateSubmit()
> > > which calls two other regular javascript functions.  When using IE,
> > > both createCharts() and getDirectorIDs get called but when using
> > > FireFox, only createCharts() gets called and never makes it to
> > > getDirectorIDs() and I'm not sure why this occurs.  Thanks
>
> > > <script type="text/javascript">
> > > // make sure at least one checkbox is checked
> > > function validateSubmit() {
> > >         if( $("input:checkbox:checked").length == 0 ) {
> > >           alert( "Please select at least one section for your PDF
> > > profile" );
> > >           return false;
> > >         } else {
> > >             createCharts();
>
> > >              getDirectorIDs();
> > >          return true;
> > >         }
> > >    }
> > > </script>- Hide quoted text -
>
> - Show quoted text -

Reply via email to