I'm using a JavaScript component that takes a 2D array as an input. There is a particular format to it, and I basically need to develop grid GUI to help configure such a string, instead of having to type it manually.
[
[0,"Chart","linear"],
[2,"3D",false],
[1,"Labels",["Student","Business","Professional","Retired"]]
]
Any ideas ...
I am looking to route/redirect all events which occur on a target origTarget to another object otherObject. I want to accomplish something like this:
/* Magic binding (doesn't work!). */
$(origTarget).bind('*', function(e) {
$(otherObject).trigger(e);
});
Is this possible with jQuery without looping through every possible event t...
I would like to convert a numerical value to a text string. I am opening several windows with the window.open() command and I would like these windows not to be on top of each other.
For that I use the argument "left" and "top" in the windows.open command but these parameters need to be text entities.
for (var i = 0; i < final_number; ...
Background:
Just for laughs I decided to search to see if anyone out there had developed a JavaScript implementation of LINQ.
Lo and behold, there seem to be several of them. It would seem like LINQ implementations are almost like string Template processing engines: everyone and his dog has written one.
Question:
Does anyone out there...
Hey all,
I was just wondering if there is a clean implementation to getting elements before appending them to the DOM.
Example (w/ jQuery):
var html = "<div class = 'test'><div class = 'innertest'>Hello!</div></div>";
var innerDiv = $(html).find('.innertest');
I feel like its not possible, but I'd like to see if there is any impl...
In my application i want to send something to the server after some time.
I have implemented it using AJAX. But it works for the first time but not doing it recursively. I have used setTimeOut() for doing that.
var xmlHttp;
var requestURL = 'http://localhost:1092/ClassicAJAXDemo/UpdateHeartbeat.aspx?name=';
function show_da...
I'm trying to ensure that visitors of my ASP.NET MVC website always have the most-current CSS and Javascript (and not some older cached version).
I tried to realize this by generating a seed value when the application domain starts, and automatically append it to the CSS and Javascript URLs (so now instead of /Content/All.js the link is...
We currently have a JS that popups a window whenever the visitor wants to leave the site. It works fine, except when hitting the back button on the browser, it popups up the alert even if we are on the site.
we want to fix this.
Please note:
-we do not want to disable the back button
-we do not want to erase the historial
the JS functi...
I need to visualise a directed graph that represents the flow of data in a web application. Can anyone recommend any JavaScript or Flash solutions for this please. It must support hooking a node click event because I need to fire off an AJAX call when this happens. Can be free or commercial. The server-side technology is Java if this mak...
i am having one div, which contains one table. i want to apply the table-width to div element.
My table cells having padding 5, so table width is not correct in IE browser, while the mozila the sample code works.
...
I was able to create a client script click event on a link button for normal ID's and numbers. But when I tried to do this with a string it causes a parse error. Not the difference lies on adding the single quote to enclose the Even("name") value. If the single quote is missing a javascript error occurs. If it exist, an ASPX parse error ...
Hello,
I'm using jQuery ThickBox plugin (http://jquery.com/demo/thickbox/). I have been concentrating on functionality so far and I have got it working exactly the way I want.
What I want to do now is to style the box so it has round corners. To make it more difficult, I would like the round corners to be transparent, so the background...
I am trying to make a sticky footer for my web page, I found some CSS that does keep the footer at the bottom but has a few downsides. 1, If you keep scrolling down the page the page just gets bigger and bigger (that was completely unexpected, no idea what caused that). 2 it moves down with the page in a jerky action, like stop..go..stop...
I am using python-visualization library for computing the datasource.
I tried to put more than one visualization in a single page. Both are line charts and data comes from a seperate URLs for each visualizations.
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript" src="/site...
I'm using jQuery to listen to DOMSubtreeModified event, and then execute a function. What I need is a way to only run a function once per event burst. So in this case, the event will only run after 1 second, and again after 3 seconds. What is the best way to do this?
jQuery
$(function(){
setTimeout(function(){
$('#container')[0].i...
I'm extremely frustrated, I can't figure out what I'm doing wrong with this slider. How I have done it looks exactly the same as how the example page does it, except the example page is working, and mine isn't. I know the script is at least running because it creates some extra <li> tags with the class 'cloned', but nothing is moving.
F...
Anyone know of a good reg exp that can do this, optimally in one go? It needs to remove whitespace at begin/end of each line, remove LFs and CRs and replace with a single space but if there's a <br> (or <br/>) at the end of the line it should not add a space. I'd need this in a JavaScript conform regexp.
...
I would like to change the text that appears in the ThickBox in the top panel. Right now it looks like this (HTML from Firebug):
http://test2.richardknop.com/thickbox.jpg
So I would like to change this part of the HTML:
<div id="TB_closeAjaxWindow">
<a id="TB_closeWindowButton" title="Close" href="#">close</a>
or Esc Key
</div>
To f...
I need some help here:
I am writing code to redirect a user to a different page and execute some code, if the user closes the window while he is working on something:
<script type="text/javascript">
window.onbeforeunload = function() {
location.assign('http://www.somesite.com');
return "go?";
}
</script>
N...
Hi
As the title says, what is the Java equivalent of JavaScript's String.match()
I need to get an array or a list of all matches
Example:
var str = 'The quick brown fox jumps over the lazy dog';
console.log(str.match(/e/gim));
gives
["e", "e", "e"]
http://www.w3schools.com/jsref/jsref%5Fmatch.asp
regards
Jon
...