ShootingBlanks Posted May 14, 2010 Share Posted May 14, 2010 Hello. I'm very new to JS, so this may not be a difficult thing... I have a bunch of files on a server that start with "ds_" then have a number then ".php". So, "ds_1.php", "ds_2.php", "ds_3.php", etc. The numbers are all in succession (and the first one will always be "ds_1.php"), but the total number that exist changes regularly. I need a "for" loop in javascript that will run through as many "ds_x.php" pages there are. So if there are pages for "ds_1.php" through "ds_5.php", then I need code that says: "For every page on the server from ds_1.php through ds_5.php, do something." Thanks for any help that can be offered!!! Quote Link to comment Share on other sites More sharing options...
Omirion Posted May 14, 2010 Share Posted May 14, 2010 I don't think there is any way of doing that as far as i know. But here's me thinking this would be easier to do with a simple php loop and inline the JS script in it. Not very efficient but should do the job. Quote Link to comment Share on other sites More sharing options...
ShootingBlanks Posted May 14, 2010 Author Share Posted May 14, 2010 I don't think there is any way of doing that as far as i know. But here's me thinking this would be easier to do with a simple php loop and inline the JS script in it. Not very efficient but should do the job. Yeah - I figured that would be the solution. Just checking if there was another way. Thanks, though! Quote Link to comment 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.