jquery

Pass data to database using javascript Onclick

Hi all, I am a real noob when it comes to javascript/ajax, so any help will be very appreciated. In reference to this question: Updating a MySql database using PHP via an onClick javascript function But mainly concerned with the answer left by Phill Sacre. I am wondering if someone could elaborate on how we are(if we can?) passing va...

Select item in the list of item using jquery

I have a list of div with the same class name. I wonder how to catch exactly which div client click on it by using jquery. I try many way in many times but I couldn''t figure out. Please help me because I''m newbie in jquery. ...

Updating Database Using Javascript.

Hi all, Hopefully this will be the last question I need to ask about this..lol.. I cant be too far of the working solution(hopefully..lol). In reference to this question: Pass data to database using javascript Onclick I am trying to pass a value to the database using javascript. Below is the code i am using. And just for visual aid, I...

Problems with ASP.net JSON Webservice response type

I am attempting to write an ASP.net web service that will be utilized by a jQuery AJAX call. I am absolutely at my wit's end trying to get this to work. I've seen a number of similar questions online but I haven't been able to find a solution that fits. When I attempt to make the ajax call (via jquery) I get a successful response from t...

JQuery help with checkboxes and their values

Hi everyone. I am very new to javascript and JQuery but I managed to get my first ajax script almost working 100%. Maybe today will be my lucky day and I can finish this up. :) Let me give you guys a sample of each file so you know what is what. I believe that my last try at figuring this out was not successful because I was confusing t...

jQuery vertical hover accordion

Hi, What jQuery plugins exist for a vertical hover accordion? I am looking for a plugin to be used for a menu where: sub-menu items will only expand after a second being hovered over (so something that perhaps uses the hoverIntent plugin); it can degrade gracefully if Javascript is turned off; and will collapse/close any sub-menu item...

How to bind jquery to ONE link <a> to an onclick function?

How do i bind a function using jquery to one and only one link label in my html document which has several links? my code looks like this; $("a").click(function(){ $("#login").slidedown("slow"); }); but this binds all the links in the document ... Gath ...

Undefined values for JQuery checkboxes

I have 3 checkboxes but they are showing as undefined in an alert box. Is there a trick to getting them to show a value? I tried putting a value of 1 in the input tag but it still reports as undefined. Ok, thanks.. Here is some code. else if (item.field == "admCustRptDly" && item.value == "1") { $('#admCustRpt...

Problem with PNG image on top of an image in CSS?

I am using a jQuery content rotator and I want to place a PNG image on top of a image and on top of that text. This is how my rotator looks like in HTML: <div id="testimonials"> <div class="slides"> <div class = "testimonialContainer"> <div class ="leesmeer"> <a href ="http://site/link"&gt;&lt;img src ="http://site/a...

IE sending POST instead of GET with $.get

Hi I have little problem. I can't use AcceptVerb.Get on some ASP.NET MVC actions because when I use $.get(..) IE sends POST instead of GET. Why??? Please help :) edit: Forget to add that Firefox work as I want - the same code in Firefox performs GET. ...

Convert js Array() to JSon object for use with JQuery .ajax

Hi, in my app i need to send an javascript Array object to php script via ajax post. Something like this: var saveData = Array(); saveData["a"] = 2; saveData["c"] = 1; alert(saveData); $.ajax({ type: "POST", url: "salvaPreventivo.php", data:saveData, async:true }); Array's indexes are strings and not int, so for t...

What is your favourite JavaScript/jQuery code editor ?

What is the best and most powerful AJAX (including jQuery) code editor? I can use Visual Studio for that but want to know what NON MICROSOFT people are using to write their JavaScript, AJAX and jQuery code. ...

"word-wrap" an LI within a UL

Hi guys, I'd like to wrap some text onto the next line that I have held in an LI - the wrapping needs to be done dynamically so I'm looking towards CSS I want it to look something like this: <ul> <li> normal sized </li> <li> big massive long one that i'd like to wrap to the next line like below </li> <li> the result that ...

jQuery Autocomplete in ASP.net MVC doesn't work when the control created in Ajax way

I am running an issue, could you help me out with your knowledge..? Basically, this autocomplete extension of jQuery depends onto the ready method of the jQueryLibrary. (I am not 100% sure what it does actually, but I can guess it checks wheather the DOM has been loaded, if loaded it does something as an regular "onload" event handler)....

What is the fastest way to get a dom element?

I'm performance-tuning my code, and am surprised to find that the bottleneck is not dom node insert, but selection. This is fast: var row = jquery(rowHTML).appendTo(oThis.parentTable); but the subsequent getting of an element inside "row" is slow: var checkbox = jquery(".checkbox input", row); I need to get the checkbox in every ...

Is it considered a bad-practice to select distinct elements by catching their class/id in a string ?

Hi, I've been using Jquery for some time now and I have a question concerning bad/good practices. Here is the deal. Lets say we have this HTML: <span class="а_s_trigger" id="tekst1">text1</span> <span class="а_s_trigger" id="video1">video1</span> <div class="a_s_songvideo" id="showvideo1"> <obj...

jQuery hide element when clicked anywhere on the page

I would like to know if this is the correct way of hiding visible elements when clicked anywhere on the page. $(document).click(function (event) { $('#myDIV:visible').hide(); }); The element (div, span etc) cannot disappear when click event occurs withing the boundaries of the element. ...

Why is my DIV smaller than its contents?

I'm trying to modify the Simple jQuery Slideshow published by Jonathan Raasch. It cycles through all images fading from each to the next. His example works with fixed-size images. I want it to instead work with images sized to a percentage width of the browser window. This works with fixed-size images... #slideshow { ... h...

selectionStart-End with textareas

I'm having this annoying problem, I can't seem to get the starting and ending index of the focused text in a textarea, all I get is undefined like this: $('#myarea').selectionStart; // return undefined Did I do something wrong? ...

How to stop intense Javascript loop from freezing the browser

I'm using Javascript to parse an XML file with about 3,500 elements. I'm using a jQuery "each" function, but I could use any form of loop. The problem is that the browser freezes for a few seconds while the loop executes. What's the best way to stop freezing the browser without slowing the code down too much? $(xmlDoc).find("Object"...