Questions tagged [serverside-javascript]

Server-side JavaScript is a set of techniques allowing to build JavaScript applications directly on the server.

Server-side JavaScript is a set of techniques allowing to build JavaScript applications directly on the server.

The most popular server-side JavaScript project is node.js, built on Chrome's JavaScript runtime, V8.

Other server-side JavaScript environments include Jaxer and Narwhal.

CommonJS project also provides a set of APIs which can be used outside the browser.

412 questions
0
votes
1 answer

How to secure socket.io from code injection?

So i'm developing a socket.io real-time web-app. The first concern of mine was "What if some evil-minded user tries to inject some code via Dev Tools or Firebug?" and i've got my answer here on SO. My next concern is: "What if some evil-minded user…
Romeo
  • 376
  • 1
  • 3
  • 14
0
votes
1 answer

How to write test driven programming in node.js?

Recently I got introduced to node.js and packages like express, mongodb and ejs. I have few questions : As a learning purpose, I have created a github repo of user management which uses express, mongodb and ejs. I have all my functions in…
Justin John
  • 9,223
  • 14
  • 70
  • 129
0
votes
1 answer

Using custom fabric.js classes in node.js

I'm using a couple of custom fabric.js classes in my app to render and encapsulate some additional data attributes as suggested here. Now that I have the JSON data generated by these, I'd like to render the canvas and write it to PNG image on the…
sa125
  • 28,121
  • 38
  • 111
  • 153
0
votes
2 answers

How to trigger server side button's click event after javascript confirm dialog returns true

I have an input as count named in a repeater with hdncount hidden input. And I have a server side button out of repeater. This script runs onblur event of count. I want to trigger server side button's click event if client click OK button on…
cagin
  • 5,772
  • 14
  • 74
  • 130
0
votes
1 answer

Modifying response using server side scripts on Azure Mobile Services

I have a mobile app for which I am using Azure Mobile Services as a backend. I have a scenario in which I need to modify the elements that the client is requesting from the database. I need to compute the rank and percentile of the record being…
0
votes
2 answers

Weird scope behavior in node or am I sleeping?

My js is as follows, /* * GET home page. */ var MongoClient = require('mongodb'); exports.index = function(req, res){ var studentObj = {}; MongoClient.connect("mongodb://localhost:27017/MY_DB_TEST", function(err, db) { if(!err) { …
painotpi
  • 6,894
  • 1
  • 37
  • 70
0
votes
6 answers

How to fetch a site name from URL in Javascript?

Is there an easy way to fetch a site name from a URL string? Example: http://www.mysite.com/mypath/mypage -> www.mysite.com http://mysite.com/mypath/mypage -> mysite.com The JS code is executed on mongodb CLI side, not in a browser.
BreakPhreak
  • 10,940
  • 26
  • 72
  • 108
0
votes
0 answers

Java EE Web App that uses server side jQuery?

I have a Java EE web application and I want to use server side jQuery to process some HTML. Here's the process - User installs a chrome extension that I wrote User visits a web page on their browser The chrome extension selects an element on the…
sonicboom
  • 4,928
  • 10
  • 42
  • 60
0
votes
1 answer

JavaScript: document.write() not working in Mac Terminal

I'm trying to include some libraries in from some server scripts that I'm running from the Mac Terminal (command line). This will not be run in a browser - I'm using Parse Cloud Code for my iOS app's backend. Any ideas why the following code would…
nickd717
  • 181
  • 2
  • 12
0
votes
2 answers

Middle layer between MongoDB and PHP and mobile aps

We plan web project (accounting software) using PHP for web frontend and MongoDB as database. Also, there will be probably mobile aps for iPhone and Android, possible REST API and more. We need to write middle layer over raw database ("model" in…
Stepan
  • 1,430
  • 2
  • 14
  • 11
0
votes
1 answer

JavaScript as a server-side language

i have been trying to understand how JavaScript can function as server-side language as i am used to JavaScript for client-side work such as AJAX. can someone explain to me succinctly, i have Java and OOP experience and can't wrap my head around…
LaneLane
  • 345
  • 7
  • 16
0
votes
1 answer

How to make a server side world time clock in xPages

I want to display to users the time in different cities/timezones like this: London 2012-02-01 11:30:00 GMT (0) New York 2012-02-01 06:30:00 GMT (-6) Stockholm 2012-02-01 12:30:00 GMT (+1) I need it to be in ssjs and generic so that it does not…
Thomas Adrian
  • 3,543
  • 6
  • 32
  • 62
0
votes
1 answer

How to handle File Upload by Appweb with Ejscript

My web apps was deployed on embedded linux, and I used AppWeb as a webserver. I used Appweb 3.3.2, with Ejscript 1.1.2 And now, I want to upload a file by web browser to server. In Ejscript's document…
0
votes
1 answer

Calling jQuery function from the server

I have a web system which collects measurements data. Those inputs comes from a mobile device (iPhone with a custom website). I would like to show a message at the admin's web site each time the server gets an input from a mobile device. The message…
toy4fun
  • 839
  • 2
  • 14
  • 33
0
votes
4 answers

Call Javascript functions from PHP

A common problem is that for validation you need to run the same code on the server and on the client. On a JavaScript heavy page there are many other function you like to share between both sides. Since you can't run PHP on the client I wounder if…
PiTheNumber
  • 22,828
  • 17
  • 107
  • 180