Kevin, Thats interesting. I just switched it to 1.1.3 and I now see what you were talking about. Oh gosh, you weren't making things up. :-)
I have to keep this mind for future stuff when we begin to embed current html with native DOM reference statements. -- HLS On Sep 1, 10:44 am, <[EMAIL PROTECTED]> wrote: > Hi, > > I see the fix - you are using the latest version of jquery (1.1.4). I was > using 1.1.3.1 . When I started using the latest version your code > suggestions started working! I appreciate the help with loader code too, > that worked great! I tested on FF (pc/mac), ie > > Thanks again for all of your help, > > -Kevin > > > From: [EMAIL PROTECTED]> To: jquery-en@googlegroups.com> Subject: [jQuery] > > Re: AJAX GetElementByID problem> Date: Sat, 1 Sep 2007 00:08:22 -0700> > > > > > > On Aug 31, 6:38 pm, <[EMAIL PROTECTED]> wrote:> > > as you suggested > > and while it does run the alert message, it> > still fails out on the > > document.getElementByID in the destination> > page with the same error: > > TypeError: document.getElementById("blah1")> > has no properties> >> > > > Would you be able to paste in your sample app that you created? I> > am > > probably missing something small.> > <html>> <head>> <title>Blah > > Blah</title>> > <style>> body {> margin-left: 5%; margin-right: 5%;> color: > > crimson; background:#1C1C1C;> }> > #ajaxLoader {> text-align: center;> > > border: 1px solid silver;> color: yellow;> background: green;> float: > > right;> }> </style>> > <script type='text/javascript' > > src="/public/js/jquery-1.1.4.js"></> script>> > </head>> <body>> > > > <h3>Kevin's Blah Test</h3>> > <div id="destDiv1">> <script > > language="JavaScript">> var s = "";> s += "<div id='ajaxLoader'>";> s += > > "<img src='/public/js/loader.gif' alt='Loading...' />"> s += "</div>";> > > $("#destDiv1").html(s);> > $.ajax({> url: '/public/blah1.htm?a=' + > > Math.random(),> type: 'GET',> dataType: 'html',> timeout: 60000,> error: > > function(a,b,c){> $("#destDiv1").html('Error loading channel'> + a + "|" + > > b + "|" + c);> },> success: function(thehtml){> // do something with HTML> > > $("#destDiv1").html(thehtml);> }> });> > </script>> </div>> > </body>> > > </html>> > Note:> > The blah1.htm has this:> > <div id="blah1"></div>> > > <script language="JavaScript">> alert("hi");> > > document.getElementById("blah1").innerHTML = "<strong>hi</strong>";> > > </script>> > Other than clean up code, making easier to read, adding my > > loader.gif> plus style, it is pretty much the same code but use jQuery to > > add the> html() so that any script tags are executed.> > If the problem > > persist, then you might want to describe the browser> you are testing it > > with. I tested the above with IE and FF.> > Hope this helps> > > PS: It was > > ajaxing so fast with my local server, to see the loader in> action, what I > > did was wrap the $.ajax() in a timer like so:> > setTimeout(function () {> > > > .. the above ajax statement ..> > },3000);> > --> HLS> > > _________________________________________________________________ > Invite your mail contacts to join your friends list with Windows Live Spaces. > It's > easy!http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friend...