Announcement

Collapse
No announcement yet.

javascript top sections menu not working

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

    javascript top sections menu not working

    does the javascript top level sections menu from the advanced user guide only work when you upload?

    i pasted the correct script into the <head>

    and the script in the body to create the menu.....but it just displays the text....advanced user guide - 35

    am i missing something or are there problems with cutting and pasting the script from the pdf?

    #2
    It should work in preview - check your code.

    Comment


      #3
      .but it just displays the text....advanced user guide - 35
      Yes - this is the problem, and yes there are many problems cutting and pasting code from the pdf version of the AUG, including page numbers being included and line breaks occurring in the wrong places.

      If you go back to the support/downloads page, you will find an optional word copy of the AUG that you can download - cutting and pasting from this word version is safe and effective.
      Bill
      www.egyptianwonders.co.uk
      Text directoryWorldwide Actinic(TM) shops
      BC Ness Solutions Support services, custom software
      Registered Microsoft™ Partner (ISV)
      VoIP UK: 0131 208 0605
      Located: Alexandria, EGYPT

      Comment


        #4
        hi thanks for the reply.

        ive looked on....http://www.actinic.com/documentation.html

        they're all pdf's...cant see no word docs?.

        am i on the right page....or do you know which parts of the script paste incorrectly?

        Comment


          #5
          this is the script as it has been pasted into my act primary html page

          <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>

          there doesnt appear to be anything out of place....surely if there was a problem with it it would give an error rather than just not showing it.

          here is a live page where i am trying it out....you will see the menu on the left is not showing

          http://www.s172585708.websitehome.co...log/Index.html

          Comment


            #6
            javascript top sections not working

            i found another post on this which had the same problems as me...the unterminated string constant and create array undefined

            i follow what instructions there were on this thread
            http://community.actinic.com/showthr...t+top+sections

            but it still does not work.

            any help plz

            Comment


              #7
              All you've posted above is the function that returns the HTML code to the calling program.

              You also need a bit more code (somewhere in the page BODY) to call this function and display the results. Double-check the documentation for that.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Hi norman,

                i only posted that script as im presuming this is what is causing the error.....i do have the script in the body to call the menu...but its only a small amount of script so i guessed the error must be in the formatting of the other part.

                thanks.

                Comment


                  #9
                  In the first post, you are talking about the javascript menu links, in post #5 you have the code for populating a dropdown selection box.

                  The word Advanced User Guide is still available on the Actinic site at http://downloads.actinic.com/docs/us...cedguide_7.zip

                  Probably best to return to an original clean template and then apply the correct changes to that original template.
                  Bill
                  www.egyptianwonders.co.uk
                  Text directoryWorldwide Actinic(TM) shops
                  BC Ness Solutions Support services, custom software
                  Registered Microsoft™ Partner (ISV)
                  VoIP UK: 0131 208 0605
                  Located: Alexandria, EGYPT

                  Comment


                    #10
                    ?am i mixing things up here.

                    my problem is...i need my top level sections to show throughout my site....so i am using the javascript code from advanced user guide to create a toplevelsections list rather than TOPLEVELSECTIONSTOP.

                    as far as i can see im talking about the same thing am i not

                    this is the instructions from page 34 of the advanced user guide....only top level sections.

                    i will try the link you gave me an dsee what happens.

                    Comment


                      #11
                      ahh hang on......right...drop down list...nooo.lol.

                      its not a drop list i want....its just a menu

                      i dont want to have to hard code my links.....is there a tag or script i can use to generate a my top level sections to appear the same as they do with the TOPLEVELSECTIONSTOP...so a vertical menu....which i can apply a style to the href etc.

                      Comment


                        #12
                        What you want IS there in the AUG. Have a read through starting at around page fourteen (can't be exact, I don't have the word version on this PC).
                        Bill
                        www.egyptianwonders.co.uk
                        Text directoryWorldwide Actinic(TM) shops
                        BC Ness Solutions Support services, custom software
                        Registered Microsoft™ Partner (ISV)
                        VoIP UK: 0131 208 0605
                        Located: Alexandria, EGYPT

                        Comment


                          #13
                          ok, i downloaded the word doc......i tried using the bulleted list as im sure i can modify this sufficiently to achieve the look i need.

                          but i still receive the errors.

                          (length is null or not an object)
                          (createarray is undefined)
                          the formatting appears correct....what could be causing the problems?

                          Comment


                            #14
                            I looked at http://www.s172585708.websitehome.co...log/Index.html and see several problems.

                            1) You seem to still be using code copy/pasted that contains unwanted line breaks.

                            2) You've put this code into Act_Primary before the

                            <SCRIPT LANGUAGE="JavaScript" SRC="actiniccore.js" TYPE="text/javascript"></SCRIPT>
                            <SCRIPT LANGUAGE="JavaScript" SRC="actinicextras.js" TYPE="text/javascript"></SCRIPT>

                            lines. You should move it to after these lines as this code uses routines in actiniccore.js and they are undefined if called before these files are loaded.

                            It's always best to look at such problems in Firefox and use its Tools / JavaScript Console to get decent diagnostics.
                            Norman - www.drillpine.biz
                            Edinburgh, U K / Bitez, Turkey

                            Comment


                              #15
                              The AUG does say
                              Note: The line <SCRIPT LANGUAGE="JavaScript" SRC="actiniccore.js" TYPE="text/javascript"></SCRIPT> (found in all Overall Layout templates) must always be ABOVE any of the script variables listed below in order for them to function correctly.
                              I still see the dropdown list code on site, but it comes BEFORE the link to the javascript source files.

                              Reading the whole thread again to see where you are going with this, it does look as though the bulleted list top level sections IS the code you should start with, but it needs to be applied exactly as shown in the AUG and be seen to work, before you alter anything to try and achieve the layout you want.

                              [added]Morning Norman, guess you're a quicker composer - as well as a better javascript hand
                              Last edited by wjcampbe; 31-Aug-2006, 08:30 AM. Reason: Norman got there first
                              Bill
                              www.egyptianwonders.co.uk
                              Text directoryWorldwide Actinic(TM) shops
                              BC Ness Solutions Support services, custom software
                              Registered Microsoft™ Partner (ISV)
                              VoIP UK: 0131 208 0605
                              Located: Alexandria, EGYPT

                              Comment

                              Working...
                              X