Results 1 to 9 of 9

Thread: Javascript array to static html

  1. #1

    ZeroPaid Regular

    Join Date
    Feb 2008
    Location
    USA
    Posts
    36

    Javascript array to static html

    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!

  2. #2

    ZeroPaid Regular

    Join Date
    Feb 2008
    Location
    USA
    Posts
    36
    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.

  3. #3
    dubstylee's Avatar

    CEO, Zeropaid Inc.

    Join Date
    Apr 2002
    Location
    SD CA
    Posts
    600
    do you actually need html files or can you do a document.write
    "Those who make peaceful revolution impossible will make violent revolution inevitable."
    - John F. Kennedy

    knofun

  4. #4

    ZeroPaid Regular

    Join Date
    Feb 2008
    Location
    USA
    Posts
    36
    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.

  5. #5
    TorrentSearch's Avatar

    Zeropaid Noob

    Join Date
    Oct 2008
    Location
    here
    Posts
    17
    Is this what you're looking for?
    http://coding.derkeiler.com/Archive/...4-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....=tryhtml_basic

  6. #6
    donnaj867

    Guest
    Hi !
    I've just visited this forum. Happy to get acquainted with you. Thanks.

  7. #7
    HelenaP's Avatar

    go luath.. céanna go luat

    Join Date
    Jun 2007
    Location
    An bealach fada chun an bhaile
    Posts
    6,090
    WTF happened to my post? JFC...

    The most Beautiful thing we can experience is the mysterious.
    It is the source of all true art and science.
    ~ Albert E.


  8. #8

    Zeropaid Noob

    Join Date
    Jul 2010
    Posts
    1
    An array is a special variable, which can hold more than one value, at a time.

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

  9. #9
    Praneet's Avatar

    ZeroPaid Regular

    Join Date
    Sep 2010
    Location
    India
    Posts
    14
    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •