<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Dropdown Menu Behavior After Ajax Fail]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=8919</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8919&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Dropdown Menu Behavior After Ajax Fail.]]></description>
		<lastBuildDate>Sat, 29 Aug 2020 21:11:07 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Dropdown Menu Behavior After Ajax Fail]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=38210#p38210</link>
			<description><![CDATA[<p>Since _last is set with e.selectedIndex before making ajax request. If ajax fails input value are not populated with data. but selected drop down option is e.selectedIndex. This can result in data loss or data overwrite on records.</p>]]></description>
			<author><![CDATA[null@example.com (dearmosin)]]></author>
			<pubDate>Sat, 29 Aug 2020 21:11:07 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=38210#p38210</guid>
		</item>
		<item>
			<title><![CDATA[Re: Dropdown Menu Behavior After Ajax Fail]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=38209#p38209</link>
			<description><![CDATA[<p>Mantis Bug Tracking For This Issue - http://mantis.frontaccounting.com/view.php?id=5201</p>]]></description>
			<author><![CDATA[null@example.com (dearmosin)]]></author>
			<pubDate>Sat, 29 Aug 2020 20:57:03 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=38209#p38209</guid>
		</item>
		<item>
			<title><![CDATA[Re: Dropdown Menu Behavior After Ajax Fail]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=38001#p38001</link>
			<description><![CDATA[<p>@joe: is this the solution?</p><p>Past references are in Posts 7 and 10 of:<br />https://frontaccounting.com/punbb/viewtopic.php?id=8672</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Fri, 14 Aug 2020 07:26:38 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=38001#p38001</guid>
		</item>
		<item>
			<title><![CDATA[Re: Dropdown Menu Behavior After Ajax Fail]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37998#p37998</link>
			<description><![CDATA[<p>In inserts.js I found this line 142<br /></p><div class="codebox"><pre><code>            if ((this.selectedIndex != this.getAttribute(&#039;_last&#039;))
                ||((string_contains(this.className, &#039;combo&#039;) || string_contains(this.className, &#039;combo3&#039;)) &amp;&amp; _update_box(this))
                )</code></pre></div><p>should it be<br /></p><div class="codebox"><pre><code>            if ((this.selectedIndex != this.getAttribute(&#039;_last&#039;))
                &amp;&amp; ((string_contains(this.className, &#039;combo&#039;) || string_contains(this.className, &#039;combo3&#039;)) &amp;&amp; _update_box(this))
                )</code></pre></div><p>Also <br /></p><div class="codebox"><pre><code>e.setAttribute(&#039;_last&#039;, e.selectedIndex);</code></pre></div><p>must be set after JsHttpRequest.request(update) request is completed</p>]]></description>
			<author><![CDATA[null@example.com (dearmosin)]]></author>
			<pubDate>Fri, 14 Aug 2020 04:16:28 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37998#p37998</guid>
		</item>
		<item>
			<title><![CDATA[Re: Dropdown Menu Behavior After Ajax Fail]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37997#p37997</link>
			<description><![CDATA[<p>You are correct, anyways thanks for your help. Let me see if I can work this out.</p>]]></description>
			<author><![CDATA[null@example.com (dearmosin)]]></author>
			<pubDate>Fri, 14 Aug 2020 02:16:18 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37997#p37997</guid>
		</item>
		<item>
			<title><![CDATA[Re: Dropdown Menu Behavior After Ajax Fail]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37995#p37995</link>
			<description><![CDATA[<p>The issue with your reload option is if it is NOT pressed.&nbsp; That is, if the list is left with option C as the user selected, the rest of the page is now inconsistent because the page was not loaded with the option C data.</p><p>I do not have any more to say about this problem other than to recommend detkenn&#039;s solution which minimizes the data loss to the user when ajax fails to load the page properly.</p><p>Good luck.</p>]]></description>
			<author><![CDATA[null@example.com (Braath Waate)]]></author>
			<pubDate>Fri, 14 Aug 2020 01:20:38 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37995#p37995</guid>
		</item>
		<item>
			<title><![CDATA[Re: Dropdown Menu Behavior After Ajax Fail]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37994#p37994</link>
			<description><![CDATA[<p>Thanks for your reply Braath Waate</p><p>I have read the thread your mentioned above</p><p>to retry is good option but if retry fail as per code</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(retry)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JsHttpRequest._request(trigger, form, tout, retry-1);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else location.reload(true);</p><p>this will refresh page as this failing process will be happening in background, to see page refreshing without knowing error will make user worried about what is happening. Further it will clear all fields including selected customer/supplier/inventory option.</p><p>Warning Indicator is seen only when there is ajax error so user is aware something is wrong. Further I have noticed for example there are</p><p>OPTION A<br />OPTION B<br />OPTION C</p><p>user first selected OPTION A ajax call is made and failed mean while user has already selected OPTION C during ajax process. Now user want details of OPTION C not OPTION A</p><p>Reload button after ajax fail will eliminate this issue. Now when user will click reload only details of selected option will be populated into input fields.</p><p>Regards</p>]]></description>
			<author><![CDATA[null@example.com (dearmosin)]]></author>
			<pubDate>Fri, 14 Aug 2020 00:31:28 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37994#p37994</guid>
		</item>
		<item>
			<title><![CDATA[Re: Dropdown Menu Behavior After Ajax Fail]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37993#p37993</link>
			<description><![CDATA[<p>See, https://frontaccounting.com/punbb/viewtopic.php?id=8672.</p>]]></description>
			<author><![CDATA[null@example.com (Braath Waate)]]></author>
			<pubDate>Thu, 13 Aug 2020 23:38:34 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37993#p37993</guid>
		</item>
		<item>
			<title><![CDATA[Dropdown Menu Behavior After Ajax Fail]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37991#p37991</link>
			<description><![CDATA[<p>Hello Everyone</p><p>When select onchange ajax request fail on dropdown menu in customer/supplier/inventory. When we get see warning triangle, the selected customer/supplier/inventory is different from populated input field. To get the correct data we have to change customer/supplier/inventory to other value then back to previous value.</p><p>Here is screenshot example<br />https://mpulse.in/images/FA_feature_suggestion.jpg</p><p>In the above example while selecting customer Keshav Enterprise my ajax request failed. The input field below are populated with previous selected user which is K.K. Enterprises. Now to get details of Keshav Enterprises We have to select some other customer then again Keshav Enterprises.</p><p>It would be appreciated, if reload button with onclick ajax function to populate the input field could be added beside warning triangle .</p><p>Thanks and Regards</p>]]></description>
			<author><![CDATA[null@example.com (dearmosin)]]></author>
			<pubDate>Thu, 13 Aug 2020 22:17:30 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37991#p37991</guid>
		</item>
	</channel>
</rss>
