I'm trying to build a simple autocomplete list:
DOM:
<input id="example"/>
<div id="results"></div>
Javascript:
$('#example').keyup(function(e) {
$('#results').empty();
$.getJSON('Search?input=' + $('#example').val(), function(response) {
// This attaches the results to the results div
updateA...
Part of my spreadsheet's script runs the following piece of code:
temp.getRange(1, 1).setValue("=QUERY(data!A1:H125, \"Select A\")");
As you might expect, this puts =QUERY(data!A1:H125, "Select A") into the A1
cell BUT the formula gives an error (#NAME, error: Unknown range name data!A1).
I know the formula is correct because if I c...
Hi,
I need to display 2 or 3 environmental variables in a webpage. Each variable will have a text box next to it to change the value and a button to initiate the change. I am new to javascript. Please help me, thanks in advance.
...
My data looks similar to this:
var root = {
node1: {
node2: 4,
node3: 2
},
node4: {
node5: 3
}
};
Which is similar to how they suggest the data be laid out for tree structures in their examples. My question is this: how would I give values to node1 and node4?
Thanks.
...
Can you set a jQuery slider to have a maximum value of 10,000 - but then if moved at all to the left it scales as though it was a slider of between 1-50 (if they move it to the right it returns to the very high value).
So it would be something like:
min: 0,
max: 50,
secondmax: 10000, (<- this is what I need to figure out).
values: [...
I'm pretty new to workign with Javascript.
In most languages you can run the code quickly locally on your machine. From what I've seen, in JS you generally only use it via the browser, and so I've been uploading my code an viewing its effects in the browser. This has proven very tiresome. Also, if I mak one error, it seems like my...
I have a real estate application that display homes.
I use AJAX to populate a fixed height/width DIV "window" with home listings.
Many times, the DIV window can be populated with literally a 1,000 or so house listings.
Each house listing includes one picture of the property and each house listing is about 100px tall (each "row" is 100...
Hi
I have this function in javascript file which works perfectly fine in Firefox / Chrome but for some reason throwing 'Object doesn't support this property or method' error on IE 8 .
Any ideas how should I rewrite the function so it is working in all sort of IEs?
validateStep1: function () {
var digitOnly=/^\d/;
var res...
I already have the conditions and everything worked out, only thing I need is the syntax in JavaScript to change the cursor to the hand, like the user has moused-over a link, and then I need the syntax to change the cursor to the arrow, like they moused-out of the link. Not much to it, just need the JavaScript syntax for changing cursors...
Hello,
My question is similiar to this question http://stackoverflow.com/questions/2223395/how-do-you-grab-an-element-from-a-remote-page-using-mootools-and-request-html
I unfortunately am not familiar with mootools at all but am being forced to use it as a number of other components on the website rely on this framework.
I am trying t...
I am trying to use ASP MVC 2 data annotations to validate a semicolon delimited list of email addresses on the client side. The regex below works on the server side but doesn't work with the javascript because javascript regular expressions don't support conditionals.
"^([A-Za-z0-9_\+\-]+(\.[A-Za-z0-9_\+\-]+)@[A-Za-z0-9-]+(\.[A-Za-...
is it possible to READ a Microsoft Word documents data\contents and display them in a web page... if yes then how
AND how to
display the documents particular page
display a particular table in the document
display a particular area or content in the document...
p.s please remember READ the data and display them in webpage.. not em...
Hi, I am new to both Rails and Javascript, so my question is probably trivial.
I am currently building a website which have a side page for index page. Inside the side panel, there is a search field for the index page, which I used for autocomplete ( Ajax.Autocompleter from the script.aculo.us). The problem is that seems autocomplete ja...
I want to make an svg element (path, rect, or circle) be able to be draggable and give it resize handles.
But unlike HTML DOM, not all elements have an upper left hand corner x,y coordinate and a width and height for a box surrounding the content. This makes it inconvenient to make a generic resize or drag procedure.
Is it a good idea ...
Suppose I have two frames. I want to set the size of the top frame so it shows all the necessary content, but no more.
For example, could I put an "hr" tag or a wide image transparent image at the bottom of the top frame and have the top frame resize automatically based on the location of this element so that this element marks the ver...
I found this method:
Array.prototype.compare = function(arr) {
if (this.length != arr.length) return false;
for (var i = 0; i < arr.length; i++) {
if (this[i].compare) {
if (!this[i].compare(arr[i])) return false;
}
if (this[i] !== arr[i]) return false;
}
return true;
}
var a = ['aa'...
I work for a company that writes software which client sites embed with < script language="JavaScript" src=..... etc. etc. We depend quite a bit on document.write to write elements out to the page. One of our clients for some reason has opted to use the content-type "application/xhtml+xml", which makes document.write() unusable in chrome...
I have a long list of words in an array. Some short, some long. I'd like to filter out those words which starts with a word from the array (length of this "prefix" word can be set to, say, 3 characters) and which at the same time ends with a word from it.
Let's say the first word is 'carport'. Now, if 'car' and 'port' exist in the array...
Hi,
I wonder if someone can help me. I know JS quite well but am completely new to JQuery...
I've got an image which is being loaded dynamically vis a call to UpdateImage()
$.fn.image = function (src, f) {
return this.each(function () {
var i = new Image();
i.src = src;
i.onload = f;
...
Hey all,
I have two problems with the below javascript that I'm not sure why they're not behaving expected as they should. I'm almost positive it should work but it doesn't. First, the left button doesn't hide when the left most p tag (the first one) for group1 is active even though it should, and the right button doesn't hide when the ...