On Fri, September 30, 2005 4:53 am, gollinger said: > Hi! > > I've two html:selects within a form. > The selected value of the first determines > the possible values in the second select box. > Now the onchange-Event fires a client-side Javascript Event. > Is it better to change this and put the functionaly > in a Java-Class. Would this be possible? > > <html:select onchange="javaclass.dosomething"> > .... > > Is this a good practise?
It's not a good practice because it isn't possible :) The onChange event handler is strictly client-side, it doesn't know about any Java classes on the server. To do what you describe requires some plumbing on the client that knows how to call back to the server. Thinks like AJAX comes to mind. ASP.Net and JSF do this type of thing too. There's lots of ways to crack this nut, but they are all going to require some client-side scripting to call the server, maybe a little, maybe a lot, depends on the approach. > Thanks for any opinions! -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]