Jump to content

javascript and CSS change width help


MDanz

Recommended Posts

When the function is called it should change the width in div 'add' but it does nothing?

 

#add {
overflow:hidden;
float:left;
margin-right:5px;
border:1px solid black;
}

 

newfield = 0;

function add() {

if(newfield!=6) {
var hundred = 100;
var newval = parseInt(newfield)*parseInt(hundred);
document.getElementById('add').style.width = newval;
newfield += 1;
}else {
         document.form.add.disabled=true;
    }
}

Link to comment
https://forums.phpfreaks.com/topic/242892-javascript-and-css-change-width-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.