I have an ajax callback setup on a dialog that works fine whenever you are just typing in a value and it searches the table for any value that matches it and gives a list to click on and select one.
The problem is the button that is associated with the drop down edit combo box.
It freezes up IE for a few minutes, then drops the entire list and recoils it back.
It drops the list normally in firefox, but refreshes the page. If you are selecting one of the values, and hit the enter key, instead of clicking on the value you want, it also refreshes the page.
The callback is setup using the:
Web_Applications_Demo_V9
Example 10.13 AJAX_EditCombo
You can see this in action at: http://72.18.202.84/scc/inventoryinput.a5w
The call back is setup on the Stock Code line.
Script on the page for the callback:
Ajax callback page:
Any suggestions would be appreciated. The list that it opens is about 5100 lines of data. Could it just be the amount that it attempts to open? I have often considered that as the reason for the issue.
If that is the case, I wonder if it would be possible to eliminate that button, and just leave the drop down whenever you type in a stock code to select.
The problem is the button that is associated with the drop down edit combo box.
It freezes up IE for a few minutes, then drops the entire list and recoils it back.
It drops the list normally in firefox, but refreshes the page. If you are selecting one of the values, and hit the enter key, instead of clicking on the value you want, it also refreshes the page.
The callback is setup using the:
Web_Applications_Demo_V9
Example 10.13 AJAX_EditCombo
You can see this in action at: http://72.18.202.84/scc/inventoryinput.a5w
The call back is setup on the Stock Code line.
Script on the page for the callback:
Code:
<input id="dlg_inventory_edit_STOCKCODE" style="WIDTH: 2in" name="STOCKCODE"> <button id="ecButton" class="A5EditComboButton" style="MARGIN-TOP: -3px; POSITION: relative"> <img style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px -3px; PADDING-TOP: 0px" hspace=0 src="images/$$navigate.move.down.png.a5image" > </button> <script type="text/Javascript"> var editComboExp = new a5_AJAX_editCombo('dlg_inventory_edit_STOCKCODE','ecButton',{ width: '2.0in', height: '3in' }); a5_AJAX_Callback('sccinv.ajax.a5w','action=poulateList&listID=editComboExp'); editComboExp.fixButtonPosition(); </script>
Code:
<%A5 dim action as c = default "" if action = "poulateList" then dim tablePath as c tablePath = _A5_Aliases.get("PathAlias.ADB_Path") dim tableFN as c tableFN = tablePath + chr(92) + "itemid.dbf" dim stockcode as c stockcode = table.external_record_content_get(tableFN,"alltrim(stockcode)","stockcode","unique_key_value()") stockcode = stritran(stockcode,"'","\'") 'encode so that it is safe for Javascript stockcode = *for_each(x,"'" + alltrim(x) + "'", stockcode) 'turn each name into a Javascript string. stockcode = "[" + stritran(alltrim(stockcode),crlf(),",") + "]" 'put the list into Javascript array format. dim listID as c ?listID + ".data = " + stockcode + ";" end if %>
If that is the case, I wonder if it would be possible to eliminate that button, and just leave the drop down whenever you type in a stock code to select.