Fork me on GitHub

Error while trying to get a javascript menu started  Bottom

Go to page 1 - 2 [+1]:

  • Hello guys

    I have a problem to get a menu started.
    I have a fully working HTML / Javascript menu:
    http://www.amsterdam-crusaders.nl/menu/

    PLZ take a look and read the info I put there.
    You can see it is working.

    Now I would like to get it into PostNuke.
    http://www.amsterdam-crusaders.nl/nuke/

    I am using http://www.predatorial-tendencies.com theme called Redrum.
    I am modifying it of course as you see.
    But I get an error while loading the page.
    If you read the error it will say:

    Code

    Line: 4
    Symbol: 2
    Error: 'TransMenu' is not defined
    Code: 0
    URL: http://www.amsterdam-crusaders.nl/nuke/index.php

    The error starts when inserting the

    Code

    [tr>
         [td colspan="15" height="1" bgcolor="#FFFFFF">
     [script type="text/javascript" language="javascript" src="transmenu_content.js">[/script>[/td>
        [/tr>


    I try to find the solution here on the forum, but couldn't find it.
    Tried to download ActiveMenu, but the latest version is not downloadable right now.

    I tried to put it the 3 javascripts in the javascript folder, but I have no clue how to call them in the .php of .html file.

    Any help/suggestion
  • Okay, I tried something
    I put these in the header.php file

    Code

    echo    "<script type=\"text/javascript\" src=\"javascript/mo.js\"></script>\n\n";
      echo    "<script type=\"text/javascript\" src=\"javascript/transmenu.js\"></script>\n\n";
      echo    "<script type=\"text/javascript\" src=\"javascript/transmenu_content.js\"></script>\n\n";


    after doing this, the error changes

    Code

    Line: 457
    Symbol: 17
    Error: Object needed
    Code: 0
    URL: http://www.amsterdam-crusaders.nl/nuke/index.php


    pfffffffffffff
    don't know what to do
  • Hi there,

    Try calling the javascript file with a relative URL from the root of your postnuke install:

    src="themes/mytheme/transmenu_content.js" or wherever it is located.

    REgards

    --
    -Lobos
    Professional PHP Framework Services: Concept, Development and Deployment
  • Rooky,

    I use javascript menus on my site without any trouble. I simply insert a new AutoThemes AutoBlock into my theme.html and call the javascript dropdown menu from an HTML block created in the PN Admin/Blocks panel.
  • @lobos
    I tried that... didn't work. Dunno why not

    @AT
    I have AT. I know how to use it and to change stuff. Is AutoBlock a special kind of block??
    I wonder: If I add that block, won't it just only show on the frontpage?
    because of course I need to have it visible on all the pages.
    Where is in PN/AT dicided what is shown on all pages, and what only on the frontpage?

    I will try it and let you know.
  • hmm.

    I tried to add a block: Core/HTML
    put the HTML table in the field. Show in the 'center'
    nothing!
    :S
    dunno if I do something wrong, or that this just doesn't work
  • Hi Rooky,

    You create AutoBlocks in the AutoTheme module admin panel. I think you need the retail version for AUtoBlocks, but I can't remember for sure.

    You must insert a block tag into your theme.html file (or other file if you have designated others). A block tag looks like this: so if you created an autoblock called menu, then the tag would look like this:

    Finally, you must also create a blcok in the PN Admin/Blocks control panel. It sound like you already completed this step. Keep in mind, that it must be assigned to your new AutoBlock (which should appear tin the dropdown if it was created properly).
  • Semi-related - check out a dynamic menu block I'm workin' on....

    New Dynamic Multi-Me…xin JS issue though

    The JSCRIPT bein' a pest in one instance though...

    --
    Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods

    Cape Cod Travel Info...
  • You've been working on some nifty stuff Nate. Good work.

    Any chance you could provide us working links to your site so that we can see them in action?
  • @AT
    AutoBlocks is not really working for me ATM.
    I am using ATlite .7
    I cannot find it in AutoTheme module admin panel

    Can you answer just a small other question.
    Why is it, that most blocks do show up where I want them, but some just don't show. No matter where I put them.
    And also, why can I place/decide about all the content on the frontpage (like on the http://www.amsterdam-crusaders.nl/nuke/) but the last block with the last submitted news is always shown. i cannot get it out, put it somewhere else or something.
    I would like to put it somewhere else.

    @Nate
    I will take a look at it tomorrow
    What do you mean by: Will work fine for you so long as you display the JSCRIPT menus you create on all pages, otherwise you get the JSCRIPT error.
  • I think you will have to buy the retail version of the AutoThemes module to get AutoBlocks.

    I'm not sure why you blocks aren't showing - I suspect, however, that you may not have the tag syntax correct (spelling or some other error).

    As for news, that is because your start page (in admin - settings) is set to News. You can create a blank module by taking an existing module like Legal, renaming it, renaming the Legal tag in the .php files and then gutting the content of the index.php file and replacing it with nothing.
  • autothemes

    Any chance you could provide us working links to your site so that we can see them in action?

    Sorry, I don't have my PN site (at least not on the web), maybe it *would* be a good idea to set up one - I just didn't want it to have any tumbleweeds blowin around, as I'd only be updating it with the occassional mod ;)

    rooky

    What do you mean by: Will work fine for you so long as you display the JSCRIPT menus you create on all pages, otherwise you get the JSCRIPT error.

    Basically, you can create multiple menu blocks with this Block. Two use JScript, the horizontal drop down & the vert fly out (not the tree of the "plain" menus)... In the case of the JScript menus, the block script looks for all them (in the current lang) and builds the Jscript necessary to make this fly out when you hover over that.

    If you have a case where all the Jscript menus built in that initial script are not present on a page (say if you put a vert flyout in the right block not always present), you get the error. Though it's not a fatal error, it just prevents the menus from flying out...

    If you say have a left vertical menu and a horizontal menu across the top (integrated into the theme - more in the readme), that appears on every page, you'll have no problem. And again, this does not involve the tree or plain menus...

    --
    Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods

    Cape Cod Travel Info...
  • @Nate see my reply on http://forums.postnu…e=viewtopic&t=27037

    @AT
    I created a block in the theme were I was going to assign my HTMLblock to
    In the HTML I put all the HTML needed.
    It will show the images, but it is not using the .js files !!!!!!!
    I GO CRAZY

    I put an example of the Dyna Menu on my site http://www.amsterdam-crusaders.nl/nuke/
  • Saw it, P.S. I'm aware of the horizontal plain menu block thang, I think I have the wrong template or something... ;)

    --
    Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods

    Cape Cod Travel Info...
  • Rocky,

    Are you sure you have the path correct?

Go to page 1 - 2 [+1]:

This list is based on users active over the last 60 minutes.