By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,940 Members | 1,522 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,940 IT Pros & Developers. It's quick & easy.

CSS and javascript

P: n/a

I would like to dynamically change an object's style in javascript but I
didn't manage to do that.
Here is an sample of my javascript code :

function checkFileName(object) {
var pattern = "<%=pr.getFiltrePhoto()%>";
if (!object.value.match(pattern)) {
object.form["myInputButton"].disabled = true;
//object.form["myInputButton"].class = 'MyDisabledClassStyle';
else {
object.form["myInputButton"].disabled = false;
//object.form["myInputButton"].class = 'MyEnableClassStyle';

I didn't manage to access to the "class" properties. Is there a way to
affect a predefined class style to an object ?


Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
all right, I found the good property ! className

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.