client-side

jqGrid client-side searching

天大地大妈咪最大 提交于 2019-11-26 05:58:41
问题 I would like to manually apply searching to my jqGrid via JavaScript. I have tried a guide here, but can\'t seem to get it completely working. In the grid setup I have a column with name \'error_column\' that I would like to perform a search on looking for the string \'Test\'. Here is what I have so far: var filter = { \"field\": \"error_column\", \'oper\': \'eq\', \"data\": \'Test\' }; $(\"Grid2\").jqGrid(\'setGridParam\', { search: true, postData: { filters: filter} }) $(\"Grid2\").trigger(

How can I run a program or batch file on the client side?

心不动则不痛 提交于 2019-11-26 05:56:50
问题 How can I run a batch file on the client side? An exe file? Just to open pre-installed program in client side? [Edit] Regarding ActiveX, I tried var activeXObj = new ActiveXObject(\"Shell.Application\"); activeXObj.ShellExecute(\"C:\\\\WINDOWS\\\\NOTEPAD.EXE\", \"\", \"\", \"open\", \"1\"); but this doesn\'t work. Any suggestions? 回答1: From Javascript? You can't. It's a security risk. Think about it - would you want every website to be able to run programs on your PC? 回答2: You mean launch an

Accessing control client name and not ID in ASP.NET

时间秒杀一切 提交于 2019-11-26 04:27:56
问题 I want to fire a server-side ASP.NET button click event in JavaScript. I checked the page source and the button \'s onclick in client side is: WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(\"ctl00$LoginInfo1$btnliOK\", \"\", true, \"\", \"\", false, false)); But I have to replace ctl00$LoginInfo1$btnliOK with something like <%= btnliOK.ClientName %> . Is there a way to do that? 回答1: You can get it using the Control.UniqueID Property btnliOK.UniqueID UniqueID gives the on page

Single Page Application: advantages and disadvantages [closed]

若如初见. 提交于 2019-11-26 04:01:59
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago . I\'ve read about SPA and it advantages. I find most of them unconvincing. There are 3 advantages that arouse my doubts. Question: Can you act as advocate of SPA and prove that I am wrong about first three statements? === ADVANTAGES === 1. SPA is extremely good for very

How to get client date and time in ASP.NET?

試著忘記壹切 提交于 2019-11-26 03:57:21
问题 When I use DateTime.Now I get the date and time from the server point of view. Is there any way to get the client date and time in ASP.NET? 回答1: What I'd do is create a hidden input field and then wire a Javascript routine to the onsubmit event for the form. This routine would populate the hidden field with the time on the client machine. The hidden field can used with ASP.NET by using the HTML control "HtmlInputHidden" class. You just give you input control a runat="server" attribute like

In IndexedDB, is there a way to make a sorted compound query?

拥有回忆 提交于 2019-11-26 03:38:48
问题 Say a table has, name, ID, age, sex, education, etc. ID is the key and the table is also indexed for name, age and sex. I need all male students, older than 25, sorted by their names. This is easy in mySQL: SELECT * FROM table WHERE age > 25 AND sex = \"M\" ORDER BY name IndexDB allows creation of an index and orders the query based on that index. But it doesn\'t allow multiple queries like age and sex. I found a small library called queryIndexedDB (https://github.com/philikon/queryIndexedDB)

Is it possible to check dimensions of image before uploading?

ε祈祈猫儿з 提交于 2019-11-26 03:10:41
问题 I have an upload control for uploading the images to the server, but before uploading I just want to make sure if the images are of correct dimensions. Is there anything on client side that can be done with javascript? 回答1: You could check them before submitting form: window.URL = window.URL || window.webkitURL; $("form").submit( function( e ) { var form = this; e.preventDefault(); //Stop the submit for now //Replace with your selector to find the file input in your form var fileInput = $

Is it worth hashing passwords on the client side

一个人想着一个人 提交于 2019-11-26 02:54:04
When I want to put a login system in place, I always compare the MD5 of the given password with its value in the users table on the server side. However, a friend of mine told me that a "clear" password could be sniffed by a network software. So my question is: is it a good idea to hash the password on the client side? Is it better than hashing it on the server side? Basically, your friend is right. But simply hashing the password on the client side is only just better than submitting it as plain text to the server. Someone, who can listen for your plain text passwords is certainly also able

ASP.NET MVC 3 client-side validation with parameters

倾然丶 夕夏残阳落幕 提交于 2019-11-26 02:41:31
问题 Following on from this post Perform client side validation for custom attribute I am trying to get my head around how to do this, passing additional parameters to the client-side script As I understand it so far to implement custom validation with MVC 3 the following is required Create a custom validation attribute Based on ValidationAttribute and implementing IClientValidatable. I have also see some examples deriving from ModelValidator, which seems to implement the functionality of both

Is it worth hashing passwords on the client side

家住魔仙堡 提交于 2019-11-26 01:44:07
问题 When I want to put a login system in place, I always compare the MD5 of the given password with its value in the users table on the server side. However, a friend of mine told me that a \"clear\" password could be sniffed by a network software. So my question is: is it a good idea to hash the password on the client side? Is it better than hashing it on the server side? 回答1: Basically, your friend is right. But simply hashing the password on the client side is only just better than submitting