CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 help me pls!!!

Print topic Send  topic

Author Message
newbie
Posted: 04/23/2002, 8:06 AM

i have a table student which contains studentid and studentname.i have another table which is attendance.i need to update the student attendance so i need to key in the studentid and studentname..right now i need to select the studentid in the listbox and the studentname automatically appears in my studentname listbox/textbox/whatever...how do i do that?can anyone pls help???any help will be appreciated!
Nicole
Posted: 04/24/2002, 12:40 AM

Hello,
it could be done with JavaScript. Create JS function that catch selected value (lets say student name) from ListBox and put it to textbox. Assign function to onchange event of Listbox.
Here is sample code:

<script language = "JavaScript">
document.FormName.student_listbox.onchange = set_val;
function set_val()
{
var set_f = document.FormName.student_textbox_field;
var get_f = document.FormName.student_listbox;
set_f.value = get_f.options[get_f.selectedIndex].text
}
</script>

   


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.