jquery

How do I set up a listener in jQuery/javascript to monitor a if a value in the textbox has changed?

How do I set up a listener in jQuery/javascript to monitor a if a value in the textbox has changed? The value is fed into the textbox by a bar code scanner attached to the tablet,so each time an item is scanned the value in the textbox changes.I need to display some information based on the value in the textbox. ...

Using jQuery to listen for an AJAX load that is not loaded using jQuery.AJAX

Okay, have a bit of a tricky one (for me anyway, i'm pretty rubbish at jQuery/JavaScript). I'm pulling in data using standard AJAX (ie, NOT using a framework like jQuery or whatnot... there is a reason for it) However, I then need to load up a jQuery script as soon as the page has been loaded in. So, here is the question, how do I bind...

jqGrid (Delete row) - How to send additional POST data?

Hi experts, I'm having problem with jqGrid delete mechanism as it only send "oper" and "id" parameters in form of POST data (id is the primary key of the table). The problem is, I need to delete a row based on the id and another column value, let's say user_id. How to add this user_id to the POST data? I can summarize the issue as the...

JQuery - Fade in new Background Image?

Hi, I think I may be trying something that isn't possible. I was recently tasked to create a html version of the flash site. On the flash site when you click on the body the image changes. I have done this with JQuery. Its brilliant! However.. it isn't "flash" enough. The powers that be want a fade effect between images. This is where...

jQuery UI Slider (setting programatically)

Hi Folks, I'd like to modify the sliders on-the-fly. I tried to do so by using $("#slider").slider("option", "values", [50,80]); This call will set the values, but the element will not update the slider positions. Calling $('#slider").trigger('change'); does not help either. Is there another/better way to modify the value AND sli...

Javascript: parseInt() with trailing characters

parseInt("7em", 10); returns 7 in all browsers I tested [*]. But can I rely on this? The reason I ask is, that I want to perform some calculations based on em, like /* elem1.style.top uses em units */ elem2.style.top = parseInt(elem1.style.top, 10) + 1 + "em"; I could do this with regular expressions, but parseInt is easier to use, a...

Inherit all methods of object (including "constructor"), but modify some of them.

Hello, Let's imagine that we have object Animal $.Animal = function(options) { this.defaults = { name : null } this.options = $.extend(this.defaults, options); } $.Animal.prototype.saySomething = function() { alert("I'm animal!"); } Now I'd like to create Cat object. It is absolutely similar to $.Annimal, but method saySome...

Replacing Text in a Toggled Anchor with JQuery

Hi I'm trying to change the text in an anchor on toggle. I'm doing this way at the moment but have found that once the anchor markup has replaced the toggle no longer works. Can someone please explain why this is happening and a solution? Many thanks. $('a#toggleHeader').toggle(function() { $('#header-wrapper').slideUp(); ...

ASP.Net wrapper control for JQuery datetime picker.

Hi, I'm looking to create a wrapper control for JQuery date time picker control to be used in asp.net website. Once the user control is ready, it will be used in simple web forms / grids / data lists or repeater controls. User control will also expose below mentioned properties for customization. TimeHourFormat: "12" or "24" (12 (AM/...

jqgrid's delGridRow not working

Hi fellow programmer I want to have a button in each row to delete the corresponding row. So I used the samples in the demo page to try to achieve this. It is working for edit row, but I also want to have a delete button. Here is my code jQuery("#detFlex1").jqGrid({ url: '<%= Html.Encode(ViewData["module"])%>/GetDetailList1', ...

how to catch ajax query post error?

I would like to catch the error and show the appropriate message if the ajax request fails. My code is like the following, but I could not manage to catch the failure ajax request. function getAjaxData(id) { $.post("status.ajax.php", {deviceId : id}, function(data){ var tab1; if (data.length>0) { ...

jquery dynamic adding hidden field

$().ready(function() { $("#add").click(function() { var vals = $("#txtaddfeature").val(); if(vals !='') $('#FeatureLists').prepend('<option value="' + vals + '" selected="selected">' + vals + '</option>'); $('#txtaddfeature').val(''); }); }); Ok after adding the value to the select list as above $('#F...

Slider with buttons. How to improve?

I need to make slider. I have content (which should shift horizontally) and two buttons - "right" and "left". If you press the button and hold it, the content starts to move (in the appropriate direction). If you not hold the button, then the movement stops. This behavior is copies the behavior of usual window scrollbar. I wrote code...

jquery href link

i have link <a id='id'>text1</a> how can i set <a id='id'>text2</a> ? ...

How can I achieve this effect with jQuery or CSS?

Is it possible to switch HTML on click? I have an index page with a large image. Under the image there are four links. When the cursor rolls over a link I would like a small tooltip to appear. If the user clicks the link I want the large image to change and some extra HTML to appear over it (just a small content box). I think I have f...

Is there a recommended approach to handle saving data in response to within-site navigation without onunload event?

Hello all, Preamble to scope my question: I have a web app (or site, this is an internal LAN site) that uses jQuery and AJAX extensively to dynamically load the content section of the UI in the browser. A user navigates the app using a navigation menu. Clicking an item in the navigation menu makes an AJAX call to php, and php then retu...

Javascript - generating a random number of specified length from set of specified values

Hi, I wanted to generate a random number 32 characters in length from a specified set of characters. For example: var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ"; var string_length = 32; Which would then return a random number of length 32 using the specified characters. ...

jquery checkbox value

how can i get the checkbox value in jquery ...

Adding class to the UL and LI as per the level

I have the following HTML mark up. <ul class="thumbs"> <li> <strong>Should be level 0</strong> </li> <li> <strong>Should be level 1</strong> </li> <li> <strong>Should be level 2</strong> </li> </ul> <ul class="thumbs"> <li> <strong>Should be level 0 -- </strong> </li> <li> ...

Checkout Control Panel that updates pricing???

Hello all, my first post here. I am not much of a programmer, I can tailor some things for my personal needs but thats about it. I am looking for a script (jQuery preferred I suppose) which is easy to incorporate and bind to a few DIVs to be updated dynamically. Nothing too deep, just something that can updated price at check-out... ...