Re: [jQuery] Re: A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-02-02 Thread Michael Geary
html.push( $child.attr('label'), '' ); $child.find('>element').$each( function( $inner ) { html.push( $inner.attr('label'), ': ', $inner.text(), '' ); }); }); });

Re: [jQuery] Re: A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-02-02 Thread Michael Geary
Cool, it will be good to see your continued work. We may be among the last holdouts in this mailing list - but I figure since the thread started here we can carry on. BTW you may notice one bit of annoying repeated boilerplate in that last version. See how the callback functions for all the .each(

Re: [jQuery] Re: A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-02-02 Thread Michael Geary
No worries on the XML vs. JSON. It's been interesting to watch your progress in refactoring the code. I hope it's useful for other people too. A few notes on the latest version... * Avoid using ALLCAPS or PARTIALcaps in a variable name. Many JavaScript programmers will think you intend such varia

Re: [jQuery] JQuery + TableSorter + TableSorterPager + (Container != Div) = undefined error

2010-01-29 Thread Michael Furmedge
~ BigDog I really wish you'd posted a clue to how you fixed this BigDog, I'm been wrestling with it for hours :( -- View this message in context: http://old.nabble.com/JQuery-%2B-TableSorter-%2B-TableSorterPager-%2B-%28Container-%21%3D-Div%29-%3D--undefined-error-tp15580200s27240p27370491.html

Re: [jQuery] Re: A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-01-28 Thread Michael Geary
No offense, but that code is really frightening. Not your fault though. JSON is not only much faster than all this XML/DOM garbage, but it is *much* easier to understand and use too! If you're coding JavaScript, you need to know how to use ordinary JavaScript objects and arrays, yes? If you know

Re: [jQuery] A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-01-28 Thread Michael Geary
Are you required to use XML? Why not use JSON and avoid all the parsing? If you have to use XML I can make some suggestions to speed up the code a bit. But let's see if that is a requirement or not first. -Mike On Thu, Jan 28, 2010 at 10:32 AM, augur <312...@gmail.com> wrote: > I spent a couple

[jQuery] Multi-line tabs plugin

2010-01-27 Thread Michael Price
uggestions appreciated J Regards, Michael Price

Re: [jQuery] Re: Call ajax on sucess response from a previous ajax

2010-01-20 Thread Michael Lawson
, do nothing. Once it has been run, disable your interval. cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'When seen from outer space, our beautiful blue planet has no national boundaries.' http://www.gives

Re: [jQuery] Call ajax on sucess response from a previous ajax

2010-01-20 Thread Michael Lawson
Do you have any code to share? cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'When seen from outer space, our beautiful blue planet has no national boundaries.' http://www.gives

Re: [jQuery] how to get href value

2010-01-19 Thread Michael Geary
But that would give you the href for the first A element in the document, not necessarily the one you clicked. Going back to the OP's code, this.href would be the easiest way to get it: $(document).ready(function() { $("a").click(function(event) { alert( "You clicked

Re: [jQuery] Reduce Image Quality

2010-01-19 Thread Michael Kubler
Thanks for that, Uploadify <http://www.uploadify.com/> is exactly what I was looking for! -- Michael Kubler *G*rey *P*hoenix *P*roductions <http://www.greyphoenix.biz> Mobile : 0433483008 I believe in a better world. I support the Zeitgeist Movement <http://www.zeitgeistsa.c

Re: [jQuery] Passing in a parameter

2010-01-17 Thread Michael Geary
If your current code in the body tag is literally: onload="getStuff(data)" then 'data' must be a global variable. You can reference this global variable directly in any of your JavaScript code. For example: $(document).ready( function() { getStuff( data ); }); If that's not exactly what you

Re: [jQuery] jQuery 1.4 cross domain post bug?

2010-01-15 Thread Michael Geary
You can't do a cross-domain POST, nor a cross-domain GET either. It doesn't matter what kind of data it returns, you can't do a POST at all. It's not a jQuery limitation; the browser won't allow it for any JavaScript code. Cross-domain JSONP works because it uses a dynamic script element, not a GE

[jQuery] Re: autocomplete: extra fields

2010-01-14 Thread Michael Lang
If you want the extraParams passed to your data url to include other form input values then you need to define the values as a function. In that function use jquery to get the values of the other inputs. $("#addressCity").autocomplete('http://www.example.com/api/ getcities/', {

Re: [jQuery] javascript loaded via ajax

2010-01-13 Thread Michael Geary
Removing a element just removes the script's *source code* from the DOM. It doesn't undo any actions that the script has already performed, such as defining functions or variables or creating other DOM elements. It doesn't change their availability for garbage collection at all. In your example,

Re: [jQuery] Actually deleting instead of .remove

2010-01-13 Thread Michael Geary
.remove() does remove the element from the document head or body, but that doesn't destroy it. It just makes it available for garbage collection - if there are no other references to the element. For example: var $div = $('test'); $div.appendTo('body'); $div.remove(); Here we've created a new DI

Re: [jQuery] Re: Ajax forms help

2010-01-11 Thread Michael Geary
The JSON part of your server response looks fine if you take out the two line breaks - I assume those are just an artifact of posting with Outlook, and your actual JSON response is all on one line. But why does it have the HTML content repeated after the last } that closes the JSON data? You don't

Re: [jQuery] Accessing REST API via JQUERY?

2010-01-04 Thread Michael Geary
The remote XML API is not on the same domain as your page, is it? Then you can't do it. Browser cross-domain restrictions will not permit it. The only reason you can use getJSON for cross-domain requests is that it actually downloads executable JavaScript code with a dynamic

Re: [jQuery] Re: Table striping still not working in IE7

2010-01-02 Thread Michael Geary
jQuery does have its own selector engine that is used in *jQuery selectors*. However, it does not add any capabilities that are not already there in *CSS selectors*. This is a jQuery selector: $('.foobar').whatever(); This is a CSS selector: .foobar { whatever } In your code you are usin

Re: [jQuery] Not working for me in IE7, but works in IE8

2010-01-02 Thread Michael Geary
Just to clarify that thought, I really like the music a lot! I just don't like having it start playing automatically when I visit the home page. -Mike On Sat, Jan 2, 2010 at 1:56 AM, Michael Geary wrote: > If I tell you the (possible) answer, will you turn off the music on the > home page? :-) >

Re: [jQuery] Not working for me in IE7, but works in IE8

2010-01-02 Thread Michael Geary
If I tell you the (possible) answer, will you turn off the music on the home page? :-) Karl Swedberg mentioned in another thread today that you may have trouble in IE6 if you try to set a background color on a TR. It has to be on the TD's instead. Maybe this is the case for IE7 too. So I would tr

Re: [jQuery] Re: jQuery does not stripe visible table rows correctly

2010-01-01 Thread Michael Geary
I wouldn't use either version. Instead, I would change your CSS from: tr.rowodd { background-color: #FFF; } tr.roweven { background-color: #F2F2F2; } to: tr { background-color: #FFF; } tr.roweven { background-color: #F2F2F2; } and then use just one line of jQuery code: $('#foobar tr:visib

[jQuery] jquery v1.3.2, [autocomplete] v1.0.2 - working but confused solution to json ajax data formatted

2009-12-31 Thread Michael Lang
I am currently using jquery 1.3.2, some jqueryui 1.7.2 (tabs, datepicker, resizeable), and Jörn Zaefferer's autocomplete plugin 1.0.2 (http://docs.jquery.com/Plugins/Autocomplete). All work together nicely. I've been working on getting my autocomplete inputs working properly. I started to make pr

[jQuery] a tag selector question

2009-12-29 Thread Michael Bierman
ot;).overlay(); $("a[rel]").css("border","9px solid red"); $("img[rel]").overlay(); }); -- Michael

