Thank you. The Firebug suggestion was helpful.  The error message is
saying that getDirectorIds() is not defined.

<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();

 // error occurs here
 getDirectorIDs();
 return true;
 }
 }
</script>

This is the getDirectorIDs() function:

<script language="javascript" type="text/javascript">
 // this gets all of the director id_individual values
 $(document).ready(function getDirectorIDs() {
 var result = "";
 $(".chkDirector:checked").each(function() {
 result = result + $(this).val() + ",";
 });
 // place the selected id_individual values in the label control
lblCheckedDirectors2
 document.getElementById('lblCheckedDirs').value = result;

 alert("cool");
 });
</script>

On Jul 21, 7:28 pm, "Michael Geary" <m...@mg.to> wrote:
> The reason this would happen is that you have a fatal error somewhere inside
> your createCharts() function. When this error occurs, it stops all
> JavaScript execution for the current event.
>
> Do you have any debugging tools such as Firebug? If not, install Firebug and
> try again. Open the Firebug panel and make sure it's enabled for your site,
> then reload the page and do whatever you need to do to trigger the error.
>
> It's very likely that Firebug will give you an error message showing exactly
> what the problem is.
>
> If the problem isn't clear from that message (or if you don't get one), try
> sprinkling the code inside createCharts() with console.log() calls:
>
>     function createCharts() {
>         console.log(1);
>         // some of your code here
>         console.log(2);
>         // some more of your code here
>         console.log(3);
>         // and some more of your code here
>         console.log(4);
>     }
>
> By watching the Firebug console, you will then be able to see which of your
> console.log() calls were actually executed.
>
> -Mike
>
>
>
> > From: evanbu...@gmail.com
>
> > 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