It can work if jsp has only one button or the buttons in jsp have the same check rule. But in my jsp, there are several buttons and their check rule are not similar. For example, there is a button in jsp for displaying in the same jsp another part which has a button to be checked. Under this case, it is not proper to put javascript:oncheck to form tag. Any better techniques?
sophy ----- Original Message ----- From: "Aurelien Pernoud" <[EMAIL PROTECTED]> To: "'Jetspeed Users List'" <[EMAIL PROTECTED]> Sent: Tuesday, August 05, 2003 4:23 PM Subject: RE: Problem in portlet action > > Hmm this may work : > > Change back your input to "submit", remove the onclick from it and add a > onsubmit attribute on the form tag like this : > > <form onsubmit="return > oncheck(document.propertySet.elements['propertyValue'].value)" > > I "think" this will submit the form only if oncheck returns true, and your > parameter will be added as it's a submit button this time :) That's worth a > try ! Tell me if that works, just to know > > sophy a �crit : > > > thanks for your replying. > > Yes,I have been awared of my misunstanding and change > > type="submit" to type="button". However, It would not work > > even if I call form.submit() because it could not call the > > "eventSubmit_doAddvalue" action. Then I tranfer two > > parameters <%= request.getRequestURI()%> and the action > > [eventSubmit_doAddvalue'].name to javascipt and form an > > action and then form.submit(). Although It works now, it > > often change the url and and I have to redirect utl in > > "doAddvalue". This is a very bad method , I think. Do you > > have better ways to resolve this problem? > > > > sophy > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > >
