Click to See Complete Forum and Search --> : similar scripts/pages


z_mirza
04-14-2003, 09:33 PM
i have 3 html and 3 script pages that are almost identical minus the data in the arrays, i want to kno how i can combine this into like 1 thing. im not big on the tech words but i hope you get what im saying

any help would be great. ive inclueded the html and js files so you can get an idea of how they are reapeating themselves. thanx alot

Nevermore
04-15-2003, 05:13 AM
You mean you want to create a file with the JavaScript in, and link to it?

z_mirza
04-15-2003, 03:00 PM
well i want to some how combine the 3 script files and the 3 html files so i dont end up with sooo many files

DrDaMour
04-15-2003, 09:33 PM
<script src="url"></script> will import a script like a #include in c++ you could use that.

z_mirza
04-15-2003, 09:44 PM
ok let me put it this way, all 3 of the script files would be in the same file yet the arrays would hold diff values and iby clicking on a certain link it would tell the script which array it needed. all the methods and stuff would stay in 1 script not 3 seperate files maybe that cleard some confuson

DrDaMour
04-15-2003, 09:57 PM
yeah create teh array in teh base file to be included, then set the values in the actual html file.

<script src="url">

[index]=value
..
..

</script>

khalidali63
04-16-2003, 12:13 AM
Take a look, if this works out for you.

Cheers

Khalid