#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Syd or UK
    Posts
    21
    Rep Power
    0

    Question simple answer to this array problem?...


    Hello,
    Im sure theres a simple solution to this...
    Havent been able to work it out... rather frustrating.
    Im not a very proficient coder - well for JS anyhow.

    My website has this array created dynamically in the webpages... based on which page it is...

    Code:
    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
    <!-- 
    var child_sections = new CreateArray(3);
    child_sections[1].sName = "Books";
    child_sections[1].sURL = books.html";
    child_sections[1].sImage = "";
    child_sections[1].nSectionId = "5";
    child_sections[1].nImageWidth = "0";
    child_sections[1].nImageHeight = "0";
    child_sections[2].sName = "Office Furniture";
    child_sections[2].sURL = Office_furniture.html";
    child_sections[2].sImage = "office_furniture.gif";
    child_sections[2].nSectionId = "1";
    child_sections[2].nImageWidth = "150";
    child_sections[2].nImageHeight = "150";
    child_sections[3].sName = "Office Supplies";
    child_sections[3].sURL = "Office_supplies.html";
    child_sections[3].sImage = "office_supplies.gif";
    child_sections[3].nSectionId = "2";
    child_sections[3].nImageWidth = "150";
    child_sections[3].nImageHeight = "150";
    // -->
    </SCRIPT>
    what i want to do with the information in this array is to create some simple navigation - vertical text links.

    eg:

    books
    office furniture
    office supplies

    All ill need from this array for now is the .sURL and .sName values. I need to create a loop which will dynamically create the links on the pages - for future expansion of my site.

    Ive looked at loops and document.write... etc but i cant figure it out.

    Can anyone help?

    Much appreciated,

    Jay-Dee
  2. #2
  3. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    Well, I see you found the right forum for this. I'll go post my reply there.
    Last edited by bricker42; October 24th, 2002 at 12:36 PM.
    -james

IMN logo majestic logo threadwatch logo seochat tools logo