|
-
Apr 6th, 2004, 03:01 PM
#1
Thread Starter
Frenzied Member
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:
function activeField(ptr)
{
'Get the current cssStyle
var myClass = ptr.className;
if((ptr.disabled != true) && (ptr.readOnly != true))
{
'Append '_Selected' to the current cssStyle
ptr.className = myClass + '_Selected';
}
}
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
-
Apr 6th, 2004, 05:24 PM
#2
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|