CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 Changing values in list box client side

Print topic Send  topic

Author Message
dhodgdon

Posts: 80
Posted: 07/28/2004, 4:20 AM

I have two list boxes (configured as combo boxes) A & B in a form. If the user changes the value in A I want to immediately change the value of B to match it. If it would be easier, I could change the second list box to be either a lable or text box. I don't use the value of the second box...it is there as a place keeper to make the form more understandable.

I added the code below to the On Change Client event. The code errors out when the page loads and, not knowing much about Java, I don't know why and the error code returned does not help.

<SCRIPT LANGUAGE="JavaScript">
function fillcombo(){
document.Courses.VideoB.options =
new Option(document.courses.VideoAB.options, document.courses.VideoAB.options);
}
</SCRIPT>

The page name is Courses_maint.asp
The form name is Courses
The first listbox is VideoAB
The second listbox is VideoB
_________________
Regards,
David Hodgdon
View profile  Send private message
Anton Hinxman
Posted: 07/29/2004, 12:13 AM

Try setting IE to debug any errors in scripts:

Tools, Internet Options, Advanced tab, click to enable "Display a notification about every script error".

If you debug the error after such notification then you will know the error but also see the DOM structure of the page.

Unfortunately, after such a debug IE just crumples and will unload all of the IE sessions running.

If you wanted a better DOM structure examination of your pages try Mozilla www browser but you will then suffer from a poorer JavaScript implementation.

You will be amazed at how many script errors there are on the www.

Also hava a look at setting the Format/id value of your combo controls. Setting such an id will expose the combos at a simpler DOM level.

Anton Hinxman

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.