javascript - JSF commandButtons both open separate window, but only one should -
the following 2 command buttons both open second browser, have onclick
target _blank
on second button. unexpected behavior appears clicking second view report button , clicking first update chart:
<h:form> <h:commandbutton value="update chart" action="#{commitment.loadchartdata}" /> <h:commandbutton value="view report" action="#{ccommitment.generatereport}" onclick="this.form.target='_blank'" /> </h:form>
well, if click second button set target
property of form
object. property stay _blank
, applied on first button click. can reset property in onclick
of first button.
Comments
Post a Comment