Javascript help needed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Javascript help needed

    HI there, I am very new to js and some help from experienced javascripters, below you will see a small snippet from my code that shows the pages to my online "BOOK"m what a want to do is just upload the pages from a uploader and the script below pickup the "pages in jpg" automatically. Is this possible??

    onlinebook.pages = [

    "pages/page-001.jpg",
    "pages/page-002.jpg",
    "pages/page-003.jpg",
    "pages/page-004.jpg",
    "pages/page-005.jpg",
    "pages/page-006.jpg",


    ];



    Thanks in advance

    #2
    Originally posted by phoenix90 View Post
    HI there, I am very new to js and some help from experienced javascripters, below you will see a small snippet from my code that shows the pages to my online "BOOK"m what a want to do is just upload the pages from a uploader and the script below pickup the "pages in jpg" automatically. Is this possible??

    onlinebook.pages = [

    "pages/page-001.jpg",
    "pages/page-002.jpg",
    "pages/page-003.jpg",
    "pages/page-004.jpg",
    "pages/page-005.jpg",
    "pages/page-006.jpg",


    ];



    Thanks in advance
    my js is a bit rusty, but i dont think so.
    first of all, the period "." is an operator. unless you are accessing a property, you need to change it.
    also the use of square brackets i think is wrong.

    try

    onlinebook_pages = array (
    "pages/page-001.jpg",
    "pages/page-002.jpg",
    "pages/page-003.jpg",
    "pages/page-004.jpg",
    "pages/page-005.jpg",
    "pages/page-006.jpg",
    );

    i might be missing a "new" somewhere but not too sure. im mostly into mobile so though i know js i dont really practice it. ive written some mean snippets though. really mean ones
    Last edited by frostymarvelous; 08.01.11, 14:43. Reason: removed a double post
    Perfection comes at a cost



    I accept liberty!

    Comment


      #3
      Hey, thanks. The code i submitted is working fine, just want it to auto fetch the files in that directory, rather me editing the file if i upload new pages ect

      Comment


        #4
        Please give more details about the process you want to achieve.

        Which directory are you referring to? the client's or yours?
        Perfection comes at a cost



        I accept liberty!

        Comment

        Working...
        X