Can you post the html you are trying to append? It sounds like you might have
found a bug but seeing as how I can append fine with the simple samples
given there might be some sort of problem in your appended markup that is
triggering it.


ja-6 wrote:
> 
> 
> Karl,
> 
> Thanks for the help, but it didn't seem to work. Any other
> suggestions?
> 
> Josh
> 
> On Nov 2, 1:49 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>> Hi there,
>>
>> Instead of this:
>>
>> > var my_var = "<div>HI</div>";
>>
>> try this:
>>
>> var my_var = $("<div>HI</div>");
>>
>> Hope that helps.
>>
>> --Karl
>> _________________
>> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>>
>> On Nov 2, 2007, at 1:53 PM, ja wrote:
>>
>>
>>
>> > I'm dynamically inserting html into a page that only contains an
>> > image. Such as...
>> > <html>
>> >  <body>
>> >    http://my_domain.com/my_image.jpg 
>> >  </body>
>> > </html>
>>
>> > my script has a large amount of html that i want to insert. the html
>> > is stored in a variable . Such as..
>> > var my_var = "<div>HI</div>";
>> > (the actual html is much larger and more complicated than my example)
>>
>> > I then have..
>> > $('body').append(my_var);
>>
>> > which you would think would insert the html into the page. it doesn't,
>> > instead it just inserts it as text. The source in Firebug is now...
>> > <html>
>> >  <body>
>> >    http://my_domain.com/my_image.jpg 
>> >   <DIV><div>HI</div>
>> >  </body>
>> > </html>
>>
>> > NOTE: that extra div that's all CAPS, isn't a typo. jquery inserts
>> > that for some reason and I don't know why.
>> > The page doesn't render the "<div>HI</div>" as html, it displays it as
>> > plain text.
>> > If I use the same code on a page that has some more to it, like
>> > google's homepage, the extra "<DIV>" isn't there and my html gets
>> > inserted properly (not as text).
>>
>> > any clues as to why? is this a bug? am I missing some aspect of web
>> > pages when they are only images?
>> > Thanks in advanced for your help.
>> > Josh
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Advanced-Problem---Any-takers--tf4739677s27240.html#a13556911
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to