client-side

ASP.NET MVC Client Side Validation

余生颓废 提交于 2019-12-05 10:27:36
I am all about using ASP.NET MVC, but one of the areas that I hope gets improved on is Client-Side Validation. I know the most recent version (Preview 5) has a lot of new features for Validation, but they all seem to be after the page has been posted. I have seen an interesting article by Steve Sanderson ... using Live Validation, Castle.Components.Validator.dll, and a Validator framework he made. I have used it in my project, but I am hoping something like it will get integrated into the official ASP.NET MVC release. I definitely think the business rules should reside either on the model or

Client side languages

时光总嘲笑我的痴心妄想 提交于 2019-12-05 10:06:43
I am not a web programmer, so please excuse my ignorance. When it comes to server side programming, we have plethora of technologies available, such as PHP, ASP.net, JSP and so on. However, when it comes to client side scripting, I have only heard of JavaScript and AJAX. Maybe you can also include Java Applets, as they run on the client. A relatively new one is also the Google's native client. But are there any more client side technologies which exist and are popular? AJAX is just a buzzword, it's not a language. Google's Native Client is similar to NSAPI, you can use it to create plugins (it

ASP.net mvc Call Action on DropDown Value Change

ε祈祈猫儿з 提交于 2019-12-05 06:41:34
问题 Ive got a dropdown on one of my views. This dropdown only has for entries. Basically i need to know how to call an action when the dropdown value is changed? My situation is: Im making a simple inbox page. The dropdown has the filter options: View All, View Invites, View Replies etc.. When the user selects a filter option from the dropdown I want to call to an action to return the new view with the filtered data. Any ideas? Im guessing it is somehow going to be a script attached to the

How to deal with timezones between server and client?

只愿长相守 提交于 2019-12-05 05:25:22
I'm developing a website where I have to deal with different possible timezones from the users. This becomes a great problem since the website hosts time-delicate events like auctions. All dates/times on the server are in UTC. Database stores everything in UTC timestamps. PHP default timezone is set to UTC too ( date_default_timezone_set('UTC'); ). Now, my problem is how I should interact with the users, whether I'm only showing a date or, more important, I'm reading a date/time from user input. A concrete example: An auction has a deadline, which I store in database as UTC. When I view the

Can't receive messages using Google Cloud Messaging for Android (not the helper library)

試著忘記壹切 提交于 2019-12-05 05:14:47
Does anybody can help me with a working example for receiving messages from gcm using Google Cloud Messaging for Android. I have tried both ways (helper library and GoogleCloudMessaging class) and nothing seems to work. I'm using a PHP script that shows the following: Multicast ID: 5.2108110103215E+18 Number of messages processed successfully: 1 Number of messages with processing errors: 0 Canonical IDs: 0 So apparently everithing is OK. I could register the device in both ways, using the helper library (gcm.jar) and using GoogleCloudMessaging class. The problem is that there is no way the

Render React Components from PHP

こ雲淡風輕ζ 提交于 2019-12-05 04:52:26
问题 I'm using ReactJS to power a simple filterable item list and it works quite well for my need. The problem is that I need to render the markup on the server for SEO reasons, but when I call React.renderComponent() it replace the existing markup with the one generated by React. Searching in React's docs I found this note: React.renderComponent() replaces the contents of the container node you pass in. In the future, it may be possible to insert a component to an existing DOM node without

localStorage - append an object to an array of objects

蹲街弑〆低调 提交于 2019-12-05 01:42:49
问题 I'm attempting to locally store an object within an array within an object. If I try the following in my console it works perfectly: theObject = {} theObject.theArray = [] arrayObj = {"One":"111"} theObject.theArray.push(arrayObj) However if I do what I think is the equivalent, except storing the result in localStorage it fails: localStorage.localObj = {} localStorage.localObj.localArray = [] stringArrayObj = JSON.stringify(arrayObj) localStorage.localObj.localArray.push(stringArrayObj) I get

Check Checkbox Disabled (Jquery)

你。 提交于 2019-12-05 00:50:12
The purpose is to; If checkbox is disabled, do nothing. If checkbox is enabled and checked, set the style of a button. Here is what I've got so far; $(document).ready(function (e) { $(".checkbox").live("click", function () { if ($(this).hasAttribute('disabled')) { return false; } var isAnyChecked; $("input[type=checkbox]").each(function () { var checkedValue = $(this).attr("checked"); if (checkedValue == "checked") { isAnyChecked = true; } }); if (isAnyChecked) { $("#<%= btnConfirm.ClientID %>").css("display", "block"); } else { $("#<%= btnConfirm.ClientID %>").css("display", "none"); } }); })

TLS with SNI in Java clients

自作多情 提交于 2019-12-04 19:58:02
问题 There is an ongoing discussion on the security and trust working group for NHIN Direct regarding the IP-to-domain mapping problem that is created with traditional SSL. If an HISP (as defined by NHIN Direct) wants to host thousands of NHIN Direct "Health Domains" for providers, then it will an "artificially inflated cost" to have to purchase an IP for each of those domains. Because Apache and OpenSSL have recently released TLS with support for the SNI extension, it is possible to use SNI as a

How to create a text file on a client machine using javascript or jquery

瘦欲@ 提交于 2019-12-04 19:37:17
How to create a text file on a client machine using javascript or jquery Varun it is possible on IE and firefox... but wonder how it will work on Safari and Crome searching the same... for FF netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); // Open the save file dialog var nsIFilePicker = Components.interfaces.nsIFilePicker; var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); fp.init(window, "Save File...", nsIFilePicker.modeSave); //fp.appendFilters(nsIFilePicker.filterHTML); fp.appendFilter("HTML File","*.htm; *.html"); fp