On Aug 21, 2:19 pm, Christof Donat <[EMAIL PROTECTED]> wrote:
> Hi,
>
> > I'm aware of that method, but I want a callback to find out what
> > content type was loaded, display it if text/html or execute it if text/
> > javascript.
>
> $('<script src="http://example.com/myscript.js"; type="text/javascript">').
>         appendTo('head');
> $('<script type="text/javascript">callMyCallback</script>').
>         appendTo('head');
>
> Since the second tag will be inserted after the first, it will be executed
> after the first script is loaded and executed. Well, you don't get the
> content Type, but you can check for the existance of variables or functions
> that should be in the script. That at least tells you if the script has been
> loaded successfully as javascript.
>
> Christof

The content returned from Google is in HTML format when it thinks
someone is abusing their system with too many requests. As a result,
the browser tries to execute the HTML as JavaScript, but as it is HTML
instead there is a runtime error (thus preventing any further scripts
from running).

Unfortunately, this is not that easy to duplicate (unless you happen
to be on the NHS network or some other large WAN) - at this very
moment it is working, but I never know when it is going to fall over
again. I don't know if the issue is localised or WAN-wide.

There is an NHS site that uses Google Maps already: http://www.qof.ic.nhs.uk
(not powered by jQuery though) and the main NHS.UK site uses Virtual
Earth, but there are no plugins for working with that.

Reply via email to