Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:31
pure relative positioning
Poster: kendra
Dated: Wednesday September 28 2005 - 6:03:51 BST
Hi,
Hi everyone,
Im having a little bit of difficulty with the positioning of the menu. It seems this problem is following us from menu to menu. Does anyone know how we can have the menu defined to a "pure relative position" so it will appear exactly where the code is places without being effected by resizing, screen resolution, browser, ect.
Thanks
Kendra A
Poster: Ruth
Dated: Wednesday September 28 2005 - 7:10:42 BST
I think you'd have to put the menu in a table. It will shift if the table shifts, it will not shift if the table doesn't. It would be easier for everyone to help if we had a page to see what it is you want.
Ruth
Poster: kendra
Dated: Thursday September 29 2005 - 2:02:21 BST
Hi Ruth, Thank you for your response.
That is one of the first things I tried, infact i tried several ways before writing you. Im new to the support team so bear with me please I studied php and very little java so I spoke to our site admin and had him look at the code.
He said:
"The menu appears to be originating its positioning relative to an offset not the location of the code , try locating the menu inside a static div layer, I have seen this problem before. This code appears to be remarkably close to Tigra menu system that has identical problems, with positioning. I hope this is not the same engine or it might not work for us. This is something that will need to be clarified.
Also our security team is also reporting a critical security violation which is causing the SSL certificate to not secure the page properly. I ran the script through SecureONE and it is reporting the problem is with the CSS file containing the milonic class. This SSL issue will need to be addressed, or we cannot purchase the license due to security reasons.
Please have the Milonic team identify and resolve the SSL issue, and please have them verify that it is not the Tigra engine. I see in the demos on there page the menus are centered and static dont focus on that, for now I have uploaded the files you sent me to the server, as you requested, included is an additional file which is the the exact same template file without the menu code that works fine with SSL, please do not order the license until the SSL issue is clearly resolved
Here is your files you requested.
Your file (template+Menu)
https://insarnia.ca/menu/milonic/
NOTE:
The page loads, the menu loads but in the incorrect position. The page is not properly secured, the SSL padlock is present until the menu is loaded then disappears, this indicates insecured data.
Blank Template
https://insarnia.ca/menu/milonic/secure.htm
NOTE:
This identical to the first one, except has no menu code, not the padlock is present and the page is full secured.
Robert
Site Admin
---------------------------------------
I dont know if that is to much information, I dont know much about ssl stuff so I though that would be better I just paste that here so you can help, sorry its so long. Im going to keep working on it, errm I hate getting stuck I wish the menu would just cooperate so I can start remaking the navigation menus
umm oh yeah if you need anything plz let me know k?
Kendra A
Support Team
Poster: Ruth
Dated: Thursday September 29 2005 - 3:21:01 BST
Hi Kendra,
Actually, I don't know about the other menu, but Milonic is not positioning by some built in offset. It has been coded, or rather it hasn't be changed by the user to be relatively positioned, it has the top=10; and left=10; in the main menu. That has to come out first, in order to position it relative.
And, it's not difficult to put it in a table, but you can't just put the calls for the files there. You remove the main menu from the menu data file, and either put that in the table cell, or put that into it's own file and save it as ? main_data.js and call it. In both cases you need to put a drawMenus(); at the end. If you put the main menu into the table cell, then you need opening and closing script tags. Of course if you put it into a text file you don't need those.
Here are the table bound instructions - http://www.milonic.com/tablemenu.php and the table based sample, which also has instructions http://www.milonic.com/menusample9.php
Below is a little synopsis of that and also the code you need to position the menu where you want it.
1. Table menus have only the main menu placed inside the table. It is cut out of the menu_data.js file and placed in script tags with an second drawMenus(); at the end of it.
2. The menu_data.js file is saved without the main menu, and it is called along with the other 3 base program files the first thing after the body tag. Below is the layout for what you would need to position it relative in the place where you want it. It is placed between the HR tags that were on the linked page in another one celled table. That's all that's in the table is the main menu. You can put the menu into any table cell, I just tend to make a table for it, because then if I want to center, or shift it right I can do that by shifting the table. It will go wherever that table goes.
Code:
<!-- START PAGE CONTENT ---------------------------->
<hr color="#C0C0C0" size="1">
<table cellpadding='0' cellspacing='0' align='center'>
<tr>
<td><script>
with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
orientation="horizontal";
style=menuStyle;
position="relative";
aI("status=Back To Home Page;text=Home;url=http://www.milonic.com/;");
aI("showmenu=Milonic;text=Milonic;");
aI("showmenu=Partners;text=Partners;");
aI("showmenu=Links;text=Links;");
aI("showmenu=MyMilonic;text=My Milonic;");
}
drawMenus();
</script></td>
</tr>
</table>
<hr color="#C0C0C0" size="1">
<p align="center"> </p>
<p align="center"> </p>
<!-- END PAGE CONTENT ------------------------------>
</TD>
<hr color="#C0C0C0" size="1">
<table cellpadding='0' cellspacing='0' align='center'>
<tr>
<td><script>
with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
orientation="horizontal";
style=menuStyle;
position="relative";
aI("status=Back To Home Page;text=Home;url=http://www.milonic.com/;");
aI("showmenu=Milonic;text=Milonic;");
aI("showmenu=Partners;text=Partners;");
aI("showmenu=Links;text=Links;");
aI("showmenu=MyMilonic;text=My Milonic;");
}
drawMenus();
</script></td>
</tr>
</table>
<hr color="#C0C0C0" size="1">
<p align="center"> </p>
<p align="center"> </p>
<!-- END PAGE CONTENT ------------------------------>
</TD>
I hope that helps. Once you look into the menu, you'll find it is probably the most versatile on the web. I like it because it is very artistically designable, I mean you can do almost anything with it in design. And, though at first, because it's something new, it seems overwhelming, once you get into it, it is so very easy to use and to put in your own links and menus.
If you have any more problems, just hollar. Someone will help.
Ruth
Poster: kendra
Dated: Thursday September 29 2005 - 6:40:00 BST
O_0 thanks,
okay I see what you mean once you get it down. It is a very nice menu system, we picked it because it does have a professional look.
I had our security team look at the ssl issue so its working, the problem though is where in the code is this blank.html called? there saying this is a issue they can workaround using another method.
Well thanks for your help Ruth, it sure has some strange code structure, I look at the javascript and it dont make much sense being all inline like that? looks almost chinese compared to the java we took up Is it encrypted? and if so when we get a license does it come un-encrypted??
tks
Kendra
Poster: Ruth
Dated: Thursday September 29 2005 - 7:39:16 BST
Sorry, I forgot that issue. OK. There is no security issue with the menu.
What is happening is this. In some circumstances, the menu creates a hidden iframe to make sure that it displays correctly, for example so it will go over radio buttons. With IE, any iframe which has no attributes gets set as the default about, about blank, I guess. That page then loads, for whatever reason MS had on this, as an insecure page under https. So, in consultation with Honeywell, Microsoft and Milonic the solution was found. In your download you will see a page called blank.html. Upload that to your root directory and it takes care of the issue. It's not that anything is insecure, it's just what IE 'acts' like in this instance. You can get more information about that at Microsoft. http://support.microsoft.com/default.as ... -us;261188
Another issue I've seen in the forums that has to do with https is graphics. Some forget and put their graphics in the http rather than the https, if you call from https to http and try to load it, you'll get that insecure/secure message. Hope that helps.
You're going to really like this menu. It is so versatile, and yes it looks very professional. Once you get going and have the time, make sure you take a look at some of the users' sites, also keep an eye here. You'd be surprised what you can do with the menu. You can have more than one on the same page, using the same files, you can have a main menu and even have little pop up single menus at different points on the page, that open when you mouseover a link. It also has a listbased option. It works with tab, you need the keypress.js module for that.
It's really great.
Ruth
Thank You Ruth
Poster: kendra
Dated: Thursday September 29 2005 - 20:33:10 BST
Hi Ruth,
Thanks for all your help, you have been very helpful. We did figure out the SSL issue, when I was editing my post you were replying.
Your example did centre the menu perfectly just as needed but kinda created a new problem.
1) We are going to be using a global folder for all menus, so every menu, regardless where it is located on the site it always refers to one global folder for its resources.
public_html/menu/js/mmenudom.js
public_html/menu/js/milonic_src.js
public_html/menu/js/menu_data.js
public_html/menu/js/mmenuns4.js
This way we can edit/add/remove a menu items or its properties, at the main folder (www/menu/) and it will effect all menus on the site.
In your example:
Code:
position="relative";
aI("status=Back To Home Page;text=Home;url=http://www.milonic.com/;");
aI("showmenu=Milonic;text=Milonic;");
aI("showmenu=Partners;text=Partners;");
aI("showmenu=Links;text=Links;");
aI("showmenu=MyMilonic;text=My Milonic;");
}
drawMenus();
aI("status=Back To Home Page;text=Home;url=http://www.milonic.com/;");
aI("showmenu=Milonic;text=Milonic;");
aI("showmenu=Partners;text=Partners;");
aI("showmenu=Links;text=Links;");
aI("showmenu=MyMilonic;text=My Milonic;");
}
drawMenus();
the embedded code defines specific menu items, is there a way to import the data from a file? So if we wanted to change say "partners" to "Sponsors" for example then we would have to be changed on every page which would be alot of work.
Another thing is that its not just a simple reference to a resource file. We cant use a set absolute path that is http:// that will cause warnings in https://, we cant use absolute https:// as it will slow down the page for users that are using http://
Likewise we cant use relative path (../menu/js) because there based on current location and will fail if they go deeper and deeper.
I suppose if we could php to define a homepath set in a variable, such as
Code:
$menupath = "/home/insarnia/www/menu/";
Then anytime the menu is called we just use that variable
Code:
$menupath/js/
Do you have any ideas how I can pull this off? I dont even know if we can pass the var from php to html or java and it keep the same browser compatible.
If you can take a quick look at
http://insarnia.ca/menu/
as you see now theres 2 menus but the bottom one works perfect just as you said. If I understand you right Ruth, then all I need to do to remove the top menu is remove the following code from menu_data.js
Code:
with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
left=10;
orientation="horizontal";
style=menuStyle;
top=10;
aI("status=Back To Home Page;text=Home;url=http://www.milonic.com/;");
aI("showmenu=Milonic;text=Milonic;");
aI("showmenu=Partners;text=Partners;");
aI("showmenu=Links;text=Links;");
aI("showmenu=MyMilonic;text=My Milonic;");
}
alwaysvisible=1;
left=10;
orientation="horizontal";
style=menuStyle;
top=10;
aI("status=Back To Home Page;text=Home;url=http://www.milonic.com/;");
aI("showmenu=Milonic;text=Milonic;");
aI("showmenu=Partners;text=Partners;");
aI("showmenu=Links;text=Links;");
aI("showmenu=MyMilonic;text=My Milonic;");
}
It appears to be working anyways, and is centred just right. Is there anything else I need to modify with respect to implementing the chunk of code I took from the js and placed in the table on the page?
Well Ruth that you so much, you have been so helpful, your so right about how great these are, if it wasnt for this ssl I would be able to start making the menu looks great and fit on.
All I really need is 1 template page with the menu working and we can get a license, and I can start making menu items and add the page content
Thanks again Ruth, your awesome!
Kendra
Poster: Ruth
Dated: Friday September 30 2005 - 3:11:19 BST
Hi Kendra,
I'm going to answer the two menus issue first. Yes, you are correct, just remove the main menu from the menu_data.js file. You will then only have the menu that is in the table.
Now, as to the other issues. I placed the menu in the table so you [and anyone who does a search on the forum for table menus] have a visual of what was done. However, you don't have to put the menu in the table, you can put a call for a menu file. So, you could put that main menu into a file and call it, embedded_main_menu.js, for example. Put that with your other menu files in the your menu folder and then on the pages you put a call for the file into the table cell where the menu code is right now.
Code:
<SCRIPT type="text/javascript" src="embedded_main_menu.js"></SCRIPT>
On the paths issue, I really don't know about that, nor about the php. I know Milonic is a php site and it also has secure areas. I also know that a lot of people who have https use Milonic so it must be possible. Not knowing the issue, I would probably think about some kind of setup where you have a menu folder under the https and one under the http, and some kind of function, if https path is , if http path is. As you can see I don't know functions, either.
I will post this to Milonic, but I suggest you contact them directly about this issue. If you go to the main site, there is a link to contact them about such things and the menu, like can this be used on a site that has both http and https sections and how.
Ruth
Poster: kendra
Dated: Friday September 30 2005 - 6:11:35 BST
Sweet!
I get it:) its just like a <?php include, your good with javascript Im getting into this so much, Rob our admin was laughin at me saying he should pay you caz you doing all the work
Your making me think I should take a class to cover Javascript&Apellets I think its called I need one more credit so I was thinking Apache configuration caz my friends taking it but Im going to do that now.
Thank you again Ruth, your so nice. If you do find out how to set a global path please let me know, but you did alot so Im not buggin you no more I dont want to make you I will do like you said
Thanks Ruth
Kendra A
WebMail & Hosting Support Team
https://insarnia.ca/