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

Creating New Folders in 'Drop Down Menu' (JavaScript)

135 100+
How do I create a new folder in a 'Drop Down Menu' using JavaScript? I have not tried anything yet, so all idea's are welcomed.
May 24 '07 #1
6 1961
acoder
16,027 Expert Mod 8TB
What do you mean by 'new folder'? Do you mean a second-level menu?
May 24 '07 #2
patelxxx
135 100+
What do you mean by 'new folder'? Do you mean a second-level menu?
I have a "Dropdown Menu" where users can select their folders, I would like an option for "New Folder" (i.e. add a new folder) and once this option is selected a "new" folder is created.
May 24 '07 #3
acoder
16,027 Expert Mod 8TB
I have a "Dropdown Menu" where users can select their folders, I would like an option for "New Folder" (i.e. add a new folder) and once this option is selected a "new" folder is created.
Can you post some code so we can work with that.
May 24 '07 #4
patelxxx
135 100+
function addOption (selectbox, text, value)
{
var optn = document.createElement("OPTION");
optn.text;
optn.value;
selectbox.options.add(optn);
}


var my_string = prompt ("Enter your New Folder Name: ")
document.write(my_string);
May 24 '07 #5
patelxxx
135 100+
Can you post some code so we can work with that.
function addOption (selectbox, text, value)
{
var optn = document.createElement("OPTION");
optn.text;
optn.value;
selectbox.options.add(optn);
}


var my_string = prompt ("Enter your New Folder Name: ")
document.write(my_string);
May 24 '07 #6
acoder
16,027 Expert Mod 8TB
See this tutorial for a standards-compliant method.
May 24 '07 #7

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

Similar topics

3
by: KK | last post by:
Drop-down menus are the hottest thing since Wonder Bread but . . . 1. Alot of people put them in the they-look-nice-but-you-cant-code-them-right-so-they-always-look-messed-up category (a la...
1
by: Greg Scharlemann | last post by:
I would like to automatically populate a drop down menu when the page loads based on the selection of an item in a different drop down menu. I made a test page that when drop down #1 changes, drop...
9
by: Harry | last post by:
I am accumulating over 80 pages per day into an archive that I will need to be able to present sequentially to viewers. Using html to viewing a page, then click on back to return to my archive...
4
by: Yuk Cheng | last post by:
<<<start index.htm>>> <html> <head> <script> function perform(action){ } </script> </head>
2
by: hemanth.singamsetty | last post by:
Hello there, I've a drop down menu (created using CSS & Javascript -- see code below). My problem is, whenever I click a link on the menu the new page replaces the current page (and the menu...
2
by: pantagruel | last post by:
I have an old web application I did where browsers with dynamic capabilities received a drop down menu on the top of the page and a fold out on the left hand side of the page and non-dynamic...
4
by: simon.cigoj | last post by:
I have an javascript made menu and some forms with the dropdown element. When the menu opens and scrolls down the drop down is displeyed over the menu and obscures the menu choices. I have this...
22
by: Archanak | last post by:
Hi, I am using 2-level CSS Drop Down Menu in my perl/CGI program. here is the code. #!c:/perl/bin/perl.exe use CGI qw(:standard);
0
by: mjohnson0321 | last post by:
I am trying to incorporate a CSS drop-down menu into a site (suckerfish menu). The menu gets lost behind the content below it, but only on one of the drop downs (News). The error occurs on all of...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.