0
votes
4answers
58 views
Can an attacker insert malicious code in html5 data attributes
So I learned earlier that using the data attribute in html5 you could insert values to be handled in a javascript file. e.g
<a href="#" data-name="hello" class="check">Hey</a>
the ...
0
votes
2answers
11 views
Use JQuery Mobile to slide and delete list elements
I'm experimenting with a JQuery Mobile page that has a simple list set up:
When I click the list elements, they are highlighted and stored by id into a local array. Is there a simple (or not so ...
0
votes
1answer
19 views
Issue with file upload in one click
I'm using an icon instead of the regular upload input + submit button.
I want the upload to starts automatically right after a file is chosen.
Once the user selects a file, nothing happens though.
...
0
votes
3answers
37 views
match two datetimes in javascript not working
I have two dates :
date1 = "2013-07-08 12:30:00"
date2 = "2013-07-08 13:30:00"
Now in javascript i want to match these two dates and its they dont match than i want to delete the appointment and if ...
0
votes
1answer
20 views
Pass array data from javascript in browser to spring mvc controller using ajax
I would like to pass an array from javascript in web browser to a Spring MVC controller using AJAX
In javascript, I have
var a = [];
a[0] = 1;
a[1] = 2;
a[2] = 3;
// how about multiple arrays as ...
0
votes
2answers
12 views
jquery impromptu confirm/prompt replacement
I am trying to write library code for alert/confirm/prompt replacements using jquery and impromptu.
I want to be able to call the functions in the same way:
eg. var getval = jConfirm("Are you ...
0
votes
0answers
12 views
Canvas toDataUrl returns blank with no errors
I am currently trying to convert my svg image to a png. I have tried & tested this locally on a text editor it works. However, when I use the same code on my ruby on rails based server - it ...
1
vote
1answer
20 views
AngularJS : what's the difference between these two lines?
$scope.init = function() {
return $scope.items = basketService.items;
};
ng-repeat = "item in items"
And working with $scope.items + refresh $scope.items with broadcasting.
OR
$scope.getItems = ...
1
vote
1answer
26 views
JQuery. Send ajax query for each row in table
I have found many answers about my problem, but problem not resolved
I have table, with data, example:
<table>
<tr>
<td class="editable"> <a id="query" href="#"> ...
1
vote
2answers
17 views
Where to put javascript events in AMD modules?
I am in the process of converting a massive .js file into AMD modules using requirejs
I realise the concept about returning function and such which are much link classes, however, how do I handle ...
1
vote
0answers
14 views
jQuery Mobile popup is not opening on .popup('open')
I am trying to use jQuery Mobile 1.3.1's popup to warn the user when login credentials are false. I started with a basic template from jquerymobile's documentation, but I couldn't make it work with ...
0
votes
4answers
30 views
Using jQuery, how can I create a select list using a page's H4 titles as options?
I would like to take all of the H2, H3, or H4 titles on a page and use them to create a <select> box where every option is a page title. This should include the value. I want to eventually use ...
0
votes
1answer
19 views
jQuery dynamic table inputs
I'm working on a school project with JS, and I've created a form where I enter the amount of forces in a problem and (through jquery) the HTML is edited so that a number of new input rows are added ...
4
votes
2answers
43 views
How can I make sure that my javascript removes whitespace before adding “…”
I have a string variable that looks this:
Årets upplaga av Storsjöcupen, en fotbollsturnering i Östersund för
ungdomar, fick en trist avrundning när anhängare till ett norskt
pojklag ...
2
votes
1answer
32 views
How to change html div without affecting inner divs in JQuery
How can I change html inside a Div in HTML without affecting inner divs inside the parent div in Jquery.
So far I have this:
HTML:
<div id="div_to_change">
This is the text
<br>
...