I am getting an error only on IE saying object does not support method but the line it is saying is somewhere around 946275090 (I know IE is off on line numbers but not usually this off). I could of swore this type of error had a specific meaning but I for the life of me can't remember. Does it mean something specific when IE return th...
I using a simple ajax script which returns found records using onkeyup in input field.
The problem:
Once a record has been returned from call it will stay printed on screen no matter what input is made or if string is latered on field.
Sample:
Lets say the string typed on form field is the word red.
red gets printed to screen.
if t...
I know you can use :contains to get elements who's innerHTML contains a certain string, but how can I get the elements whos innerHTML starts with a string?
...
I have a nested set of jQuery droppables...one outer droppable that encompasses most of the page and an a set of nested inner droppables on the page. The functionality I want is:
If a draggable is dropped outside of any of the inner droppables it should be accepted by the outer droppable.
If a draggable is dropped onto any of the inner...
I've made this script that lets you navigate through multiple divs with jQuery, but I want to make a css change to the parent if the 6th div is shown and using .is(":visible") hasn't given me any luck.
$(document).ready(function() {
/* Set the frame to #sf1 */
$('#sf2, #sf3, #sf4, #sf5, #sf6').hide();
/* Slide Animation for Nex...
I am trying to match URLs with a tested Regex expression but when I use JavaScript to evaluate it returns false.
Here is my code:
var $regex = new RegExp("<a\shref=\"(\#\d+|(https?|ftp):\/\/[-a-z0-9+&@#\/%?=~_|!:,.;\\(\\)]+)\"(\stitle=\"[^\"<>]+\")?\s?>|<\/a>");
var $test = new Array();
$test[0] = '<a href="http://www.nytimes.com/imag...
Hi. I think I may be missing something or haven't grasped a fundamental of jQuery. I have searched for hours but yet to find an answer to my question.
I've got an old website that I'm upgrading to use jQuery and many of the links call a JavaScript onClick call that passes multiple parameters, as per the example below:
<a href="#" oncli...
I'm working on a Javascript library that does not depend on jQuery, though I have jQuery and QUnit available in my tests. In the library, I attach an event to an element the way jQuery does:
if (document.addEventListener) {
tab.addEventListener('click', MyModule.show, false);
} else if (document.attachEvent) {
tab.attachEvent('click...
Hello EveryOne,
I am new to javascript/jquery.
I have a simple question one of java script function is running and wanted to see the thread id for that thread.
In java we do like
Thread.getID();//in java
which will print the thread id of running thread.
In the similar way what is the function we use to get the running thread id in jav...
Let's say I have this jQuery extension method:
$.fn.foobar = function() {
var clone = this.parent().clone();
};
After I've gotten clone, how can I find the cloned child element that is the same as this?
Will this work?
$.fn.foobar = function() {
var clone = this.parent().clone();
var cloneOfThis = clone.find(this);
};
...
Hi,
I have a javascript class like this:
function Foo() {
this.x = 5;
this.y = x + 10;
}
Does 'x' not get scoped to the instance of the class when I don't use '.this'? If so, how do we use callbacks then? I have something like:
function Foo() {
this.x = 5;
this.grok = function() {
jQuery(blah).animate({
..,
...
Ive just had some fantastic help from Sandeepan, thank you!
Please can anyone see what I have done wrong with this ....
<head>
<script type="text/javascript" src="jquery-1.4.2.js"></script>
<script type="text/javasript">
function addItemToUsersList(itemId)
{
$.ajax({
'url': 'member-bucketadd-execTEST.php',
'type': 'GET...
I want to design a site with header, navigation part and content... for SEO purposes I want the coding in the order of content, header and navigation area... but when viewing the site we want to see header first then navigation area then content... is there any way doing this ?
...
Hello,
I'm using the Jquery UI autocomplete on an existing project. Well, the performance is dog slow, especially when executing the
input.autocomplete("search", "");
My solution was to cache the information, so even though its dog slow it only occurs once. I think I'm missing a very simple Javascript bug and I would really apprec...
So, this is strange, and it was working for me about a month ago, before I made a bunch of code updates. Anyways the issue is the live submit handler wont even run in IE8, however, if i run it on a button click, it works. See below:
HTML
<label>Add Attachment</label>
<form class="file_upload" method="post" enctype="mult...
Hi all, I've got the below code...
var ToggleButtons=new Array();
ToggleButtons[0] = "#Click";
ToggleButtons[1] = "#DoubleClick";
ToggleButtons[2] = "#Drag";
ToggleButtons[3] = "#RightClick";
ToggleButtons[4] = "#MiddleClick";
function SelectButton(id) {
var x = 0;
for (x = 0; x++; x < ToggleButtons.length) {
if (x ==...
I'm trying to replicate a "feature" of PHP (And in most languages) in Javascript.
Here it is in PHP:
$objectName = 'ObjectA';
$someObject->$objectName->someMethod();
Basically using a string variable to reference an object variable.
So in Javascript, I was hoping to do something like:
var objectName = "ObjectA";
someObject.[objec...
It seems like this question is asked periodically and the common response is "You shouldn't do that with AJAX anyway. Just set the window location to the file."
But I'm trying to request a file that doesn't actually exist out on the server anywhere. It's dynamically generated (by a Django view) given the GET/POST context parameters. The...
I had been using jsvalidate, but it doesn't fit my requirement of conditional validation for what I want to do; I want to make a couple of fields required only if a select is previously marked as yes.
I have been looking into mootools's formcheck, it seems a bit fancier and nicer than jquery's validation plugin, but I don't know if it w...
var a = {};
a.__defineGetter__('test',function() {return 5;});
var i ="test";
Is there any other way I can execute the getter other than a[i]; (while using var i to do it)
EDIT:
I was asking ways to use var i to do it. I'll explain the real problem a bit better.
I am using getters on my namespace object to load modules only wh...