DNA180 Posted September 24, 2013 Share Posted September 24, 2013 Into a php page I have 20 text boxes. I want to make a button, using javascript, and when user clicks on it the rest 19 text boxes to take 1st text box's text. I have done something like this but it isn't working... Any idea??? function Throw_PhotoStuff(){var pcount=1; while(pcount<20;){document.getElementById('photo_'+pcount).value = document.getElementById('photo_1').value; pcount++;}} Thank you for your precius time!!! Link to comment Share on other sites More sharing options...
DNA180 Posted September 24, 2013 Author Share Posted September 24, 2013 It's OK I found it... It was a syntax error. I should remove the semicolon from while(pcount<20;) to while(pcount<20). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now