client-side

Use Client-Side Validation when custom [required] attribute is used

南楼画角 提交于 2019-11-30 22:01:55
on this project we do not use the default dataannotation attributes from the System.ComponentModel.DataAnnotations namespace, but custom attributes are built. So we do place a [required] attribute on a property, but it's a custom built one. For server side validation we managed to override the validation with a custom validation provider, but we are stuck with tthe client side validation. As i read in the docs, i see that when you use the default [required] attribute, these kind of attributes are rendered on the html elements: data-val-lengthmax="10" data-val-length-min="3" data-val-required=

How to read epub files using javascript

非 Y 不嫁゛ 提交于 2019-11-30 20:54:47
How to read epub files using javascript? I tried epubjs but thats not suited for my requirement. Is any other alternative javascript libraries available? Readium Foundation just released Readium Web Components: see http://readium.org/news/announcing-readiumjs-a-javascript-library-for-browser-based-epub-3-reading (code: https://github.com/readium/Readium-Web-Components ) Alternatively, you might want to have a look at FuturePress: http://www.futurepress.org/ (code: https://github.com/fchasen/epub.js/ ) Finally, TEA also has something you might find interesting: https://github.com/TEA-ebook

offline, cross-tab communication (javascript-only)

☆樱花仙子☆ 提交于 2019-11-30 20:50:15
问题 Is it possible to find foreign instances of certain website? Ofc theese are independently opened tabs (not by window.open). I need to prevent user from opening 2 tabs, and send message to previously opened tab to inform that it's impossible to open 2 tabs. 2 Intependent tabs may break page offline storage and webSQL structure, so that I can't allow people to use 2 tabs. It's also semi-offline app so it needs to be client-side solution. 回答1: You can communicate across tabs using localStorage.

OpenSSL client not sending client certificate

强颜欢笑 提交于 2019-11-30 20:06:03
I am struggling with a client certificate problem and hope somebody here can help me. I'm developing a client/server pair using boost asio but I'll try to be unspecific. I'm on windows and using openssl 1.0.1e Basically, I want to have client authentication by using client certificates. The server shall only accept clients that have a certificate signed by my own CA. So I have setup a self signed CA. This has issued two more certificates. One for the client and one for the server. Both signed by the CA. I have done that quite a few times now and I am confident that I got it. My server side

How to set the value of p:selectOneRadio with Client Side API?

老子叫甜甜 提交于 2019-11-30 16:06:55
In my JSF view I am using a p:selectOneRadio . Now I have to change the value of this component on client side as side effect. In the Client Side API of this component I have found the following which I think I could use for this if I find the proper way how to use it: PrimeFaces.widget.SelectOneRadio=PrimeFaces.widget.BaseWidget.extend( { // ... select:function(a){ this.checkedRadio=a; a.addClass("ui-state-active") .children(".ui-radiobutton-icon") .addClass("ui-icon-bullet").removeClass("ui-icon-blank"); a.prev().children(":radio").prop("checked",true)} }); To me (without having much

Passing data from one web page to another

柔情痞子 提交于 2019-11-30 15:32:39
问题 I need to pass a potentially large amount of data from one page to another using client side techniques. It is basically a list of id's which will get displayed on the target page. Obviously query string is not suitable as there could be thousands of ids so I thought I could use javascript to dynamically add a form (method=GET), write the ids into a hidden field and submit the form to the target page. It seems to work ok but I want to know if there is a better way of doing it - this feels a

CSS - position button inside image

只谈情不闲聊 提交于 2019-11-30 14:21:14
I have div that contains an image, I need to place a button inside the image to around the top right corner of the image, when I do this #button_id{ position: relative; left: 270px; top: 30px; } What this is doing is making the button image be placed somewhere else, it moves the image left to the right and down, but the now the button is click-able in bar from where it was originally placed to the far right of the div. When I try this #button_id{ position: relative; float: right; padding: 0px -40px -15px; } it moves the button to the right but it won't move it down. Note: the button is inside

Why doesn't my form post when I disable the submit button to prevent double clicking?

ε祈祈猫儿з 提交于 2019-11-30 14:12:54
问题 Like every other web developer on the planet, I have an issue with users double clicking the submit button on my forms. My understanding is that the conventional way to handle this issue, is to disable the button immediately after the first click, however when I do this, it doesn't post . I did do some research on this, god knows there's enough information, but other questions like Disable button on form submission, disabling the button appears to work. The original poster of Disable button

How to programmatically create a client side file in Javascript that can be downloaded by the user? [duplicate]

一个人想着一个人 提交于 2019-11-30 13:06:06
问题 This question already has answers here : How to create a file in memory for user to download, but not through server? (20 answers) Closed 6 years ago . I wanted to experiment creating a Javascript application that takes input from the user in a form and then generates a file based on the user's form input. The file should then be downloadable by the user all without touching the server. How do you create a file on the client side with JavaScript and where on the client side could it be stored

Android Client socket , how to read data?

馋奶兔 提交于 2019-11-30 09:56:49
here's my full code: the cnx is established , and i am sending data to server , but i cant read anything from the server... public class client extends Activity { /** Called when the activity is first created. */ Socket sock; String spliter = "**"; String mobileNbr = "100"; String LastJOKEId = "-1"; String spliterlast = "^^$$"; BufferedReader inFromServer; DataOutputStream outToServer; TextView cnx; TextView output; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); setupNetworking(); // Thread readerThread=new Thread