client-side

A way to create random-noise background image (png) with javascript?

半腔热情 提交于 2019-12-03 07:59:53
The new layout of YouTube added a background random-noise which I like very much, having seen almost exactely the same effect on other sites, so I plan to use the same technique in my webpage prototypes, or at least have this "trick" in my toolbox for future use. The image is like this (taken from http://g.raphaeljs.com/barchart.html ): Now Youtube accomplishes the (embarrassingly identical) same effect by embedding the image in source code: (on Youtube main page, right click background to display it, then right click the image and "display image properties" [ffox]): data:image/png;base64

Generating, viewing, and saving SVG client-side in browser

 ̄綄美尐妖づ 提交于 2019-12-03 07:52:29
问题 I am writing a little HTML5+JS tool to generate an SVG image. I have encountered a number of issues in doing so, and while I have workarounds for most of them, in at least one case I feel like there must be a better way. And then there are a couple of things that still just aren't working. At present, this is for my own use, so cross-browser compatibility isn't a concern; as long as it works in Firefox (first preference) or Chromium, it's all good. I would like to stick it online once it's

Client side routing. How does it work?

折月煮酒 提交于 2019-12-03 07:21:05
I need a client-side routing solution to work with a chrome app. I've researched several and crossroads.js seems like a good fit. When I include it in my html file, it doesn't seem to work; that is, if I use code like crossroads.addRoute('/news/{id}', function(id){ alert(id); }); crossroads.parse('/news/123'); , the page alerts '123' but if I type '/news/321' in the browser's url bar, it preforms the browser's default action, instead of alerting '321'. What am I doing wrong. (Also, I realize the title is broad, but I believe the difficulties I'm having with crossroads.js are more general than

client-MVC vs server-MVC

有些话、适合烂在心里 提交于 2019-12-03 06:51:23
问题 I am looking to get some input from other users on the benefits of server-side MVC. With the power of many javascript libraries. What good purpose does server-side MVC server anymore? You can easily use client-side MVC with templating and a REST API to make a much more resposive application with less overhead of reloading a whole page for minor changes. 回答1: Server MVC benefits: Mature. Widely adopted. Most of the code is inside server so should be more secure. But definitely the tendency is

PHP: Let user download purchased file ONLY

陌路散爱 提交于 2019-12-03 04:41:22
I am forseeing a problem with allowing customers who purchase some content from me via PayPal. I will offer multiple, intangible goods. When someone completes their purchase for one of these goods, they will be redirected to a landing page - let's call it "thank_you.php" - which will automatically queue up a download and allow a link to queue up download in case it doesn't start automatically. This will be done by passing the unique item ID to the download page ("download.php"). This method is essentially a mimic of the top answers from these threads: PHP generate file for download then

Client-side XSLT

 ̄綄美尐妖づ 提交于 2019-12-03 04:19:08
问题 I converted my whole site to XML/XSL and I would like to know all of the current issues with performing Client-side XSLT. Here are the ones i already know of (from first-hand experience): Cross-domain XSL files (this is a security issue and not cross browser) disable-output-escaping (this does not work in FF... they consider it a security issue) Also as for browser support this is all i know of: Opera 9+ FF 1.0+ SF 2.0 + (i may be wrong on this) Chrome IE 6.0 + Any others would be helpful too

How to create client side full text search engine with pure JavaScript and HTML5?

牧云@^-^@ 提交于 2019-12-03 04:19:06
问题 I need to create client side search engine for an offline html application in offline storage like CDROM. I already create it with Win32 and the catalog file is near 2GB (MDB file). My offline web application use CEF (Chromium Embedded Framework) and PhoneGAP so I can disable the browser web security. I thought the IndexedDB may help me but , I couldn't find anyway to copy the storage file to other media. My catalog file will be near 2GB, so I can't read all record to memory. I need to make

Templating language for both client-side and server-side rendering

三世轮回 提交于 2019-12-03 04:15:16
问题 I'm investigating JavaScript templates as a way to render our views. The goal is to be able to render client-side for users that have JavaScript enabled to to render the same templates/data server side for those users (and crawlers) that don't. Requirements Client side rendering. Server side rendering (JVM support a nice-to-have). Reasonable support for loops, conditionals, text manipulation, partials, macros and extensions/plugins. Reasonably big/active community of users. Unsatisfactory

TinyMCE client validation problem

情到浓时终转凉″ 提交于 2019-12-03 03:36:48
I have problem with TinyMCE editor. I have form with few text fields and textarea (tinymce), and enabled client validation. When I click save button validation occures on all text fields, but it takes 2 click to validate tinymce content. Furthermore, validation shows message only when field is empty, or if condition is not satisfied (just for test causes, max 5 characters can be entered), but when I enter right number of characters ( less then 5 ), error message stays. Here's code sample: <%Html.EnableClientValidation(); %> <%= Html.ValidationSummary(true, "Na stranici postoje greške.", new {

Server side templates, client side templates - Automatic conversion?

我是研究僧i 提交于 2019-12-03 03:06:33
With the event of the jQuery templates plugin, I am wondering how to maintain both server-side and client-side templates. Because in my case, I have some templates, that would be duplicates - server-side as well as client-side. Just imagine this: You have a form, where you can enter list points. When you press submit, an AJAX request is generated but the entry is already showed on your page. Now, the markup for this bullet point should be the same - wether it was generated through JS or by my PHP/.NET/whatsoever application. Are there any good ways to maintain those templates / keep them in