Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP function

 
Kinga Cserveny
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone please help,
I have been working on this problem for the last 2 days. I have written a function that will be activated when a value is selected from a dropdown. And this function should select the same index item in another text box called "trd_cls_ef_date_day".
I can not get it working, I can output the index of the first selected drop down in a text field, but can not get it to select the second text box. Code is below
//************************
js.append("\n<script language=\"javascript\">");
js.append("\nfunction setOtherDates(index) {"+
"\ndocument.form.trd_cls_ef_date_day.options[index].selected=true;"+
"\n}"+
"\n</script>");
//*****************************
thank you for your help.
kinga
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
might try posting this to the JavaScript forum...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic