server-side

jQuery Datatables show html content

佐手、 提交于 2019-12-05 21:30:17
问题 I have a jquery datatable on my page, which uses server side processing to retrieve data. In this case, one of the columns contains html content, thus my server responses looks like this: "aaData": [ [1, "aaa", "<span class="myclass">html here</span>" ], ... I tryed with "aoColumnDefs": [ "aTargets":[2], "sType": "html" } But I still see the cell content as if it were plain string. What can I do? 回答1: Made a working version with "aoColumnDefs": [ { "aTargets": [2], "sType": "html", "fnRender"

Server Side sorting in an ExtJS GridPanel

不问归期 提交于 2019-12-05 19:31:10
问题 I have a paged GridPanel and don't know how to go about adding server side sorting. Do I add a listener for the sortChange() event? Do I override it? Or is there another event that I should work with. Any help would be appreciated. 回答1: No. In the definition for your store just set remoteSort: true, // to enable sorting sortInfo: { // the default sort field: 'someField', direction: 'ASC' | 'DESC' } And on the server side you will now be getting a sort and dir request parameters specifying the

Can the server use a file from a client without uploading it to the server? ASP.NET

柔情痞子 提交于 2019-12-05 18:24:22
I was wondering, at the moment, the client uploads a file to a directory on the server where the server can then use the file (csv file) to update a SQL database. Is that the only way the server can use that file? For it to first be uploaded to the server? Or can you use that file without uploading it to a directory of the server? (using visual studio 2012, C# and asp.net) Code update--- asp Uploading the file. (I know the code can be cleaner an written better, but my testing code is never clean) //Uplod file to the server FileUpload1.SaveAs(serverUploadDir + FileUpload1.FileName); //Use the

Business logic in JavaScript. Fat client vs thin client

泪湿孤枕 提交于 2019-12-05 17:19:39
问题 Is it a good idea to implement business logic on the client side with JavaScript? What kind of logic should be there? Validation Logic? Related to GUI? What would you do if the same logic want to be used in another application (exposed) implementing it in JavaScript would mean you can't reuse that logic. On the other hand having all logic on the server side would mean more requests to the server. What do you think? 回答1: You can create reusable Javascript modules so there's no intrinsic

Is there a javascript server-side interpreter, like php?

我们两清 提交于 2019-12-05 09:12:01
For example, writting server-side things using javascript, instend of php. Aptana Jaxer is very neat. You can even manipulate the DOM, and call server-side JS functions from the client. Check out node.js ( http://nodejs.org/ ). Server-side javascript with asynchronous stuff. Very neat. There is Server-side JavaScript Yup, there are several interpreters: Server-Side Javascript uses on Wikipedia Don't know which one/s are the most popular, available, and stable, though. One popular implementation: http://www.mozilla.org/rhino/ Checkout http://commonjs.org/ -- MV Try TeaJS , which has a native

What do I need to run a node.js script on my server?

北城余情 提交于 2019-12-05 05:33:05
I have a standard Apache server. Do I need anything special to run a node.js script (http://socket.io/) on the serverside? Node.js provides its own HTTP server, thus making Apache unnecessary. If you wish to run Apache and Node.js on the same server, either set node to listen to port 80 and forward unhandled requests to Apache, or vice versa In both instances, Node/Apache will listen to the publicly open port 80, and forward to Apache/Node listening on some non-public port. You will need shell access to start the node.js server. So it most likely won't work on shared hosting. 来源: https:/

Automatically add svn keyword properties for new files (server-side)

笑着哭i 提交于 2019-12-05 00:02:57
I want to add svn properties (like svn:keyword=Id Date Rev Author) to files upon commits of new files. For this to work there may be two main options: Client-side: altering the autoprops in the svn client configuration Server-side: do some magic with commit-hooks The client side is not always desirable, as control over the client set up is needed. I want to solve this on the server. How can this be done. The Subversion docs say it's a bad idea to modify a commit on the server side . Instead, you could do something like a customized version of the svn_apply_autoprops script periodically through

Create server-side DVR application to be able to record DVR in FMS

人盡茶涼 提交于 2019-12-04 20:31:46
I want to be able to use the DVR compability in FMS3. But to do that I need to implement a server-side DVR application it says in the documentation. The problem is I cannot find any example on this. "You need to add server-side ActionScript to handle the recording and the correct client-side ActionScript to your media player." http://help.adobe.com/en_US/FlashMediaLiveEncoder/3.0/Using/WS0C4F8D5E-0388-4d1e-AE60-D5B3FB1BC682.html Any help about this server-side script would be greatly appreciated! Regards Niclas I believe this explains the server side script fairly well: http://labs.influxis

How do you avoid duplication of validation on the server and client-side?

只愿长相守 提交于 2019-12-04 18:09:54
问题 How do you avoid duplication of validation on the server and client-side? Is there a web programming platform that generates one from the other, so I don't have to keep the two in sync? 回答1: There are frameworks that can generate the client-side validation from serverside validation configuration. Now I don't know what language or frameworks you are using, but maybe this article can be of help: http://www.emadibrahim.com/2008/09/08/client-server-side-validation-in-aspnet-mvc/ He's using

Run server-side js from php through exec()

ぃ、小莉子 提交于 2019-12-04 17:44:17
I have a site running on Apache/PHP, and as a matter of performance, I wrote a javascript to do a specific task. I have installed node.js on server, in order to run this javascript. When I call the script from the command line, it works fine. See the command below: > node myscript.js But I need it to run from a php page, and I am trying to do this by calling the exec() PHP function, like this: <?php exec('node myscript.js >/dev/null/ 2>&1 &'); ?> ...but it's not working. Am I doing something wrong? Is there another way to do what I want? I found a way to make it work! I just wrote the full