Re: [jQuery] Rebinding not working

2009-12-26 Thread Michael Geary
That .live() code wouldn't work because what you've really written is: var temp = exp_iphone_get_trans(); $('#transactions ul li a').live('click tap', temp); Now you can probably see what the problem is with that. By adding the () after the function name, you are *calling* the funct

Re: [jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread Michael Geary
Don't sweat it, dude. First off, Eric didn't post the comment you're referring to. And if he had, I'd be inclined to cut him some slack. After all, Eric's English is *much* better than my Chinese (or whatever Eric's native language is). Second, we all post something once in a while that offends a

Re: [jQuery] Re: js function to jQuery

2009-12-23 Thread Michael Geary
Unicorns are a mythical creature, and so is that use of parentheses. Could this be the syntax you were looking for? (function() { var $ = window.jQuery; $("#CollapseExpandTd").click( function() { $("#TreeviewTd").toggle(); $("#MenuBarTd").toggle(); }); })(); That puts al

Re: [jQuery] Re: Autosuggest breaks in ie7/8

2009-12-22 Thread Michael Geary
tting the title, because you can only have one tag in a document, and once the page is loaded you can't add another tag. Lucky for the OP, someone followed up with a comment to the effect of, "Dude! Ever hear of document.title?" :-) -Mike On Tue, Dec 22, 2009 at 8:48 PM, Michael

