change text in input box - Programmers Heaven
It looks like you're new here. If you want to get involved, click one of these buttons!
C and C++
Delphi and Kylix
DirectX Game dev
Newbie Game Programmers
Database & SQL
Sound & Music
FreeLance Software City
Join the Team
Comments on this site
New programming languages
Off topic board
Mobile & Wireless
Operating Systems & Platforms
Embedded / RTOS
Windows CE & Pocket PC
Quality & Testing
Active Server Pages
HTML & WEB-Design
WEB-Services / SOAP
change text in input box
im new in php codes
i just wanna ask if someone know how to change the text inside the input box?
for an example:
if user insert text in the input box
the input box view the text type=arial & text size=1
can I do that?
Share on Facebook
: im new in php codes
: i just wanna ask if someone know how to change the text inside the input box?
: for an example:
: if user insert text in the input box
: the input box view the text type=arial & text size=1
: can I do that?
You would have to implement a function of one of the possible events associated with textboxes.
like onChange or onBlur = "doChanges(this)"
If you can explain what you want I could tell you how.
Share on Facebook
I think you mean you want to change the styles of the input box...?
You should do that with CSS. If you start with webprogramming you should know that there are three different sections you have to take care of.
The first is the server side language. If you have a simple static site you won't be needing it, but since you are on the php board here I figure you are using PHP as server side script. In this section the HTML page is build, you can merge it with data from your database or files on your server. All is merged to one file wich is spit out by the server and sent to the client (the browser)
The third section is the CSS (Cascading stylesheet) Your HTML get's it lookes here. THe containers get backgroundcolors, borders, background images, margins, paddings etc... Containers can be repositioned etc.
So to come back to your question... You don't change the looks of an input tag with php, you use CSS to do that.
include a css file in the head of your html page:
or use an inline stylesheet
or really do it crappy with inline styles...
You'd best use a combination. Styles that are used in the whole site go in the stylesheet, styles that are only relevant to this single page can go in a style tag, and styles that are only relevant for one element go inline. (Best minimize this last one, and maximize the first one)
to set the styles for you input tags :
font-family : Verdana, Helvetica, Sans-serife;
font-size : 80%;
If you want to change only some textboxes use classes and id's
background-color : #FF0000;
background-color : #00FF00;
hope you now understand enough to really get into webprogramming...
: : hello
: : im new in php codes
: : i just wanna ask if someone know how to change the text inside the input box?
: : for an example:
: : if user insert text in the input box
: : the input box view the text type=arial & text size=1
: : can I do that?
: You would have to implement a function of one of the possible events associated with textboxes.
: like onChange or onBlur = "doChanges(this)"
: If you can explain what you want I could tell you how.
Share on Facebook
Programmers Heaven articles
Programmers Heaven files
Programmers Heaven uploaded content
Programmers Heaven C Sharp ebook
Operated by CommunityHeaven LLC
- All rights reserved.