One Form with two button and two target

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

One Form with two button and two target

dhiraj.g
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
Reply | Threaded
Open this post in threaded view
|

Re: One Form with two button and two target

Robert Gan
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,
I want to use two buttons with two different target in a form.
Can it possible or not.


Thanks
Dhiraj Gupta
dhirajgupta



If you reply to this email, your message will be added to the discussion below:
http://ofbiz.135035.n4.nabble.com/One-Form-with-two-button-and-two-target-tp4635213.html
To start a new topic under OFBiz, email [hidden email]
To unsubscribe from OFBiz, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: One Form with two button and two target

rrhati2010
In reply to this post by dhiraj.g
You can manage the form targets with JavaScript too with each button click.
RRH
Reply | Threaded
Open this post in threaded view
|

Re: One Form with two button and two target

dhiraj.g
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
Reply | Threaded
Open this post in threaded view
|

Re: One Form with two button and two target

Robert Gan
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,
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
dhirajgupta



If you reply to this email, your message will be added to the discussion below:
http://ofbiz.135035.n4.nabble.com/One-Form-with-two-button-and-two-target-tp4635213p4635216.html
To start a new topic under OFBiz, email [hidden email]
To unsubscribe from OFBiz, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: One Form with two button and two target

dhiraj.g
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
Reply | Threaded
Open this post in threaded view
|

Re: One Form with two button and two target

Robert Gan
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
Thanks for  your reply
Any  example  for handling form target with JavaScript too with each button click.

Thanks
Dhiraj Gupta
dhirajgupta



If you reply to this email, your message will be added to the discussion below:
http://ofbiz.135035.n4.nabble.com/One-Form-with-two-button-and-two-target-tp4635213p4635218.html
To start a new topic under OFBiz, email [hidden email]
To unsubscribe from OFBiz, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: One Form with two button and two target

ershad
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.......
Reply | Threaded
Open this post in threaded view
|

Re: One Form with two button and two target

thanh
I have the same problem,