Thanks for the tip. I don't think of using try/catch in javascript. I'll
keep that in mind next time I'm having a problem.

--Erik

On 12/20/06, Dotan Dimet <[EMAIL PROTECTED]> wrote:

Whenever you're puzzled why a certain line never gets executed, consider
that your code might have thrown an exception and died.

I've found that wrapping the suspicious code with a try/catch block

try{ .... } catch(e){ alert(e); }

is very helpful.

Especially when your code gets called by a link click or a form submit()
event - the exception means your function doesn't return properly,

which means it doesn't return false, and the browser changes the
document location, which might prevent the exception from showing up

in firebug or the javascript console.

- Dotan


Erik Beeson wrote:

>
> function(data) {
>   alert(data); // shows XMLSomethingOrOther
>   $('success',data).text(); // or .children() or .size()
>   alert('made it'); // this never happens
> }
>



_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to