Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > JavaScript > pasteHTML for F...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 35551 of 36179
Post > Topic >>

pasteHTML for Firefox?

by geevaa <govivasanth@[EMAIL PROTECTED] > May 9, 2008 at 08:37 PM

Hi All,


Try the example javascript given in this link in IE and Firefox.
http://www.java2s.com/Code/JavaScript/Node-Operation/pasteHTMLExample.htm



<html>
<body>
<script language="JavaScript">
function function1() {
    var myRange = document.selection.createRange();
    var m = myRange.pasteHTML('<p>Hello World</p>');
}
</script>
<p>Highlight a part of this text, then click button below</p>
<input id="myB" type="button" value="Click me" onclick="function1();">
</body>
</html>





Its works only in IE and not in Firefox.
Is there is any Firefox equivalent coding to achieve the same
functionality which is working good in IE?

Thanks in advance.
 




 2 Posts in Topic:
pasteHTML for Firefox?
geevaa <govivasanth@[E  2008-05-09 20:37:33 
Re: pasteHTML for Firefox?
Bart Van der Donck <ba  2008-05-12 00:37:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 5 19:24:36 CDT 2008.