Announcement

Collapse
No announcement yet.

Creating a Jump List Containing the Top-Level Sections

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

    Creating a Jump List Containing the Top-Level Sections

    This exercise will insert a drop-down list containing a list of top-level sections into the HTML of your store. As soon as a customer selects a section, they will jump to it.

    When presented to customers in the browser, the code becomes a drop-down list containing a list of the top-level sections.

    To include this, paste the following just above the </head> tag of your overall page layout:

    HTML Code:
    <actinic:variable name="JavaScriptArray" value="All Data From Top Level Sections" />
    
    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
    
    <!--
    
    /***********************************************************************
    *
    * ACT_DropListBox -returns a string containing the HTML for the SELECT listbox
    *
    ************************************************************************/
    
    function ACT_DropListBox(ar)
    
    {
    
    var strIDs = '<SELECT SIZE="1" NAME="ACT_droplstbox" onClick="if(options[selectedIndex].value) window.location.href=(options[selectedIndex].value)">'
    var sel = " SELECTED"
    
    strIDs += '<OPTION ' + sel + ' VALUE="">Select a Section</OPTION>'
    
    for (var i=1;i<=ar.length;i++)
    {
    if (ar[i].sURL !=null)
    {
    strIDs += '<OPTION VALUE="' + ar[i].sURL + '">' + ar[i].sName + '</OPTION>'
    }
    }
    
    strIDs+='</SELECT>'
    return strIDs
    }
    
    //-->
    
    </SCRIPT>

    Paste the following code within your store design where you want the drop-down list to appear.

    HTML Code:
    <form name="Act_SectionDroplist">
    <script language=Javascript1.1>document.write(ACT_DropListBox(sections))</script>
    </form>
Working...
X