Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Last Updated: Saturday November 22 2008 - 06:11:22

Creation of a sitemap


Poster: gerarcyr
Dated: Tuesday February 21 2006 - 13:36:46 UTC

Hi,

is there any function which allows me to create a site map from my menu ?
I would like to create a sitemap page on my intranet, with all the items of my menu.

Thanks in advance.


Poster: John
Dated: Tuesday February 21 2006 - 13:52:07 UTC

Try this.


Poster: gerarcyr
Dated: Tuesday February 21 2006 - 13:56:29 UTC

John wrote:
Try this.

Thank's a lot, this is exactly what i'm looking for....

Sitemap


Poster: annasue
Dated: Wednesday June 14 2006 - 15:30:23 UTC

I tried the link at "Try this" and am getting an error on the page. I even tried just pasting the code in without altering it at all and it still doesn't work.

http://www.webs2impress.com/infotec/secondpage.html

Thanks for your help.


Poster: John
Dated: Wednesday June 14 2006 - 15:35:07 UTC

The "this" link, which is http://support.milonic.com/demos/site_index/index.htm, is working fine. Just tried it numerous times.

Sorry, don't know what to tell you.


Poster: annasue
Dated: Wednesday June 14 2006 - 15:39:21 UTC

The link works fine. It's the code that page supplies that isn't working.


Poster: John
Dated: Wednesday June 14 2006 - 15:51:54 UTC

Sorry, feel like I'm pulling teeth here. Exactly what is it about the code that is not working?


Poster: annasue
Dated: Wednesday June 14 2006 - 16:05:51 UTC

Well, it isn't displaying a sitemap when I click on sitemap. The instructions said to place this code where I wanted the sitemap to be called:

<SCRIPT language=Javascript src="http://www.webs2impress.com/infotec/menus/mm_siteIndex.js" type=text/javascript></SCRIPT>


This isn't putting anything in that spot.

This is what I have in the embedded_main_menu.js file.

aI("image=images/buttonbkgrnd.jpg;url=javascript:http://www.webs2impress.com/infotec/menus/mm_siteIndex('windowAttributes')");

Also, when you click on SiteMap on the menu bar, there is an error displayed at the text field at the bottom of the window.

I am endeavoring to use the demo version for the moment because the company will not allow me to put the building files under their domain until it has been approved by all. I fully intend to get the license then. Could this be the problem? The horizontal menus are working without problems.


Poster: John
Dated: Wednesday June 14 2006 - 16:37:30 UTC

Did you take the sitemap code from the demo page...
Code:
var mm_tName;

function mm_listMenu(mN)
{
  var j, iN;

  _iwd.write("<ul>");

  for (j=0; j<_m[mN][0].length; j++)
  {
    iN = _m[mN][0][j];

    _iwd.write("<li>");

    if (_mi[iN][2] != null) _iwd.write('<a href="' + _mi[iN][2] + '" target="' + mm_tName  + '">');
    _iwd.write(_mi[iN][1]);
    if (_mi[iN][2] != null) _iwd.write('</a>');

    if (_mi[iN][3] != null) mm_listMenu(getMenuByName(_mi[iN][3]));

    _iwd.write("</li>");
  }

  _iwd.write("</ul>");
}

function mm_siteIndex(windowAttributes, indexHeading) // , cssFile)
{
  var attr = "toolbar=no,scrollbars=yes,resizable=yes,status=yes";
  if (windowAttributes.length > 0) attr += "," + windowAttributes;
  _iWin = window.open("", "Site_Index", attr);

  _iwd = _iWin.document;

  if (_iWin.window.opener.name.length == 0) {
    _iWin.window.opener.name = "parentwin";
  }
  mm_tName = _iWin.window.opener.name;

  _iwd.open();
  _iwd.write("<html><head><title>Site Index</title>");

  if (arguments.length > 2) _iwd.write('<link rel="stylesheet" type="text/css" href="' + arguments[2] + '">');

  _iwd.write("</head>");
  _iwd.write("<body>");
  _iwd.write("<h1>" + indexHeading + '</h1>');
//  _iwd.write('<h1><div style=""><input type="button" value="< Back" onclick="window.opener.history.back()"><input type="button" value="Next >" onclick="window.opener.history.forward()"></div>' + indexHeading + '</h1>');
//  _iwd.write('<p class="toolbar"><input type="button" value="< Back" onclick="window.opener.history.back()"><input type="button" value="Next >" onclick="window.opener.history.forward()">');

  for (i=0; i<_m.length; i++)
  {
    if (_m[i][7])
    {
      mm_listMenu(i);
    }
  }

  _iwd.write("</body></html>");

  _iwd.close();
}

...save it to a file called mm_siteIndex.js, and upload it to your server in the appropriate spot as ASCII (straight text)?

Using the demo version of the software to get going should cause no problems at all.


Poster: annasue
Dated: Wednesday June 14 2006 - 18:45:57 UTC

I had already copied this file to the directory and put it on the server. However, just in case there was a problem, I copied what you sent to the correct filename and moved that to the server. Now I am not getting the error message but neither is the sitemap working either.


Poster: Ruth
Dated: Wednesday June 14 2006 - 20:33:39 UTC

Hello,

I used your posted url for the mm_siteIndex.js file and get a file not found. Without that file there's no site index.

Ruth


Poster: annasue
Dated: Wednesday June 14 2006 - 20:50:11 UTC

It is a sub directory "menus".


Poster: Ruth
Dated: Wednesday June 14 2006 - 21:33:46 UTC

Hi,

I have no idea what's up. I just put your page and your files up at my site and everything is working fine. I changed your www to mine of course but as you can see when you get there, it has the same folder layout as you are using.


So, you can try this and see that it works. I'm using your unlicensed files instead of mine so I kept everything the same.

Ruth


Poster: Ruth
Dated: Wednesday June 14 2006 - 21:41:10 UTC

Hi,

Just found the problem, but I don't know why it's a problem.

Change your url for the aI string that has the siteIndex to

Code:
aI("image=images/gtsitemap01.jpg;overimage=images/gtsitemap02.jpg;url=javascript:mm_siteIndex('windowAttributes','indexHeading');");


It is probably because that siteIndex.js file is in with the milonic files. I'm not good on paths. I'd think that a full path would work but it doesn't seem to do that, however the one above works.


You should also be aware that this will NOT give you item names when you're using images. It just says undefined. The links work but all your main menu items show in the site map as undefined.

Ruth
Ruth


Poster: annasue
Dated: Wednesday June 14 2006 - 21:46:45 UTC

Thanks so much! That fixed it! Is there no way around the "undefined" thing?


Poster: John
Dated: Wednesday June 14 2006 - 22:38:54 UTC

Not sure about this, but try a title=;


Poster: annasue
Dated: Wednesday June 14 2006 - 22:46:04 UTC

Well, I had that in there once and on my horizontal menus, it put the text over my graphics and that's not what I want....sigh...


Poster: Ruth
Dated: Thursday June 15 2006 - 2:57:57 UTC

Hi,

No, there's no way around the undefined when you have images unless the mm_siteIndex.js file is modified. I think there's a alt property for images, or maybe that's for title and possibly that could be done, adding a if the code for text is not present then look for the title or something else might be used, say status but that's the only way it can be done as far as I know.

By the by, this is not a Milonic 'module'. It was created by a user.


Hope that made sense :?

Ruth


Poster: annasue
Dated: Thursday June 15 2006 - 11:15:14 UTC

Yes, it made sense, Ruth. Thank you for all your help.