473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

making a dynamic menu with asp

347 100+
i am trying to make a menu that has 4 sections and all the information comes from my database

i have main sections UK Accents, Ages, Styles, World Accents, Foreign Languages.

in these there will be links to various pages.
the links are called voicetype in my database and also have a setting for type which includes a reference to the sections

i.e. the age 40's has a voicetype of 40 and a type of Ages

i am trying to find a way of listing these depending on whether a person on our site is in the voicetype catagory?

Hope this make sense

the site can be seen at

http://www.yaketyyak.co.uk

unfortunately i have no page to show on an attempt at this all i ahve is the artists pages that have text links on them in 1 list but i want to seperate them out in the seperate catagories

i hope i have the right section for this

many thanks
Oct 10 '12 #1
11 2755
Rabbit
12,516 Expert Mod 8TB
I must not understand what you're looking for because I'm looking at that site and it seems to filter the list just fine when clicking on different categories.
Oct 10 '12 #2
colinod
347 100+
Hi rabbit

It's not that it does not work I think it works fine but we have had users not realise that the text links take them to other versions of the artists pages so I have been asked to make a version of what is on the previous page to the right of the biography on the artist page so that is why I am trying to do this

Silly I think but have been asked to do it
Oct 10 '12 #3
Rabbit
12,516 Expert Mod 8TB
Can you do a mockup of what you want to accomplish? I'm having trouble visualizing what you're asking for.
Oct 10 '12 #4
colinod
347 100+
Hi Rabbit

try looking at this

http://www.yaketyyakallmouth.com/pag...&voicetype=All

although sizing is not as i want it the idea is there.

I want to be able to only have the main button appear if the artist is any of the catagories in it, and obviously just the buttons for the catagories relevant to the artist

thanks

colin
Oct 11 '12 #5
Rabbit
12,516 Expert Mod 8TB
It sounds like you have all the data you need in the database about what types the artist specializes in. You can check against the recordset you're returning from the database and if the type is in the recordset, then output it, otherwise don't. In pseudocode, it would be something like this
Expand|Select|Wrap|Line Numbers
  1. recordset = "select * from sometable where artist = 'some artist'"
  2.  
  3. if "sometype" is in recordset then
  4.    output "sometype"
  5. end if
  6.  
  7. repeat for other types
The exact syntax you end up using will be different, but the logical idea is there.

Another option that you have is to reuse your existing code if you have any. You are either hard coding that menu on my left or you are doing it dynamically from data in the database. If it's the latter, you can use the same code, just use a different recordset.
Oct 11 '12 #6
colinod
347 100+
Thanks for that i suppose it it just be a long list of if then and if else statements like i do to get the text in, the thing i can figure out is how to seperate out the things into seperate sections i.e. the ages under the ages button etc and also how i would not show a main section if they were not in it, like USA World accents etc
Oct 11 '12 #7
Rabbit
12,516 Expert Mod 8TB
It doesn't have to be a long list of if statements. That was just to get the logical idea across. As I don't know how you currently code that menu, it's hard to make any definitive suggestions.

You would "seperate out the things into seperate sections" the same way you do it now. I don't know how you're doing it currently but just do it the same way and it will be in the correct section.

As for the main section, you would do a check just like you would for the subsections.

Without any code, it's difficult to say say specifically what has to be done. Once you have some code, we can get into specifics, but until then, I can only offer generic suggestions on approach.
Oct 11 '12 #8
colinod
347 100+
Ok i only have the main sections set agains the things in the sperate sections so i suppose the best way would be to add that information to the database.

At the moment my code for the text loops through with an if then that changes certain sections to add spaces and characters if needed so i can cope with that

can i do an if loop and say something like if 'sometype' is in recordset and is in 'maintype' then show it?

thnaks
Oct 11 '12 #9
Rabbit
12,516 Expert Mod 8TB
That's one way of doing it. A more efficient way would be to build a menu from any given set of records without having to check if it's in there. But that might be more work. I can't say if it would be more work without knowing how it's currently done.
Oct 11 '12 #10
colinod
347 100+
The current menu your looking at is hand codes without a database using a HTML list jquery and styles
Oct 11 '12 #11
Rabbit
12,516 Expert Mod 8TB
Then it would be more work to create it dynamically. And if you're looking for a fast turn around, then I would just jury rig it with a bunch of checks that you can just copy and paste and change the type. But if you have the time to work it out, I would create the menu dynamically in code so maintenance and flexibility is improved.
Oct 11 '12 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Macamba | last post by:
Hi all, I am currently developing a website for a voluntary organisation. It is my first step in website development. The dynamic menu I developed has some bugs, which I addressed in another...
10
by: Gernot Frisch | last post by:
Hi, I have found some menu functions. It works quite well, but how can I replace it with a simple <a href> if javascript is turned off? I reduced my code to:...
4
by: Stromboli | last post by:
hi people, My problem is that I need to build a dynamic menu (preferably that works in all the browsers) that appears when I mouseover a certain link. The problem is that I have to declare...
7
by: zorhel | last post by:
Hi. I will do a dynamic menu for a asp.net app.. I don't know yet if how I will get the data for populate this menu: from a sql server database, xml file or what, but I know it will be dynamic any...
4
by: spx27 | last post by:
Does anyone know the best way to handle passing a dynamic menu generated from a login from one asp.net page to another. Would it be better to recreate the menu on each page? Save the menu as a...
1
by: biela | last post by:
Hi I'm from Poland and I have small question :). I'm looking for sample example how to create dynamic menu. Generaly my website will see like that ------------------------------------ 2...
1
by: tribal boy | last post by:
Guys, I am using a dynamic menu which uses xml,xsl a css file and javascript. This works fine when there are no server controls around or underneath it. The problem is whenever the menu...
0
by: Oded Dror | last post by:
Hi there, I'm using ASP.NET 2.0 with VWD 2005 I created a master page with web sitemap And attached Dynamic Menu Now when I set all dynamic menu properties to BackColor = Transparent...
4
by: SAL | last post by:
Hello, is there a way to menu control dynamically center itself horizontally on a page? I have placed a menu control in a panel control (no ajax) and would like it to center itself. Depending on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.