Need help displaying multiple MySQL rows using AJAX
Hi, I am trying to display multiple rows using ajax. I currently am able to pass the json string back to ajax and loop through the array. Right now my ajax call only displays the last record in the table instead of all records (should be 2 in this case). The variable "len" is correct with the number 2. So it loops through twice but only displays the second row. I am trying to figure out how to print out each row before it loops to the next row. Any help would be greatly appreciated! Thank
impact of null object refs in jquery?
Hello - In jQuery is there any impact to calling methods on object references that don't exist? For example, consider the following: var currencyFields = {'aMyCurrX','aMyCurrY','aMyCurrZ'}; $( $.each(currencyFields, function(i){ FormatCurrency(currencyFields[i]); }); ); function FormatCurrency(fieldId) { //just a placeholder for now alert($('#' + fieldId).value()); } In the example above, the page is generated dynamically and not all curr fields will necessarily exist on the generated
link to and select tab
hi all.... i'm trying to link to a specific tab and activate it from the same page. i'm using this code for my tabs $(document).ready(function() { //Default Action $(".tab_content").hide(); //Hide all content $("ul.tabs li:first").addClass("active").show(); //Activate first tab $(".tab_content:first").show(); //Show first tab content //On Click Event $("ul.tabs li").click(function() { $("ul.tabs li").removeClass("active"); //Remove any "active" class $(this).addClass("active"); //Add
Calling external server files
Is there an API call for calling external files? I'm trying to get the output from a server side file to be displayed on my page preferably through a JQuery mobile method. This returns an HTTP error: 0. Help Please
How can I display a jQuery Dialog from code behind (VB) in Visual Studio?
Is it possible to run a name jQuery function from an event in code behind? Say an on-click event or as a result of a true "IF...then..else" statement? Any helps would be most appreciated. thanks
jquery works, but not ajax
I am using a .net4 user control, and after viewing data...all events and ajax working correctly, the table data is updated by way of a C# server code, the data appears correctly, and mouseenter/mouseleave events fire, but the ajax does not execute! is there some kind of registration of async event or binding i should be doing with the ajax? var prm = Sys.WebForms.PageRequestManager.getInstance(); prm.add_pageLoaded(PageLoadedEventHandler); function PageLoadedEventHandler() { .......
Get Number of Charaters with HTML
Hi, I want to get some number of characters placed inside p tag with HTML. how can I do this?? Please help me out??
Need a small help for a jquery code fix
Hi all, I am making a jquery game. I am facing issues in hitTest and jquery animation. One animation affects the other object animation. Please help. Please get the attached files to see it.
how to convert Jquery Var content to XML Content
Hi everyone, I am currently working with Jquery and my entire project needs to be done only using sharepoint Client Object Model (so i cant make use of server side coding). I have created a xml structure (by appending some string together) and stored it in a jquery var variable. Now my variable content looks like this <Collection xmlns="http://schemas.microsoft.com/collection/metadata/2009" xmlns:ui="http://schemas.microsoft.com/livelabs/pivot/collection/2009" SchemaVersion="1" Name="listname">
help required filtering in jquery
Hi, i want to use filter in jquery but not gtting how to proceed with it. i have written below script. actually i want to do is, on click of .leftSelect i want to hide the current div and show previous. but only if parent is talkNowOptionsSkip i want to show some other div. this is not working which i have written below: $(".leftSelect").click(function(){ $(this).closest('.closed').hide(); $(this).closest('.pushLeftPressed').prev().show(); }); $(".talkNowOptionsSkip .leftSelect").click(function(){
Call a PHP function on SELECT element change and get result as JSON format
Hi, I'm working in a new application built on top of CodeIgniter (PHP). I have several html SELECT element, each element has a associated value in a DB table. What I need to do, and don't know how (know it's using .ajax but not so sure about the syntax or how to get the things as I want) is to make a AJAX call when users change the SELECT element and populate a INPUT element with the associated value. See the example below: Table in DB: id: 1 name: option1 value: value1 id: 2 name: option2
AJAX data representations... JSON, Text, XML
Greetings, I've been playing with this and got it to work, but it just isn't satisfactory. I use JQuery AJAX to call a Web Method in C#. Right now I have the datatype: text. With it set to text, I can return from C# - strReturn = "{\"error\":\"No Data sent\"}"; and I can my message (a little more than just the ("error") with var obj = jQuery.parseJSON(msg); var obj1 = jQuery.parseJSON(obj.d); alert("onSuccess -\nerror=" + obj1.error + "...\nDate=" + obj1.date + "\n...Table=" + obj1.contacttable
How to get values out of this jquery code?
I have this plugin which I found online - I've modified some bits but the bit I need is to know where the values are kept and how to access them. Sadly, the code is longer than what this forum permits one to submit...so I am putting a link and I hope someone kind enough will look through the code and might be able to tell me how to take user inputs from the page and access it... https://github.com/QuickenLoans/SlickQuiz
getJson is not working, no resluts
Hi, I found this page that is working : http://blog.comperiosearch.com/wp-content/uploads/2012/09/solr.html This is the source code for that page, I changed only my url inside getJSON function : Type in something reutersey and click the <b>search</b> button!<br> <input id="searchterm" /> <button id="search">search</button> <div id="rs"></div> <script src="http://code.jquery.com/jquery-latest.min.js"> <script type="text/javascript"> $("#search").click(function(){ $("#rs").empty();
validating form field via ajax
I'm using jQuery validate. I'm trying to use ajax to see if an email address is already taken. My form is #new_user. $('#new_user').validate({ rules: { 'user[email]': { required: { depends: check_email }, email: true } ... function check_email() { var email_address = $("#user_email").val(); $.post("/checkuser",{ email: email_address } ,function(data) { if (data != 'true') { return false; } else { //if
Local Storage
Why won't this code display on my page. Here is my github url https://github.com/awacs68/ASD-3 $('#display').on('click', function(){ // $("#dataloading").empty(); var getItems = function(){ for(var i = 0; i < localStorage.length; i++){ var key = localStorage.key(i); var value = localStorage.getItem(key); var item = JSON.parse(value); $(''+ '<ol>'+ item.vehicle[1] +'</ol>'+ '<li>'+ item.fname[1] +'</li>'+ '<li>'+ item.lname[1] +'</li>'+ '<li>'+ item.year[1] +'</li>'+
Success function problem
Hi guys, grettings from Colombia: I have a code and the code works fine but I have a sucess function on a click button (guardar) and the sucess function works fine too but (and this is the really weird part) I have a code into that sucess function that only works if I have and undefinide work inside. So, this is the code the bold part is the part of the problem (by the way Im newbie so maybe my code is no the best way to do it): the bold part doesn´t execute without the undefinide word. $("#edit_td").focus(function(){
code more reasonable and shorter possible?
Hi, I am working with some mustache templates on my site and so have to do this document ready introduction: $(document).ready(function(){ templates.defaultViewTemplate = "templates/defaultViewTemplate.html"; templates.chart_1_AnimationTemplate = "templates/Chart_1/Studio_p1.html"; templates.chart_1_FullscreenTemplate = "templates/Chart_1/Fullscreen_p1.html"; templates.chart_2_AnimationTemplate = "templates/Chart_2/Studio_p2.html"; templates.chart_2_FullscreenTemplate = "templates/Chart_2/Fullscreen_p2.html";
jquery getJSON issue
is_loggedin: function () { var status = false; $.getJSON('/api/isloggedin/',function(res){ if(res.user_status){status = true;} }); return status; }in this case status returns always false. even user_status is true. what is wrong here? or should i re check my server-side. thank you
Replacing jquery animation type with variables
hello! I'm kind of newbie and struggling right now with some workaround for the IE7/8 PNG transparency issue. what I have already done is that I'm replacing the fadeIn() with show() and fadeOut() with hide(): // setting variables var showElemIEFix = 'fadeIn', hideElemIEFix = 'fadeOut'; // browser check, setting animation to show/hide if (!$.support.leadingWhitespace) { showElemIEFix = 'show'; hideElemIEFix = 'hide' } $('.startButton').delay(1000).[showElemIEFix](); what I need
jQuery hover on all elements
hello :) i wanna do some like this : I have a lots of elements with hover i wanna do fade effect to all of this elements some like this: http://www.dotnetcurry.com/ASPNETandjQuery/Section7-ImageControl/R38-ImageOpacity.aspx how i can do it? thanks (sry for my english i know is poor :> )
Defer loading of menu using Jquery
Hello guys, I am using the following code to load my menu on my site. <div id="navigation_uber"> <!-- mfunc wp_nav_menu( array( 'theme_location' => 'category-menu' ) ); --> <?php wp_nav_menu( array( 'theme_location' => 'category-menu' ) ); ?> <!-- /mfunc --> </div> I have been doing extensive tests and I noticed that my website renders much faster if I can defer the loading of the menu using Jquery to the end. The total speed might be the same but the perceived speed by the user who
Horizontal Scrolling of page not working correctly
Can anyone help, I cant see why this code will not scroll to section 4 and when it does it goes to section 1. have checked the link and they seem to be working. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Website Horizontal Scrolling with jQuery</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta name="description" content="Website Horizontal Scrolling
Trying to keep div hidden on load
I'm developing a site where I have two galleries loaded on demand (which are children of the "Gallery" page). The main pages crossfade and I am trying to do the same with the gallery sub-pages but I'm having a problem where I want to load the divs hidden but haven't had any luck. I've tried many things so maybe there's some limitation I have to work around in this scenario. Walk Through: Go to the SITE then go to the Gallery page. If you click the "Antiques" button you will see the gallery fade
Reading Form Data from POST to html page
Hi I am trying to use jQuery/Javascript to read Form Data that is posed to an html page. Here is the scenario I have a page "Page1.html" which users are directed to to register for a conference. On this page I have a button wich allows them to pay. When they click this button they are taken to a payment gateway where they can pay. This payment provider then posts their response back to "Page2.html" in a Form. Everything works fine, but I cannot seem to access the Form Data in Page2.html. I cannot
jQuery behaves differently on hover outs for the same element
Hello, here is my live example: http://eshop.equit.cz/ Try hovering over the menu - it should change the button color to black and changw the font to white. Vice versa when hovering out. However when I hover over the button then move my mouse down to the submenu and then hover somewhere out, button is white but the text is not black although Firebug show it should be. If I move my mouse immediately to next button or out of the button, it works as expected. Here's my JS code: $("ul#topnav li.sub").hover(function()
Contact form
Hi, I'm new to developing with jquery and i'm trying to make a contact form with a dropdown select option. For now as response I get 'undefined' back form the contact form. Can somebody help me out? Here's my code: HTML: <form id="contactForm"> <fieldset> <label for="contactName" id="name_label">Naam</label> <input type="text" name="contactName" id="contactName" size="30" value="" class="text-input" /> <span class="error"
Some difference of invocation between firefox and chrome
In firefox, the following code is ok: $('#click').click(location.reload); In chrome, it would get an error: Uncaught TypeError: Illegal invocation But the following code is ok in firefox and chrome: $('#click').click(reload); function reload(){location.reload();} Is this the problem of jQuery? (firefox 19.0, chrome: 26 dev, jQuery: 1.8.3 and 1.9.1)
testing whether .show() was used on a element.
I read that the .show() method sets "display" to "block" on whatever is being shown. How do I test whether display is indeed already block? Thanks
Disable hyperlinks until animation is complete/disable hyperlink on element that has been clicked until new one is clicked
I have multiple pictures in divs with the class .overlay and when one is clicked the contents of 2 variables fill 2 other elements. There are 2 more things that I need to address, however. 1. I would like all of the .overlay elements to be unclickable until the animation is completed. 2. I would like the .overlay that was clicked to remain unclickable until a different .overlay is clicked. Code: $('.overlay').on("click",function(){ var text = $(this).attr("title"); $('#category').animate({'opacity':
Break the .delay()
Hi, The documentation say's The .delay() method is best for delaying between queued jQuery effects. Because it is limited—it doesn't, for example, offer a way to cancel the delay—.delay() is not a replacement for JavaScript's native setTimeout function, which may be more appropriate for certain use cases. but there is way to break the delay: JSFiddle
Selecting an element by id from a variable
Hi All, I'm trying to do something which I think should be very easy, but I can't get it right, and I'm not sure why. The basic HTML structure I have is this: <a href="" data-id="xx">Link</a> <a href="" data-id="yy">Link</a> <div id="xx">...</div> <div id="yy">...</div> And so on. When I click on the link with the data-id of xx I want that to toggle a class of 'open' on the div with an id of xx. Similarly for the yy link, and so on. This is the jQuery I'm using: $(document).ready(function() {
Am I misunderstanding the use of .prop() or is this a bug?
Okay, so prior to yesterday I have always been using .attr() to retrieve an element's properties. I knew of .prop(), but I wasn't really sure what the difference was. After a bit of reading I've come to the conclusion that for HTML option elements .prop() would be more suitable than .attr() when checking the selected state. ...right? So I started doing some testing: <select> <option id="o" value="1" selected></option> <option value="2"></option> <option value="3"></option> </select> $('#o') here
is it possible to add class="{validate:{required:true}}" ?
I know jquery can be used for addClass and removeClass elements in forms. Is it also possible to add a class="{validate:{required:true}}" to a form field? Thanks! Peter T
Validate Multidimensional Array before passing to ajax file
I have a form field that is dynamically created in PHP with the following: <input type="text" name="subproduct[$i][quantity]" value="0" /> So if there are 5 products from the database the above will repeat 5 times for $i shown above. When someone clicks submit on the form I want to make sure there is at least one of the above with a value greater than "0" being passed in order to submit the form. NOT all of them need to have a value greater than "0" but at least one of them does. Any suggestions?
jQuery XML append element help
Hey everyone. I'm having a serious issue trying to append a new element to an XML object, here's some example code: var xmlString = "<test><item><moose></moose><moose></moose></item></test>"; // this is just dummy xml; var myXml = $.parseXML(xmlString); var $myNode = $(myXml).find('item'); // this works great $myNode.append('<moose></moose>'); // this is where it fails When I try use append to append another element I get a JavaScript error: "Object doesn't support this property or method" What am
How To Write Data To an xml file using jquery
Hi all, I am getting a collection of data from a list in share point using the CSOM Model. I have Created The XML structure using jquery successfully....Now the only pending work left for me is to store that xml structure in a xml file.....I have created an empty file named output.xml to which i want to add my data using jquery.....CAn any one tell me how to store the data in to this xml file...I have the Xml Data Structure stored in a var XMLStructure variable of my jquery function..I just want
return a value as a closure, get the innerhtml instead of $(.x).html
First off the click event is not firing. Presumably because I am using the class .x instead of the innerhtml which is also x. What I want is the event to fire when the x is clicked. The "x" is in a span enclosed by table row, table definition: i<tr><td><span class="x">x</span></td></tr> function delete_handler(e){ var $target =$(event.target); if( $target.is(".x")){ var id = row.attr("id"); $("#mytable").find("tr:eq(input:checked)").remove(); }; return
Need help to change the zzrss feed to work as pagination
I am using zzrss to display the feeds on a page I want to add pagination to the feed the thing is zzrss allows feed limit and offset value so I want to use a button as next and previous for the pagination so it jumps 5 posts Visit the site for the whole documentation and examples I want to have the pagination feature. Thanks in advance and let me know if anybody is not getting the question. here is my sample code it just displays recent 5 posts <script type="text/javascript"> $(document).ready(function
Pass HTML Value to Jquery to display new table
Hello, Hopefully this forum can help me. I am new to jQuery. I have a table that displays information from MySQL and I want to have one of the cells (Date) be a clickable link to display another table. This is my table cell <td><a href="#" onclick=display() id="astat" value="<?php $player; ?>"><?php echo $d->current()->gamedate; ?></a></td> display() is my jQuery function. I am trying to use jQuery to process the php variable (table id #) to kick off another mysql query to populate another table.
Next Page