Re: [jQuery] Re: Autosuggest breaks in ie7/8

2009-12-22 Thread Michael Geary
or why or how it could have happened... but if some of us > didn't at least try to help, then this mailing list would be > practically nothing but topics started with replies of "post code/ > link" > > whatever i suppose > > > On Dec 22, 11:04 pm, Michael G

Re: [jQuery] Re: Autosuggest breaks in ie7/8

2009-12-22 Thread Michael Geary
Sorry, but that's not right at all. There is no problem with using 'row' as a function parameter name in IE. We're veering into Cargo Cult Programming here, but it's not your fault, MorningZ. The problem is that we can't see the actual code that's going wrong, so we're all reduced to guessing. GJ

Re: [jQuery] can I add 2 jquery in 1 page

2009-12-22 Thread Michael Lawson
Not exactly sure why you would want to do that. Load the first jQuery with jQuery.noConflict(); Then you can access that one by saying jQuery(), and the second using the default $() cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw

Re: [jQuery] jQuery FullCalendar Fetch Events Optimization

2009-12-17 Thread Michael Geary
50 events should be like nothing. I suspect the problem may be that you're calling "$('#calendar').fullCalendar('renderEvent', calevent, true);" separately for each individual event. I'm not too familiar with the Full Calendar, but can you use the 'events' option described on this page: http://a

Re: [jQuery] Re: setTimeout

2009-12-17 Thread Michael Geary
p.s. If there are extra blank lines in my code samples, those aren't intentional (especially not that one in the middle of the chain). Gmail is adding those for some reason! On Thu, Dec 17, 2009 at 1:19 PM, Michael Geary wrote: > I'm sorry, I should have spotted the major bug in th

Re: [jQuery] Re: setTimeout

2009-12-17 Thread Michael Geary
, but this way i´ve tried it too. I have > copied your code and test it too but it just don´t work. > > The function is called an a alert for example makes it output but the > important code is not running like this. > > On 17 Dez., 18:21, Michael Geary wrote: > &

Re: [jQuery] Re: What is the event when a user presses the enter key anywhere on the page?

2009-12-17 Thread Michael Geary
Good tip, thanks, Mike. A couple of suggestions... First, you could simplify that if test to: if( e.which == 13 || e.keyCode == 13 ) That would do exactly the same thing in all cases as the original code. But you can simplify it even more. jQuery cleans up the properties of the event object

Re: [jQuery] Re: How to compare data in 2 jQuery data() elements

2009-12-17 Thread Michael Geary
I think you guys are making this too complicated. Just loop through the data properties: function dataChanged( a, b ) { for( var key in a ) if( a[key] != b[key] ) return true; return false; } if( dataChanged(o,n) ) { someAJAXFunctionThatSavesTheFiel

Re: [jQuery] setTimeout

2009-12-17 Thread Michael Geary
You are calling the lengthy jQuery chain *first* and then passing its result to setTimeout. Your code is equivalent to: var temp = $(['li.',o.hoverClass].join(''),this) .add(this) .not(not) .removeClass(o.hoverClass) .find('>ul') .css('visibility','hidde

Re: [jQuery] ajax

2009-12-17 Thread Michael Lawson
Is your selector correct for your success function? perhaps you meant $("#loading") instead of $("loading") ? cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'When seen from outer space, our bea

Re: [jQuery] google.load issue

2009-12-16 Thread Michael Geary
Put your lines of code in separate tags. google.load() uses document.write() to write a