By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,712 Members | 2,063 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,712 IT Pros & Developers. It's quick & easy.

Problems with pasteHTML

P: n/a
I'm running this line of code:

oTarget.pasteHTML(formattedHtmlText);

where oTarget is a text range object.

When formattedHtmlText is, say, "<STRONG><BUTTON
class=placeHolder>[[ContAmt]]</BUTTON>&nbsp;text</STRONG>" the HTML is
pasted properly and the UI is changed accordingly.

However, if formattedHtmlText is "<BUTTON
class=placeHolder>[[ContAmt]]</BUTTON>&nbsp;text" the HTML is not
pasted and there is no change in the UI.

The text is being pasted into a <div> tag.

Any thoughts? Thanks!

Sep 19 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
you can not paste a 'class'

a class hangs on higher interpretation.

------------------------

also' your' &nbsp; [non breaking space]

is indication,that you have not even a clue
about markup.

----------------------

where do you live? JAMAICA
======================

Let's call your question the jamaica sway

"colinhumber" <co*********@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
I'm running this line of code:

oTarget.pasteHTML(formattedHtmlText);

where oTarget is a text range object.

When formattedHtmlText is, say, "<STRONG><BUTTON
class=placeHolder>[[ContAmt]]</BUTTON>&nbsp;text</STRONG>" the HTML is
pasted properly and the UI is changed accordingly.

However, if formattedHtmlText is "<BUTTON
class=placeHolder>[[ContAmt]]</BUTTON>&nbsp;text" the HTML is not
pasted and there is no change in the UI.

The text is being pasted into a <div> tag.

Any thoughts? Thanks!


Sep 20 '05 #2

P: n/a
commercial said the following on 9/20/2005 3:57 AM:
you can not paste a 'class'

a class hangs on higher interpretation.

------------------------

also' your' &nbsp; [non breaking space]

is indication,that you have not even a clue
about markup.
And your reply is indication that your IQ is smaller than your foot size.
----------------------

where do you live? JAMAICA
What does that have to do with anything? Other than your lack of
intelligence?

======================

Let's call your question the jamaica sway


Lets call your answer "stupid".
<--snip-->

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
Sep 20 '05 #3

P: n/a
Well, a couple things. First off, what class are you talking about? The
formatHtmlText is a string. Second, the &nbsp; was put in there
automatically by the IE HTML engine, not me.

Sep 20 '05 #4

P: n/a
Randy Webb wrote:
What does that have to do with anything? Other than your lack of
intelligence?

+-------------------+ .:\:\:/:/:.
| PLEASE DO NOT | :.:\:\:/:/:.:
| FEED THE TROLLS | :=.' - - '.=:
| | '=(\ 9 9 /)='
| Thank you, | ( (_) )
| Management | /`-vvv-'\
+-------------------+ / \
| | @@@ / /|,,,,,|\ \
| | @@@ /_// /^\ \\_\
@x@@x@ | | |/ WW( ( ) )WW
\||||/ | | \| __\,,\ /,,/__
\||/ | | | (______Y______)
/\/\/\/\/\/\/\/\//\/\\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
================================================== ================

<http://en.wikipedia.org/wiki/Internet_troll>
Sep 22 '05 #5

P: n/a
Daniel Kirsch wrote in message news:dg*************@news.t-online.com...
Randy Webb wrote:
What does that have to do with anything? Other than your lack of
intelligence?

+-------------------+ .:\:\:/:/:.
| PLEASE DO NOT | :.:\:\:/:/:.:
| FEED THE TROLLS | :=.' - - '.=:
| | '=(\ 9 9 /)='
| Thank you, | ( (_) )
| Management | /`-vvv-'\
+-------------------+ / \
| | @@@ / /|,,,,,|\ \
| | @@@ /_// /^\ \\_\
@x@@x@ | | |/ WW( ( ) )WW
\||||/ | | \| __\,,\ /,,/__
\||/ | | | (______Y______)
/\/\/\/\/\/\/\/\//\/\\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
================================================== ================


where is the "jgs" attribute in this ascii??? someone removed it???
http://www.geocities.com/SoHo/7373/please.htm
give the author credit where credit is due.

why do I say that?
http://www.geocities.com/SoHo/7373/people.htm#troll

see http://www.france-echecs.com/index.p...50907165024612
and http://forum.java.sun.com/thread.jsp...sageID=3285693
(about the 5th entry on both)
or an older one
http://groups.google.com/group/news....6?dmode=source
Sep 22 '05 #6

P: n/a
Robi wrote:
where is the "jgs" attribute in this ascii??? someone removed it???


Seems so:
http://jni.sdf-eu.org/trolls.html
Sep 23 '05 #7

P: n/a
Daniel Kirsch said the following on 9/22/2005 2:33 AM:
Randy Webb wrote:
What does that have to do with anything? Other than your lack of
intelligence?

<http://en.wikipedia.org/wiki/Internet_troll>


That is totally hilarious with all things considered, now go away.

Especially considering that you did not answer my question.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Sep 23 '05 #8

P: n/a
Randy Webb wrote:
That is totally hilarious with all things considered, now go away.

Especially considering that you did not answer my question.


"commercial" writes messages like that in several newsgroups. My message
was only a request to not give him any attention and a link to a
description "why not".
I didn't want to offend anyone else - especially not you.

Cheers
Daniel
Sep 23 '05 #9

P: n/a
Daniel Kirsch said the following on 9/23/2005 6:50 AM:
Randy Webb wrote:
That is totally hilarious with all things considered, now go away.

Especially considering that you did not answer my question.

"commercial" writes messages like that in several newsgroups. My message
was only a request to not give him any attention and a link to a
description "why not".
I didn't want to offend anyone else - especially not you.


None taken.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Sep 23 '05 #10

P: n/a
colinhumber wrote:
Well, a couple things. First off, what class are you talking about? The
formatHtmlText is a string. Second, the &nbsp; was put in there
automatically by the IE HTML engine, not me.


I don't know if you got your answer yet, but just off the top
of my head , if giftwrapping the button in <strong> container
made it work, how about just gift wrapping it in another container
(<span> or such) and see if that makes it happy.


--
--.
--=<> Dr. Clue (A.K.A. Ian A. Storms) <>=-- C++,HTML, CSS,Javascript
--=<> http://resume.drclue.net <>=-- AJAX, SOAP, XML, HTTP
--=<> http://www.drclue.net <>=-- SERVLETS,TCP/IP, SQL
--.
Sep 23 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.