Safari does not let you to inject script files once the page has
loaded. A few months ago I found a tricky way to make it possible...
not tried...
http://lists.apple.com/archives/Webcore-dev/2005/Mar/msg00023.html

Good luck and don't forget to tell us the result ; )

2007/3/28, Brandon Aaron <[EMAIL PROTECTED]>:
> Safari improves pretty rapidly and is pretty good about following
> standards but it is not without its problems. It can be very
> frustrating sometimes ... especially if you have to support 1.0.3 or
> even 1.3.
>
> --
> Brandon Aaron
>
> On 3/28/07, Yansky <[EMAIL PROTECTED]> wrote:
> >
> > Hmm ok, I guess the easiest solution would be to put all the javascript into
> > one file and do the browser sniffing in that file.
> >
> > It's weird - people always complain about IE's bugs, but lately I've had a
> > lot of problems getting things to work in Safari; whereas IE(7) will just
> > work.
> >
> >
> > Brandon Aaron wrote:
> > >
> > > Last time I tried an ID on a script tag, Safari wouldn't find it.
> > >
> > > --
> > > Brandon Aaron
> > >
> > > On 3/28/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:
> > >> Safari is very weird with <script> tags! any script tag is assumed to be
> > >> javascript, and loaded in the beginning and that's it.
> > >> Try making a new script tag, and inserting it.
> > >> Safari broke many of my cute tricks!
> > >>
> > >> I'd never considered using an id on a script tag, but they are in the
> > >> dom,
> > >> so it should work.
> > >>
> > >>
> > >> On 3/28/07, Yansky < [EMAIL PROTECTED]> wrote:
> > >> >
> > >> > Hi guys, I'm trying to get the following to work in Safari, but it just
> > >> wont
> > >> > add the script source & I can't figure out why.
> > >> >
> > >> > This is my code:
> > >> > <head>
> > >> > <title></title>
> > >> > <script type="text/javascript" src="jquery-latest.js"></script>
> > >> > <script type="text/javascript">
> > >> > $(document).ready(function() {
> > >> >   if($.browser.msie) {
> > >> >         $('#scriptReplace').attr("src","test2-ie.js");
> > >> >   }
> > >> >   else {
> > >> >         $('#scriptReplace').attr("src","
> > >> test2-mozilla-EtAl.js");
> > >> >   }
> > >> > });
> > >> > </script>
> > >> > <link rel="stylesheet" href="test2.css" media="screen,projection"
> > >> > type="text/css" />
> > >> > <script id="scriptReplace" type="text/javascript" ></script>
> > >> > </head>
> > >> >
> > >> > It works fine in IE, Opera & Firefox, yet it wont work in Safari
> > >> (2.0.4).
> > >> > Does it take longer for Safari's DOM to be ready? Is using an ID to
> > >> locate
> > >> > the correct script tag the right way to go?
> > >> >
> > >> > Cheers.
> > >> > --
> > >> > View this message in context:
> > >> http://www.nabble.com/Problems-with-script-replacement-in-Safari-tf3481746.html#a9718408
> > >> > Sent from the JQuery mailing list archive at Nabble.com.
> > >> >
> > >> >
> > >> > _______________________________________________
> > >> > jQuery mailing list
> > >> > discuss@jquery.com
> > >> > http://jquery.com/discuss/
> > >> >
> > >>
> > >>
> > >>
> > >> --
> > >> Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
> > >> _______________________________________________
> > >> jQuery mailing list
> > >> discuss@jquery.com
> > >> http://jquery.com/discuss/
> > >>
> > >>
> > > _______________________________________________
> > > jQuery mailing list
> > > discuss@jquery.com
> > > http://jquery.com/discuss/
> > >
> > >
> >
> > --
> > View this message in context: 
> > http://www.nabble.com/Problems-with-script-replacement-in-Safari-tf3481746.html#a9722143
> > Sent from the JQuery mailing list archive at Nabble.com.
> >
> >
> > _______________________________________________
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>


-- 
Roberto Ortelli
http://weblogger.ch
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to