javascriptRelated issues-Collection of common programming errors
Philipp Claßen
javascript coffeescript read-eval-print-loop
I have been experimenting with the Javascript haskell-js library, but I stumbled upon a strange behavior of the coffeescript REPL.With node, the following example works as expected:$ node require(‘haskell’); > [1,2,3].map(‘+1’); [ 2, 3, 4 ]But with coffeescript, it fails:$ coffee -v CoffeeScript version 1.6.1 $ coffee require ‘haskell’ [1,2,3].map(‘+1’) TypeError: +1 is not a function at Array.map (native) at repl:3:15 at REPLServer.replDefaults.eval (/usr/local/lib/node_modules/coffee-script
Andrew Thompson
java javascript swing security applet
First of all I’m aware that my question is same as in here. But that question did not helped me.I have self signed applet.jarsigner -verify sJSApplet.jar jar verified.Warning: This jar contains entries whose signer certificate will expire within six months.Applet’s purpose is to open MS Word document from LAN machine. So far I’ve tried opening using Desktop.open() and Runtime.exec(). With AccessController.doPrivileged and without. I always get java.security.AccessControlException: access denied.
Gohar
javascript asp.net-mvc validation datetime validator
I have a Custom Attribute for DateTime validation with given dateformat and also javascript validator which are provide me both client side and server side validation. But now I should change my datetime validation so that it would be performed according clients local DateTime format and I do not know how.I couldn’t find anything that help me.So please advise me how can I implement at least client side DateTime validation or how can I get client’s date format by javascript.
tonberry
javascript visual-c++ visual-studio-2012 windows-8 windows-runtime
I face a problem to compile windows 8 application which is create using visual studio 2012 windows runtime component project. I’m using html 5 , javascript and c++ to develop this application. But when I compile the project I’m getting error which is JavaScript runtime error: Error in the DLL.I don’t know how to fixed this problem and when i build this project I’m getting error like below:-Error 40 Loading assembly “D:\workspace\Test\apps\Test\windows8\native\Debug\WindowsRuntimeComponent1\Wi
Akke
javascript jquery jquery-ui dialog callback
I’m writing some form validation functions, and I’ve decided to go with jQueryUI for prompting the user because of flexibility.There is a slight problem tho. I want my functions to return an array which consists of a boolean and a string for my error reporting system. JQueryUI dialogs are asynchronous which means the browser won’t hang and wait for a return value as the native prompt() would.Here is some sample code:Validator function:function verifyTOS_PVM_v2() {verifyTOS_PVM_v2_callback = ”;i
raheel shan
javascript jquery knockout.js
I am trying to call a function on attr src but failing. Here is what i have tried.function FavoriteViewModel() {var self = thisself.FavoriteProfiles = ko.observableArray([])self.getRating = function(Rating){//here i want conditions and concat image pathreturn does nothing here}self.LoadData = function(){//run ajax and put its result in self.FavoriteProfilesself.FavoriteProfiles(Result)} self.LoadData() }When i run ajax this brings this result. Results are multiple i am only posting
Josh Unger
javascript internet-explorer canvas internet-explorer-8 easeljs
I am using EaselJS and want to allow for backwards compatibility with ExplorerCanvas.This should be possible using the following code (see here): createjs.createCanvas = function () { … return canvas implementation here … }However, If I put an alert in this function and run the code, the function is never run.How do I go about getting this to work?Edit:Here is a simplified example of the code I am using:<!DOCTYPE html> <html lang=’en’> <head><meta charset=’utf-8′ />&l
JoMo Apps
javascript android ios eclipse phonegap
I am developing an app for my work (social housing) and I want it to be able to allow the user to take a photo and attach it to an email so they can send it to us (pictures of repairs etc)I’m using Phonegap and Eclipse as I want the app to be cross platform but am testing in Android primarily at the moment. Is there a way to do this? I am currently using the code below with no avail. <script typr=”text/javascript” charset=”utf-8″>function camera(){navigator.camera.getPicture(onSuccess, onF
Dan
javascript ios uiwebview monotouch onerror
Here’s an answer for a similar question in Objective C but I’m not sure what’s the right way to translate it to MonoTouch.Basically, I want to be able to catch JavaScript errors and know at least filename and line number-unfortunately, window.onerror doesn’t give this crucial information.In particular, I’m not sure if I should expose a native library or if I can write this in pure MonoTouch.
The Dark Knight
java javascript security jsp jstl
I am in a bit of a pickle :I have a lot of values which i am setting in a bean in java and then i am getting them in javascript and jsp using scriplets like this :In My Bean.java :public void setListValue(String s) { listValue = s; } public String getListValue() { return listValue; } Now in my jsp(inside a javascript function) :input = $input({type:’hidden’,id:’ListVal’,name:’ListVal’, value: ‘<%= results.getListValue() %>’});Sometimes i am using the scriplet code to ret
Web site is in building