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}" />&nbsp;   <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

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -