Change <div> text color & font without refreshing page
Expand Post »
I need quick help, its urgent for my job, pls help me.
I need to change the font color, font size & font face of some text assigned in a div. To do so I have a form select option menu at the top, adn below the menu three's 3/4 divs with some text. I need to change text properties of the div from select menu, and the page must not refresh. Its actually a little version of text editor.
I'll be glad if someone solves it ASAP.
Koyel555, I think you might need to give your controls some more thought. You say there are several divs and several factors (font, color, size) but you only mention one control - a select menu.
It depends exactly what you want but you may need one menu per div, and possibly one menu per factor per div.
Another way of diing it would be to have a single set of controls (one per factor) and a way to signify an "active" div on which they operate - one div at a time.
It is certainly hard to see how a single select menu would offer adequate control.
Airshow
Last edited by Airshow; Aug 16th, 2009 at 9:45 pm.
Koyel555, I think you might need to give your controls some more thought. You say there are several divs and several factors (font, color, size) but you only mention one control - a select menu.
It depends exactly what you want but you may need one menu per div, and possibly one menu per factor per div.
Another way of diing it would be to have a single set of controls (one per factor) and a way to signify an "active" div on which they operate - one div at a time.
It is certainly hard to see how a single select menu would offer adequate control.
Airshow
Ahh....yes! I clumsily forgot to place .style before the .color or any other property. Wouldn't be the first time...
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline:add to div