Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 10th, 2004, 05:56 AM
Friend of Wrox
Points: 486, Level: 7
Points: 486, Level: 7 Points: 486, Level: 7 Points: 486, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: Athens, , Greece.
Posts: 105
Thanks: 0
Thanked 0 Times in 0 Posts
Default Onchange listbox

Hello!

I need some help here!

I have two listboxes with numbers from 1 to 30 (in the same page). When a user selects a value in the 1st listbox I want this value to be inserted in the 2nd listbox too... So, how can I do this?

Thank you in advance!!!
Reply With Quote
  #2 (permalink)  
Old June 16th, 2004, 07:45 AM
Authorized User
 
Join Date: Jun 2004
Location: Tirupati, Andhra Pradesh, India.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Vagelis,

  Cosider two listboxes d1,d2
  to add values to d2 on clicking yo have to write the following in the script

  document.forms[0].d2.options[0] = new Option(DisplayNmae,OptionValue);
  Here Display Name is display value in the list box and Option Name is the name of that value.
   to add numbers eg 45,46 to list box u have to write
    document.forms[0].d2.options[0] = new Option("45","item1");
    document.forms[0].d2.options[1] = new Option("46","item2"); ...

Here onwards plz specify u'r query clearly,Here u din't said whether the query is on HTML or some thing else.

let me here from u..

Prasanth.c


prasanth.c
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Event:OnChange catchrohith Classic ASP Basics 0 November 3rd, 2006 12:52 AM
OnChange issue kdyer Beginning PHP 2 October 4th, 2006 06:45 AM
submit form on listbox onchange webnitro Javascript How-To 3 December 10th, 2005 08:31 PM
'onChange' crmpicco Javascript How-To 2 January 28th, 2005 05:37 AM
access listbox in onchange event ozcyberus1 JSP Basics 0 September 6th, 2004 05:34 PM



All times are GMT -4. The time now is 06:45 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.