jquery

Obtaining the unformatted value for an input mask

I am using the jQuery meioMask plug-in in order to mask input fields with various different masks (such as "999-999-999") Before I save the resulting value of the field, I need to revert back to the unformatted version of the input (so in the above example we would want to store the value "123456789", not "123-456-789". Is there any wa...

jquery-ui-dialog: why does clicking on elements inside dialog spawn more dialogs ?

$(top.document).ready(function () { $(document).click(processAction); function processAction(e){ var clicked = e.target; newDialog("You've Clicked On A Link !") function newDialog(mytitle){ var $dialog = $('<div id="myunique"></div>') .html("<a href='http://sss.com'&gt;click&lt;/a&gt;") .dialog({ ...

jQuery: How to make an AJAX request and continue without waiting for request to complete?

I want to make an AJAX request "in the background" of my JavasSript function, but my script waits for the AJAX request to complete before it continues to execute my code. $('div').hide(); $.get('/controller/action', { id: 'abc123' }, function(data){ //request completed //now update the div with the new data ...

Ajax success, how to refresh response every minute

Hi, I am really confused by this few lines of code that should work in my opinion. Div is updating when using .html, but not when using custom script. I have a couple files, index.php and test.php index contains: $(document).ready(function () { setInterval(function () { $(function () { $.ajax({ ...

jQuery help with checking parent of checked child checkbox

I have a main row and some other rows underneath that main row like this: [checkbox] Main heading row [checkbox] first child row [checkbox] second child row When I click on the child row, it should check the parent (main) row automatically. Problem is that it doesn't check it first time I click it. I ha...

JQueryUI Tabs Selection and Validation

I am trying to validate tab content(using ajax validation) before switching to the next tab. So when the user clicks on the tab, the current tab content is sent to the server for validation. And when result from the server is received I switch to the next tab. Here is some code: $('#tabs').tabs({ select: function(event, ui) { ...

Why is this jQuery code not working?

I am trying to make a simple tool tip function (I'm trying to learn jQuery so please don't suggest plugins for this). When I write it like this it works: $('span.toolTip').hide(); function toolTip() { $('.targetLink').mouseover(function() { $('.toolTip').show(...

How do i specify a colspan on jquery datatables from ajaxsource?

I use the following code to fetch a json and load it as content for a blank table which is added dynamically to the DOM by: $('#a_dialog').html('<table cellpadding="0" cellspacing="0" border="0" class="display" id="tbl_random_number"></table>'); The reason for this is because I find it easier to construct a JSON object than to create a...

jQuery elements inside a jQuery dialog stop working after ajax call

Hello all, <div id="divItems"><div id="divItemsContent"></div></div> I think i know what the problem is, just don't know how to solve it. Here is the code: function SplitOrder() { var SplitTable = $.ajax({ url: 'AjaxActions/SplitTable.aspx?FromObjectID=' + $('#hidObjectID').val() + '&ToObjectID=' + ObjectID[1], as...

jQuery button display in IE6

We have some HTML buttons which we format using JQuery - $('#button').button(). Works great but.. when the page first loads in IE6 you see the "unformatted" regular HTML button and then you see the JQuery formatting kick in a split second or so afterwards. What can you do do avoid displaying the default HTML button and just display ...

jCarousel infinity ajax load (browser compatibility?)

Dear all, I tried to use jCarousel to create a sort of image display gallery, it will first load a few images and then load some more dynamically when clicking "next" or "prev". Everything work fine in clicking "next" but it acting weird when loading ajax in clicking "prev" in working in chrome and IE 8. I suspect the problem would be ...

jQuery: Why would selector fail?

<html> <head> <script src="../jquery.js" type="text/javascript"> </script> <script type="text/javascript"> $(".demo").click(function() { alert("JavaScript Demo"); }); </script> </head> <body> <p class="demo">a paragraph</p> </body> </html> Why did not the click function response? Thanks. ...

How to disable asp.net ImageButton that is wired to server event (so it can't get re-posted)

I have an asp.net ImageButton -- with an OnClick event that another developer originally coded. It looks like this: <asp:ImageButton ID="ImageButtonSaveAddress" runat="server" ImageUrl="btnSave.gif" OnClick="ImageButtonSaveAddress_Click" /> In the code behind, the event code looks like this ... protected void ImageButtonSaveAddr...

jquery animation is choppy in internet explorer when a large background image is used

Hi, I am using a dynamically expanding background image (similar to the new google home page background image feature). I have an jquery lavalamp animated menu that sits on top of the large background image. The jquery animation is nice and smooth in all browsers, except for (you guessed it) IE. In IE8, it is choppy. I've ruled out ...

jQuery ajaxSuccess and ajaxError behavior

Hi, The global events ajaxSuccess and ajaxError are not working properly for me. I disconnected my Internet connection and ajaxSuccess handler executes with xhr.status=0, and ajaxError is not executing at all. I need you to confirm if this is bug or am I doing something wrong? Thanks! ...

Jquery, What does slice return on failure?

I can't find this anywhere, how do you check to see if slice is returning elements still in the list? Like $('.class').slice(n-th,n-th); When n-th variables are increased throughout the index of the return class by slicing, how do you know when slice returns on an invalid index? Hope I explained that well. Here is the example code of w...

jQuery Ajax Accessing json

I have been trying to access certain part of the json response, however I am unable to do so. json = '{ "now": "2010-09-23 22:06:53 EST", "data":[ {"id":"1","year":"2010","month":"09","day":"23","hours":"08","minutes":"09","seconds":"25"},{"id":"8","year":"2010","month":"09","day":"23","hours":"08","minutes":"09","seconds":"18"}, ...

ASP.NET MVC2 partial view form via jQuery show() - best way to display validation errors (P-R-G pattern)

So, the partial view is a form, that is revealed via a jQuery show(). The form is submitted, and suppose a unique index is violated, for example, using the Post-Redirect-Get pattern I pass the errors via TempData back to the original view, which contains the partial view that is of course hidden again. Therefore the form's errors/hints...

jquery GET request not working in IE and FF

Right now I have this GET request which works in Chrome but not in IE or FF. var dire = $(this).attr('dir'); if(dire == "ASC"){ var dp = "DESC"; } else if(dire == "DESC"){ var dp = "ASC"; } else{ var dp = "NA"; } $(this).attr('dir',dp); var col = $(this).attr('col'); $('#entries').fadeO...

jQuery: Retrieving the next links hash value in list

Hello, I'm trying to retrieve the hash value of the next link HTML <ul id="links"> <li><a href="index.php?#1"></a></li> <li><a href="index.php?#2"></a></li> <li><a href="index.php?#3"></a></li> </ul> JS $('#links li a').click(function() { var current_link = $(this).attr("href").substring(1); var next_link = $(th...