troubleshooting Question

Syntax setTimeout JQuery

Avatar of mjfigur
mjfigur asked on
JavaScriptAJAX
1 Comment1 Solution404 ViewsLast Modified:
I just need some help with my syntax. I am trying to add to the code below a try and catch statement so that when .change calls the function it does a try on:

$(this).htmldbSetSession({
   success:function(){
    refreshEmp();

and then catch(ex) it would set a timeout of 100ms.

Not sure how to code this and the syntax need help please.

$(function(){
 $('#P20_MANAGER_NAME').htmldbCascade(
  '#P20_DEPARTMENT_NAME',
  'MANAGER_CASCADE_OPT_GRP_LOV',{
  parentSession:true,
  parentTrigger:'change'
 });
 $('#P20_EMPLOYEE_NAME').htmldbCascade(
  '#P20_MANAGER_NAME',
  'EMPLOYEE_CASCADE_OPT_GRP_LOV',{
  parentSession:true
 }).change(function(){ 
  /* bind change event to set session state and refresh report */
  $(this).htmldbSetSession({
   success:function(){
    refreshEmp();
   }
  });
 });
});
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros