[jQuery] Problem with radio/checkboxes on ajax post
Hi, I use this function to submit my post requests. But now I have a problem with radio buttons and checkboxes. It sends all button values to server, so the last radio buttons' (even it's not checked) value passes as value. checkboxes are same, even it's not checked, it sends checked value. $("form#profile_form").submit(function() { $("#users_profile h1").after('<div class="loading"></div>'); $("#users_profile .errors").remove() var inputs = []; $(':input', this).each(function()
[jQuery] SIMILE : Exhibit in Jquery?? (a wish)
Hi, i love MIT Simile projects (http://simile.mit.edu/exhibit and http://simile.mit.edu/timeline) because they're great UI for displaying, searching and filtering data in the client-side (no server-side required). The only problem I see is their speed: it is slow. I'm sure that if they try to implement most parts with Jquery library would be a lot faster. Does anybody know about anybody doing this conversion ;-) ? -- Enrique Meléndez Estrada (2367) Servicios Informáticos Organización y Servicios
[jQuery] auto-populating multiple boxes... problem with pg_fetch_array?
hi everybody, there is a nice tool to populate multiple select boxes out there : http://remysharp.com/2007/09/18/auto-populate-multiple-select-boxes/ it must be a very stupid question but I’m trying to apply this tool to get data from postgreSQL, but I always get an empty [] value. It means that the array $json[] is not filled in the while statement. But the dbase connection and the query is correct ( I can check applying a echo “data: “.$row[0].”"; and all the data is displayed). I suppose pg_fetch_array
[jQuery] hoverIntent-like for keystrokes ?
Does anyone know if a such plugin already exists ? to enhance an autocomplete field I'd like to avoid ajax requests to be fired while typing each letter. Instead I'd like to fire requests only if the delay between two keystrokes are greater than a desired delay that can be configured when invoking the plugin. Thank you
[jQuery] jQuery taking a second or two to load?
Hi guys, Not sure if I'm just being fussy, but I'm running jQuery on an intranet site, and pages normally load almost instantly, even taking to account my own shoddy Javascript. Whilst using jQuery, it takes sometimes up to two seconds to load a page and I'm not sure why. Could it be because I'm using the compressed version? Or are my calls to the functions breaking it? I've got something basic, quite simply: <script type="text/javascript"> // initialize the jquery code $(document).ready(function(){
[jQuery] nested function problem?
I have managed to place the values of 4 textboxes into an array called array1 (each value is placed into its own array element). I am having problems when I try to place the 1st 2 elements of array1 into the 1st element of array2 ie array2[0] = concatenated value of array1[0] and array1[1] array2[1] = concatenated value of array1[2] and array1[3] I guess this isn't the optimum solution so any advice is welcome. TIA <html> <head> <title></title> <script type = "text/javascript" src="jquery.js"></script>
[jQuery] jQuery magnifier not working when using multiple divs for images
I'm having some problems using the magnifier ui. Everything seems to work for one div of images however if I add another div of images the script does not work as expected. For the second div the image zooms in when the mouse is not even close to the image. I have posted the sample code below and a link to the sample http://www.kikesweb.com/pos/magnifiertest.html http://www.kikesweb.com/pos/magnifiertest.html <html> <head> <script type="text/javascript" src="jquery.js"></script> <script
[jQuery] DateJS: Robust Date manipulation library
Hello all, This came through my feed reader this morning, and I thought it looked like the kind of thing jQuerians might enjoy: <a href="http://www.datejs.com/">http://www.datejs.com/</a> It's a Date library with lots of parsing capabilities and jQuery style chainable syntactic sugar. It's ~25k minified (!), so it's probably not for everyone, but I can imagine a lot of places where something like this would be very helpful. Cheers! --Erik
[jQuery] attribute filters for blank string
Is there any way to match attributes that are an empty string using attribute filters? For instance, I might have a lot of anchor tags in a file with an href of "". How might I write a selector -- ie $("a[@href='null']") -- that would match this? Unfortunately removing the "null" -- $ ("a[@href='']") --ended up matching nothing Thanks!
[jQuery] animated list problem
Hi, I create a list of items, which are randomly being added to the top of the list and removed from the bottom of it. My idea was to animate newly appearing items with sliding them down and fading in, and animate items, being removed by fading out and sliding down. It more or less works, but one time it just stops working and some items are stuck and some internal jquery loop keeps running and giving me the whole bunch of errors in browser. Actually it works as expected in IE, but stuck in both
[jQuery] InGrid Plugin Trouble
I'm trying to use InGrid (latest version 0.9.1) w/ jQuery v1.2.1 but I'm running into a little trouble: http://www.intoajax.com/ingrid/index.cfm It's generating an error in FireBug and when I look at it, it looks like it's trying to tell me that the number of table columns between the main page and the results being pulled back via XHR aren't the same. In looking at both, it looks like the same number. Can someone take a look and give me a second set of eyes? Thanks, Rey
[jQuery] ANNOUNCE: tinyEdit v.1.0 plugin for jQuery released
The tinyEdit plugin informs users which HTML tags are allowed in a textarea, and it provides easy select/insert functionality for those supported tags. The primary purpose of the plugin is to provide bloggers with a lightweight editor for comments. Any suggestions or issues, please let me know. Thanks! http://www.reindel.com/tiny_edit/ Brian
[jQuery] jQuery List/Demos/Samples
Hi, Where can I find a list of demos and live samples that I could test drive. I am looking for something similar to www.ajaxrain.com. Best, Lawk Salih.
Using jQuery Flash Plugin?
I've tried two jQuery Flash plugins so far (Flash and jMedia), and neither is working, which makes me think I'm missing something in terms of the correct way to implement them. Here's my html for using the Flash plugin (found at http://jquery.lukelutman.com/plugins/flash/#faq): <div id="Show_FZ_Demo">Click to see the demo video!</div> ...and here's my jQuery code: $(document).ready(function() { $('#Show_FZ_Demo').flash( { src: 'http://localhost:8888/images/FZ_Demo.flv' }, { expressInstall:
attribute filters for blank href?
Is there any way to match attributes that are an empty string using attribute filters? For instance, I might have a lot of anchor tags in a file with an href of "". How might I write a selector -- ie $("a[@href='null']") -- that would match this? Unfortunately removing the "null" -- $("a[@href='']") --ended up matching nothing Thanks!
[jQuery] The click event and Ajax (Problem)
Hi, I am sure this is a pretty basic question but I have the following problem. When I try to load content into a div container with AJAX, the content just loads for a split second and disappears or unloads itself again. It seems that the click event only works when the actual click is performed. Do I have to use another event or what is the problem? $(document).ready(function() { $("#mylink").click(function(){ $("#mydiv").load("content.html"); }); }); Thanks. alex
[jQuery] Home page first visit popup window creation
I would like to create a popup that would come out after visiting my site for the first time. How can I do this with jquery? Thanks
[jQuery] how to append() to a textarea
append() doesn't seem to work. I also tried this function that was mentioned in another thread here by John and that doesn't seem to work for me either. Anyone else got this to work? What might I be missing? $.fn.appendVal = function(txt) { return this.each(function(){ this.value += txt; }); };
[jQuery] [S] Truncate textstring / result plaintext string
Hi, i was looking how to truncate a simple textstring (no tags), ie. "This string is too long" to "This string" with a simple call var newString = $(xyz).truncate(minlength, maxlength, atlength, array(".", ",", "-", "(", ")", ...); which will cut the string at the position a char from array exists between minlength and maxlength, if not, cut it at position atlength. Any ideas anyone? TIA, frank
[jQuery] scope question
I'm trying to wrap my head around objects and object literals. I can't seem to figure out how to access the object within one of its methods, when the method is triggered by an event. In other words the context for 'this' shifts when the method is invoked by a handler. See simple example below: $(document).ready(function () { var myObject = { o : 'hello', init : function() { alert(this.o); //'this' changes } } myObject.init(); // 'hello' $(document).click(myObject.init); //'undefined'
[jQuery] A secure way to save on unload
Hi, I'm using php and ajax calls to save content of a form and I'm wondering if there is a secure way to save a form also on the unload of the page. From a book that I have: the event fires before the document goes away, don't burden the event handler with time-consuming tasks, such as generating new objects or submitting a form. The document will probably go away before the function completes, leaving the function looking for objects and values that no longer exist. The best defense is to keep your
[jQuery] IE not triggering change event on dynamically added html
I am using JQuery and JQuery UI. I'm using tabs from the UI part. I'm trying to build a form dynamically adding and removing input elements on the fly. I would expect someone else has tried this before, and that there is an existing implementation somewhere that works. Here is a page with my example problem: http://www.shelfnet.com/new_tab_form_test/new_tab_form_test.html In my examples I've tried doing this three different ways. The third I know I must be doing something wrong because IE at least
[jQuery] Thickbox does not apply css in Safari 3
Hi, I have a html which has css elements like: <style type="text/css"> label {margin-bottom:10px;} input {margin-bottom:10px;} </style> when this page is popup up with thickbox, it works except the css does not apply to the related elements, if I display the page without thickbox, everything works, any idea why? Thanks, A.C.
[jQuery] :empty pseudo-class and whitespaces
Hello, I think the :empty pseudo-class has a bug, the docs are wrong or I misunderstood the docs. The Problem is, that :empty only matches elements when they really have no children, incl. textnodes with whitespaces or newlines. http://docs.jquery.com/Selectors/empty
[jQuery] Problem in delete cookie with jQuery Cookie plugin
Hi Guys, I´m working with this piece of code: $(this).toggle( function() { $(this).children().slideToggle('fast', function() { $.cookie('_wp_el_' + i, i, { expires: 30, path: '/', domain: 'leandrovieira.com' }); }); }, function() { $(this).children().slideToggle('fast', function() { $.cookie('_wp_el_' + i, null, { expires: 30, path: '/', domain: 'leandrovieira.com' }); }); }); The cookie isn´t dele anyway. There´s something wrong? Regards
[jQuery] WYMeditor: placing cursor in editor frame
Hi, I want my WYMeditor instance to have the cursor placed in the beginning of the editor, currently you must click the content before the cursor gets added. Does anyone know is this is possible and how? kind regards, Lex
[jQuery] Automatically reading out the plugins used on a page
Dear reader, I would like to know if there is a solution for the following: Suppose I have within one website 15 plugin's I used. However, not each page uses all 15 of them, on average let's say each page uses 2 or 3 plugin's only. It would be wonderful if jquery determined which plugins it needs for the current page and writes out which plugin's to include afore loading the page any further. Thus instead of writing out all the <script>...</script> jquery does so for you - managing http requests
[jQuery] using blockUI to block a select/dropdown list
Hi I am trying to use blockUI to block a select/dropdown list named 'srv_voice' when an AJAX request is being processed. Code is simply $('select[name=srv_voice]').block(); I have used $().ajaxStart($.blockUI).ajaxStop($.unblockUI); to block the whole page so that part of the plugin works. Likewise I have also blocked other div elements on the page. Why can I not block this select box? Does this plugin only support certain elements? Thanks Tom
[jQuery] passing parameter to anonymous function ( frameready )
Hello everyone :) i'am a newcomer here :) i have a problem with using JQuery and frameready plugin. i need to modify dom elemen especially the css. i have a iframe in my main document. this is my javascript code with jquery and frameready plugin function changeColor(evt) { var color = evt.value; $.frameReady(function() { $('h2.pagetitle').css('color', color); }, "common"); } "common" is my iframe name this link is about frameready plugin http://ideamill.synaptrixgroup.com/?page_id=18
[jQuery] Ajax seems to be running fine, but is running the 'error' function. What am I doing wrong?
I have an Ajax function I'm using to test right now. When the function is called (upon a click), it runs the function, but displays the "Error, please try again" message. In Firebug, it looks like the function is returning the correct msg. I was using 1.0.2 (I think) where it worked, minus the replaceWith function, and then I upgraded to 1.1.2 and now it's showing the error message. Here's the function below, any ideas on what I'm doing wrong? function testAjax(id,page,sort) { $.ajax({
[jQuery] Documentation of datatype map
Hello all, i'm new to jquery and i'm very happy with it! Thaks to the developers! I have a "missing documentation hint". The datatype "map", for example used in $.get(url,data,callback) for data, is documented as "Key/value pairs that will be sent to the server.". What is missing is the possibility to us an array as value. Looking thru the code told me, that in this case the key will be repeated. Using PHP at the serverside you can use the "[]" to declare the key as array - known from checkboxes
[jQuery] dataType & POST
(i post this message again i've posted it 2 hours ago but it didn't appear yet.) in jquery doc is written : warning "script" will turn posts into gets so, is there a way to send POST or DELETE or PUT ajax query with datatype: 'script'? regards
[jQuery] Scroll to top animate
Hi all, I try to animate the scrolling to top of the Page, is works not :( HTML: </head> <body> <div id="top"> <h1> ...... CONTENT ..... ..... CONTENT <p id="toplink"> <a href="#top" title="nach oben springen">top</a> --------------------------------------------- JS: $("#toplink a").click(function(){ var h = $("body").height(); // alert (h); $("body").animate({ scrollTop: h }, "slow"); // return false; }); ---------------------------------------------- uncomment the alert and I become 1560 when click
[jQuery] MacWorld new site using jQuery
http://beta.macworld.com/ Right in the source, you can see jquery-1.2.1.min.js and jquery.taconite.js.
[jQuery] ExtJS
Inspired by this Christmas Calendar (http://catalyst.perl.org/calendar/2007/1) i want to ask for input regarding ExtJS vs. jQuery. The ExtJS overview and demos are very straight forward and rather impressive at a glance. I guess that what makes the biggest impression is that the library seems to fit together seamlessly. jQuery OTOH seems more like a toolbox where you choose plugins yourself with the risk that there are incompatibilities - but the tools can be more powerful. Is this a fair statement?
[jQuery] last non-empty row
What's the best way to find the last non-empty row in a table? "non-empty" = at least one table cell in the row contains text Is there a better way than this? var last = 0; $("#table1 tr)".each(function(i) { if ($(this).children("td:not(:empty)").size() > 0) { last = i; } }); Thanks!
[jQuery] Getting response from dataType: Script
<span style="font-family: trebuchet ms,sans-serif;">A co-worker is new to jQuery and has a question over my head. :) See below.</span><br style="font-family: trebuchet ms,sans-serif;"><br style="font-family: trebuchet ms,sans-serif;"> <span style="font-family: trebuchet ms,sans-serif;">Glen</span><br style="font-family: trebuchet ms,sans-serif;"><span style="font-family: trebuchet ms,sans-serif;">---</span><br style="font-family: trebuchet ms,sans-serif;"> <span style="font-family: trebuchet ms,sans-serif;">Is
[jQuery] FJAX instead of AJAX-DRUPAL
I couldn't find any AJAX module to handle img's and txt, so I'm trying to use FJAX that I have used easily in normal web sites. The problem in Drupal is the JS part of the FJAX . If you r not familiar wiht FAJX their web site is http://www.fjax.net/. Is quite smaller than AJAX and uses a swf as engine. I have been suggested to check JQUERY and I did , but my JS is quite inadeguate to get my hands in it. Has anyone tried FJAX in Drupal? Or can give me a lead in how to merge FJAX JS into JQUERY?Thanks
[jQuery] Ajax ie7 $.post
Hi folks I tried make a simple ajax and didnt work in ie7. FF works fine. <script> $(document).ready(function(){ $("#submit").each(function(){ $(this).bind("click", function(){ $.post("../../../submitajax.php", { ts: $(".secure").attr("name"), mytext:$("input#url").val(), }, function(data){ $('#click10').remove(); $('.share').append(data);
[jQuery] Dealing with large forms
I would like to get some opinions or ideas regarding showing small portions of a lengthy form and advancing through the form by hide() and show(). Below is what I have done, is there an easier or more standard way to do this? Currently I have divided the sections up by fieldsets and using jquery like so: var $totalSets = $('form').find('fieldset').length; $('fieldset').each(function(index) { if(index ==0) { $('<div class="control"><span class="next"><img alt="'+index+'" src="..\/img\/bgs\/nav_right_green.jpg"\/>
Next Page