LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-17-2004, 11:53 AM   #1
belorion
Member
 
Registered: Aug 2003
Distribution: Slackware 10.0
Posts: 124

Rep: Reputation: 16
HTTP Forms question


Yeah, I know that most don't consider HTML "programming", but I figure this is the best place to ask the question.

I have a webpage which has a form in it. In this form is a drop box... this drop box is *very* large, and I basically have 6 different dropboxes with the same options in the drop. In other words, I have 6 very large drop boxes which all have the same options.

As a result, my page renders rather slowly. Is there a way to tell the drop box to use the same options as another? I figure this might be accomplished with javascript, but I wasn't sure how to go about implementing it.

Thanks.
 
Old 12-17-2004, 12:14 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Probably the simplest way would be with javascript like:
Code:
<script language="javascript">
options="<option>Option 1</option><option>Option 2</option><option>Option 3</option>";

document.write('List 1 <select name="list1">'+options+'</select><br>');
document.write('List 2 <select name="list2">'+options+'</select><br>');
document.write('List 3 <select name="list3">'+options+'</select><br>');
</javascript>
 
Old 12-17-2004, 02:24 PM   #3
belorion
Member
 
Registered: Aug 2003
Distribution: Slackware 10.0
Posts: 124

Original Poster
Rep: Reputation: 16
That looks perfect, thanks!
 
  


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
apache: http://localhost (work) http://ipaddress (not working) sarmad Linux - Newbie 7 02-05-2013 07:47 AM
Firefox - HTTPS works, but HTTP doesn't, any ideas? (Newbie question) RichardDarling Linux - Networking 2 11-03-2005 08:23 AM
http filserver question compu73rg33k Linux - Software 2 06-07-2004 10:37 AM
HTTP Question gauge73 Linux - Networking 6 04-19-2004 03:31 PM
a question about http or dns not sure? peterb Linux - Networking 14 12-03-2003 02:32 AM

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

All times are GMT -5. The time now is 10:31 AM.

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