Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Format text inside the Alert Box? Urgent

Hi!! i have a script for caps lock on which will alert when caps lock on..The problem is the alert is in 2 lines & the first line text has to be bold.i am not sure how to do that?Can some one help me if anything could be done to manipulate the alert method itself

or

create a hidden html table/div that includes the warning message
position and show the hidden warning message based on the "onkeypress" method
hide the message when caps lock is no longer on


Can some one give me an exaple or sample code as to how this could be achieved?
ASAP Pleaseeeeeeeeeee
Thanks



Comments

  • aaronjones3593aaronjones3593 Member Posts: 122
    [b][red]This message was edited by aaronjones3593 at 2006-5-5 6:28:21[/red][/b][hr]
    : Hi!! i have a script for caps lock on which will alert when caps lock on..The problem is the alert is in 2 lines & the first line text has to be bold.i am not sure how to do that?Can some one help me if anything could be done to manipulate the alert method itself
    :
    : or
    :
    : create a hidden html table/div that includes the warning message
    : position and show the hidden warning message based on the "onkeypress" method
    : hide the message when caps lock is no longer on
    :
    :
    : Can some one give me an exaple or sample code as to how this could be achieved?
    : ASAP Pleaseeeeeeeeeee
    : Thanks
    :
    :
    :
    :
    second method would be better

    [code]
    CAPS LOCK IS ON




    document.getElementById("divWarning").style.display = "none";

    function txtKP()
    {
    if ([red]caps is on[/red])
    {
    document.getElementById("divWarning").style.display="";
    }
    else
    {
    document.getElementById("divWarning").style.display="none";
    }
    }




    [/code]

    adapt red bit for determining if caps is on

    EDIT: Forgot to include JScript statement to hide warning message when page loads, added before function.
Sign In or Register to comment.