Announcement

Collapse
No announcement yet.

Including Section Tree on 3rd party site

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

    Including Section Tree on 3rd party site

    Hi there

    I need to display the section tree generated by Actinic on a 3rd party (completely unconnected) website

    Am I right in thinking that as long as I include

    Code:
    <SCRIPT LANGUAGE="JavaScript" SRC="http://www.mainsite.com/acatalog/actiniccore.js" TYPE="text/javascript"></SCRIPT>
    <SCRIPT LANGUAGE="JavaScript" SRC="http://www.mainsite.com/acatalog/actinicextras.js" TYPE="text/javascript"></SCRIPT>
    in the head tags of the page together with the drop down box Javascript
    Code:
    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> 
    <!-- 
     
    function ACT_DropListBox(ar) 
    { 
    var strIDs = '<SELECT SIZE="1" NAME="ACT_droplstbox" CLASS="select_box" onChange="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 + '&ACTINIC_REFERRER=' + escape(location.href) + '">' + ar[i].sName + '</OPTION>'; 
    { 
    if (ar[i].pChild) 
    { 
    for (var j=1;j<=ar[i].pChild.length;j++) 
    { 
    strIDs += '<OPTION VALUE="' + ar[i].pChild[j].sURL + '&ACTINIC_REFERRER=' + escape(location.href) + '">' + '- ' + ar[i].pChild[j].sName + '</OPTION>'; 
    } 
    } 
    } 
    } 
    } 
    strIDs+='</SELECT>' 
    return strIDs 
    } 
    //--> 
    </SCRIPT>
    and then use
    Code:
    <script language=Javascript>document.write(ACT_DropListBox(section_tree))</script>
    to call the drop down list, this will both display correctly AND link the user back across to the main site (as intended)?

    Or do I need to include any other Javascript includes to generate the section tree?

    The problem I'm having is that this seems to punt them to the correct site but does NOT place them in the /acatalog directory, simply with the correct filename off the root directory

    Thanks

    Jos
    Thanks

    Jos Medinger

    Tel : 01978 843 962
    www.internetology.co.uk
    Actinic / E-Commerce Hosting, Design & SEO
    ______________________________________

    #2
    Actinic support had me link

    <SCRIPT LANGUAGE="JavaScript" SRC="../acatalog/actiniccore.js"></SCRIPT>
    <SCRIPT LANGUAGE="JavaScript" SRC="../acatalog/actinicextras.js"></SCRIPT>
    <SCRIPT LANGUAGE="JavaScript" SRC="Act_section_tree.js"></SCRIPT>
    <SCRIPT LANGUAGE="JavaScript" SRC="Act_sections.js"></SCRIPT>
    Owner of a broken heart

    Comment


      #3
      Hi Gary

      Those extra 2 lines are essential (I forgot to post them earlier) however in order for the drop down to be displayed, it has to be called from the actual URL it is generated on

      i.e. SRC="http://www.mainsite.com/acatalog/actiniccore.js" rather than with a relative link as per your example

      If I put the 4 in as per your example
      Code:
      <SCRIPT LANGUAGE="JavaScript" SRC="http://www.mainsite.co.uk/acatalog/actiniccore.js" TYPE="text/javascript"></SCRIPT>
      <SCRIPT LANGUAGE="JavaScript" SRC="http://www.mainsite.co.uk/acatalog/actinicextras.js" TYPE="text/javascript"></SCRIPT>
      <SCRIPT LANGUAGE="JavaScript" SRC="http://www.mainsite.co.uk/acatalog/Act_section_tree.js" TYPE="text/javascript"></SCRIPT>
      <SCRIPT LANGUAGE="JavaScript" SRC="http://www.mainsite.co.uk/acatalog/Act_sections.js" TYPE="text/javascript"></SCRIPT>
      I get exactly the same behaviour as before...

      1) The resolved link goes to

      www.3rdpartysite.com/link.html

      RATHER THAN

      www.mainsite.com/acatalog/link.html

      I wonder if there's some browser inteference from cross site scripting issues (probably security related?)

      Any one got any more suggestions?

      Jos
      Thanks

      Jos Medinger

      Tel : 01978 843 962
      www.internetology.co.uk
      Actinic / E-Commerce Hosting, Design & SEO
      ______________________________________

      Comment


        #4
        This could be because thier will be no actinic generated BASEREF in the external site
        Owner of a broken heart

        Comment


          #5
          Hi there,

          Please try the following:

          Where you want the dropdown list box to appear, rather than have it as:

          Code:
          <script language=Javascript1.1>document.write(ACT_DropListBox(sections))</script>
          Change it to read:
          Code:
          <form name="Act_SectionDroplist">
          <script language=Javascript1.1>document.write(ACT_DropListBox(sections))</script>
          </form>
          Try this and see if it makes a difference?

          Kind Regards
          Nadeem Rasool
          SellerDeck Development

          Comment


            #6
            Hi Nadeem

            This doesn't seem to make any difference

            You can see the actual behaviour happening on this site

            Any further ideas?

            Jos
            Thanks

            Jos Medinger

            Tel : 01978 843 962
            www.internetology.co.uk
            Actinic / E-Commerce Hosting, Design & SEO
            ______________________________________

            Comment


              #7
              What do the URLs look like in the .js file? What format are they in? Could you paste a few lines here?

              Comment

              Working...
              X