Jump to content

Javascript while loop help!


DNA180

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...