This is a discussion on "Pulll Down menu referencing a list" within the Web Page Design section. This forum, and the thread "Pulll Down menu referencing a list are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Pulll Down menu referencing a list
|
||
| Notices |
![]() |
|
|
LinkBack (2) | Thread Tools |
#1
|
|||
|
|||
|
Pulll Down menu referencing a list
This is the code I am using at the moment for my pull down menu. It works great. I was wondering if it is possible to have the pull down menu reference a list file instead of entering each item separately like I did below. The reason is that if I make changes to the list file, it will be easier for me to maintain the pull down menu. Especially if I have the drop down code appearing on several pages on my web site.
Right now if I made a change to my links below and I have this code in three separate pages on my web site, I would have to make three separate changes. If I had my pull down menus referencing the same list file, then all I would have to do is make changes to that list file and all of my three pull down menus would reflect the changes made. I know that there must me an answer to this question. Thanks!! <select name="select15" onChange="window.open(this.options[this.selectedIndex].value,'_blank')"" style="width: 100%;"> <option selected>MUSIC</option> <option value="http://www.apple.com/">Apple</option> <option value="http://www.nfo.net/">Big Band database</option> <option value="http://www.ottawacarsija.com/"">Bosnian Radio</option> <option value="http://www.chuo.fm"">CHUO-FM</option> <option value="http://www.classicmoviemusicals.com"">Classic Movie Musicals</option> <option value="http://www.downbeat.com"">Downbeat Magazine</option> <option value="http://www.drummerworld.com"">Drummerworld</option> <option value="http://www.inamellowtone.blogspot.com/"">In A Mellow Tone</option> <option value="http://www.jazz.com/"">Jazz</option> <option value="http:/www.jazzreview.com/"">Jazz Review</option> <option value="http:/www.jazzstandards.com/"">Jazz Standards</option> <option value="http://www.musicweb-international.com/RiseandFall/index.htm"">Popular Music</option> <option value="http:/www.redhotjazz.com/"">Red Hot Jazz Archive</option> <option value="http://www.songwritershalloffame.org/"">Songwriters Hall Of Fame</option> <option value="http://www.touchemusic.se/"">Touche Music</option> </select> |
|
|
|
#2
|
||||
|
||||
|
Re: Pulll Down menu referencing a list
You could use an include? SO on each page you have:
__________________
Jack Franklin - Webforumz Moderator (x)HTML | CSS | PHP | MySQL | JQuery (Javascript) Contact: My Blog | Twitter | Delicious Want Lessons? PM me. If you think I've helped, please press the 'Thanks' Button.
Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
|
|
#3
|
|||
|
|||
|
Re: Pulll Down menu referencing a list
Thanks for the quick reply!! Much appreciated. I am totally new to all this HTML stuff so I need a lot of hand holding. How do I create a dropdown.php file to hold all of my option values?
If you go to my web site (www.mcran.com), you will see at the bottom of my home page I have three pull down menus. These menus also appear in the sidebar of some of my other pages as well as at the bottom of my Interviews page. If I understand correctly, All I have to do is create a php file for Music, one for computer, and the third for Shows each with their own .php file. Then all I have to do is update for example the Music.php file and all of my music pull down menus will reflect this change? If that is the case, this is exactly what I am looking for. |
|
#4
|
||||
|
||||
|
Re: Pulll Down menu referencing a list
Yep. Take your drop down into the new PHP file, and were it was, put:
<?php include('file.php'); ?> Noting that your pages must end with .php for thsi to work. Good luck, and any problems just post again
__________________
Jack Franklin - Webforumz Moderator (x)HTML | CSS | PHP | MySQL | JQuery (Javascript) Contact: My Blog | Twitter | Delicious Want Lessons? PM me. If you think I've helped, please press the 'Thanks' Button.
Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
|
|
#5
|
|||
|
|||
|
Re: Pulll Down menu referencing a list
I am using a Mac so do I just have to go into a text editor, put the drop down info in there and save it as Music.php? That's it?
|
|
#6
|
||||
|
||||
|
Re: Pulll Down menu referencing a list
Yep. Then add the include in your page. Good luck
__________________
Jack Franklin - Webforumz Moderator (x)HTML | CSS | PHP | MySQL | JQuery (Javascript) Contact: My Blog | Twitter | Delicious Want Lessons? PM me. If you think I've helped, please press the 'Thanks' Button.
Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
|
|
#7
|
|||
|
|||
|
Re: Pulll Down menu referencing a list
Thanks! Does the for example music.php file have to reside in a specific location on my hard drive?
Thanks for understanding my concerns. I am so new to all this stuff. |
|
#8
|
|||
|
|||
|
Re: Pulll Down menu referencing a list
Is this acceptable syntax?
<?php*include('http://www.myserver.com/files/music.php');*?> |
|
#9
|
||||
|
||||
|
Re: Pulll Down menu referencing a list
Almost there! Where have you got the * from!
<?php include('yourfile.php'); ?>
__________________
Jack Franklin - Webforumz Moderator (x)HTML | CSS | PHP | MySQL | JQuery (Javascript) Contact: My Blog | Twitter | Delicious Want Lessons? PM me. If you think I've helped, please press the 'Thanks' Button.
Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
|
![]() |
| Thread Tools | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://webforumz.com/web-page-design/65501-pulll-down-menu-referencing-a-list.htm
|
||||
| Posted By | For | Type | Date | |
| Realmac Software / Question regarding pull down menus on more than one page | This thread | Refback | Feb 23rd, 2008 11:33 | |
| Realmac Software / Question regarding pull down menus on more than one page | This thread | Refback | Feb 23rd, 2008 11:29 | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| php/mysql database fields into html list/menu | csun | PHP Forum | 4 | Jul 27th, 2007 16:04 |
| dropdown menu / list box | amalafrida | JavaScript Forum | 5 | Jul 27th, 2007 09:49 |
| menu/list width question | swiftmed | Web Page Design | 3 | May 19th, 2006 13:05 |
| Menu List. Select Multiple without Ctrl+Click? | Andy K | JavaScript Forum | 7 | May 10th, 2005 09:01 |
| A way to change background color of a menu list | gohankid77 | Web Page Design | 1 | Oct 12th, 2004 10:14 |