Thanks Hans,
Also an anchor can be placed outside the form, if somehow there occurs a
need to change the position of the anchor on the page. Thus facilitates
to submit any form within the document.
--
Ashish Nagar
Hans Bakker wrote:
Ok, sounds reasonable
i can support this.
Regards,
hans
On Wed, 2009-04-22 at 13:04 +0530, Ashish Nagar wrote:
Hello Hans,
We have used anchors throughout the applications, wherever needed to
pass url parameters. Doing this change, ensures that the layout of the
link will be same as previous one and used consistently throughout the
system. This is equally important on the pages, where there are some
links which are not calling any service, so need not to modify and also
the links which are calling service, need to be modified. Having a
consistent way to pass the parameters is a good idea. Using javascript
leverages you to use it in various manners.
Although you can apply the same css on the submit button as well, but
there will be a very minor difference in the layouts of a submit button
and an anchor.
Thanks & Regards,
--
Ashish Nagar
Ashish Vijaywargiya wrote:
These are the way of handling the same thing.
To maintain consistency I did this change.
Let's see what other has to say about this.
I am fine with either option.
--
Ashish
Hans Bakker wrote:
can you tell me what the advantage is to do this?
in my opinion it makes the code unnecessary complicated.
regards,
Hans
On Wed, 2009-04-22 at 10:57 +0530, Ashish Nagar wrote:
jler...@apache.org wrote:
- <a
href="<@ofbizUrl>removePartyFromCategory?productCategoryId=${(productCategoryRole.productCategoryId)?if_exists}&partyId=${(productCategoryRole.partyId)?if_exists}&roleTypeId=${(productCategoryRole.roleTypeId)?if_exists}&fromDate=${productCategoryRole.getString("fromDate")}</@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonDelete}</a>
+ <FORM method="post"
action="<@ofbizUrl>removePartyFromCategory</@ofbizUrl>"
name="lineForm_delete${line}">
+ <#assign hasExpired = false>
+ <input type="hidden" name="productCategoryId"
value="${(productCategoryRole.productCategoryId)?if_exists}">
+ <input type="hidden" name="partyId"
value="${(productCategoryRole.partyId)?if_exists}">
+ <input type="hidden" name="roleTypeId"
value="${(productCategoryRole.roleTypeId)?if_exists}">
+ <input type="hidden" name="fromDate"
value="${(productCategoryRole.getTimestamp("fromDate"))?if_exists}">
+ <INPUT type="submit"
value="${uiLabelMap.CommonDelete}" style="font-size: x-small;">
+ </FORM>
Just wondering, could we use anchor <a href= "javascript:
document.lineForm_delete${line}.submit()" class=
"buttontext">${uiLabelMap.CommonDelete}</a> instead of a submit
button so as to maintain consistency?
--
Ashish Nagar