PDA

View Full Version : Javascript array to static html



flyingmunky25
October 3rd, 2008, 02:22 PM
Hi All,
I'm looking for a way to take a javascript array from a .js file, and process it to create a single html page per item in the array.
I have looked at the options of writing a script in c++ or c# or some other language to process the file, but i was wondering if anyone knew of something thats already made or a program that would do this.

Thanks!

flyingmunky25
October 3rd, 2008, 02:33 PM
i probably should have elaborated some more
This script holds a bunch of data and the html file pulls out the different elements it needs and creates a table in html.

the .js file is pretty much just a large database since we do not have any server-side scripting here or database access.

dubstylee
October 3rd, 2008, 05:17 PM
do you actually need html files or can you do a document.write

flyingmunky25
October 3rd, 2008, 10:56 PM
i actually need the html files. for whatever reason that i don't know, my job requires them. they want the pages done with the javascript and also just plain old html pages.

TorrentSearch
October 12th, 2008, 07:21 AM
Is this what you're looking for?
http://coding.derkeiler.com/Archive/Perl/perl.beginners/2004-06/0796.html
Or does it have to be Javascript?

Is this similar to what you want to do?
http://www.w3schools.com/html/tryit.asp?filename=tryhtml_basic

donnaj867
June 22nd, 2010, 08:53 PM
Hi !
I've just visited this forum. Happy to get acquainted with you. Thanks.

HelenaP
June 23rd, 2010, 12:42 PM
WTF happened to my post? JFC...

rocksparow
July 12th, 2010, 09:50 AM
An array is a special variable, which can hold more than one value, at a time.

cars1="Saab";
cars2="Volvo";
cars3="BMW";

Praneet
September 19th, 2010, 10:51 PM
Yes arrays can hold more variables ,
char cars[3]={'Saab','Volvo','BMW'}; //this is a array.(C++)
here char is a datatype of cars, which is a variable holding 3 values
now to access 'Saab' you should use-
cars[0], and to access BMW cars[2]
cars[3] is the variable to declare the end of values.