Here $('#selectShoppingList') will do the job instead of $('selectShoppingList') because it is an Id selector, we have to use # with Id value in jQuery selector. So the correct solution should be
$('#selectShoppingList').submit() Thanks and Regards -- Amardeep Singh Jhajj http://www.hotwaxsystems.com/ On Fri, Oct 7, 2016 at 4:08 PM, Scott Gray <scott.g...@hotwaxsystems.com> wrote: > Any indication as to why $('selectShoppingList') wasn't working? I'm not > up to date with our latest javascript framework but changing to document. > getElementById('selectShoppingList') seems like a workaround rather than a > fix. > > I'm also curious why the diff seems so large when the changes were much > smaller, as can be seen here: > http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ > ecommerce/template/shoppinglist/EditShoppingList. > ftl?r1=1763685&r2=1763686&pathrev=1763686&view=diff&diff_format=h > > Regards > Scott > > On 7 October 2016 at 12:59, <jler...@apache.org> wrote: > > > Author: jleroux > > Date: Fri Oct 7 07:29:58 2016 > > New Revision: 1763686 > > > > URL: http://svn.apache.org/viewvc?rev=1763686&view=rev > > Log: > > Fixed: cannot edit shopping list for ecommerce and ecomseo > > (OFBIZ-8348) > > > > go to https://localhost:8443/ecomseo > > login as DemoCustomer > > go to https://localhost:8443/ecomseo/editShoppingList > > create 2 shopping lists > > ofbiz shows the 2 shopping list. but you cannot select the first shopping > > list > > for editing > > > > Thanks: Wai for report, Pawan Verma for patch > > > > Modified: > > ofbiz/trunk/specialpurpose/ecommerce/template/ > > shoppinglist/EditShoppingList.ftl > > > > Modified: ofbiz/trunk/specialpurpose/ecommerce/template/ > > shoppinglist/EditShoppingList.ftl > > URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ > > ecommerce/template/shoppinglist/EditShoppingList. > > ftl?rev=1763686&r1=1763685&r2=1763686&view=diff > > ============================================================ > > ================== > > --- ofbiz/trunk/specialpurpose/ecommerce/template/ > > shoppinglist/EditShoppingList.ftl (original) > > +++ ofbiz/trunk/specialpurpose/ecommerce/template/ > > shoppinglist/EditShoppingList.ftl Fri Oct 7 07:29:58 2016 > > @@ -94,16 +94,16 @@ under the License. > > <#if shoppingLists?has_content> > > <form id="selectShoppingList" method="post" > action="<@ofbizUrl> > > editShoppingList</@ofbizUrl>"> > > <fieldset> > > - <select name="shoppingListId"> > > - <#if shoppingList?has_content> > > - <option value="${shoppingList. > shoppingListId}">${ > > shoppingList.listName}</option> > > - <option value="${shoppingList. > > shoppingListId}">--</option> > > - </#if> > > - <#list shoppingLists as list> > > - <option value="${list.shoppingListId}" > > >${list.listName}</option> > > - </#list> > > - </select> > > - <a href="javascript:$(' > selectShoppingList').submit();" > > class="button">${uiLabelMap.CommonEdit}</a> > > + <select name="shoppingListId"> > > + <#if shoppingList?has_content> > > + <option value="${shoppingList.shoppingListId}">${ > > shoppingList.listName}</option> > > + <option value="${shoppingList. > > shoppingListId}">--</option> > > + </#if> > > + <#list shoppingLists as list> > > + <option value="${list.shoppingListId}" > > >${list.listName}</option> > > + </#list> > > + </select> > > + <a href="javascript:document.getElementById(' > > selectShoppingList').submit();" class="button">${uiLabelMap. > > CommonEdit}</a> > > </fieldset> > > </form> > > <#else> > > @@ -247,14 +247,14 @@ under the License. > > </select> > > </span> > > <span> > > - <label>${uiLabelMap.CommonStartDate}</label> > > - <input type="text" class="textBox" > > name="startDateTime" size="22" value="${(recurrenceInfo. > startDateTime)?if_exists}" > > /> > > - <a href="javascript:call_cal(document.reorderinfo. > startDateTime, > > '${nowTimestamp.toString()}');"><img src="<@ofbizContentUrl>/ > > images/cal.gif</@ofbizContentUrl>" width="16" height="16" alt="Calendar" > > /></a> > > + <label>${uiLabelMap.CommonStartDate}</label> > > + <input type="text" class="textBox" > name="startDateTime" > > size="22" value="${(recurrenceInfo.startDateTime)?if_exists}" /> > > + <@htmlTemplate.renderDateTimeField > > name="startDateTime" className="" event="" action="" alert="" > > title="Format: yyyy-MM-dd HH:mm:ss.SSS" value="${(recurrenceInfo. > startDateTime)!}" > > size="25" maxlength="30" id="startDateTime1" dateType="date" > > shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" > > localizedIconTitle="" timeDropdown="" timeHourName="" classString="" > > hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" > ampmName="" > > amSelected="" pmSelected="" compositeType="" formName=""/> > > </span> > > <span> > > <label>${uiLabelMap.CommonEndDate}</label> > > <input type="text" class="textBox" name="endDateTime" > > size="22" value="${(recurrenceRule.untilDateTime)?if_exists}"> > > - <a href="javascript:call_cal(document.reorderinfo. > endDateTime, > > '${nowTimestamp.toString()}');"><img src="<@ofbizContentUrl>/ > > images/cal.gif</@ofbizContentUrl>" width="16" height="16" border="0" > > alt="Calendar"></a> > > + <@htmlTemplate.renderDateTimeField name="endDateTime" > > className="textBox" event="" action="" alert="" title="Format: yyyy-MM-dd > > HH:mm:ss.SSS" value="${(recurrenceRule.untilDateTime)!}" size="25" > > maxlength="30" id="endDateTime1" dateType="date" shortDateInput=false > > timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" > > timeDropdown="" timeHourName="" classString="" hour1="" hour2="" > > timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" > > pmSelected="" compositeType="" formName=""/> > > </span> > > </div> > > <div> > > @@ -365,12 +365,12 @@ under the License. > > <div class="screenlet-body"> > > <table> > > <thead> > > - <tr> > > - <th>${uiLabelMap.EcommerceListName}</th> > > - <th>${uiLabelMap.EcommerceListName}</th> > > - <th> </th> > > - <th> </th> > > - </tr> > > + <tr> > > + <th>${uiLabelMap.EcommerceListName}</th> > > + <th>${uiLabelMap.EcommerceListName}</th> > > + <th> </th> > > + <th> </th> > > + </tr> > > </thead> > > <tbody> > > <#list childShoppingListDatas as childShoppingListData> > > @@ -416,16 +416,16 @@ under the License. > > <@paginationControls/> > > <table width="100%"> > > <thead> > > - <tr> > > - <th>${uiLabelMap.OrderProduct}</th> > > - <th><table><tr><th>- ${uiLabelMap. > EcommerceStartdate} > > -</th><th>- ${uiLabelMap.EcommerceNbrOfDays} -</th></tr><tr><th>- > > ${uiLabelMap.EcommerceNbrOfPersons} -</th><th>- > > ${uiLabelMap.CommonQuantity} -</th></tr></table></th> > > - <#-- <td nowrap="nowrap" align="center"><div><b> > Purchased</b></div></td> > > --> > > - <th>${uiLabelMap.EcommercePrice}</th> > > - <th>${uiLabelMap.OrderTotal}</th> > > - <th> </th> > > - </tr> > > - </thead> > > - <tbody> > > + <tr> > > + <th>${uiLabelMap.OrderProduct}</th> > > + <th><table><tr><th>- ${uiLabelMap. > EcommerceStartdate} > > -</th><th>- ${uiLabelMap.EcommerceNbrOfDays} -</th></tr><tr><th>- > > ${uiLabelMap.EcommerceNbrOfPersons} -</th><th>- > > ${uiLabelMap.CommonQuantity} -</th></tr></table></th> > > + <#-- <td nowrap="nowrap" align="center"><div><b> > Purchased</b></div></td> > > --> > > + <th>${uiLabelMap.EcommercePrice}</th> > > + <th>${uiLabelMap.OrderTotal}</th> > > + <th> </th> > > + </tr> > > + </thead> > > + <tbody> > > <#list shoppingListItemDatas[lowIndex-1..highIndex-1] as > > shoppingListItemData> > > <#assign shoppingListItem = shoppingListItemData. > > shoppingListItem/> > > <#assign product = shoppingListItemData.product/> > > > > > > >