client-side

SCRIPT5022: Sys.WebForms.PageRequestManagerServerErrorException: Input string was not in a correct format

雨燕双飞 提交于 2019-12-01 16:46:43
问题 On IE10, when I click the login button I see the following error in the console: SCRIPT5022: Sys.WebForms.PageRequestManagerServerErrorException: Input string was not in a correct format. ScriptResource.axd, line 939 character 13 I added some server-side logging, but the page is never sent, so it seems a client side issue. This behavior does not occur in IE8, Firefox OR chrome, there it works fine. 回答1: This is occurring because your submit button is an input with type="image" . Therefore,

Store data locally using HTML and JavaScript

て烟熏妆下的殇ゞ 提交于 2019-12-01 15:53:19
I have a small LAN with some computers. I'm looking for a way to build a dynamic HTML webpage that uses JavaScript to store some data locally (can't use server side - only client side). The webpage will be stored on a network drive shared with all the computers. I wish to do that using a file, maybe an XML file or something similar that will be loaded using JavaScript and then saved again after some changes. The data must be shared with all the computers on the LAN. How can I do this? HTML5 localStorage //Set localStorage.setItem("lastname", "Smith"); //Get var lastName = localStorage.getItem(

Store data locally using HTML and JavaScript

假装没事ソ 提交于 2019-12-01 15:35:48
问题 I have a small LAN with some computers. I'm looking for a way to build a dynamic HTML webpage that uses JavaScript to store some data locally (can't use server side - only client side). The webpage will be stored on a network drive shared with all the computers. I wish to do that using a file, maybe an XML file or something similar that will be loaded using JavaScript and then saved again after some changes. The data must be shared with all the computers on the LAN. How can I do this? 回答1:

Client of web service in Perl

只愿长相守 提交于 2019-12-01 14:15:15
I am the client - I wish to call methods of a web service. I have a web service address (.svc suffix) and I have the method's name, return value and their argument. The service is implemented with WCF (HTML end point). I wish to call those methods by SOAP::Lite . What should I write for the URI, proxy and how exactly do I call the methods? You set the proxy to the endpoint and the uri (or in the most recent version ns ) to the namespace in the method definition. One of the easiest ways to do this is simply to use the WSDL URI and create a SOAP::Schema object with it, like so: my $schema = SOAP

How to set up caching for css/js static properly

断了今生、忘了曾经 提交于 2019-12-01 13:12:11
to prevent problem, when I update CSS/JS media files and browsers dont request new version, because they cache these files I used this solution: https://github.com/jaddison/django-cachebuster , that adds ?<timestamp of file> to CSS/JS filenames (replaces /media/main.css with /media/main.css?20012931203128. I assumed that it will force browsers to reload css file when timestamp is changed (file is updated) and use local cached version in other case. But what I see in Apache logs (and at firebug) is that browsers (at least Firefox) requests CSS/JS files for each reload of the page, even after

Client of web service in Perl

*爱你&永不变心* 提交于 2019-12-01 12:24:59
问题 I am the client - I wish to call methods of a web service. I have a web service address (.svc suffix) and I have the method's name, return value and their argument. The service is implemented with WCF (HTML end point). I wish to call those methods by SOAP::Lite . What should I write for the URI, proxy and how exactly do I call the methods? 回答1: You set the proxy to the endpoint and the uri (or in the most recent version ns ) to the namespace in the method definition. One of the easiest ways

Posting an object and a file in the same call to the server with jQuery.ajax

旧街凉风 提交于 2019-12-01 12:17:42
I'm trying to make a client side post to the following MVC action method: [HttpPost] public void Create(ProductModel product, HttpPostedFileBase imageFile) { productServices.AddProduct(product, imageFile); } This is straightforward with a type="submit" button, however in my particular case I need to do it with an ajax call. I can just pass the ProductModel as JSON easy enough. $.ajax({ url: '/Product/Create', type: 'POST', data: JSON.stringify({product: { Id: 1, Name: "SomeName" } }), contentType: 'application/json; charset=utf-8', success: function (data) { alert("Product Created!"); } }); I

How to set up caching for css/js static properly

a 夏天 提交于 2019-12-01 12:03:11
问题 to prevent problem, when I update CSS/JS media files and browsers dont request new version, because they cache these files I used this solution: https://github.com/jaddison/django-cachebuster, that adds ?<timestamp of file> to CSS/JS filenames (replaces /media/main.css with /media/main.css?20012931203128. I assumed that it will force browsers to reload css file when timestamp is changed (file is updated) and use local cached version in other case. But what I see in Apache logs (and at firebug

How to client-side detect when a page is bookmarked?

血红的双手。 提交于 2019-12-01 10:58:35
Is it possible to detect when a page is bookmarked within the browser, using Javascript? No, AFAIK this is not possible. Most browsers will not let you detect when a page is bookmarked because this would be another vector for Browser History Mining exploits. If malicious code could tell what websites you've used then, for example: At best, they'd know things about you that you might wish to keep private. They could use that information to target you with embarrassing ads or to target your kids with irresistible ads. They could target you with much more effective phishing attacks -- since they

Posting an object and a file in the same call to the server with jQuery.ajax

你。 提交于 2019-12-01 10:05:17
问题 I'm trying to make a client side post to the following MVC action method: [HttpPost] public void Create(ProductModel product, HttpPostedFileBase imageFile) { productServices.AddProduct(product, imageFile); } This is straightforward with a type="submit" button, however in my particular case I need to do it with an ajax call. I can just pass the ProductModel as JSON easy enough. $.ajax({ url: '/Product/Create', type: 'POST', data: JSON.stringify({product: { Id: 1, Name: "SomeName" } }),