Results 1 to 2 of 2

Thread: Changing Style Class in Netscape

  1. #1

    Thread Starter
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861

    Changing Style Class in Netscape

    I created a custom textbox control in .NET, which calls a javascript function whent he control gets the focus. The function get's the contorls css className then adds the word "_Selected" on the end
    So a control whose cssClass (className) is "textBox", would then have it's className changed to "textBox_Selected".

    Everything works fine in Internet Explorer, but not in Netscape. So I was curious if anyone new why?

    Here is the javascript function
    VB Code:
    1. function activeField(ptr)
    2. {
    3.    'Get the current cssStyle
    4.    var myClass = ptr.className;
    5.  
    6.    if((ptr.disabled != true) && (ptr.readOnly != true))
    7.    {
    8.       'Append '_Selected' to the current cssStyle
    9.       ptr.className = myClass + '_Selected';
    10.    }
    11. }
    When the control get's the focus, the color just changes to white, however, it should change to a light brown.
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  2. #2
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    The function looks fine to me, except for how you're written your comments. I'm suprised it even workied in IE.
    You probably added those comments just now though.

    The only other thing I can think of is that NS doesn't support this yet or that or displayes the colour differently to IE, try something like black, see what happens then.
    Have I helped you? Please Rate my posts.

Posting Permissions

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



Click Here to Expand Forum to Full Width