Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: SV: Mac/Apple TextArea Issue


Message #1 by "Robert Nyman" <robert.nyman@c...> on Fri, 27 Sep 2002 12:22:41 +0200
Well, as far as I know, textRanges only work on Win 32.

But if you took the value in a textarea box or input field, and then
used innerText or innerHTML (depending on what you want to do):

var oCell =3D document.getElementById("aTableCell");
var strTextValue =3D document.getElementById("theValueElement").value;
oCell.innerHTML =3D "<b>" + strTextValue + "</b>";


Not exactly what you want, I know, but that's the closest I can think of
right now...


/Robert



-----Ursprungligt meddelande-----
Fr=E5n: Amardeep Kanwar [mailto:amardeep@h...]
Skickat: den 26 september 2002 22:04
Till: JavaScript HowTo
=C4mne: [javascript_howto] Mac/Apple TextArea Issue


Hi,

I have code like

var oTR =3D document.selection.createRange();
oTR.text =3D "<B>" + oTR.text + "</B>";

It gets executed when i click on the bold button, if i have any text
selected in my textarea. and it adds <B>tags to the front and back of
that
text as you can see.

I am trying to make this thing work on Macintosh/Apple computes,
operating
system i have is OS 9.2 with ie 5.1.1 on it.

Is there a way to do this thing? All the help will be greatly
appreciated.

Thanks

Amardeep

---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20


  Return to Index