what's the different between $.ajax(...type: "POST", dataType: "JSON"...) and $.post(..., "JSON")
I can get the return json string parse with $.post(), but not $.ajax(). {"result": "success", "id": "1"} ...
I can get the return json string parse with $.post(), but not $.ajax(). {"result": "success", "id": "1"} ...
I know that Attr gets the exact class of an element. Is there a way to get the element exact class as defined in CSS? For example an element may have class "title" but be defined in CSS as a descendant selector, something like: .other-list .title {} I need something to get that exact class value. You can see here the full example: http:/...
I have a div that is viewable if you click the appropriate link, using jQuery's slideToggle to display it. It has $(document).ready(function() { $('#content-click').click(function() { $("#content").slideToggle(100); }); }); <div id="content" style="display:none;"> this is the content </div> In the print css, I t...
Hi all, I have to set the attributes 'width' and 'height' for a canvas element, depending on the available screen resolution. Setting them statically from html works (ex. <canvas id="canv" width="1600" ... ). From Javascript I can't do it. I've googled and searched in SO but I didn't find anything that works. I am using JQuery and I've t...
I have a set of hidden inputs on my html page. I'm looking to run a piece of jQuery to check if any of them have a particular value constant ("New"), and if they do, then do the following: $('#dataContainer').scrollTo("id of the input with the special value"); Is it possible to loop through the inputs based on value using jQuery sele...
I use slideToggle to toggle div's of content and I was wondering how I would be able to change between two images, one being a plus (+) sign, to click to display the content and a minus (-) sign to hide the content. Any help is appreciated. This is what I have to toggle one of the div's $(document).ready(function() { $('#planning-cli...
Hey folks, I'm just getting my bearings with Javascript and jQuery, and I'm working on an animation. Essentially, what's going on is an element, #left-arrow. On hover, the arrow moves left 10px and increases opacity. I'm using the 2D Transform plugin for jQuery to handle the transform. Now my issue, however, is that javascript will ...
Ok, so we've got the latest JQGrid grid working beautifully, but the editoption value param doesn't seem to do the required replaces in the grid values. This did work in a previous version. The EditForm works perfectly. ...{ name: 'Field1', index: 'Field1' , editable: true, edittype:'select', editoptions:{ dataU...
Ive been struggling with this all day, been close a couple times but nothing seems to work exactly. I have a text input <input type="text" name="USA_sub" id="USA_sub" /> and after that an input <input type="text" name="FirstName" id="FirstName" /> I need to make sure (create a validation rule) that states "#FirstName" 's value must be ...
Hey, I am using jcarousellite control to provide carousel effect on my images via next and prev button. <button class="prev"><<</button> <button class="next">>></button> <div class="anyClass" style="background-color:Red;" > <ul style="width:100%"> <li style="width:100%" ><div style="background-color:Green; width:100%; te...
Hi, I have the following HTML <input type="hidden" name="conf1" value="7th IEEE/IFIP International Conference on Embedded and Ubiquitous Computing (EUC-09)"> <input type="hidden" name="conf2" value="IEEE International Symposium on Parallel and Distributed Processsing with Applications"> <input type="hidden" name="conf3" value=...
I have a large HTML document which has roughly this structure: <div id="a"> <!-- more html code here --> <span id="title">...</span> <!-- more html code here --> </div> <div id="b"> <!-- more html code here --> <span id="title">...</span> <!-- more html code here --> </div> ... ... <div id="z"> <!-- more html...
How do I do a .match on a string that has parentheses in the string? String1.match("How do I match this (MATCH ME)"); None of the answers are getting me what I want. I'm probably just doing it wrong. I tried to make my question basic and I think doing that asked my question wrong. This is the statement I am tring to fix: $('[id$=txtE...
Is there a way for two or more ID's be required to be checked before doing something. For instance: If BOTH Checkbox 1 and Checkbox 2 are checked then the event happens. But if only 1 or the other are checked by themselves, something else happens. I thought this would work but nope. function toggleStatus() { if ($('#checkbox1 #...
Hello everybody, I have written a DotNetNuke module for a customer that allows them to "delete" a coupon from a table. When they click the link, an Ajax POST is created, using jQuery, and upon success the row should be deleted (or at the very least, hidden) and a success message displayed with a CssClass attached. Everything is workin...
I'm able to copy the following .htm file to my sony ericsson C510 and the mouseover works: <script type="text/javascript"> <!-- if (document.images) { front = new Image back = new Image front.src = "front.png" back.src = "back.png" } function swapImage(thisImage,newImage) { if (do...
Since my cell phone apparently doesn't support JQuery, but does run the simple Javascript tests I have done, how can I convert the following JQuery code into standard Javascript? All I need this to do is have basic click-to-hide / click-to-show functionality. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/T...
Dear learned folk, I made a web app that loads images using jquery, ajax and json. I got it to work in Firefox, but alas, Safari and Chrome remain stubborn. It has to do with a "race condition" where images don't load quickly enough, so I have a load event as well as a trigger event to wait until all images are loaded before appending t...
Hi Assuming we have a comment textarea where the user can enter this code: [quote="comment-1"] How can I replace that code before the form submits with the actual html content from <div id="comment-1"> ? ...
I'm working with the jQuery Form Plugin. I have my servers send 200 responses on success, which trips the success listener perfectly fine. Per the standard, 301 and 302 and transparently redirected by the browser. However, when the server returns, say a 401, the Form Plugin just silently dies. How can I apply a listener to non-200 respon...