Can someone tell me how to change this getJSON request to a .ajax call so I can set the contentType option?
$.getJSON('json/showreel.json', function(data) {
//get total number of JSON objects and generate random numder
var total = data.length;
var randnum = Math.floor(Math.random()*total)
//Loop through each of the JSON...
Hey all,
I'm attempting to repopulate a drop down menu. I'm making an ajax call to retrieve myList. When I have the new list, I remove all the options from the select element and insert the new values (about 100 options). This works great on later versions of IE and Firefox; the refresh is almost instant. However, on IE6, these oper...
Ok, last question for today I promise!
I have the following line of code that features a radio button list (radTopx)
ddlBuyer.Attributes.Add("onclick", "$('#tbxProdAC').val(''); $('#txtbxHowMany').val(''); $('#GridView1').remove(); $('#radTopx').attr('checked',false); ");
What I am trying to achieve is that when ddlBuyer is clic...
I have something like this:
<tr id='<%=currentRow %>' onclick="SetBackgroundColor(this)" style="background-color:Yellow">
When i click on a row i want to change its background color and i did like this:
function SetBackgroundColor(rowId)
{
$(rowId).css("background-color", "#000000");
}
but i don't know why it doesn't work. An...
Hi,
I'm experiencing a strange error in IE on this site: http://www.davenuttall.co.uk
The fund-raising barometer on the left-hand side animates upwards to the correct position just fine in all other browsers, but throws an 'invalid argument' error in IE.
I think it's caused by the easing method - easeOutElastic - from the easing plugi...
Hi, i've got a page with links to MP3s, when the link is clicked I use javascript to show a small Flash player (NiftyPlayer) under the link. When a different link is clicked, the old player is hidden and the new player is revealed.
The player auto-starts when the element is shown, and auto-stops when hidden - in Firefox.
In IE it will ...
Hello,
I've been making good use of the jQuery icons in my web app, but have come to a point where I would like to use a color that I'm not able to achieve by default. I'm currently using the "State Street" theme, which primarily uses green. But I have a red box with white text, and would like to use an icon that is white as well. There...
I'm having a heck of a time wrapping my head around JQuery syntax (probably because my javascript isn't that solid to begin with). Here's my problem. I'm using datepicker on two input boxes (#ev_start and #ev_end) #ev_end must occur after #ev_start.
HTML
Event Start <input type='text' name='ev_start' id='ev_start'/>
Event End <inpu...
Dojo has this:
http://download.dojotoolkit.org/release-0.4.3/dojo-0.4.3-widget/tests/widget/test%5FSelect.html
Similar to Google Auto-suggest.
Does jQuery have anything similar?
...
I'm trying to do this:
$(window).unload( function () {
$.ajax({
type: "POST",
url: "http://localhost:8888/test.php?",
data: "test",
success: function(msg){
alert( "Data Saved: " + msg );
}
});
alert (c);
});
However, the success alert is never shown, nor does this request seem to be even hitting the server. What am I doi...
Why is line 10 returning null?
http://pastie.org/720484
it works with line 40
...
I was wondering if such a tool exists in a browser. You select any item on the page like a <p> tag nested in several div's and the tool creates a JQuery selector for it which I can copy and use in my Javascript function.
...
<!-- According to Meta-SO, editing is a way to politely bump, so I am trying this one more time to see if anyone has any more info. Thanks -->
UPDATE: Still haven't solved this issue:
Hello again:
I have worked away at this issue, and still no luck. I am going to try and clarify what I am doing, and maybe that will bring something to...
I grabbed a bit of code to do some paging with jQuery, via Luca Matteis here
http://stackoverflow.com/questions/516754/paging-through-records-using-jquery
I've made some edits to the paging script so that I can use the same code to provide paging of different content in different locations on the same site.
For the most part, I think ...
First, housekeeping: A quick review makes me think this isn't a duplicate but would be happy to be corrected.
I've got an ASP.NET MVC app that have a page with multiple forms, each form has some text fields, an agreement checkbox and a submit button. I'd like to disable the submit button if the agreement checkbox isn't checked individua...
I have a site that need to get some data from a different sit that is using asp.net MVC/
The data to get loaded is from these pages:
http://charity.hondaclassic.com/home/totaldonations
http://charity.hondaclassic.com/Home/CharityList
This should be a no brainer but for some reason I get an empty response, here is my JS:
<script>
...
I'm dynamically adding some lis to an unordered list using jQuery. They are positioned absolutely (using the style param on each li), but when they are added to the page they aren't in the right positions, even though when I check them with Firebug or Chrome's element inspector, all the values are correct.
Also note that the lis are us...
Hello all,
I am creating a customize site page that dynamically changes the current page so that you can see a preview of what you are changing. Everything is working pretty well, except that the code I'm using apparently can't handle pseudo-classes such as :hover and :visited.
The code is very simple, I am basically doing the followin...
Heya guys.
I'd like to get the value after a hash in the URL of the current page and then be able to apply this in a new function... eg.
The URL could be
www.example.com/index.html#foo
And I would like to use this in conjunction with the following piece of code
$('ul#foo:first').show();
I'm kinda assuming/hoping there is some...
I recently discovered jQuery, and I can immediately see how useful and elegant it is.
I'm curious, though - are there any reasons NOT to use it (and just use plain old JavaScript instead)? If there aren't any reasons, should it not be integrated fully into the JavaScript language?
...