client-side

Cross domains sessions - shared shopping cart cross domains

旧城冷巷雨未停 提交于 2019-11-27 19:09:43
we are solving the problem with eshop (php, mysql). The client want to have the same eshop on two domains with shared shopping cart. In the shop customer can do the shopping without users account (can't be logged in). And there is the problem, how to make the shared shopping cart cross domain. The data from cart is stored in sessions, which we stored in database too. But we can't solve the problem in carrying data over domains. Identifying unlogged user is not holeproof ( research ). The example, how it should work Customer goes to domainOne and add some things to the cart. Than he goes to

AngularJS client MVC pattern?

核能气质少年 提交于 2019-11-27 16:42:21
Until now I was mainly using Struts 2 , Spring , JQuery technology stack for building web applications. The point is, that mentioned stack uses server side MVC pattern. The main role of web browsers was limited to a request/response cycle (+ client side validation). Data retrieval, business logic, wiring and validation were mainly responsibilities of the server side. I have few questions regarding AngularJS framework that were inspired by following quotes I've read: From the AngularJS tutorial : For Angular apps, we encourage the use of the Model-View-Controller (MVC) design pattern to

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

こ雲淡風輕ζ 提交于 2019-11-27 16:25:11
问题 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

How can I create a file for storage on the client side with JavaScript?

本小妞迷上赌 提交于 2019-11-27 15:11:39
I need to create a temporary file to store user settings on the client side. Is it possible to create a simple log file using JavaScript? You have a few options: Cookies localStorage database Check this link: HTML5: Client-side Storage Creating a file is possible only in IE using ActiveX objects. If you want to store user settings, you should : use cookies store client information on the server The ability for a webpage to access an individual's hard disk would be hazardous. However, as Trey pointed out below, you can use: HTML 5 Client Side Storage (browser support still limited) ActiveX

Copy and crop images in Javascript

China☆狼群 提交于 2019-11-27 14:06:26
问题 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. 回答1: Have a look at Pixastic, specifically http:/

Can I modify or add cookies from JavaScript? [closed]

淺唱寂寞╮ 提交于 2019-11-27 13:18:44
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 years ago . Exactly what are the restrictions for handling browser cookies from javascript? Can I check if cookies are enabled for example? 回答1: Yes! Read this excellent article about using cookies with JavaScript Here's an excerpted code example. function createCookie(name,value,days) { if

How to get client MAC address by a access on a website?

╄→尐↘猪︶ㄣ 提交于 2019-11-27 13:07:02
I have my website, and it records the number of visitors, IP and time of access... I want to identify each visitor... I think that this was possible recording IP Address... but when the IP is dynamic, my system fails. So I think that I can solve it recording MAC address... is possible? What language should use? PHP, ASP, Javascript? Thanks Edit: What I can use to identify each user without having login information (username & pwd). The MAC address, by TCP/IP standards, is never communicated outside of the local-area network to which it pertains -- routers beyond that LAN don't even get the

Generating client side certificates in browser and signing on server

╄→尐↘猪︶ㄣ 提交于 2019-11-27 12:50:38
Is it possible to request generation of client keypair in browser and send the public key to the server CA to be signed transparently? Then installing the signed certificate in user's browser? Scenario: User opens https://examle.com/ web page, server identity is verified User requests an account creation Keypair is generated in user's browser and not revealed to server/CA Pubkey is send to server for signing Server signes the key and generates certificate Certificate is sent to client and installed in browser along with private key Next time client connects to server, his identity is verified

Disable client-side validation in MVC 3 “cancel” submit button

微笑、不失礼 提交于 2019-11-27 11:38:39
OK, been trying things for hours and could use some help. I'm trying to implement a page in MVC 3 that has "back" and "next" buttons. When the back button is clicked I want to disable client-side MVC validation from running so that my action method will run and send the user to the previous logical web page. I've tried this: <script type="text/javascript"> document.getElementById("backButton").disableValidation = true; </script> and this: <input type="submit" name="backButton" value="← Back" title="Go back to step 1." disableValidation="true" /> But no matter what, the cilent-side validation

Image Dark/Light Detection Client Sided Script

大兔子大兔子 提交于 2019-11-27 11:29:49
Does anyone know if there is a script available to detect darkness/lightness in an image (html included) using a client sided script? I basically want to be able to detect the type of image (dark/light) used in the background and have CSS/HTML/Jquery/JS adapt the page based on a variable that is either dark of light (true of false). I know there are server sided script available but cannot use that for this particular development. Thanks in advance. This function will convert each color to gray scale and return average of all pixels, so final value will be between 0 (darkest) and 255