Hi Mike, many many thanks for your quick reply. I really appreciate
you (and all of you) taking the time to help me out. :)

> what you probably want instead is this:
> $.ajaxSettings.url = token;
> $.ajaxSettings.global = false;

Ahhh, thanks! I was did not see ajaxSettings in the docs. :(

I think this page confused me a little:

"Global Events"
<http://docs.jquery.com/Ajax_Events>

Now that I have had the help and clarification, I understand what the
docs are telling me. :)

So, just a few more quick questions, if anyone has a minute to reply:

1. If I wanted to specify more than one URL to ignore, would the
syntax be something like this:

$.ajaxSettings.url = token1;
$.ajaxSettings.url = token2;
$.ajaxSettings.global = false;

2. When specifying the url as above, should global=false only apply to
those url's? I am noticing that global=false applies globally... Hehe,
not to just the url's specified?

3. My current solution based on the help from this thread:

// Start closure:
$(function() {
        $.ajaxSettings.global = false;
        ...
        ...
        ...
        $.get(token, function(txt) {
                $emailStory.append('<input type="hidden" name="ts" value="' + 
txt +
'">');
                $.ajaxSettings.global = true;
        });
});
// End closure.

Is the above a viable solution? Maybe I should be using $.ajax()
instead?

Thank you!
Cheers,
M

Reply via email to