Tagged Questions
0
votes
0answers
15 views
Getting line number for error when evaluating a script using java's javascript engine
If a runtime error happens in script run by java's javascript engine, I can happily get the error and importantly the line number from the exception.
When loading a "level" I evaluate a level script ...
0
votes
1answer
11 views
Starting Camera Activity Cordova Plugin
Basically, what I want to do is to create Aztec code reader plugin.
So I need to open some kind of camera screen inside my app. I should do that inside my Java code, which right now looks like so:
...
0
votes
0answers
12 views
Need a very simple GAE Channel API example [on hold]
How do I trigger a JavaScript function on the client from a server script using GAE Channel API?
I have read through the following docs however I am not too familiar with Java or Python and found ...
0
votes
1answer
21 views
Cassandra on Java stack vs Mongo Db on JavaScript stack
I am trying to compare and contrast MongoDB vs Cassandra. Our project is Java based.
Some of the differences i found out are
Cassandra is highly available and partition supportive vs MongoDb is ...
-3
votes
0answers
18 views
Java Class concept vs JavaScript Prototype concept [on hold]
In what ways is the Class concept in Java analogous to the Prototype concept in JavaScript and in what ways are they divergent?
-6
votes
0answers
25 views
HTML5- Tem como capturar o audio do browser com html5? [on hold]
Tenho um aplicativo que simula uma bateria, tem como capturar o audio e salvar?
Se não, existe a posibilidade de fazer o mesmo com java? ou não é possível fazer esta proeza?
0
votes
1answer
21 views
How can I call a Java function from JavaScript in my Cordova/Phonegap application?
My application uses Cordova. I need to capture a keypress in my app and then call a Java function in my Cordova app, like so:
$(document).on('keypress', function() {
// call mySpecialFunction() ...
-2
votes
0answers
36 views
Website design with serverside scripting [on hold]
I apologise if im not precise enough but I have very little knowledge in these areas.
Im working on a website and Ive read so much about possible approaches and solutions that my brain is melting. At ...
0
votes
0answers
14 views
Java websocket trigger event to javascript client
I'm building an application with Spring 3, Spring MVC, Tomcat7.
I'm triying to refresh content in a jsp when something changes in server side.
For this purpose I followed this tutorial: ...
0
votes
1answer
37 views
How to write cron expression for specific weeks?
How do I write a cron expression for specific weeks? say If I want a job to execute on mon, Tue and Sunday of 1st and 3rd week OR say the last week of the month of the say 1st and 9th Month?
Days ...
0
votes
0answers
11 views
org.mozilla.javascript.Context.evaluateString issue
The following piece of code
Context cx = Context.enter();
cx.setOptimizationLevel(9);
Scriptable scope = cx.initStandardObjects();
String expression = "function wrapper() ...
0
votes
1answer
23 views
Method POST not working when send request to REST Service
My problem look like this: When i send POST request to REST Service I get Access-Control-Allow-Origin error, but request GET it's working.
This is my Rest Service:
@Path("/createUser")
...
-1
votes
2answers
26 views
How Minify JavaScript in Spring-MVC
I Want Minify all js file in my project
i use spring-mvc ,tiles and tomcat
Please give me proper solution how to implement this in proper way
thanks in advance
1
vote
2answers
38 views
How to encode a String in Angularjs?
I use Angularjs to send a get http request to my server. The server respond to rest request using Spring MVC. Here a snippet code on my angular url building :
var name="myname";
var query= "wo?d";
...
0
votes
2answers
25 views
How to use the JavaScript API of PhantomJS in a Java Application
I want to write an application in Java, which should test a website in a headless browser, like for example PhantomJS or zombie.js. PhantomJS scripts are written in JavaScript so how can I use the ...
1
vote
2answers
48 views
Why does this AJAX call doesn't return success and change URL in browser after returning from controller?
I am working on a Spring MVC project where the homepage has two input fields. Both input fields are of String type. But the regNo field gets number and if the user enters the regNo it should be taken ...
0
votes
2answers
36 views
Time zone conversion to CST based GMT offset
I have date(01-oct-2014), time (00:37:31), GMT difference(-360) now
I want to get the time conveted to CST. The solution can be in javascript
Or oracle databse.
I have read several articles but ...
0
votes
2answers
40 views
How to call a controller method from jsp in Spring mvc using onchange method
I have a Spring mvc project with an html form in jsp.
The form has a date field which I have to validate.
But, we cannot enter an already existing date in the database, so I want to get that ...
0
votes
0answers
18 views
Javascript on the page with authentication asks for authentication again
I've wrote a simple login system with Servlet3. Everytime user logins, system will store an specific cookie (UUID) in browsers, so system can remember login easily next. Everything works fine but in ...
-3
votes
1answer
17 views
Java Script Gross/Net Pay Calculator
Hey I have been having trouble getting the code for the calculate button to function with the code I have.For some reason it isn't displaying correctly. When I click the calculate button to figure out ...
0
votes
1answer
17 views
session attribute not being set until I refresh thepage
I have some code:
$(document).ready(function(){
$(":button").click(function(){
var formData = {"field1":field1, "oper1":oper1, "value1":value1, "field2":field2, "oper2":oper2, ...
0
votes
0answers
21 views
Get Arraylist value into a variable in jQuery
I have a table sometable as follows :
att_id | id | name
1 | 1 | aaa
2 | 2 | bbb
1 | 1 | ccc
4 | 4 | ddd
1 | 3 | eee
1 | 3 | fff
I ...
0
votes
1answer
35 views
Get value from custom html attribute
I took the maintenance of a really old java web application. (Recently it was passed from tomcat 4 to tomcat 6, and maybe this caused the problem.)
In the jsp there is a table that have inside this ...
-6
votes
1answer
27 views
Javascript implementation of find all links in selenium
I have the below Selenium code in Java. How can it be implemented in JavaScript?
package practiceTestCases;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import ...
0
votes
1answer
43 views
how to send multipart/form-data request in ajax
The below function wont work. i want to upload multiple files & request submit by ajax.here content type occur "text/plain;charset=UTF-8" i want to change content type="multipart/form-data"
the ...
0
votes
0answers
8 views
Using cors to communicate with my jersy Rest service
I need cors to communicate with my (Jersey) Webservice, because the client runs on another domain.
The webservice runs on Tomcat. I've tried to simply add the Tomcat cors filter, which didn't work.
...
0
votes
1answer
33 views
parseInt inside Java inside html
We have a calendar with some custom views. Our views are loaded in a calendar component (inside a div). This calendar component has a js file that loads html templates.
This is the method that load ...
0
votes
0answers
10 views
MULTI-TABBING ISSUE For one of the Java Web Application - Mixing the data from two different records
Problem:
Whenever we save the data of two different records in two different tabs of the browser for the same session, data is getting mixed up for the respective saved records.
Scenario:
1) Tab1: ...
0
votes
1answer
43 views
AlertDialog box Repeats four times
OK my question is a lot bigger than the Title. But can't describe everything in a Title. So here we go.
I am writing an App that when a NFC cards get detected by Phone, it will be able to WRITE and ...
0
votes
0answers
10 views
how to customize google translator dropdown
i am translating a simple text page from english to spanish,for that i am using google translator plugin.
its working fine but i want to hide some hyperlinks(if their in page) when it is translated to ...
0
votes
4answers
38 views
Need To Disable A Table When A Link Clicked
I have a bootstrap 3 table which contains links. What i'm after is to disable the table when one of the links are click and also for the table to give the user a visual that the table is disabled ...
-6
votes
1answer
42 views
Complx validation [on hold]
I have 4 input fields named A, B, C, D. I have to validate them in the following format.
At least one of them needs to be filled in order to proceed further.
A can be entered on its own independent ...
0
votes
1answer
25 views
Java 8 Nashorn JJS – javascript console
a question to an expert:
The latest Java 8 provides Javascript engine Nashorn. Its known that with the magic of invokedynamic the javascript is compiled to JVM bytecode, unlike Mozilla Rhino, which ...
0
votes
0answers
33 views
Need to parse only value data to Google Visualisation API
Consider the following JSON data:
{
timestamp: 1412048041,
status: 200,
request: {
mbean: "MineStar:name=Statistics,type=Speedometer",
type: "read"
},
...
1
vote
0answers
15 views
Webservice Exception Javascript DWR
I'm trying to unravel a Webservice work and replicating it's call, but I've been unable to do it.
In this website, if you input, for example, HY6210 a new window appears with data already filled in.
...
0
votes
1answer
24 views
Netsuite File cabinet
I was wondering if it would be possible to use nlapiLoadFile() to call a file from an external drive in the server (A server within the company or local drive) and not from the file cabinet. (which ...
0
votes
0answers
24 views
Map on JSP to human readable HTML
So on my JSP I have my command/model object that has a Map(String, Object) variable. The map values are either Strings or more Map(String, Object), which in turn contain the same thing, and so on down ...
0
votes
0answers
12 views
Does Nashorn have an equivalent of “yield”?
The yield keyword in JavaScript would be pretty handy for certain scripting tasks in Java 8's Nashorn engine. Given the bleeding-edge-ness of yield (it's in ES6), it's probably not included in ...
0
votes
1answer
36 views
Javascript: Disable button based on server status
I'm very new to Javascript and I have a button that need to be constantly checked against whether a server is active or not.
I'm using the Play framework based in Java. I already have a class ...
-4
votes
0answers
22 views
JavaScript and Java (server-side) interaction [duplicate]
I have a special application written in Java. I need to invoke some methods from JavaScript (web browser-based) on the same machine the java application runs. What I can do?
java code isn't embedded ...
0
votes
0answers
17 views
Crate a pop-up window from a minimized browser
We have an application (CQ5)which creates some alerts based on some business conditions. This is basically uses a pop-up created with java script (internally this uses the java script timer). But is ...
1
vote
2answers
58 views
spring-mvc : how to pass parameters in mvc without method arguments at the controller
I was being tasked to create my controllers without passing any parameters at the method signature.
I am quite baffled as this is quite challenge and I haven't really seen any examples at the net.
...
0
votes
2answers
27 views
How to pass text box values to next page using Hyper link in jsp
I Want to pass my text box values in the jsp through hyperlink .both the text box and Hyperlink are in the same jsp page.How can i achieve this
0
votes
7answers
59 views
grading with if else statement
import java.util.Scanner;
public class grade {
public static void main(String args[]) {
Scanner input = new Scanner(System.in);
double no;
System.out.print("Please enter your CPA: ");
no = ...
1
vote
1answer
45 views
Spring-MVC : two jsps into one controller with one requestMapping
Can I use one request mapping for two jsps?
I am currently calling one request mapping from one controller but one of the jsps doesn't seem to be caught by the controller.
Both jsps have the same ...
0
votes
0answers
23 views
Detect Blocked popups without opening a popup
This question has been raised many times on "How to check if the popup is blocked on my browser or not" and all the solutions that i found have proposed a solution where a new popup window is opened ...
0
votes
1answer
51 views
Set cookie in java, read in javascript
I'm trying something similar to this: Detect when browser receives file download
I'm using Chromes Developer Tools to monitor my cookies and my problem is that the cookies I set in my server side ...
2
votes
0answers
17 views
Video Streaming in android Using Java server
I have an android application by which i need to upload video from IP Camera to a server and have to stream that from another device from that server. That is I have to stream live video from Ip ...
0
votes
0answers
21 views
Show PDF cover page as thumbnail on browser
My requirement is that i have to display list of PDF documents on browser as rectangular boxes. In the rectangular box i need to show PDF document cover page as thumbnail. When user clicks on any ...
0
votes
1answer
29 views
Javascript from Java - document object
I am trying to invoke a java script function that creates a html div structure by using e.g.
/* ... */
document.createElement("div");
/* ... */
Unfortunately I have no window and/or document ...