jquery

How can I convert query string or JSON object map to single JSON object with jQuery?

For this example, assume that I have a list of months in a form, each with a checkbox next to them. I'm looking for help on doing either of two things: Convert a query string (e.g. "January=on&March=on&September=on") or Convert an object map: [{ January: 'on' },{ March: 'on' },{ September: 'on' }] to a single JSON object: { January:...

ASP.NET MVC and jQuery with TempData

I have a link in one of my views that users can click that calls an ActionResult. The link is like so: <a class="do_something" href="#">lorem ipsum</a> I then have some javascript that posts to the ActionResult (there is no data passed to the ActionResult) like so: $("a.do_something").click(function() { var urltopost = "/foo"; ...

JQuery if then else using URL parser plugin quest for elegance take 2

This is my second question about this topic, the original question can be found here: JQuery if then else using URL parser plugin, there must be a more elegant solution! If you are sitting comfortably I shall begin! I have built a web page which contains a list of questions. Each question has an answer contained in a Div after it. The ...

I need help with the $(this) context in jQuery

I need some help in this code block: options.imgs.click(function() { var allImgs = $("#big img"); $("#big img").each(function(n) { this.index = n; }) animateImage(allImgs); }) }; function animateImage(images) { for(var i = 0; i < images.length; i++) { if (images[i].index == 0) { ...

need to get value from the database and populate a drop down list using jquery

hi i need to populate a drop down list when i select a certain value , and the options need to be queried from the database .. can i achieve this from jquery ? if i can then please i would appreciate any help.. ...

Error updating JScript IntelliSense with Google Apis hosted jQuery

I reference jQuery in my application via: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js. This generates an error with vs.net: "Error updating JScript IntelliSense: c:...jquery.min-fds90[1]..js: Object doesn't support this property or method @18:9345. Other than putting a local copy of the javascript file on my dev box...

Jquery getJSON to external PHP page

I've been trying to make an ajax request to an external server. I've learned so far that I need to use getJSON to do this because of security reasons ? Now, I can't seem to make a simple call to an external page. I've tried to simplify it down as much as I can but it's still not working. I have 2 files, test.html & test.php my test.htm...

Jquery and Other Libraries Error

Guys, I am having this issue with jquery and have no idea how to solve it .... can anyone help or provide some assistance!? [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIDOMXPathEvaluator.evaluate]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: http://example.com/w...

Push content off page

I am setting up a page with a vector couch on the right and on mouseover it will slide out. My goal is to have my content to the left of the couch slide off to the left of the page. Would I need to set my elements to absolute to have then slider over? I will probably be using animate() to move the couch out adjusting the right css prop...

Somewhat lost with jquery + php + json

I am starting to use the jquery $.ajax() but I can't get back what I want to...I send this: $(function(){ $.ajax({ url: "graph_data.php", type: "POST", data: "casi=56&nada=48&nuevo=98&perfecto=100&vales=50&apenas=70&yeah=60", dataType: "json", error: function (xhr, desc, exceptionobj) { ...

offline data storage & access using jQuery

does anybody have any experience writing up a offline data storage & access app on jquery. my server side app would be an ASP.Net app. basically, i would be providing a trimmed down version of my web app so that users could access some of the data while they are offline and can sync the data when they connect again. I have heard of googl...

How can I bind events to the appended element?

I tried to show an error message using the jquery effect fadeTo and tried to hide the message by appending a button and using fadeout but doesn't seem to work. What I did was: $("#sub_error") .fadeTo(200, 0.1, function() { $("#sub_error") .html(error.join("<br/><br/>")) .append('<br/><input type="button" name="err_o...

Unable to make a SO floating effect for browsing messages in jQuery

I am interested in the floating effect of SO when pressing the newest link: Which library would you use in jQuery to make the floating effect? ...

Can I create a coda slider navigation with variable height for its content?

Hi, Most people know the Coda Slider effect well these days but even with googling and doing a search here I could not find my answer. Question How can I create a Coda Slider style navigation that uses horizontal sliding/scrolling but adaptes its height during the sliding animation to the height needed for the content? For instance, t...

Passing associative array through AJAX to PHP

I'm trying to pass this to a PHP script through AJAX: var answers={}; for (x=0; x< allAnswers.length; x++) { answers.x=new Array(); answers.x['id']==allAnswers[x]['id']; answers.x['val']=$("#field_" + x).val(); } var data={}; data.id=questions[qId]['id']; data['answers']=answers; $.post('inde...

i tried serialize() but doesnt seem to work ? what am i doing wrong?

i did this but not working if(error.join()!="") { $("#sub_error").fadeTo(200,0.1,function() { $("#sub_error").html(error.join("<br/><br/>")).append('<br/> <input type="button" name="err_ok" id="err_ok" value="ok">') .addClass('subboxerror').fadeTo(900,1); bindEvents(); }); function bindEv...

jQuery not loading on the iPhone

Hello all, I'm trying to use a UIWebView to display content, and jQuery to manipulate that content, but I can't get jQuery to load. Here's the code that I have setting up the UIWebView, setting the baseURL, and loading the content (an HTML file that's in the local bundle): UIWebView *view = [[UIWebView alloc] initWithFrame:[[UIScreen m...

Make Firebug output errors somewhere persistent

I have some error in my JavaScript which should open a dialog with an image in it (works) and then call the JQZoom plugin on that image (doesn't work). I think Firebug outputs some error into the console. My code is supposed to intercept the click of a hypertext link and then return false to prevent the browser from moving to another p...

JQuery : Event for a button

Dear all I am newbie to jQuery and loves it Can any one give me a small jQuery code snippet to Show an alert/Div when a button (with id btnSave ) being clicked . ...

JQuery : Event for a button

Dear all I am newbie to jQuery and loves it Can any one give me a small jQuery code snippet to Show an alert/Div when a button (with id btnSave ) being clicked . ...