LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-26-2006, 04:32 AM   #1
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 11
Posts: 1,288

Rep: Reputation: 52
HTML or Javascript combo select


I am only a casual Javascript user.

I need to present to the user a tree of "select/option" lists with 3 or 4 levels. Out of over 1,000 options the user will probably select between 1 and 3 options.

Can someone make suggestions on how to do this?

I do not mind doing it in HTML code using links unless advised otherwise. My concern is would HTML keep track of the different values selected and submit the lot when submitting the form?

I have downloaded a 2-levels Javascript script from the web which works on the web but does not work when downloaded, it looks like the main part of the script is not in the download and I am reluctant to spend a lot of time in finding out why it does not work as I assume it will need a substantial rewrite for 3 or 4 levels.

Any hint most welcome.
Thank you for your help.
 
Old 08-26-2006, 06:44 AM   #2
robbbert
Member
 
Registered: Oct 2005
Location: Hannover, Germany
Distribution: Let there be Ubuntu... :o)
Posts: 573

Rep: Reputation: 32
Quote:
I am only a casual Javascript user.
I guess, there would be some programming involved...

I would be able to write such a script. Nevertheless, it's you/yourself who needs to do it, after all.
I'ld be happy to assist with specific issues.

For a start, is there a link to what you've downloaded?
What's the exact data you want to display?
This is all client-side JavaScript, right?
 
Old 08-26-2006, 10:45 AM   #3
cramer
Member
 
Registered: Feb 2006
Distribution: Red Hat 9
Posts: 112

Rep: Reputation: 15
If this data is held on the server in some form or another in which it doesn't make sense to manually create all the option groups etc. then you might consider using some language such as Perl w/ CGI.pm to construct your options lists. It is a nice tool when it comes to handle large amounts of data for forms. It also allows the use of javascript in the way it presents the data.
 
Old 08-28-2006, 02:27 AM   #4
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 11
Posts: 1,288

Original Poster
Rep: Reputation: 52
Thank you for your answers. While waiting for these answers I tried a plain HTML script and the result is not as clumsy or bulky as I thought it would be, in fact it's very neat, so I think I'll use it and save the time trying to solve the problem with Javascript.

To robbbert: Thank you for the offer, I tried to retrieve the original scrip but I can't find it now, it was a cut-and-paste from a free javascript scripts site.
 
Old 08-28-2006, 12:21 PM   #5
robbbert
Member
 
Registered: Oct 2005
Location: Hannover, Germany
Distribution: Let there be Ubuntu... :o)
Posts: 573

Rep: Reputation: 32
OK. If it works that way, that's more than great.

BTW, how much KB of filesize is your HTML page. (Using client-side JavaScript, it wouldn't be smaller...)

(Just being curious. )
 
Old 08-29-2006, 06:14 AM   #6
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 11
Posts: 1,288

Original Poster
Rep: Reputation: 52
This HTML is just under 54k for exactly 734 entries to choose from using checkboxes, this involves a heading section of links to each main subject and, within these, a subsection of links to each sub-subject together with a submit button in each subsection.

It would probably be more efficient in Javascript but time is the biggest constraint.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP: html Form Select function problem camlinux Programming 2 05-15-2005 08:23 PM
Javascript / HTML <select> tag djgerbavore Programming 3 04-23-2005 10:51 AM
Html Javascript help apt Programming 3 03-20-2005 11:46 PM
Menu bar being blocked by combo box in html ArulPrabhuT Programming 3 01-05-2005 03:09 AM
changing an HTML table with javascript eantoranz Programming 2 10-29-2004 12:21 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration