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; } } Quote Link to comment https://forums.phpfreaks.com/topic/242892-javascript-and-css-change-width-help/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.