Drop Down box to textbox
Hi
I have a textbox and a drop-down box which does nothing at the moment.
The drop down box has a list of fonts. I am trying to get the font in the textbox to change when the user chooses using the drop-down box.
Can someone give me an easy way to do this??? If it's not easy, just give me the script anyway. Thanks alot.
(To see my page at the moment visit)this link
kb posted this at 22:56 — 3rd November 2004.
He has: 1,380 posts
Joined: Feb 2002
I was having the same problem...
All i know is...you're not gonna change the font IN the box...you're going to add tags to format it when displayed. However, i don't know how to insert tags where teh cursor is.
I'd be interested as well.
Abhishek Reddy posted this at 02:05 — 4th November 2004.
He has: 3,348 posts
Joined: Jul 2001
You can change the font for the whole box. Access the font-family property of the box's style.
But you can't change the font for parts of the box's content, afaik, without resorting to a rich text box. There are many products that offer this sort of thing, even cross-browser solutions. I think you'll find some here: http://hotscripts.com/JavaScript/Scripts_and_Programs/Text_Effects/index.html
We did hammer out a script similar to this some time ago on here... search a little in Web Page Authoring or Webmaster's Corner and see if you find anything interesting.
Also, in a previous thread you mentioned you wanted this for homework, I think; if it is homework that you're supposed to do yourself, we'd have to be careful not to do it for you, so a notice from you may be fair.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.