client-side

How can I save div as image at client side where div contains one or more than one HTML5 canvas elements?

会有一股神秘感。 提交于 2019-11-29 12:14:40
Div 'canvasesdiv' element contains three HTML5 canvases. <div style="position: relative; width: 400px; height: 300px;" id="canvasesdiv"> <canvas width="400" height="300px" style="z-index: 1; position: absolute; left: 0px; top: 0px;" id="layer1" /> <canvas width="400" height="300px" style="z-index: 2; position: absolute; left: 0px; top: 0px;" id="layer2"/> <canvas width="400" height="300px" style="z-index: 3; position: absolute; left: 0px; top: 0px;" id="layer3"/> </div> How can I save an image combining all canvases present inside the div 'canvasesdiv' at client side using JavaScript? andrewmu

Dot separated clientside date validation in asp MVC 4

两盒软妹~` 提交于 2019-11-29 12:12:13
So I've been banging my head to wall with this problem for hours. I'm creating localized validation for my date input fields. I've overwritten the default jquery date validator and the method seems to be working fine. Everything seems to go as planned but jquery validator just won't let me to post the form. Breakpoint placed in the custom validation method is hit properly in the firebug and it returns true as it's supposed to. Once I continue executing, the validation error fields with red rectangles are gone but validation summary still displays the MVC generated property errors. Here's the

Which C# SOAP Client Library is easiest to use?

老子叫甜甜 提交于 2019-11-29 11:13:23
I would like to connect to a SOAP web service using C#. Before I jump right in, trying anything Google throws at me I would like to ask what is the cleanest and best way to do it where most of the work is done for me. I would like a high level method, where I give it a WSDL and it will basically handle a lot of things for me. I of course don't want to have to do any of the XML, except to see what it is doing to debug. What is the nicest fanciest library/method that Microsoft has for doing this? Notice that I'm more concerned with optimizing developer time over performance, though there

What's a good bit of JS or JQuery for horizontally scrolling news ticker

丶灬走出姿态 提交于 2019-11-29 10:46:21
I am looking for a little bit of JQuery or JS that allows me to produce a horizontally scrolling "news ticker" list. The produced HTML needs to be standards compliant as well. I have tried liScroll but this has a habit of breaking (some content ends up on a second line at the start of the scroll), especially with longer lists. I have also tried this News Ticker but when a DOCTYPE is included the scrolling will jolt rather than cycle smoothly at the end of each cycle. Any suggestions are appreciated. Edit So thanks to Matt Hinze's suggestion I realised I could do what I wanted to do with JQuery

How to read from Serial port in a webpage

坚强是说给别人听的谎言 提交于 2019-11-29 07:30:38
I want to design a webform that user should fill some fields. The value of one field should be read from Serial port (COM1) of client computer which a special hardware is connected to it and the user presses the Send to PC key of the hardware when filling the form. How i can listen to COM1 port in my webpage and get the value of COM1 and place it in the web form automatically? I heard that ActiveX controls can do this but it is compatible only with IE (right?). The other option is Java applets. I want a simple solution which be compatible with (at least) IE/Firefox/Opera. I the server-side i

Why do people minify css and javascript, when we have gzip? [duplicate]

蓝咒 提交于 2019-11-29 05:52:01
This question already has an answer here: Is there a benefit to minifying JavaScript before gzipping it? 5 answers Why people go through all the pain of minifying JavaScript and CSS files if they can just turn on gzip compression on the web server? This will give the same (or even better) result in traffic preformance. Does minification give additional benifits? You can use gzip (which is usually built into web servers) in combination with Minification. Minification does a lot of additional things that gzip can't, however, like removing comments, renaming long variables to shorter variable

com.sun.faces.ClientStateSavingPassword - recommendations for actual password?

人盡茶涼 提交于 2019-11-29 03:16:09
问题 In all of the reference pages I've found with regards to encrypting the ViewState, the only comment on the password is "your password here". Are there any recommendations regarding the length / complexity of the password that we should use? 回答1: Depends on Mojarra version. It had several flaws/fails in earlier versions. In Mojarra 1.2.x - 2.1.18 , it was never actually used. The JNDI entry name was namely incorrectly documented. It was documented as com.sun.faces.ClientStateSavingPassword

Meteor using a local connection results in error: insert failed: 404 — Method not found

混江龙づ霸主 提交于 2019-11-29 02:18:14
I've got a meteor collection on the client side Friends = new Meteor.Collection("Friends"); Meteor.subscribe("Friends"); I have a user authenticate with facebook and I want to grab a list of their friends: FB.api("/me/friends? auth_token="+response.authResponse.accessToken, function(response){ for (i = 0; i<response.data.length;i++){ Friends.insert(response.data[i]); } ); I have a function to get that list: Template.Friends.all_friends = function(){ return Friends.find(); } I have a template that would like to display all the friends on the screen: <template name="Friends"> {{#each all_friends

How to prevent form submission while using HTML5 client-side form validation in Opera 11?

此生再无相见时 提交于 2019-11-29 02:03:45
How to prevent form submission while using HTML5 client-side form validation in Opera 11? Here is a sample test page: <section> <h2>Test</h2> <form> <input type="text" name="test" id="test" required/> <input type="submit" value="Test" /> </form> </section> Validation works in Opera 11, but when the button is clicked after entering a value, the browser submits the form. I want the browser to stay on the webpage always, which is good for client-side-only scripts, on the local hard drive, where there is no server, for example. When I add return false; or try to prevent the form from submitting,

Copy and crop images in Javascript

依然范特西╮ 提交于 2019-11-28 21:54:09
I'm trying to create a small 2D game in Javascript/Canvas which consists of several animated sprites. I'd like to cut down on the number of HTTP requests, so I combined each frame of animation (32px by 32px) into one image per sprite (say, 192px by 128px). Is there any way I can copy and crop these images clientside back into several smaller images? It would vastly simplify my rendering code and help reduce loading time due to network latency. Have a look at Pixastic , specifically http://www.pixastic.com/lib/docs/actions/crop . The HTML5 Canvas API provides a method called drawImage which