This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes JSP function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP function" Watch "JSP function" New topic
Author

JSP function

Kinga Cserveny
Greenhorn

Joined: Aug 29, 2001
Posts: 18
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

Joined: Oct 17, 2001
Posts: 4313

might try posting this to the JavaScript forum...


- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP function
 
Similar Threads
Passing parameters in XSL to JavaScript
how can i send a request to a servlet without submitting the whole form
How to show selected value, and name of list menu
Passing parameters in XSL to JavaScript
Having trouble with javascript ...