![mtasa script not updated on client mtasa script not updated on client](https://forums.mrgreengaming.com/uploads/monthly_09_2014/post-12121-0-20576700-1409810098.png)
#MTASA SCRIPT NOT UPDATED ON CLIENT UPDATE#
When item(s) are moved from one box to another, the list of product details should update to reflect the new selections.If no items are selected in a list box, the relevant transfer button should be disabled.Selecting items and pressing the relevant transfer button should move items to the other list box.To see what we’re aiming for, let’s define some behaviours we want the page to exhibit, some of which are repeated from the current server driven behaviour. We’ll do it using progressive enhancement so that the page will still work for non-JavaScript enabled browsers. In this article, we’ll enhance the current UI so that all the display work is done on the client with no involvement from the server beyond the initial set-up and final submit. This works well enough but it would be a much nicer user experience for this behaviour to be client driven there’s no real need to involve the server in redrawing the interface every time. Having done so, the details of the chosen items are shown under the list box.Ĭurrently the UI is driven entirely by the web server, when a button is pressed the form is submitted and the server takes the necessary actions to update the view data model then re-displays the updated UI. To summarise the behaviour, the user selects one or more items in the available list box and clicks the > button to move them to the requested list box. This article follows on from a previous one I wrote about using list boxes in ASP.NET MVC. The relevant JavaScript files are included in the sample project but for reference, I’m using Knockout v1.1.1 and jQuery templates downloadable from here along with jQuery 1.4.4 Previously
![mtasa script not updated on client mtasa script not updated on client](https://i.imgur.com/xNpqfxA.png)
To run the code, you’ll need Visual Studio 2008 or above with MVC installed. It’s designed to complement the functionality of other libraries such as jQuery and when used together, some really powerful behaviours can be achieved with little effort. It was written by Steven Sanderson author of one of the best (in my opinion) books on ASP.NET MVC so it’s got a good pedigree behind it. It’s similar in principle to data-linking in jQuery but takes the concept even further.
![mtasa script not updated on client mtasa script not updated on client](https://user-images.githubusercontent.com/4274691/95139095-fd730200-076b-11eb-8310-e2e009856fd4.png)
It can be used to keep a UI and a data-model in sync in a similar way to how Silverlight bindings work. Knockout is a new JavaScript library that simplifies data-binding on the client.