473,382 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Change Font

Hello.

I have one TextBox and one CheckBox on my web page, now when I click on the
CheckBox I want to change font (depends on CheckBox state) of my TextBox
wuth JavaScript.
How can I do this?

Thank you.
Nov 19 '05 #1
1 1234
Make Css classes and handle the checkbox's onclick event:

<asp:checkbox ... onclick="clicked(this)" ... />

javascript:

function clicked(chBox){
if (chBox.checked)
myForm.txtBox.className="CssForChecked";
else
myForm.txtBox.className="CssForUnChecked";
}

Eliyahu

"David Dvali" <da*********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hello.

I have one TextBox and one CheckBox on my web page, now when I click on the CheckBox I want to change font (depends on CheckBox state) of my TextBox
wuth JavaScript.
How can I do this?

Thank you.

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: S.W. Rasmussen | last post by:
A trivial (?) question: does anyone know how to change the shape of the cursor in a RichTextBox control from the normal vertical line to an underscore?
3
by: BKM | last post by:
Is there a way that I can change the default font in VB6 so I don't have to constantly change the font of each new control that I add to my project?
16
by: Coder Droid | last post by:
I'm trying my first table-less site, and I've bumped my head up against a wall. I can't change the font size within a div. Real quick, my style sheet has: -------------------------------------...
9
by: Dr John Stockton | last post by:
Assuming default set-ups and considering all reasonable browsers, whatever that may mean, what should an author expect that his readers in general will see (with visual browsers) for a page with...
3
by: (Pete Cresswell) | last post by:
I'd like to have SQL come up in a mono-spaced font like Courier New. Anybody been able to do this? -- PeteCresswell
2
by: Hariharan S | last post by:
Hi Guys, Have an issue with the Font object. I have a text box in which I can enter text and I have included a small button which upon selection, should enable me to change the newly entered...
2
by: Jim | last post by:
Working with VB.net under VS.Net 2003. Have a simple form with a Button1. I want to change the font on the button when the button is clicked. Is there a way to Dynamically change the Font for...
3
by: Phil Stanton | last post by:
Correct me if I'm wrong, but is it impossible to change the font in a report field when in print preview (MDE database) or can it only be done in design view in the MDB database. Part of my...
5
by: _Who | last post by:
I spent all day yesterday trying different things. Something has happened so I can't change font size. I have a table and in the first cell I have only text. I tried using the cell's Style...
18
by: wizdom | last post by:
Help - change text on click - text has another onclick inside with php variables ---------- I think what I'm trying to do is simple. I have a 2 buttons on a page. 1 button allows a thread of...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.