PDA

View Full Version : vetical menu



mikeV
04-17-2005, 09:30 AM
I downloaded the vertical menu (http://www.dynamicdrive.com/dynamicindex1/jimmenu/).

It works fine and i played with it to fit my style.

My question is i need to embed this vertical menu in my home page called home.aspx into in second row of my table.

In my home.aspx file i like to have 3 views. one is the top for pictures. The second view is going to be on the left. Here i like to have tables(2 rows, 1 coloum). The first row will have just a picture. The second row to have the vertical menus i customized. How can i do this??? I created a file called vm.html. In this file I followed the instruction, on my head tag i placed the script and on the body i placed onload="init()".

When i open this file, vm.html it works fine. That is it shows the vertical menu on the left hand side of the browser. How could i include this file ,vm.html which it has only the vertical menu when i open it, into my home.aspx on the left second row below the picture(first row)?

Thank you

jscheuer1
04-17-2005, 02:59 PM
By 'views' do you mean frames? If so, one potential problem is if the left frame/view isn't wide enough to display the sub menus, they will become hidden or partially hidden. Another problem, this menu is not positioned via page layout. It is positioned absolutely - either in relation to the page it is on or, if using the float option, in relation to the window or frame it is displayed in. To get the effect you say you want you could put an iframe in the table cell where you want this menu to be and have that iframe's source be the file with the menu on it. BUT, the dimensions of the iframe, the table, the table cell and the frame/view the menu is in must all be large enough to display the entire menu and its sub menus.

mikeV
04-17-2005, 06:01 PM
hi jscheure1

Yes i meant frames and it does work in frames. Like you said the frame should be big enough. But i am trying to avoid frames instead on each page i plan to have the vertical menu on bottom of the first row(the picture).
So in that row i used this code<Td> include vm.html</td> but the vertical menu shows up all the way to the top on top of the first row. Is this a bad idea or how can approach this problem?????? I see websites having a vertical menu on the left and their content page in the middle. When you go page to page you see the vertical menu all the time, that is why i put my vertical menu on one file vm.html and call it on each page.
THANK YOU

mikeV
04-17-2005, 06:20 PM
hi jscheure1
This how the code looks like on my home page, home.aspx.

vm.html is just holding the vetical menu. If it is opened by it self it has only the vertical page and i set it up using the tutorial when i download the vertical menu, that is by copying and paste in the <head> the script tags and in the <body> tag called the method onload = "init()" .

In the file home.aspx, this is how the code looks like.........
<TD style="HEIGHT: 92px">
<%
Response.WriteFile ("vm.htm")
%>
</TD>

jscheuer1
04-17-2005, 07:24 PM
Well, I am not much up on asp or aspx. However, common sense would indicate two things.

1) If you have a table cell (<td> </td>) without the <table><tr> . . . .</tr></td> tags around it, it will act weird. You probably don't have this problem, it just isn't clear to me from your explanation.

2) When you include a page via WriteFile, in almost any person's programming language, that's got to mean the file is written to the file just like its code was written in the container file in the first place. This is different than displaying one file from within another (with say, an iframe). When the code is written into the container file, it 'takes over' like a mild computer virus, morphing the container page into a new version of itself. If you just display inside an iframe, you can keep the two pages more separate and probably have better luck getting the effect you want.

Iframes can be set to have no borders and/or no scrollbars with the width and height of your choosing, so that a user won't even know it is there.

mikeV
04-18-2005, 03:43 PM
hi jscheuer1
Thank you for your help. I used iframes and it works......
<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 16px; WIDTH:880px;POSITION: absolute; TOP: 16px; HEIGHT: 544px"
cellSpacing="1" cellPadding="1" width="880" border="1">
<TR>
<TD style="HEIGHT: 1px">
Picture goes here
</TD>
</TR>
<TR>
<TD style="HEIGHT: 5px">
<iframe src="vm.htm" style="WIDTH: 776px; HEIGHT: 150px"></iframe>
</TD>
</TR>
</TABLE>
but the only problem is when i clik on the menu it displays the content inside that iframe. I am new for iframe so i am going to read more on iframe, I have used <frameset> before not <iframe>. To give you example what i wanted, This website http://www.************/webtools/dhtmlmenu/store/relativefloat/index.php
has floating menu on the left and the content on the right. The menu on the left has submenus and it streches to the right, crossing into the content. If i used frames i have to have enough space to show the menu and submenus. If i do that, the page will have a wide gap between the menu and the content because i am reserving a space for the submenus. Can you give me any idea how i can make my page to look like that, that is menu on the left and content on the right without too much gap between the menu and the content.
Thankyou, sincerly

jscheuer1
04-18-2005, 05:19 PM
only problem is when i clik on the menu it displays the content inside that iframeWell, if we are still using the same menu, it has the ability to target a frame by name, are you using that to target the desired frame in the frameset page? If so, you might have to prefix the target name like this, say for a target named mainArea:

target="parent.mainArea"

I really don't think this should be needed though. As for your other question, I haven't really looked into it yet but, this goes back to what I said about the frame needing to be wide enough. There are scripts for collapsing and expanding frames that might work for this. However, we are getting into the realm of:

Why use frames when you have a menu that provides consistent cross site navigation to begin with? Why not just put it on each page via WriteFile?

mikeV
04-19-2005, 03:33 PM
hi jscheuer1
Exactly, i don't want to use frames. So forget what i told you about using asp.net OR frames or iframes.

HOW can i include the vertical menu in a page? The instruction when i download the vertical menu said place the <script> tags in the <head> and onload = "init()" on the body tag. When i do that it works, but what i want is to load the vetical menu inside a <table> tag, let say in second row of first column(If my <table> has 2 columns and the left column has 2 rows)

THANK YOU

jscheuer1
04-19-2005, 06:30 PM
To do that you would still need an iframe, that way the menu will go wherever the iframe goes, which will go wherever the table cell goes. This menu is positioned absolutely or floated, the methods for which are in the documentation, particularly on the tutorial.html included in the distribution. There is no method offered to position it as part of a table or any other element. But, now the question becomes, why put it in a table? The idea is to configure it to appear where you want it to be on the page and then arrange the rest of the page so things look good.

mikeV
04-20-2005, 02:50 PM
hi jscheurer1

Thakyou for your help, now i understand how to place the menu in my home page using the correct coordinates without any frames , iframes or tables.

mikev