Using AJAX via POST with multi-select
I have a search form that uses AJAX to fetch data and populate a table. Several of the search fields are multiple selects. Problem is, only the first option is getting passed thru to the PHP file called by the AJAX function. var fs_users = $("#users"), fs_status("#status"), fs_roles("#roles"), ...; var fs_allFields = $([]).add(fs_users).add(fs_status).add(fs_roles)...; $("#fsSearch").click(function() { //alert(fs_roles.val()); $.ajax({ "cache": false, "type": "POST", "url": "fetch_data.php",
Passed by reference in an .each loop
I've made a trivial html page to show my problem. This page should take all of the <tr> tags from the first table, move them into the second table in reverse order, and change each <tr> tag's click handler to print it's internal <td> tag's contents. Unfortunately, the function I've set as the click handler seems to be passing a variable by reference rather than by value. I'm sure this is probably the expected behavior, but is there someway to prevent this behavior? If this doesn't sound very clear,
how return a second value from autocomplete function?
Hello ! sorry for my English. I am new to ajax and jquery, as I can return a second value of the autocomplete function? the script <script type="text/javascript"> $("#nombre").autocomplete("<?php echo base_url()?>transportistas_controller/autocomplete_partidos"); $("#nombre").blur(function(){ window.opener.$("#partidonum").val($(this).val()); window.close(); }); </script> the function function autocomplete_partidos() { $nombre = $this->input->post('q');
How to change cell value?
I have a table as below, I hope the "ecCurrent" will be changed to "no rank" when I unchecked dat.ECRank, what can I do? <table cellspacing="0" class="caption" cellpadding="1"> <tr> <td class="pad" rowspan=3 style="text-align:right;width:100px">COM</td> <td class="item_h">Rank</td> <td class="item_h">ecCurrent</td> <td class="item_h">eBest</td> <td class="item_h">Tokka</td> <td class="item_h">Pop</td> </tr> <tr> <td class="item_kakaku"><%=dat.Rank1%></td>
Help me on this coding. Thanks
Online I found this coding to sort a json. But I don't understand how it works. In this line, returnthis.pushStack([].sort.apply(this, arguments ),[]); what are they doing ? what is "sort.apply"? Anybody can convert that to plain coding or point to any link ? jQuery.fn.sort = function() { return this.pushStack( [].sort.apply( this, arguments ), []); }; function sortLastName(a,b){ if (a.l_name == b.l_name){ return 0; } return
Tables working differently in IE
Hi, I have a HTML Table that I populate using JQuery according to if a user clicks certain buttons and enters certain data. Finally when the user wants to submit this form, I have a validation piece of code that attempts to check if the Table is empty or not. I use JQuery in all of this, and it seems to work in FireFox and Chrome, but not in IE? My initial HTML Table looks like: <table id="myTable"> <thead> <th>Column1</th> <th>Column2</th> </thead> <tbody> </tbody> </table> My Code to Add a Row
What could be dragging my app?
Hey there, I'm building a (quite advanced) photo-viewer. It all worked pretty well, until I added about 300 photos and tested it in InternetExplorer :-S First all the thumbnails were loaded directly, which I've changed to load when necessary. I also made some major changes to the sliding-animation, but IE seems to get jammed before that. Could anyone find out where I've failed? http://preview.brandphoto.nl/projects/4 Thanks!
click events on absolute positioned elements
I have an div element (lets call it div number 1) that I have attached a click event to using jquery.bind() method. That works fine. I then have another div element (div number 2) that is absolute positioned on top of div 1. Now div number 2 also has a click event binded to it, which works... the problem is when I click div 2 and the click event triggers, so does the click event from div 1... I don't want the click event from div 1 to fire.. See attached picture.
No data being returned from AJAX call
I am currently using $.ajax to post to a Perl file that queries a webservice and returns XML. Running the Perl via command line confirms that XML is being returned with Content-Type: application/xml. However, regardless if I set the dataType parameter to "xml", "XML" or just use jQuery's intelligent guess, it appears that I am not getting any data returned to my function at all. I've tried using the full $.ajax notation and the simplified $.get notation as follows: $.get( 'http://internalperlsite/addLocation.pl',
Showing input focus on textboxes
I have just started using jQuery and getting familiar with the syntax. I have a simple function I want to run that will add a "focus" class when a textbox receives focus, and remove it when it loses it. I have the following code: $(document).ready(function () { $("input[type='text'], input[type='password']").focus(function () { $(this).addClass("inputFocus"); alert('Handler called'); }); $("input[type='text'], input[type='password']").blur(function () { $(this).removeClass("inputFocus");
hover menu
Hi all, I have a navigation menu with some subnavigation, the classical kinda thing, a list within a list. The nested list is being hidden in CSS and the trick is to hover the list item which holds the nested list to make it expand. <ul> <li><span><a href="/site/company/" title="Company">Company</a></span> <ul> <li><a href="/site/company/corporate-info/" title="Corporate info">> Corporate info</a></li> <li><a href="/site/company/management/" title="Management">> Management</a></li>
Strange .stop() behaviour when mouseout / over
hello, I've put together a little rollover script. When a link is hovered in a tag cloud a statusbar is shown with a little more information on the keyword. The strange behaviour happens if you quickly move from hyperlink to hyperlink without letting the animation duration finish, then when you move your mouse over another link it will only animate to the point it stopped at when the last link was exited. Any ideas. I would think there is something very simple I am doing wrong. $(document).ready(function()
A custom chained-select... a better way? Can't get ScrollTop working quite right
Hi everyone I've built a kind of chained-select system using jquery and a couple of DIV elements. http://thenetzone.co.uk/categorydemo/category.html It works by having all the available categories loaded into the right-hand DIV as LI elements, but they are all hidden by default. Any categories currently selected for that record are shown using an inline style declaration... done server-side from our database data before the page is sent to the user. When a user clicks a category over from the left
Why won’t this Jquery run on IE?
Hello All, I have this Jquery code (function($){ $.expr[':'].linkingToImage = function(elem, index, match){ // This will return true if the specified attribute contains a valid link to an image: return !! ($(elem).attr(match[3]) && $(elem).attr(match[3]).match(/\.(gif|jpe?g|png|bmp)$/i)); }; $.fn.imgPreview = function(userDefinedSettings){ var s = $.extend({ /* DEFAULTS */ // CSS to be applied to image: imgCSS: {}, // Distance between cursor and preview:
Getting Node text with jQuery
Hello all! I need a little advice please.I have a page with one button (Push) and another 2 fields (Number, Link) I want when i push the button the page to open the Link page (it's html local files) and highlight the word at the Number position I want to escape tag elements En example if i have Number = 5 and Link = myTest.html in myTest.html i have This <font color="red"> is a </font> good <b><u>example</u></b> i want to highlight the example word Many thanks
How do I list years back to a certain date?
Ok I'm guessing this might not be something covered by JQuery, but I just love doing everything with dollar signs in front if I can :) I want to basically create an array of years from the current year back to a specified year. Any ideas? Thanks in advance :)
adjust height of a DIV according to externally loaded content
is it possible to adjust height of a DIV or IFRAME according to externally loaded content (another PHP) using jQuery? and actually, is it possible to do when i load external content recursively (i load external content into already loaded external content)? you can see what i mean at http://www.janper.sk and click MINULE PROJEKTY thanks!
Plugins part of jquery website not working?
Is there something wrong with that part or it's in my pc, or my internet. When i search on that page, it doesn't show any results or it shows Access denied????
Fixed : Have you ever found a problem : out of memory : line 12 ?
Today, I put my time on study how the jquery animation is working. // literal notation var jquery_animation_style_d = {effect:{opacity:1,left:"+=450"},style:{duration:500, easing: 'easeInOutQuart'}}; $(document).ready(function(){ $("#toggle_d").click(function() { jquery_animation("#animation_box_d","jquery_animation_style_d"); }); }); function jquery_animation(object_id,animation_style) { eval("$('"+object_id+"').animate("+animation_style+".effect,"+animation_style+".style);"); }
is it possible to animate several objects in the animate callback function at once?
Hello, I have the following problem, I have a toggle animation which puts the area I want to show to the user in view, ones that animation has played I want to animate several other objects on the page. I have the code to animate one object by using the callback function in animate. But is it possible to animate several objects in the callback function?. I have read posts on the internet saying this is possible and it will not cause any problems as far as I can understand them, but they fail to mention
Jquery works locally but not online
My problem is that the menu on my webpage using jquery work locally on my computer but when I test it online it doesn't work, I just get a bunch of hyperlinks. The page I set for testing is here: http://ppphotography.com.au/test/w I have searched the forums in vain for hours now and in desperation I post here hoping for help. Thanks in advance
Conflicting Code: Can you help me debug this?
Hello, I'm currently working on a site and I'm having a problem with 2 files of jQuery that conflict. Here is the URL to my work in progress: TEST PAGE what is suppose to happen is you hover over the #header-container and it expands showing the #show-hide jQuery scroll box. that happens, but then my scroll does not... scroll. If I remove the thumbnail.js (the expanding div) then the gallery.js (the scroll box) works. I can't figure out what is stopping the scroll bar to scroll. Here is the thumbnail.js
How can I get the XML as text from a DOM object?
I'm trying to make a few SOAP calls using jQuery. What I'd like to be able to do is read the results of my first SOAP call in as XML, convert that to a jQuery DOM object, make modifications using jQuery selectors, and then output the DOM object as XML text and submit it back to the SOAP receiver. So far I've managed to get my SOAP response read in via the $.xmlDOM plugin. My next question is: how can I convert the DOM object this plugin creates to XML easily (and by easily I mean: without running
divide a table
I want to divide a table to two new table, this is my way, and hope the code can be more brief. Script $(function() { var $devide = 2, $newTableWidth1 = 0, $newTableWidth2 = 0, $newTableStr1 = '<table id="newTable1">', $newTableStr2 = '<table id="newTable2">'; $('table tr').each(function($i) { $newTableStr1 += $(this).is('[class]') ? '<tr class="' + $(this).attr('class') + '">' : '<tr>'; $newTableStr2 += $(this).is('[class]') ? '<tr class="' + $(this).attr('class') + '">' : '<tr>'; $(this).find('td').each(function()
copying options of select into another select
I have 2 html-selects, one as source, the other as target. I want to copy the source-options to the target. #sel_rel > source #sel_new_after_rel > target function openFormAddRel(){ generateFieldset("Release hinzufügen", "reg_edit", "form_add_rel"); var root=$("#form_add_rel"); root.append("<input id='inp_rel_add_name'></input>"); root.append(" einordnen <select id='sel_new_after_rel'></select>"); $("#sel_new_after_rel").append("<option id='sel_new_after_rel_0' name='0'>als
jQuery function doesn't work after running Ajax
hello, I'm trying to add/Edit a DIV content with jquery function to toggle another DIV. I'm doing it by Ajax (I tested it both by Prototype and Jquery Ajax). and I use $(document).ready(function() to be sure that the content is loaded. but the toggle function for new added/edited DIV does not work. it seems that jquery creat an specific ID like: jQuery1275516513501="5" <button id="deleteConfirm94" jQuery1275516513501="5" onclick="deleteAjax('94');" style="WIDTH: 3em"> I find it by copy
not() and filter() not behaving correctly when used with $(array)
Hi, I've posted this bug (http://dev.jquery.com/ticket/6626), but I'm just wondering if anybody knows any quick fix? If we create a jQuery object from an array, and then apply not() and filter() on that object, the result won't be correct. The following code is used for testing. The top part (using selector, ie. $('tr') is the control showing the correct result as a comparison). The bottom part (creating an array and then creating a jQuery object based on them) is the incorrect result demonstrating
how to use variables in get
Hi there, Is it possible to use variables in place of round1 below? If yes, how? $.get(sampleNo+'.html?rid='+Math.random(), function(data){ var dataObj = eval(data)[0]; var thisRoundBids = dataObj.round1.ThisRound; Thank you.
div "blinks" in IE before going to the correct position
Hey guys, I've run straight into a wall head first and I need some help getting "unstuck". :X This works in all browsers but IE (what a surprise). I was wondering if I could add a delay or something in my script to "show" the div on mouseover. I am open to suggestions on a solution to this, the delay was just the first thing that came to mind because it seems that IE is translating the HTML on the fly. The problem: the div "blinks" for a millisecond in IE, then goes to where it is supposed to go.
.mouseover problem
OK So I got 5 images, 3 are headers and layered using z-index(head, head-templates, head-projects) to be on-top of each other; the other 2 are just images for the mouseover(templates, projects). What I want to happen is when you hover over the image templates I want it to animate head to head-templates and when you put your mouse over projects it animates head to head-projects. When your mouse take your mouse off, so mouseout is used, I want it to animate back to head. The css for the images are
how not to submit the form elemtns once it's hidden?
Hello, I have the following code working fine but the problem is that it always submits the first div (article) even though it's hidden. My question is how do I submit the form and the elements in the form in the div that's shown? (if I select Music radiobutton, I want to submit the input elements of the Music Div not the Article div. Thanks. $(document).ready(function(){ $("input[name$='itemlist']").click(function() { var selection = $(this).val(); $("div.box").hide();
Issues getting either $.each() or $('#selector').each() to work correctly.
I have a application where I am receiving a xml file, selecting a row of data then appropriately putting the data in other specific divs to be used/displayed. I have almost every thing working with exception of where I have more than one node in the xml file that repeats. Example: <photo> <pic> <asset>weaponLib/stillMedia/slides/A106.jpg</asset> <thumb>weaponLib/stillMedia/thumbs/A106.jpg</thumb> <caption>Side view of DODIC A106</caption>
Question about <a> tag when using toggle effect
Please take a look at the following links: http://www.pottersignal.com/catalog/catalog_firesystems_test1.html For the most part the toggle effect works beautifully. However, I have noticed a quirk when you scroll to some of the links at the bottom - the page jumps back up to the top when you click on a link and you have to scroll back down to view the expanded content. I believe this is because I added href="#" to each of these <a> tags. The reason I did this was to force the cursor to recognize
Load File .ASPX into DIV. In file .ASPX have a Gridview with Paging
When use this code function HabilitaDiv(nomeDiv){ var div = nomeDiv.replace("btn", "div").replace("menu", "div").replace("_", ""); $.ajax({ method: "GET", url: "divAreaCliente.aspx", data: "div="+ div, beforeSend: function() { $("#carregando").show("fast");
How to start items in Queue of $(document).ready() not until all css information of the prior item is calculated?
Hi all, I have 2 ready items. The first changes the size of the surrounding div, the second tries to find out about the size of the changed div, but only gets the old value before the first ready item started. If i place a new ready item that holds for a second (i.e. an alert box) the calculation of the first ready item is done when the last ready item starts and all works fine. Is it possible for a ready item to wait and not to start until the item before is finished? THX Jan
[jQuery] jquery form plugin upload problem
Hi All, Hoping someone can help me out with this, been stuck on it for a while: I'm using the latest version of the jquery form plugin (from MAlsup) for file uploading. The upload works: the server call happens, the file data makes it there and the server returns a value, in this case just a number (as plain text). I've been unable to get that returned value to show up in the success function. Maybe someone knows what I'm missing. Here's my latest attempt: html: <div id="upload"> <form name="uploadForm"
:contains is nightmare
I have a case need to find some keyword in hundreds of td and change it's color, I use $('td:contains("keyword")') takes over 8 seconds to find out, it's terrible, how to make it quick?
Using jQuery to sort data into tabs?
Is something like this possible? I have been trying to accomplish this all day, the only way I can come close is to write javascript functions to create the tabs, but the data has to be sorted all ready. I basically have an XML file parsed into data tables, but I want these to be sorted into tabs. I want a way to keep data sorted into tabs like this: [2000] [2001] [2002] [2003] [Jan] [Feb] [Mar] ** tables for Jan-2000 only Is this possible? Been trying all day :(
Can't remove pre-checked radio/checkbox attribs
Hi, if you have a form with pre-checked radio or checkbox elements it is not possible to remove the checked states neither with $('#id').attr('checked', false); //or $('#id').attr('checked', ''); nor with $('#id').removeAttr('checked');If the elements are not pre-checked but you check them with mouse click - it works as expected. Background: I have a search form which is prefilled based on previous selections and queries but I need a reset button to clear all checkboxes and fields. Any ideas/hints?
Can't load jquery on Apache
Hi, All: I have a problem, when I load jquery.js from local, my test server is Apache 2.2.14 and PHP 5.3.1. The code is : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery Starterkit</title> <script language="javascript" src="lib/jquery-1.4.2.min.js"></script> <script language="javascript">
Next Page