> Hey all, I am wondering if you can remove a session attribute on an
> onchange command, this is what I have:
>
> <SELECT name='TestMenu2' onChange='<%session.removeAttribute("test");%>
> clearMenu(2);clearMenu(3);this.form.submit();'>
No, you can't do that. JSP scriptlets are executed on the server when
the page is being created, and can't be attached to JavaScript events in
the manner you're trying to do. The contents of onChange need to be
JavaScript code, which is run on the client. If you want to remove a
session attribute, you'll have to write your JavaScript to generate a
request to the server, and then have a servlet do it on the server.
> to my JSP page which ends up removing the attribute, but doesnt show
> the difference in the page header until the page is finally refreshed,
> which I dont beleive there is an easy way to do in the if statement.
If you want to change the page content, then that's even more involved.
Look into accessing the DOM from JavaScript. None of it is on-topic in
this newsgroup, and I'm sure the people in comp.lang.javascript would be
happy to help.

Signature
Chris Smith - Lead Software Developer / Technical Trainer
MindIQ Corporation