|
Hi All,
I want to use two buttons with two different target in a form. Can it possible or not. Thanks Dhiraj Gupta
Dhiraj Gupta
|
|
of course!
as example from categoryForms.xml: .... <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field> <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> <hyperlink target="deleteProductCategoryAttribute" description="${uiLabelMap.CommonDelete}"> <parameter param-name="productCategoryId"/> <parameter param-name="attrName"/> </hyperlink> </field> .... Am 25.07.2012 08:46, schrieb dhiraj.g [via OFBiz]: Hi All, |
|
In reply to this post by dhiraj.g
You can manage the form targets with JavaScript too with each button click.
RRH
|
|
In reply to this post by Robert Gan
Hi Robert,
Thanks for your reply. <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> <hyperlink target="removeGroupFromFacility" description="${uiLabelMap.CommonDelete}" also-hidden="false"> <parameter param-name="facilityId"/> <parameter param-name="facilityGroupId"/> <parameter param-name="fromDate"/> </hyperlink> </field> deleteLink is define by Ofbiz.But i want to use my customized button. Thanks Dhiraj Gupta
Dhiraj Gupta
|
|
This is not a problem. You can change
title, style, target, description and so on...its nothing ofbiz
specific. You see the target is "removeGroupFromFacility", so
there you can add your target...(in my button it was
"deleteProductCategoryAttribute" --> its just the service name
which is called in service.xml)
Am 25.07.2012 08:56, schrieb dhiraj.g [via OFBiz]: Hi Robert, |
|
In reply to this post by rrhati2010
Hi rrhati2010
Thanks for your reply Any example for handling form target with JavaScript too with each button click. Thanks Dhiraj Gupta
Dhiraj Gupta
|
|
with javascript I just know how to
include into html / ftl etc.
there you have to change the attribute "target" in the sourrounding "form" tag with java script. Give your buttons a name or id or class... than you can grab them with java script and change the target in time depending on whcih button is clicked. but be carefully, cause people who havent enabled java script, cannot use these buttons in that case! Than you have to use helper methods like <noscript></noscript> or you have to live with that :) kindly Am 25.07.2012 09:00, schrieb dhiraj.g [via OFBiz]: Hi rrhati2010 |
|
Hello everyone,
i have a similar issue. i have a multi type form with two submit button. And i need to have two target for two submit button at the same form. so far what i have learned from this thread that it can be done by javascript. but can't solve the problem. could any one kindly give me any example here pls....... |
| Free forum by Nabble | Edit this page |
