1
vote
3answers
58 views

Build, Modify, Output Javascript Array

I'm trying to accomplish the following...if it's asking too much in a single question then some simple steps on what events to use will still help. There are 2 blank textareas sitting next to ...
0
votes
3answers
20 views

Need help using navbutton and counter to show & reset array sequence

My goal is to develop a very simple "make your own story" game engine using script. Right now, this code sufficiently starts the story, but it yields "undefined" after passing the final array in the ...
1
vote
7answers
46 views

Hiding a Javascript Array with jQuery

Right now I have a function that looks like this: function hidearray() { $('#one, #two, #three').hide(); } I'd like to put those IDs into 1 array, which would look like var myArray['one', ...
0
votes
1answer
33 views

NodeJS (General JS) comparing IP address

I'm using the following code to compare returned IP address (Using node-restify which is similar to express): var checkIP = function (config, req) { var ip = ...
1
vote
1answer
45 views

Image arrays with thumbnails using display property in JavaSript

I just want to upgrade image arrays using JavaScript. I added thumbnails below, So larger image can be displayed when thumbail is clicked. The problem happens after I click "prev" or "next" (after ...
0
votes
1answer
21 views

JSON call data array that has whitespaces in its name

I'm calling a json string that has white spaces in the its identifiers which is causing my code to break. I'd like to call the first name and last name var names = jQuery.parseJSON('[{"F ...
-2
votes
2answers
40 views

Arrays dont want to cooperate while using PHP and JS with Jquery [closed]

This is very strange problem and I really dont know what should I do. I take array workers from MySQL database with json_encode Then i copy it to two other arrays on which I will make operations soon ...
1
vote
2answers
45 views

Performance of modifying an array in an object: to use a variable, or not?

Consider the following JavaScript global object: var obj = { key1: [ 'data1', 'data2', ... ], key2: [ 'data1, 'data2', ... ], ... } Assume I have a function that needs to modify the array assigned ...
0
votes
2answers
29 views

Order-safe value passing from php to javascript

If I pass an array from php to js: var array = <?php echo json_encode($array); ?>; Is it true that the ith element js array and the php array will refer to the same data?
2
votes
1answer
67 views

removing value from array on specific location [duplicate]

I realise there is a lot of topics on this subject but I believe this one is different: The goal is to get an value from an array on a random location then delete this value. I use this part by John ...
0
votes
2answers
46 views

Javascript find and replace (customized) [closed]

var MyAddress = " Google Ireland Ltd.<br> Barrow Street<br> Dublin 4<br> Dublin<br> Ireland "; Using split, I can put each line into an array: ...
0
votes
1answer
51 views

php loop through scripts array & remove item

I have the following script in my cms page: window.addEvent('domready', function () { SqueezeBox.initialize({}); SqueezeBox.assign($$('a.modal'), { parse: 'rel' }); }); var ...
0
votes
1answer
35 views

Redefine a function after it is created in Javascript

I'm creating through a PHP loop (the reason of the loop is because I want more or less cases) a switch Javascript function, that outputs this: function my_function(array_name) { switch (true) { ...
1
vote
1answer
30 views

Creating Object Properties in JSON (Javascript) Dynamically in a Method

I am left scratching my head here. I am pretty new with both JSON and Javascript so I am wondering how I would go about this. Say I have an object: MyObject.prototype = { // different methods ...
3
votes
1answer
31 views

sort a JS string array by a specific letter

I have to sort an array of strings like this: var arr = ["akaw","waka","kawa","akwa"]; The type of sort must be by a specific letter, W in this case so my function must return this array: arr = ...

1 2 3 4 5 371
15 30 50 per page