[jQuery] Plugin help: need dropdown (stylable in IE)
Hello, Searching for dropdown in the plugin repository yields dozens of results, most of which have no comments. So I'm hoping someone out there with experience using the kind of plugin I need can chime in. :) Currently I have a SELECT field that contains theme names. Upon choosing a value in the select, the user hits a submit button and the page reloads, now with the new theme var being used to load the right CSS file. This presents a problem because we've customized the dropdown area (see attached image), and IE6 (which we need to support) doesn't let you style select boxes - you're stuck with the gray arrow and ugly outline, etc. I assume the only way to handle this is to do a JS solution, so I'm looking for a good, stylable dropdown plugin. It doesn't need to do anything fancy like multiple select. Thanks! -Kim attachment: themedropdown.jpg
[jQuery] Best autocomplete plugin?
Hi folks, long time no chat ;) I'm redeveloping my site finally and am looking to update a few core jquery plugins. The current autocomplete I'm using is jorn's version, at least a year old. I came back to the jquery site to get the newest version, but I discovered that there are now several other versions. Can anyone chime in with their experiences on the autocomplete plugins? Is Jorn's newest version still the best way to go? Thanks! -Kim
[jQuery] Re: Best autocomplete plugin?
Awesome!! I'll try installing this and see how it works. --- On Wed, 6/25/08, Jörn Zaefferer [EMAIL PROTECTED] wrote: From: Jörn Zaefferer [EMAIL PROTECTED] Subject: [jQuery] Re: Best autocomplete plugin? To: jquery-en@googlegroups.com Date: Wednesday, June 25, 2008, 11:47 AM I can recommend to use version 1.0.1 of my autocomplete plugin, released a few minutes ago, just for you: http://plugins.jquery.com/project/autocompletex Let me know if you have any questions. Jörn On Wed, Jun 25, 2008 at 5:04 PM, Kim Johnson [EMAIL PROTECTED] wrote: Hi folks, long time no chat ;) I'm redeveloping my site finally and am looking to update a few core jquery plugins. The current autocomplete I'm using is jorn's version, at least a year old. I came back to the jquery site to get the newest version, but I discovered that there are now several other versions. Can anyone chime in with their experiences on the autocomplete plugins? Is Jorn's newest version still the best way to go? Thanks! -Kim
[jQuery] Why is removeAttr necessary? (Instead of overwriting with attr)
Hi folks, I just spent the last hour trying to figure out why a piece of jquery wasn't working, and finally tracked it down to inaccurately assuming you could overwrite an attribute with attr. Using attr to blank out values (ex: .attr(name, )) seems to work fine, but as soon as I try to use it with an actual variable (ex: .attr(id, idvar)), nothing happns. I finally discovered that the code worked perfectly if I called removeAttr(id) first, prior to the .attr(id, idvar) call. Can anyone explain to me why overwriting doesn't work with attr? Is this a bug? Am I missing some kind of core concept? Thanks, ~Kim Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
[jQuery] Re: Why is removeAttr necessary? (Instead of overwriting with attr)
...huh? I've written to this mailing list for over a year with jquery related questions. -Kim --- Saidur [EMAIL PROTECTED] wrote: Hi kim why you change the discusson subject. On Dec 9, 3:30 pm, Kim Johnson [EMAIL PROTECTED] wrote: Hi folks, I just spent the last hour trying to figure out why a piece of jquery wasn't working, and finally tracked it down to inaccurately assuming you could overwrite an attribute with attr. Using attr to blank out values (ex: .attr(name, )) seems to work fine, but as soon as I try to use it with an actual variable (ex: .attr(id, idvar)), nothing happns. I finally discovered that the code worked perfectly if I called removeAttr(id) first, prior to the .attr(id, idvar) call. Can anyone explain to me why overwriting doesn't work with attr? Is this a bug? Am I missing some kind of core concept? Thanks, ~Kim Never miss a thing. Make Yahoo your home page.http://www.yahoo.com/r/hs Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
[jQuery] Re: Why is removeAttr necessary? (Instead of overwriting with attr)
Hi John, After doing a bunch more debugging, I think this might be a strange firebug problem. I know it's not jquery-related, but have you ever heard of firebug not properly updating the code while debugging? What I notice is that if I perform alerts before and after the attr call, it does show the correct values for the attributes I'm trying to overwrite (by just using attr). THe problem was, the lines of code in firebug were sometimes changing, mostly not, so I think I inaccurately assumed it was a jquery problem. thanks! -kim --- John Resig [EMAIL PROTECTED] wrote: Do you have some example code? That shouldn't fail for any particular reason. --John On Dec 9, 2007 4:30 AM, Kim Johnson [EMAIL PROTECTED] wrote: Hi folks, I just spent the last hour trying to figure out why a piece of jquery wasn't working, and finally tracked it down to inaccurately assuming you could overwrite an attribute with attr. Using attr to blank out values (ex: .attr(name, )) seems to work fine, but as soon as I try to use it with an actual variable (ex: .attr(id, idvar)), nothing happns. I finally discovered that the code worked perfectly if I called removeAttr(id) first, prior to the .attr(id, idvar) call. Can anyone explain to me why overwriting doesn't work with attr? Is this a bug? Am I missing some kind of core concept? Thanks, ~Kim Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
[jQuery] Karl, cluetip questions: Select IE6 bug ETA, and incorporating JTIP?
Hi Karl, There are two major reasons why I am using JTip: 1. You had posted a fix for the select issue (select boxes showing up above the tooltip), which directly affects how I'm using the box so I need this functionality 2. The built in CSS styles has the little arrow shape that points to the tooltip, giving it the appearance of a comment/talking bubble. In the JS, it checks browser width etc (or something) and calculates which side to put the box on and where to position this arrow shape. I'd really like to switch to cluetip, especially since there is support for clicking inside the tooltip. I know you are super busy, but I'm wondering if: a) you have some sort of ETA on when you plan on incorporating the IE6 fix (my development needs to happen pretty much now, so if it will be awhile I will need to wait to incorporate cluetip) b) if you plan on incorporating this diamond shape idea, as opposed to keeping it just as a floating box with no link to the cursor tip itself. (or, if you don't, perhaps you have ideas on how I could hackjob it together from jtip code myself?) Thanks a bunch :) -kim Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
[jQuery] Re: Karl, cluetip questions: Select IE6 bug ETA, and incorporating JTIP?
Wow, I had a long day at work and come back to all of this awesomeness! Thanks for the explanation, Karl... I guess I wasn't looking close enough to see that a jtip version already existed. I'll try incorporating this now and see what I can do, and will try to figure out bgiframe as well. thanks! -kim --- Rey Bango [EMAIL PROTECTED] wrote: Mitchell, I believe what you're seeing is the slide down effect that's an option in clueTip. If you want to get around that just do something like this: $('#cfvhelp').cluetip({width: 200, cluetipClass: 'jtip', arrows: true, dropShadow: false, fx: {open:'show', openSpeed: 'fast'}}); This will improve the display performance quite a bit. @Karl: What I would suggest is that if the fx is left out, default to using show() as opposed to fadeIn() and then on line 340, change this line: $cluetip.hide()[defaults.fx.open](defaults.fx.openSpeed); to $cluetip.hide()[defaults.fx.open](defaults.fx.open != 'show' (defaults.fx.openSpeed)); so that way if the show is the selected effect, the box instantly appears and no speed method call is necessary. By doing this, I was able to achieve the same effect as Cody's jTip while still maintaining all of the cool and extensive functionality available in clueTip. The best of both worlds. Rey... Mitchell Waite wrote: Compared the mitch demo to the jTip demo. http://www.codylindley.com/blogstuff/js/jtip/ Now I am sure j Tip is faster, but faster might not be the right word. Its like this. The very first time I hover over your cluetip I can actually see the divs and such being assembled. jTip doesnt have that flaw, it comes up whole. And if you move the mouse back and forth over the link you will see the alignment issue with the arrow. I think everything works nice but the performance bugs me. Mitch *From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Karl Swedberg *Sent:* Wednesday, August 22, 2007 6:22 PM *To:* jquery-en@googlegroups.com *Subject:* [jQuery] Re: Karl, cluetip questions: Select IE6 bug ETA, and incorporating JTIP? On Aug 22, 2007, at 5:07 PM, Mitchell Waite wrote: One last thing Karl. Side by side your cluetips take longer to appear then jTips do. About 1/2 second slower on this rig but that is a critical period that should be fast. Again this is me, maybe others like them slow. You know, Mitch, I think I have an idea what's going on now. When you include the hoverIntent plugin in the head, the cluetip picks it up and uses its .hoverIntent() method (with default settings) rather than the .hover() method. So, I put together another little demo, just for you. I took out the hoverIntent plugin, and it's much zippier now. I also set the open option to show and the openSpeed option to '' (an empty string). http://plugins.learningjquery.com/cluetip/demo/mitch.html Let me know how that goes for you. If speed is what you're after, this should do the trick. Karl I see what may be a weird bug in IE7. If I leave your example page, go do something in another window, when I come back to your page the tooltips will not work until I reload your page. Thanks a lot for reporting this. I'll have to boot up Parallels and check it out asap. That kind of weird bug scares me, though. I'm not very good at debugging that sort of thing. The new layout on your example page is much better, and now that I see how easy it is to do the arrow thing I am more motivated to switch. Glad to hear it. I also think your examples are too large in font and size, e.g. normally tooltips are NOT giant boxes, they are tiny hints. Well, that's all adjustable, so change them to your heart's content. You can change the font-size in the css and you can change the width in the cluetip's options. Check out the demo I made for you (see link above). I made the font smaller. :-) Have you tested them in IE7? If they work fine there and FF I think I am now sold. Well, not often enough, to be honest. I have tested in IE7, but not lately. But I will soon. I promise. Most recently tested in IE6, Firefox, and Safari 2 Mac. === message truncated === Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. http://sims.yahoo.com/
[jQuery] Re: Slow plugin scripts -- any way to speed them up?
Eric and Sean, thanks for the response. :) As it turns out I was using tablesorter as a secondary example (and to be honest, I don't recall how many rows caused the error; I stopped using it and added manual pages instead). My primary concern right now is the star rating plugin, but I know I've encountered this sort of thing before with my own personally written scripts as well. It seems that with repetition (or binding, or anything) over a large number of items, IE tends to pop up the your page is loading slowly box and I pretty much figure I am done for with that idea. Fine with my own scripts, but with a plugin, this is concerning as I'd really like to use it. thanks, -kim --- Eric Crull [EMAIL PROTECTED] wrote: Maybe you could attach to the click event for the table (one attachment instead of hundreds) and then filter the event to see what row is being acted on. look at this thread for inspiration: http://groups.google.com/group/jquery-en/browse_thread/thread/bc8ad59bce66b658 On Jul 12, 9:27 pm, Kim Johnson [EMAIL PROTECTED] wrote: Hi folks, I run an information database and have been thwarted a few times by some of the popular plugins. Specifically, let's say I have 150 table rows on a page. I've used at least two plugins now (tablesorter and the star rating plugin) which first lag, and finally pop up the oh-so-happy a script is causing your page to load slowly, do you want to cancel error (in IE). Tablesorter I think only timed out like that if it was in the hundreds of rows, but for the star rating plugin (the one I'm trying to use right now), I try to attach one on each table row and it easily dies. Doesn't seem to matter if I remove all other scripts on the page, either. This is one I rellly wanted to use, but I also can't remove rows from the pages. Do you guys know of any tricks to speed stuff up and squash the page loading slowly error? sorry for the ambiguous question! -kim ____ Get the Yahoo! toolbar and be alerted to new email wherever you're surfing.http://new.toolbar.yahoo.com/toolbar/features/mail/index.php Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
[jQuery] jquery 1.1.3 and undefined variables
Hi folks, I had 100% working jquery code throughout my site, but upon updating to the newest version, a TON of stuff is no longer working. Specifically, undefined is showing up in various variables being passed around or gotten via selectors. One thing I've found is that while in the past a blank variable would pass into an ajax call as nothing (and in my php code, I could then just say if (!$varname) ), now, it's passed as undefined. Once I put in a bunch of error handling it works fine, but this is kind of irritating as I keep discovering similar errors throughout the site now. Can someone explain what the fundamental change was in the newest jquery that is causing this to happen? I'd at least like to understand before I go around fixing all the affected areas. thanks, -kim Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather
[jQuery] Re: jquery 1.1.3 and undefined variables
Hi John, There isn't so much a page to show, as I've fixed the error (and the fix was in my php code, not jquery) and/or you have to be logged in to use the features, but here's the culprit code that suddenly changed how it was working. I'm still in novice mode with jquery so there might be a much easier way of doing this. The goal: update the status of a database entry depending on whatever is selected in a form select dropdown. Because I needed to keep track of whether this is a NEW or EXISTING database entry, I appended a custom ID and name onto each dropdown item. Since I need to get the info with PHP and selecting the dropdown does ajax magic, I didn't know another way of doing this. I append EITHER the existing DB entry's ID under the ID tag, OR the name of the series if the DB entry doesn't exist yet, under the NAME tag. Thus, either the ID or NAME tag is empty, while the other is populated. I then check both in the ajaxed page, and whichever is populated, I then insert or update an entry accordingly. Here's the jquery ajax calling code: $(select.status).change(function() { var obj = $(this); switch (obj.val()) { case 0: var status = watched; break; case 1: var status = watching; break; case 2: var status = dropped; break; case 3: var status = saved; break; }; $.ajax( { type: POST, url: /users/processanime.php, data: (status= + obj.val() + animeid= + obj.attr(name) + useranimeid= + obj.attr(id)), success: function(responseText){ snip, this stuff doesnt matter }); return false; }); Notice that both the name and ID field are both passed, even though one is empty. Now, before the newest version of jquery, in my ajaxed page (processanime.php) I'd simply do a check for if (!$var). But after the upgrade, it appears blank values are passed as undefined (I did an alert statement). I guess it's not really an error, just seems like variables are now passed differently through the .ajax call if they are blank. An easy enough fix, just really troublesome due to the many places on the site I have similar code for; hence if there's an explanation, I'd love to know what's going on :) thanks, -kim --- John Resig [EMAIL PROTECTED] wrote: Kim - We haven't seen any errors like this, do you have a page up where we can see it in action? --John On 7/8/07, Kim Johnson [EMAIL PROTECTED] wrote: Hi folks, I had 100% working jquery code throughout my site, but upon updating to the newest version, a TON of stuff is no longer working. Specifically, undefined is showing up in various variables being passed around or gotten via selectors. One thing I've found is that while in the past a blank variable would pass into an ajax call as nothing (and in my php code, I could then just say if (!$varname) ), now, it's passed as undefined. Once I put in a bunch of error handling it works fine, but this is kind of irritating as I keep discovering similar errors throughout the site now. Can someone explain what the fundamental change was in the newest jquery that is causing this to happen? I'd at least like to understand before I go around fixing all the affected areas. thanks, -kim Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather Get the free Yahoo! toolbar and rest assured with the added security of spyware protection. http://new.toolbar.yahoo.com/toolbar/features/norton/index.php
[jQuery] Re: Hiding select options in IE?
Hi Luc, I just had to figure out a similar problem, and dynamically remove a select option. Thankfully, there is an easy plugin available: http://www.texotela.co.uk/code/jquery/select/ From the page: Remove an option by index: $(#myselect2).removeOption(0); or value: $(#myselect).removeOption(Value); or with a regular expression: $(#myselect).removeOption(/^val/i);. To remove all options, you can do $(#myselect).removeOption(/./); In my case, I simply want it to remove the default blank value if they've selected a value, so here's my code: if (obj.attr(id) == obj.containsOption()) { obj.removeOption(0); } --kim --- Luc Pestille [EMAIL PROTECTED] wrote: Hi all, Thanks to IE's inability to dynamically hide/show options within a select list, I need to do it differenly, but I can't get it to work =/. This is what works as I'd expect in FF; //this is only for agency jobs - show titles dependent on discipline selected discipline = $(#admin-jobs .discipline_agency_row select [EMAIL PROTECTED]).val(); $(#admin-jobs .jobtitle).hide(); titles_needed = #admin-jobs .discipline + discipline; $(titles_needed).show(); $(#admin-jobs .discipline_agency_row select).change(function(){ $(#admin-jobs .jobtitle).hide(); titles_needed = #admin-jobs .discipline + $(this).val(); $(titles_needed).show(); }); This is what I've come up with, and logically I think it should work, but it doesn't. IE strips all the options out (but shows the empty dropdown) and won't add any back in, and FF doesn't strip any out at all. //show titles dependent on discipline selected $discipline = $(#admin-jobs .discipline_agency_row select [EMAIL PROTECTED]).val(); $titles_needed = #admin-jobs .discipline + $discipline; alloptions = $(#admin-jobs .jobtitle).clone(); if ($discipline){ reqoptions = alloptions.find( option:not('+$titles_needed+') ).remove(); $(#admin-jobs .title_row select).empty(); $(#admin-jobs .title_row select).append(reqoptions); } $(#admin-jobs .discipline_agency_row select).change(function(){ $titles_needed = #admin-jobs .discipline + $(this).val(); alloptions = $(#admin-jobs .jobtitle).clone(); if ( $(this).val() ){ reqoptions = alloptions.find( option:not('+$titles_needed+') ).remove(); $(#admin-jobs .title_row select).empty(); $(#admin-jobs .title_row select).append(reqoptions); } }); Anyone got a method that does work, or does a plugin exist to counter IE's bug? Luc Pestille Web Designer in2, Thames House, Mere Park, Dedmere Road, Marlow, Bucks, SL7 1PB tel: +44 (1628) 899700 | fax: +44 (1628) 899701 | email: [EMAIL PROTECTED] | web: www.in2.co.uk This message (and any associated files) is intended only for the use of jquery-en@googlegroups.com and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not jquery-en@googlegroups.com you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer. Messages sent to and from us may be monitored. Any views or opinions presented are solely those of the author jquery-en@googlegroups.com and do not necessarily represent those of the company. Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online. http://smallbusiness.yahoo.com/webhosting
[jQuery] Re: Event binding for both body.click AND body.change?
Just wanted to do a quick followup -- by putting the select change binding BELOW the body binding, I got this code to work, but I'm still interested in knowing if there's a way to bind two different things to the body element (click versus change versus whatever). Anyone know? thanks, -kim --- Kim Johnson [EMAIL PROTECTED] wrote: Hi folks, Quite awhile back, Karl pointed out to me the fantastic article about event binding for ajax. I've since implemented the following function $('body').click(function(e) { if ($(e.target).is('img.closebutton')) { var attribute = close; buttons($(e.target), attribute); } (snip) where buttons handles things. Everything on the page that needed to be handled was an image or text click, so this solution worked fine. However, now I have a dropdown I need to integrate onto the page, and I need to handle the dropdown's change event (I have 100% working code for the dropdown on a different page on the site which doesn't have this body.click code). I tried putting body.change(function(e) etc above the body.click function, but it appears the event is being caught by body.click due to the initial clicking of the dropdown. Any thoughts would be greatly appreciated :) thanks, -kim Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. http://tv.yahoo.com/ Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=listsid=396545469
[jQuery] Re: Star Rating System
I personally would still love to see the option built in for half star ratings; I've been waiting on integrating the plugin until such a thing is available. :) (half star ratings meaning, you can rate something 3.5 stars, as opposed to just the average showing up as 3.5 stars once the integer ratings are averaged) --kim --- Mario Moura [EMAIL PROTECTED] wrote: Hi Folks I would like to suggest a improvement in this amazing plugin http://php.scripts.psu.edu/rja171/widgets/rating.php look http://www.imdb.com/title/tt0413300/ You have User Rating: 7.4/10 average . This average could be in a container for example div id=average'7.4/div and should be the default value. About the action I still confuse. My CMS provide me: form class=nodevote-form id=nodevote-rate-form method=post action=/home/nodevote/18/add select id=edit-vote class=form-select name=vote option value=0Select/option option value=11/option option value=22/option . option selected=selected value=77/option option value=1010/option/select input type=submit class=form-submit value=Vote id=edit-button name=op/ So two things are important. If none option isnt selected so Request user vote , and after vote append vote like Imdb did. if option selected=selected so show vote (and you should be able to edit this) Another very interesting feature is the rollover system (10 start, with average and you can vote in same place) I like imdb Star Rating System and I think it is the best solution so why not make something similar. Imdb use Ajax. It is just a suggestion and congratulation to author of Star Rating System. Regards Mario Get the free Yahoo! toolbar and rest assured with the added security of spyware protection. http://new.toolbar.yahoo.com/toolbar/features/norton/index.php
[jQuery] Re: Autocomplete (Jorn) plugin problems - click broken, etc
Hi Dan, Though my response is late, thanks for your reply. :) I implemented your plugin without a hitch and it works perfectly. I'm fiddling with using IDs now and will post with any other questions I come up with. thanks again! And I hope Jorn sees these issues for his plugin too. -kim --- Dan G. Switzer, II [EMAIL PROTECTED] wrote: Kim, Hello, So now I'm trying to implement Jorn's fantastic autocomplete revision, and am encountering some problems. Since you're in a hurry, try my original mod to see if it works for you: http://www.pengoworks.com/workshop/jquery/autocomplete.htm Joern's made a lot of changes and refactored most of the code. Joern's code base is definitely going to be a huge improvement, but it is still in development and there are known issues and it's not really ready for prime time yet. Anyway, I'm going to take a stab at what I think may be the issues below. First, there's definitely a positioning issue in Firefox. The pop-ups are appearing at the bottom of the document. Not sure what the issue is, but it could be a CSS issue w/one of the parent object. By do any of the parent items in the input boxes have relative positions? Problem page: http://anime-planet.com/anirec/recommendation2.php?animeid=2 Autocomplete initialization: $(#rec1).autocomplete( autocomplete_anirec.php, { minChars:3, cacheLength:50, max:50, delay: 10 } ); (I admittedly am not sure what cacheLength does, but I tried increasing it) The cacheLength controls how many items to cache. Each AJAX call is cached--so that no more AJAX operations are needed. In autocomplete_anirec.php, I am echoing: $title . \n for each title. --- Repro steps (for problem 1): 1. In the first select anime box, type end (without quotes) 2. CLICK (don't use tab or the enter key) Blue Gender Results: Notice that Zone of the Enders: Dolores shows up as the selected string. For some reason, the revised code is having problems finding the correct value that was selected in dropdown. Joern's code is heavily refactored here and the problem isn't jumping out at me. Like I said, try my code for the time being. From the looks of your example, it'll do everything you need. -Dan __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[jQuery] Re: Autocomplete (Jorn) plugin problems - click broken, etc
Note: In addition, this only works in IE6 :( (firefox doesn't initialize it at all) --- Kim Johnson [EMAIL PROTECTED] wrote: Hello, So now I'm trying to implement Jorn's fantastic autocomplete revision, and am encountering some problems. Problem page: http://anime-planet.com/anirec/recommendation2.php?animeid=2 Autocomplete initialization: $(#rec1).autocomplete( autocomplete_anirec.php, { minChars:3, cacheLength:50, max:50, delay: 10 } ); (I admittedly am not sure what cacheLength does, but I tried increasing it) In autocomplete_anirec.php, I am echoing: $title . \n for each title. --- Repro steps (for problem 1): 1. In the first select anime box, type end (without quotes) 2. CLICK (don't use tab or the enter key) Blue Gender Results: Notice that Zone of the Enders: Dolores shows up as the selected string. Repro steps (for problem 2, probably related to problem 1): 1. Refresh page 2. In the first select anime box, type end (without quotes) 3. CLICK (don't use tab or the enter key) Zone of the Enders: Idolo (the last option in the dropdown -- you'll need to scroll) Results: Notice that nothing shows up. This happens for other entries as well such as Hakkenden, The. Repro steps (for problem 3) 1. Refresh page 2. In the first select anime box, type end (without quotes) 3. Using the up/down keys (NOT the mouse click), move down to Hakkenden, The and press Enter. 4. DO NOT CHANGE FOCUS by clicking anywhere. With the cursor still in the first select anime box, use the backspace key to erase Hakkenden, The 5. Type end (without quotes) Results: Nothing happens. The only way to get the autocomplete to show up again is to change focus by clicking in another box and then clicking back in the previous box. This problem happens intermittently while doing a lot of combinations of things, but this is just one that happens every time. -- Any thoughts from Jorn or others? I'm wondering if the internal numbering of the dropdown items is messed up (or I haven't set them correctly via a plugin option?) so when you click with the mouse, it's not picking up the right thing? For problem 3, maybe a binding issue? Was hoping to get this feature up today so hopefully the answer isn't too hard. :) thanks, -kim __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[jQuery] Is it possible to bunch rules in Jorn's validator plugin?
Quick question: is it possible to bunch rules together in Jorn's validator, similar to how you can bunch cases in a switch statement? Ex: rules: {storyscore: {required: true}, story: {required: true}, animationscore: {required: true}, animation: {required: true}, } Is it possible to change to something like: rules: { storyscore, story, animationscore, animation: {required: true} } My jquery code is large and bloated so I've been trying to figure out ways to cut corners (and didn't see any examples on the demo page that did this) -- insight would be appreciated! :) thanks, -kim Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends.http://mobile.yahoo.com/mail
[jQuery] Re: TableSorter issues: special characters, mixed data
Thanks Christian! I just pasted that in and indeed, now there isn't a JS error and it sorts correctly by title. However, now something strange is happening and the other fields don't sort -- they all sort by title! The date specifically is what I just tried. Here are two sample pages: http://anime-planet.com/users/reviewindex.php?usersid=19 ^^this page has always worked, because it has no special character names http://anime-planet.com/users/reviewindex.php?usersid=1 ^^the problem child page. The title does now work. Also, here's the tablesorter initialization: $(#userreviewtable).tableSorter({ sortColumn: 'title', stripingRowClass: ['alt2','alt'], stripeRowsOnStartUp: true, textExtractionType: ['title'] }); And one other question: is it possible to do multiple columns for textExtraction (using a comma, two separate lines for it, etc)? There is one other column (score) that in theory should be able to have either nothing, or a number. Note: I'm still down with helping you on the documentation front :) thanks! -kim --- Christian Bach [EMAIL PROTECTED] wrote: Kim, is it possible to publish a test page so i can take a look? A quick fix would be to use the new property textExtractionType - which in true tablesorter spirit is undocumented. Here is a example: This forces the tablesorter to extract data out of the title attribute, allowing a simple way to present mixed data to the user (string/numbers/etc). script $(table).tableSorter({ textExtractionType: ['title'] }); /script table thead tr thRow/th thNumber/th /tr /thead tbody tr td title=1One/td td title=3030.00/td /tr tr td title=22/td td title=50a href=50.000/td /tr /tbody /table Best regards Christian 2007/4/5, Kim Johnson [EMAIL PROTECTED]: Anyone know a workaround for this? :) Christian, any thoughts? -kim, who would really like to not code a bunch of tablesorting tonight in php ;) --- Kim Johnson [EMAIL PROTECTED] wrote: ATTN: Christian or anyone else familiar :) I'm trying to use TableSorter for a few large batches of data, but am getting JS errors depending on what content is in the columns. For example: -Digit-only data works, but MIXED data (ex: some fields are empty, and some have decimal values) fails. -Special characters break the sorting. For example, I have a list of titles and some titles start with special characters (ex: .hack//SIGN, ~To Heart~). This also breaks. I suspect these are breaking because of something to do with the generic sorting function: generic: function(a,b) { return ((a[1] b[1]) ? -1 : ((a[1] b[1]) ? 1 : 0)); } I usually use MYSQL's sorting mechanisms to filter queries (var1 var2) and this method works with special characters and such, so I'm not sure what the best way to modify the js file would be (for a temporary solution, until this is fixed in a subsequent release). Do you know of the reason why these cases are breaking, and/or what a good workaround would be? thanks, -kim No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news -- POLYESTER* Wittstocksgatan 2 115 24 Stockholm Phone: 08-660 73 50 / +46-8-660 73 50 Mobile: 070-443 91 90 / +46-70-443 91 90 E-mail: [EMAIL PROTECTED] http://www.polyester.se Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. http://tools.search.yahoo.com/toolbar/features/mail/
[jQuery] Re: TableSorter issues: special characters, mixed data
Super close, but not quite! :) http://anime-planet.com/users/reviewindex.php?usersid=1 $(#userreviewtable).tableSorter({ sortColumn: 'title', stripingRowClass: ['alt2','alt'], stripeRowsOnStartUp: true, textExtractionCustom: [ [2,'integer'] ], textExtractionType: ['title'] }); ExtractionType fixes the title issue -- those sort just fine now. I also changed the date to 4 digits and that works just fine (it didn't work with the date line you had mentioned for 2 digits). However, the Custom line still doesn't do anything for sorting the score field. (I removed the 0's, as normally those fields would be BLANK, as opposed to 0). I also tried changing [2, 'integer'] to 'decimal' or 'double', to no avail. Any ideas on this last tiny bit? thanks again, -kim --- Christian Bach [EMAIL PROTECTED] wrote: I took a look at your example page and this snippet will solve your problem: $(#userreviewtable).tableSorter({ sortColumn: 'title', stripingRowClass: ['alt2','alt'], stripeRowsOnStartUp: true, textExtractionCustom: [ [2,'integer'] ], dateFormat: dd/mm/yy }); What we are doing here is forcing the third column (we start counting at zero) to use the integer parser, since the column is messed up with the auto detection and identified as a text column (hey, no ones perfect). As regarding your date format 01/01/07 i have added this to the shortDate parser, however since the year is formatted with two digests the parser will parse 07 as 1997 since there is no way for it to know that you properly mean 2007. So my suggestion is to change this to a full 4 digit year format. If you do change the the year to a 4 digit format remove the dateFormat property from the tablesorter constructor. The new tablesorter version can be found here: http://dev.jquery.com/browser/trunk/plugins/tablesorter/jquery.tablesorter.js?format=txt Best regards Christian 2007/4/5, Kim Johnson [EMAIL PROTECTED]: Thanks Christian! I just pasted that in and indeed, now there isn't a JS error and it sorts correctly by title. However, now something strange is happening and the other fields don't sort -- they all sort by title! The date specifically is what I just tried. Here are two sample pages: http://anime-planet.com/users/reviewindex.php?usersid=19 ^^this page has always worked, because it has no special character names http://anime-planet.com/users/reviewindex.php?usersid=1 ^^the problem child page. The title does now work. Also, here's the tablesorter initialization: $(#userreviewtable).tableSorter({ sortColumn: 'title', stripingRowClass: ['alt2','alt'], stripeRowsOnStartUp: true, textExtractionType: ['title'] }); And one other question: is it possible to do multiple columns for textExtraction (using a comma, two separate lines for it, etc)? There is one other column (score) that in theory should be able to have either nothing, or a number. Note: I'm still down with helping you on the documentation front :) thanks! -kim --- Christian Bach [EMAIL PROTECTED] wrote: Kim, is it possible to publish a test page so i can take a look? A quick fix would be to use the new property textExtractionType - which in true tablesorter spirit is undocumented. Here is a example: This forces the tablesorter to extract data out of the title attribute, allowing a simple way to present mixed data to the user (string/numbers/etc). script $(table).tableSorter({ textExtractionType: ['title'] }); /script table thead tr thRow/th thNumber/th /tr /thead tbody tr td title=1One/td td title=3030.00/td /tr tr td title=22/td td title=50a href=50.000/td /tr /tbody /table Best regards Christian 2007/4/5, Kim Johnson [EMAIL PROTECTED]: Anyone know a workaround for this? :) Christian, any thoughts? -kim, who would really like to not code a bunch of tablesorting tonight in php ;) --- Kim Johnson [EMAIL PROTECTED] wrote: ATTN: Christian or anyone else familiar :) I'm trying to use TableSorter for a few large batches of data, but am getting JS errors depending on what content is in the columns. For example: -Digit-only data works, but MIXED data (ex: some fields are empty, and some have decimal values) fails. -Special characters break the sorting. For example, I have a list of titles and some titles start with special characters (ex: .hack//SIGN, ~To Heart~). This also breaks. I suspect these are breaking
[jQuery] Re: TableSorter issues: special characters, mixed data
Err... I take that back. -the only way for the page to not have javascript errors is to put in the ExtractionType line, due to the special characters in the title. -however, by doing this, any time you sort any other field, it still is sorting by title, not the field you actually clicked. --- Kim Johnson [EMAIL PROTECTED] wrote: Super close, but not quite! :) http://anime-planet.com/users/reviewindex.php?usersid=1 $(#userreviewtable).tableSorter({ sortColumn: 'title', stripingRowClass: ['alt2','alt'], stripeRowsOnStartUp: true, textExtractionCustom: [ [2,'integer'] ], textExtractionType: ['title'] }); ExtractionType fixes the title issue -- those sort just fine now. I also changed the date to 4 digits and that works just fine (it didn't work with the date line you had mentioned for 2 digits). However, the Custom line still doesn't do anything for sorting the score field. (I removed the 0's, as normally those fields would be BLANK, as opposed to 0). I also tried changing [2, 'integer'] to 'decimal' or 'double', to no avail. Any ideas on this last tiny bit? thanks again, -kim --- Christian Bach [EMAIL PROTECTED] wrote: I took a look at your example page and this snippet will solve your problem: $(#userreviewtable).tableSorter({ sortColumn: 'title', stripingRowClass: ['alt2','alt'], stripeRowsOnStartUp: true, textExtractionCustom: [ [2,'integer'] ], dateFormat: dd/mm/yy }); What we are doing here is forcing the third column (we start counting at zero) to use the integer parser, since the column is messed up with the auto detection and identified as a text column (hey, no ones perfect). As regarding your date format 01/01/07 i have added this to the shortDate parser, however since the year is formatted with two digests the parser will parse 07 as 1997 since there is no way for it to know that you properly mean 2007. So my suggestion is to change this to a full 4 digit year format. If you do change the the year to a 4 digit format remove the dateFormat property from the tablesorter constructor. The new tablesorter version can be found here: http://dev.jquery.com/browser/trunk/plugins/tablesorter/jquery.tablesorter.js?format=txt Best regards Christian 2007/4/5, Kim Johnson [EMAIL PROTECTED]: Thanks Christian! I just pasted that in and indeed, now there isn't a JS error and it sorts correctly by title. However, now something strange is happening and the other fields don't sort -- they all sort by title! The date specifically is what I just tried. Here are two sample pages: http://anime-planet.com/users/reviewindex.php?usersid=19 ^^this page has always worked, because it has no special character names http://anime-planet.com/users/reviewindex.php?usersid=1 ^^the problem child page. The title does now work. Also, here's the tablesorter initialization: $(#userreviewtable).tableSorter({ sortColumn: 'title', stripingRowClass: ['alt2','alt'], stripeRowsOnStartUp: true, textExtractionType: ['title'] }); And one other question: is it possible to do multiple columns for textExtraction (using a comma, two separate lines for it, etc)? There is one other column (score) that in theory should be able to have either nothing, or a number. Note: I'm still down with helping you on the documentation front :) thanks! -kim --- Christian Bach [EMAIL PROTECTED] wrote: Kim, is it possible to publish a test page so i can take a look? A quick fix would be to use the new property textExtractionType - which in true tablesorter spirit is undocumented. Here is a example: This forces the tablesorter to extract data out of the title attribute, allowing a simple way to present mixed data to the user (string/numbers/etc). script $(table).tableSorter({ textExtractionType: ['title'] }); /script table thead tr thRow/th thNumber/th /tr /thead tbody tr td title=1One/td td title=3030.00/td /tr tr td title=22/td td title=50a href=50.000/td /tr /tbody /table Best regards Christian 2007/4/5, Kim Johnson [EMAIL PROTECTED]: Anyone know a workaround for this? :) Christian, any thoughts? === message truncated === Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit
[jQuery] How to change form data before submitting to form plugin?
Hi again folks, Almost finished with the form validation/form plugin combo! A quick question: I have a password field that I'd like to encrypt before sending via ajaxSubmit (a simple MD5 call would suffice). I know I can use beforeSubmit to do things, but am not sure how to physically change a value. I've attempted various things with jqForm and formData to no avail -- is it a correct assumption that there's no way to have the beforeSubmit function be call by reference? Regardless, I downloaded a JS MD5 script, just am not sure how to change the value before submitting. Thanks1 -kim It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. http://tools.search.yahoo.com/toolbar/features/mail/
[jQuery] Re: Badly need help with ajaxForm/validator
I wrote to Dan privately thanking him for this info, but want to point it out to the list too -- this is a GREAT presentation for those who are interested in cementing jquery knowledge, and the examples are top notch. Thanks again Dan! --- Dan G. Switzer, II [EMAIL PROTECTED] wrote: Kim, I just did a presentation where I put together a demo that does all of these things. Go to my blog and download my presentation: http://blog.pengoworks.com/blogger/index.cfm?action=blog:585 Now the examples are in ColdFusion (not PHP), but you should be able to follow the logic w/out a problem. The examples you're most interested in are examples 2.2 2.5. In example 2.2 I just show a working example of a form submitting back to itself (for signing up for a mailing list--but the logic is the same for what you're doing.) In example 2.3 thru 2.5 I show the progression of adding unobtrusive JS using jQuery to eventually build a form that will validate on the client side, submit to the server via AJAX, do server side validation, and then display the appropriate message based on whether the operation was successful or not (this is in ex2.5_mailing_list_validation_ajax.cfm.) (NOTE: Messages in Example 2.5 coming from an AJAX operation have the string [AJAX] appended to them so you can see the difference.) You can view the files here: http://www.pengoworks.com/workshop/jquery_demo/ (FYI - Some of the other examples may not work properly, because I wrote them for a newer version of CF than I have on my server. However, the examples that you're concerned about work fine.) -Dan -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kim Johnson Sent: Tuesday, April 03, 2007 3:48 AM To: jquery-en@googlegroups.com Subject: [jQuery] Badly need help with ajaxForm/validator I've been working on this for three days and can't for the life of me figure out the best solution. I have a login area on every page. My (old but working) code is the following: $(div#login input#login_btn).click(function() { $.ajax({ type: POST, url: /users/login.php, data: (login=1username= + username + password= + pw), dataType: html, success: function(msg){ window.location.reload(true); }, async: false }); return false; }); Note that I don't have any error handling hooked up. On login.php, it sets a cookie; then, when the page reloads, it sees the cookie and shows the logout form instead. I now want to do two things: hook up Mike's form plugin, and Jorn's validator. I saw the example at the validator demo page for it + ajax but can't figure out how to customize it for what I need. I tried implementing this: $(#loginform).validate({ submitHandler: function(form) { jQuery(form).ajaxSubmit({ dataType: html, success: function(json) { if(result.status) { v.showErrors(result.data);} else{ window.location.reload(true); } } }); } }); This doesn't work, but I can't say I'm surprised. I don't understand JSON (usually just use HTML/responsetext), but don't know how to get this to work with it. Things I need: 1. validation to be done before ajaxform/submit is called (right now it's basic -- make sure username/password is populated). I can get this to work with plain old validator (no ajax used) 2. validation errors from login.php to be outputted if there are any (specifically, if the username/password don't work, I have a generic error message I need to pass back to display) 3. window.reload to be called if everything worked I know this is a vague request, but can anyone help me out? Arrgh, I have to have this done by Thursday and am about ready to throw my monitor through the window :( thanks, -kim ___ _ It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. http://tools.search.yahoo.com/toolbar/features/mail/ Don't get soaked. Take a quick peek at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather