Ken Hardwick
|
| Posted: 06/02/2002, 6:02 AM |
|
I have been working on a database driven menu system to use with CodeCharge.
The original "free" javascript/dhtm menu was downloaded from www.softcomplex.com
I have made a few modifications to the javascript,created a database and a codecharge application that allows one to create a menu and then thru use of a function decide which menu to use on any specific page or dynamically thru code change which menu to use on specific page.
Please check out/test out at.. http://www.kenhardwick.com/cc_06/default.asp
For explaination of some of the settings used..please read documentation at.. http://www.softcomplex.com/products/tigra_menu/docs/
Would appreciate feedback on this...would be willing to share if enough interest.
Thanks,
Ken Hardwick
ken@kenhardwick.com
|
|
|
 |
cornwell
|
| Posted: 06/02/2002, 3:03 PM |
|
Looks good Ken.
This is a valuable utility and I'd be grateful for anything you're willing to share.
I'm used to providing dynamic menus via functional-access security levels (well over 70 levels )on a statewide transaction application and would like to learn/see how I could provide the same on the browser-based PC apps I'm now assigned.
Appreciate your contributions to this group - picked up the calendar and it will soon be out in a working app.
Cornwell
cornwell@tasmail.com
|
|
|
 |
cornwell
|
| Posted: 06/02/2002, 3:03 PM |
|
Looks good Ken.
This is a valuable utility and I'd be grateful for anything you're willing to share.
I'm used to providing dynamic menus via functional-access security levels (well over 70 levels )on a statewide transaction application and would like to learn/see how I could provide the same on the browser-based PC apps I'm now assigned.
Appreciate your contributions to this group - picked up the calendar and it will soon be out in a working app.
Cornwell
cornwell@tasmail.com
|
|
|
 |
Ken Hardwick
|
| Posted: 06/05/2002, 5:44 AM |
|
I have made a few more modifications to this and provided downloadable zip file with all files needed to use...
http://www.kenhardwick.com/cc_06/default.asp
Ken Hardwick
Norman,Ok
|
|
|
 |
spaceclown
|
| Posted: 06/05/2002, 5:59 AM |
|
Ken, great job! I love it and just wanted to thatnk you.
|
|
|
 |
jell-0
|
| Posted: 06/05/2002, 11:43 AM |
|
Ken I downloaded your code and it is great but I am having a small problem. When I create a new page how do I get the menu to show up there?
|
|
|
 |
Ken Hardwick
|
| Posted: 06/05/2002, 11:46 AM |
|
To display the menu on a page, add the following in the Page/Close event
MenuName = "???????"
SecurityLevel = "?"
TheMenu MenuName,SecurityLevel
Just use "9" for security level if you are not using it to control
what menu items are displayed based on security level values.
|
|
|
 |
jell-0
|
| Posted: 06/05/2002, 12:13 PM |
|
Works great I just want to clerify something so nobody else tries to over think it like I did.
Page/Close Event
MenuName = "???????"
SecurityLevel = "?"
TheMenu MenuName,SecurityLevel <--Do Not Edit! I actually put the menu name and sec lev.
Silly i know.
|
|
|
 |
spaceclown
|
| Posted: 06/07/2002, 6:19 AM |
|
Ken is there a way to get the menu to be confined to a table or a row in a table?
Also can you explain the necessary changes needed if you are using security, like lev 1,2,3
Thanks Ken
|
|
|
 |
Ken Hardwick
|
| Posted: 06/07/2002, 7:01 AM |
|
/////////////////////////////////////////////////////////////////////////////
Ken is there a way to get the menu to be confined to a table or a row in a table?
...........................................................................
No sure what you mean here but since this is a database driven system...you can modify the current function or create new functions using new SQL statements to
control what menu items are retrieved/used. see my note below on security.
////////////////////////////////////////////////////////////////////////////
Also can you explain the necessary changes needed if you are using security, like lev 1,2,3
The most current zip file now has the security level built in.
It pretty much works like cc's security level...if a person has security level of "3" then one can see all menu items with security level of 3 or less..
If you don't want to use security levels just leave each menu item with the default of "0" then when calling the menu just use any value...which of course be equal to or greater than zero...below is the SQL that determines the menu items to be used...
kenSQL = "SELECT mMenu.MenuID, mMenu.mTitle, mMenu.mLink FROM mMenu "
kenSQL = kenSQL & " where mMenuName = '" & menuname & "'"
kenSQL = kenSQL & " and SecurityLevel <= " & Security_Level & ""
kenSQL = kenSQL & " and mTitle is not null "
kenSQL = kenSQL & " order by mMenu.MenuID"
Set rstGetRows = cn.Execute(kenSQL)
Hope that helps clarify...just keep in mind that you could add addition fields to the table and then modify the above SQL to meet your needs.
|
|
|
 |
spaceclown
|
| Posted: 06/07/2002, 9:24 AM |
|
Thanks for the security answer.
Secondly what I meant by table:
example:
I have a header page. In the header page in the page properties under the header and footer tab I have the following code.
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#000000" width="100%" height="100">
<tr>
<td width="100%" height="33"> </td>
</tr>
<tr>
<td width="100%" height="33"> </td>
</tr>
<tr>
<td width="100%" height="32"> </td> <-------- here!
</tr>
</table>
</center>
</div>
The line marked here is where I would like the menu. By default the menu always goes to the top of the page even if you put it in a form.
|
|
|
 |
spaceclown
|
| Posted: 06/07/2002, 9:56 AM |
|
Oh ya, another question
On the menu top level I do a mouseover the menu expands then on the next level that expands the font changed style. where is this controlled, I think everything looks like arial them the other level is Times New Roman. does my site.css control this or is it the one you supplied under noncc?
Thanks again ken
|
|
|
 |
Ken Hardwick
|
| Posted: 06/07/2002, 4:03 PM |
|
Spaceclown,
To be totally honest, I have not spend much time studying this menu system as far as the various options but instead just added the options as part of the database.
Please review the documentation provided by softcomplex at...
http://www.softcomplex.com/products/tigra_menu/docs/
There may be some features that I did not include in my program.
Also, check out their forum..at ... http://www.itcs.kiev.ua/softcomplex/products/tigra_menu/forum/
Sorry I can be of more help but just do not have the information.knowledge to
past on.
|
|
|
 |
Ken Hardwick
|
| Posted: 06/08/2002, 3:18 AM |
|
Spaceclown,
I did look this menu system this morning...as far as position of the menu,
modify the values of "block_left" and "block_top" for Level 1.
With this you can control the position of the menu on the page.
As far as the font size/style for each level, they are controled by the
CCmenu.css file.
To modify, please review... http://www.softcomplex.com/products/tigra_menu/docs/stat_styles.html
for documentation.
Hope this helps a little more...I am still learning on this also...
Ken Hardwick
Norman,Ok
|
|
|
 |
tim
|
| Posted: 06/09/2002, 6:02 PM |
|
ken, I was messing with your menu and I like it but not sure on the security. I had to change the code in the MenuItemGrid page, menuitems form, open events properties. I changed it to
response.write "Current menu = " & session("menu") & " Security Level = " & session("userrights")
if session("menu") <> "" then
if session("userrights") = "" then
SecLevel = 0
else
SecLevel = session("userrights")
end if
TheMenu session("menu"),SecLevel
end if
this makes the security level display correct. But I am not sure what to change in the global to make the security work correct. Right now every one can view the items. Any clue?
|
|
|
 |
Ken Hardwick
|
| Posted: 06/09/2002, 6:49 PM |
|
this makes the security level display correct. But I am not sure what to change in the global to make the security work correct. Right now every one can view the items. Any clue? ............
Tim...
You just need to edit each MenuItem and set its security level.
For instance, set all the 30000 series menu items to security level 3, then
only person with that security level will be able to see the menu.
On my menu page...select the securityLevel menu and change security levels in
the search box...notice how the menu chages...as different levels are selected..
|
|
|
 |
tim
|
| Posted: 06/10/2002, 10:28 AM |
|
Another question I am changing the apperance of the menu and a couple questions. I looked at the docs but it's not workin 4 me. I need the buttons on the top level to be 80 wide, the rest I dont care. I got them to change to 80 and it changed but they are seperated by space. I need them to have no space. Where in the .js file do I change this? Also I would like an arrow or image on buttons that have submenus. How is this done? thanks ken
|
|
|
 |
Ken Hardwick
|
| Posted: 06/10/2002, 11:19 AM |
|
Another question I am changing the apperance of the menu and a couple questions. I looked at the docs but it's not workin 4 me. I need the buttons on the top level to be 80 wide, the rest I dont care. I got them to change to 80 and it changed but they are seperated by space.
I need them to have no space. Where in the .js file do I change this?
From the Layout page...
For Level 1...change both the Width and the Left to same value..that will eliminate all but a tiny space between each top menu item...
Also I would like an arrow or image on buttons that have submenus. How is this done? thanks ken
Select "test1" menu ...there is one there with a image...however, I could not get the image to appear unless it was in the root directory..not sure why..but at least I could get it work otherwise...
Ken
|
|
|
 |