SEO Software
Closed Thread
Results 1 to 8 of 8

Thread: how to change the color of lable in html?

  1. #1

    Question how to change the color of lable in html?

    hi..i tried to do validation and at that time which ever textbox in the form doesnot validate then there have a lable which i put so if text is not valid then i want to change the color of that lable...can anyone plzz suggest me how to change lable color in html?


  2. Micro Niche Builder

  3. #2
    PromoJunkie Staff Kay has a reputation beyond repute Kay has a reputation beyond repute Kay has a reputation beyond repute Kay has a reputation beyond repute Kay has a reputation beyond repute Kay has a reputation beyond repute Kay has a reputation beyond repute Kay has a reputation beyond repute Kay has a reputation beyond repute Kay has a reputation beyond repute Kay has a reputation beyond repute Kay's Avatar
    Join Date
    Dec 2008
    Location
    US
    Posts
    2,055
    Thanks
    158
    Thanked 187 Times in 131 Posts
    Blog Entries
    11

    Default

    jtndr, I'm not sure what label you're talking about. Is there any way you can show it to us to give us a better idea? Thanks. And welcome aboard.

    Please press the "Thanks" Button in posts you like, don't post to say "Thanks".

  4. #3

    Default

    i think what he really mean here was that -when a user input an invalid in the text box inside the form - this user will know what exactly he miss upon filling up the form if he sees the highlighted box, is this right mister?

  5. #4

    Default

    u can do it in following manner.
    Code:
    <html>
    <script language=javascript>
    function ifun()
    {
    	var lbl=document.getElementById("lb");
                  lbl.style.color='red';
    }
    <body>
    <input type=text name=t onblur="fun">
    <label id="lb">Hiii</label>
    </body>
    </html>

  6. The Following User Says Thank You to sanky12ka4 For This Useful Post:

    Kay (05-19-2009)

  7. #5

    Question

    Quote Originally Posted by jtndr View Post
    hi..i tried to do validation and at that time which ever textbox in the form doesnot validate then there have a lable which i put so if text is not valid then i want to change the color of that lable...can anyone plzz suggest me how to change lable color in html?
    i am not getting for what perpose you want to do....?
    and also actually which color do you want to change.....
    can you explain me....?

  8. #6

    Wink

    Quote Originally Posted by jtndr View Post
    hi..i tried to do validation and at that time which ever textbox in the form doesnot validate then there have a lable which i put so if text is not valid then i want to change the color of that lable...can anyone plzz suggest me how to change lable color in html?
    we have to use font attribute and then change the property of font color what we wish.

    Quote Originally Posted by whatthehell View Post
    i think what he really mean here was that -when a user input an invalid in the text box inside the form - this user will know what exactly he miss upon filling up the form if he sees the highlighted box, is this right mister?
    yes. I am agree with it .we have to put this type condition to alert the user

    how to create html yahoo page and other applications.so other can not hack the yahoo.
    Last edited by Kay; 05-19-2009 at 09:30 PM. Reason: no need for THREE posts. Posts merged and post padding infraction given.

  9. #7

    Lightbulb

    Quote Originally Posted by djk View Post
    how to create html yahoo page and other applications.so other can not hack the yahoo.
    hmm....
    nice topic...
    but for that you have to learn anti hacking system....
    i think it is more preferable to you.........

  10. #8

    Default

    Do you want to change
    colour dynamically?
    Or Set Only single colour for that label.

Closed Thread

Similar Threads

  1. change table align
    By ruchi_patel in forum Databases
    Replies: 7
    Last Post: 06-20-2009, 02:59 PM
  2. which is your best color?
    By MGM840 in forum General Discussion
    Replies: 10
    Last Post: 02-24-2009, 09:04 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts