Creation of a sitemap

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
gerarcyr
Advanced
Advanced
Posts: 11
Joined: Thu Nov 03, 2005 11:44 am

Creation of a sitemap

Post by gerarcyr »

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.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Try this.
John
gerarcyr
Advanced
Advanced
Posts: 11
Joined: Thu Nov 03, 2005 11:44 am

Post by gerarcyr »

John wrote:Try this.
Thank's a lot, this is exactly what i'm looking for....
annasue
Super Advanced
Super Advanced
Posts: 42
Joined: Thu Apr 14, 2005 11:37 pm
Location: Huntsville, AL
Contact:

Sitemap

Post by annasue »

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.
Anna Sue Edwards
Webs 2 Impress
Huntsville, AL USA
http://www.webs2impress.com
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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.
John
annasue
Super Advanced
Super Advanced
Posts: 42
Joined: Thu Apr 14, 2005 11:37 pm
Location: Huntsville, AL
Contact:

Post by annasue »

The link works fine. It's the code that page supplies that isn't working.
Anna Sue Edwards
Webs 2 Impress
Huntsville, AL USA
http://www.webs2impress.com
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Sorry, feel like I'm pulling teeth here. Exactly what is it about the code that is not working?
John
annasue
Super Advanced
Super Advanced
Posts: 42
Joined: Thu Apr 14, 2005 11:37 pm
Location: Huntsville, AL
Contact:

Post by annasue »

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/men ... teIndex.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/men ... Attributes')");

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.
Anna Sue Edwards
Webs 2 Impress
Huntsville, AL USA
http://www.webs2impress.com
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Did you take the sitemap code from the demo page...

Code: Select all

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.
John
annasue
Super Advanced
Super Advanced
Posts: 42
Joined: Thu Apr 14, 2005 11:37 pm
Location: Huntsville, AL
Contact:

Post by annasue »

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.
Anna Sue Edwards
Webs 2 Impress
Huntsville, AL USA
http://www.webs2impress.com
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
annasue
Super Advanced
Super Advanced
Posts: 42
Joined: Thu Apr 14, 2005 11:37 pm
Location: Huntsville, AL
Contact:

Post by annasue »

It is a sub directory "menus".
Anna Sue Edwards
Webs 2 Impress
Huntsville, AL USA
http://www.webs2impress.com
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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: Select all

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
annasue
Super Advanced
Super Advanced
Posts: 42
Joined: Thu Apr 14, 2005 11:37 pm
Location: Huntsville, AL
Contact:

Post by annasue »

Thanks so much! That fixed it! Is there no way around the "undefined" thing?
Anna Sue Edwards
Webs 2 Impress
Huntsville, AL USA
http://www.webs2impress.com
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Not sure about this, but try a title=;
John
annasue
Super Advanced
Super Advanced
Posts: 42
Joined: Thu Apr 14, 2005 11:37 pm
Location: Huntsville, AL
Contact:

Post by annasue »

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...
Anna Sue Edwards
Webs 2 Impress
Huntsville, AL USA
http://www.webs2impress.com
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
annasue
Super Advanced
Super Advanced
Posts: 42
Joined: Thu Apr 14, 2005 11:37 pm
Location: Huntsville, AL
Contact:

Post by annasue »

Yes, it made sense, Ruth. Thank you for all your help.
Anna Sue Edwards
Webs 2 Impress
Huntsville, AL USA
http://www.webs2impress.com
iain_s
Advanced
Advanced
Posts: 15
Joined: Tue Oct 26, 2004 11:55 am
Location: Stafford, England
Contact:

Re: Creation of a sitemap

Post by iain_s »

Problem using mm_siteIndex.js


I'm trying to create a siteindex for 'www.doxeyca.co.uk' and have implemented the code into the index page for the site.
All I get is a window with the heading 'Doxey Site Index II' (see html below).
It seems that in the code

Code: Select all

 for (i=0; i<_m.length; i++)
  {
    if (_m[i][7])
    {
      mm_listMenu(i);
    }
  }
_m_length must be zero as there is no '<ul> </ul> in the html.

The only (slightly) non-standard things on the site are
- the menu file is called 'dm_menu_data.js' (not 'menu_data.js')
- There are 4 menus in use which are called individually (ie no 'Main Menu' although I have specified it to see if it cured the problem.



Menu Call line (in 'Doxey and the Net')

Code: Select all

aI("text=Generate Site Index;
url=javascript:mm_siteIndex('top=50,left=50,height=500,width=600,toolbar=yes,
menubar=yes','Doxey Site Index II','doxey.css');");
html generated for SiteIndex :

Code: Select all

<html><head><title>Site Index</title><link rel="stylesheet" type="text/css" href="doxey.css"></head><body><h1>Doxey Site Index II</h1></body></html>
I'm not very experienced with js so I may be missing something
Iain
Iain
Post Reply