MDanz Posted July 26, 2011 Share Posted July 26, 2011 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.