473,396 Members | 1,968 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,396 software developers and data experts.

javascript menu help

I am creating a webpage and a need a series of drop-down menus.
I have the menu values in an excel file with 2 columns. comment and value

i want the meu to display:
comment 1 (value 1)
comment 2 (value 2)
comment 3 (value 3)

ie thryoidectomy (441030)
resection (45313)
biopsy (34333)

if you select biopsy the output is 3433, or if you select thyroidectomy the output is 441030

is there a way to write code so that the menu is created from a fiile?

thank you,
-a
Nov 16 '06 #1
2 1132
steven
143 100+
It is possible, however an excel spreadsheet file isn't the best method.

You can output your spreadsheet to CVS file (plain text representation of your spreadsheet), which you can then parse and use the data as you wish. You could also use an XML file, placing the data in an XML and parsing this to receive the data you need.

An XML file is simple and looks something like this:

Expand|Select|Wrap|Line Numbers
  1. <menu>
  2.  
  3.   <item>
  4.     <item_name>
  5.     <item_value>
  6.   </item>
  7.  
  8.   <item>
  9.     <item_name>
  10.     <item_value>
  11.   </item>
  12.  
  13.   <item>
  14.     <item_name>
  15.     <item_value>
  16.   </item>
  17.  
  18. </menu>
  19.  
Nov 16 '06 #2
thank you for your help.
i can get the data out of an excel file into any format, i am just not sure how to import this into javascript to appear as menus.

thank you,
-a



It is possible, however an excel spreadsheet file isn't the best method.

You can output your spreadsheet to CVS file (plain text representation of your spreadsheet), which you can then parse and use the data as you wish. You could also use an XML file, placing the data in an XML and parsing this to receive the data you need.

An XML file is simple and looks something like this:

Expand|Select|Wrap|Line Numbers
  1. <menu>
  2.  
  3.   <item>
  4.     <item_name>
  5.     <item_value>
  6.   </item>
  7.  
  8.   <item>
  9.     <item_name>
  10.     <item_value>
  11.   </item>
  12.  
  13.   <item>
  14.     <item_name>
  15.     <item_value>
  16.   </item>
  17.  
  18. </menu>
  19.  
Nov 17 '06 #3

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

Similar topics

2
by: Rob McLennan - ZETLAND | last post by:
Hi, I have set up an external stylesheet, named "print.css", to format the style of all pages printed from my company's website. I've been previewing my changes to the stylesheet by doing...
7
by: Marci | last post by:
I found this script for cascading menus, however, I cannot reach the author to solve the bug I am having when I add a second menu to it. My problem is this: If I click on the first link, the...
2
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at...
16
by: Jay | last post by:
I've been using Travis's Expanding Menu (http://www.squidfingers.com/code/dhtml/expandingmenu/) for a site i'm working on. The problem is I need to add some functionality to it. I need the the...
2
by: polo | last post by:
Hi i am trying to get a horizontal menu and sub menu in css, which works great on my Firefox But, in order to get around the ie hover bug, i included some javascript which gives me a strange...
8
by: chrisdude911 | last post by:
how do i add video into a javascript web page with my own custom buttons?
12
by: tim | last post by:
I am using foldoutmenu 3 and am having problems with viewing my menus in firefox. On my sub3 menus i have more than one line of text in some places. firefox does not recognise that there is more...
4
torquehero
by: torquehero | last post by:
Hi all :) I have created a horizontal navbar using Xara Menumaker. The Menu items have several dropdown menus. Its a javascript. When the mouse cursor is moved over any menu item, a dropdown...
3
by: Jlcarroll | last post by:
Hi, I am building a web page.and have a simple javascript menu... I call the javascript menu within a div block that my print sytlesheet has set as a display: none;, well all the content in that...
3
by: mportman300 | last post by:
Have pity on me.. i have been doing html, css, javascript squarely over 2 years... and am now doing a family project.. in my project i have decided to use a context menu script, its a menu that...
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.