[jQuery] Re: New Google Browser announced
I love it! No non-sense web browsing. I'll still keep firefox for development of course, but I'll definitelly recommend it for general use. 2008/9/2 Giovanni Battista Lenoci [EMAIL PROTECTED] Is out! :-) -- gianiaz.net - web solutions p.le bertacchi 66, 23100 sondrio (so) - italy +39 347 7196482 -- Cheers, Diego A.
[jQuery] Select nodes with namespaced attribute
I have a similar question to the one I posted here before, except this time I have no workaround. I have an xml document as follows: node name at:datasource=xyzJohn/name nameJane/name /node I need to select all nodes that have the (at:datasource) attribute. The CSS3 selector is [at|datasource], but this doesn't seem to work in jQuery. Does anyone have any advice on how to do this? -- Luke Van In Alio Technologies www.aliotech.com
[jQuery] Context menus in Opera?
Hi, Does anyone know of a context menu or right-click override (jquery or otherwise) that works in Opera? I've found that the contextmenu plugin (http://www.trendskitchens.co.nz/jquery/contextmenu/) works great in IE and Firefox (though has problems being assigned to hyperlinks), but none appear to work in Opera. Cheers, Sean
[jQuery] jquery in rails/rjs files
Is it possible to use jquery in rails rjs files? I have a lot of files like: page[:item].replace_html render :partial = foo page.call 'update_basket' . . . I just looked at jquery and I would like to replace all my prototype code. But when I do not include prototype page.call does not work with an error message: Ajax not defined Is there a way to solve this problem? Thanx
[jQuery] a couple jGrowl tweaks
Hey Folks, So... faced with the challenge of how to elegantly display query results on top of a google map (queries from assorted data services, such as geonames, etc), I settled on jGrowl. The look was right, the controls were right... just a few things I needed to tweak. I figured I'd post the problems and solutions in case they're of use to anyone, and in hopes that if someone knows of a better way to accomplish the same, they might offer advice, as I'm still rather new to all of this. So... 0) Retarget jGrowl towards a customDiv with customJGClass. customJGClass is then positioned overtop the map. 1) We need to limit how much space jGrowl can take up on the map. Overflow could work, but is awkward, ugly, or inelegant. Better would be if we simply limit the number of Growls that can appear in the customDiv jGrowl. To do this, we use jGrowl's beforeOpen function as follows. var checkGrowlLimit= function (e,m,o) { var queryResultsObj =this.find('.jGrowl-notification').slice(1); // skip the spaceholder if (queryResultsObj.length (o.maxGrowls || 6) ) { queryResultsObj.eq(0).children('div.close').unbind('click.jGrowl').parent().remove(); } } and use jQuery('#customDiv').jGrowl('A message!',{sticky:true,beforeOpen:checkGrowlLimit}); This also supports adding a new option of maxGrowls. Problems: * If we try to make that a while loop, such that setting maxGrowls of 2 would prune away the extra additional growls... it crashes FF3. I'm sure theres an obvious reason why, but I'm missing it. * We can't support animation on the checkGrowlLimit, because if we used the closing animations, then spamming the Growler would result in the same growl being targetted for destruction multiple times... in other words, we could spam past the limit. 2) However, some of these jsonp queries are multi tiered and take 30-40 seconds. (Parcel queries, through a geoserver web feature server... first we query a parcel status layer, response determines if there is data, and if so, where we should look for it). Thats entirely too long to go without showing the user that something is actually happening. Therefore, we'd like to show a message or spinner of some brand or another in a Growl, and then replace it with our data, once the json arrives. But how can we target a specific Growl? To do this, we will make use of the jGrowl's theme options. Setting a theme simply sets a class for the jGrowl. id might be better, but I don't know of any way to set the id of a Growl, so we'll have to make do with class. function queryWithFeedback() { var d = new Date(); var constant = 'arbClass_' +d.getTime() ; . {sticky:true,beforeOpen:checkGrowlLimit,theme:constant + ' default'} makes for a reliably unique class. After that, once our final query returns, we just declare the growl once, and then jQuery('#customDiv').find('.'+constant).find('.message').text('Our new message!'); Problems * close and beforeClose will use the original message rather than the new one. In any case, those are the tweaks. They work, but I suspect there are better ways of handling the issues, and would welcome any feedback/advice. Thanks! Josh
[jQuery] Jumpy, unpredictable hover() in Firefox
Hi, I've got some hover effects in my menu that go a bit crazy, only in Firefox. It works fine in Safari (and IE, I'm fairly sure). //=== // I slimmed this code down, but it's the same.. // Hide submenu only if it's not current, or not parent of current $(#menu .trigger:not(.current_parent, .current) ul).hide(); // .trigger will slide open submenu only if it's not current, or not parent of current submenuTrigger = $(#menu .trigger:not(.current_parent, .current)); submenu = $(#menu .trigger ul); // Open submenu on hover over trigger submenuTrigger.hover(function() { submenu.slideDown(500); }, function() { // do nothing } ); // Close submenu on hover away from #menu submenuTrigger.parent().hover(function() { // do nothing }, function() { submenu.slideUp(500); }); // div id=menu ul lia href=#Home/a/li lia href=#Line up/a/li li class=trigger current_parenta href=#Competitions/a/li ul li class=currenta href=#Kiteboarding/a/li lia href=#BMX/a/li lia href=#Skate/a/li lia href=#Scooters/a/li lia href=#Bikini and Boardshorts/a/li lia href=#Coconet Cuties/a/li /ul lia href=#Get Involved!/a/li lia href=#Accommodation/a/li lia href=#Contact Us/a/li /ul /div //== Link: http://coconetclassic.net.au/ Thanks for your help! Daz
[jQuery] Re: every item shown regardless of letter typed
sorry about the missing code! it's quite simple: --- $(document).ready(function(){ $(#client).autocomplete(data.json, { parse: function(data) { return $.map(eval(data), function(row) { customers = data; return { data: row, value: row.name, result: row.name } }); }, minChars: 2, width: 263, formatItem: function(item){ return item.name; } }) }); and here is the little json thingy: { customers:[ { name: A, project:[ {name: p1}, {name: p2}, {name: p3} ] }, { name: B, project:[ {name: p1}, {name: p2}, {name: p3}, {name: p4}, {name: p5} ] }, { name: C, project:[ {name: p1}, {name: p2} ] } ] } should be easy peasy, shouldn't it? On 3 Sep, 00:44, MorningZ [EMAIL PROTECTED] wrote: What can cause this? that would be your code... but where and when and how is unknown with what little you provide
[jQuery] Needs help with Growl
Can someone please help me implement growl? I am struggling to find any documention for a simple implementation of this plugin. I have tried the standard code script type=text/javascript src=~/javascript/Growl/growl.js/ script script type=text/javascript src=~/javascript/Growl/ mootools-1.2b2.js/script script type=text/javascript $(document).ready ( Growl.Smoke({ title: apos;Window.Growl By Daniel Motaapos;, text: apos;http://icebeat.bitacoras.comapos;, image: apos;growl.jpgapos;, duration: 2 }); } /script which is what the plugin page implies. Technically, all I want is for it to appear when the page is loaded. All i keep getting is Syntax Error. Thanks in advance for any help. James
[jQuery] Re: error $ not defined
You got it. here you go. the file is located in c:/inetpub/wwwroot/domain and the jquery file is located in c:/inetpub/wwwroot/domain/js/jquery-1.2.6.min.js html head script type=text/javascript src=js/jquery-1.2.6.min.js/script script type=text/javascript $(function(){ $(a).click(function(event){ event.preventDefault(); // prevent the default action - which in the case of a means 'don't go there' $(this).hide(slow); //Hide the element - slowly :) }); $(a).addClass(test); // adds the class 'test' to ALL a links $(#orderedlist).addClass(red); // Add the class 'red' to the element named orederedlist $(#orderedlist li).addClass(blue); //Add the class 'blue' to any list item immediately under the id orderedlist $(#orderedlist li ul li).addClass(green); $(#orderedlist li ul li:last).addClass(purple); }); /script style type=text/css a.test { font-weight: bold; } .red {border: 1px solid red;} .blue {color:blue;} .green {color:green;} .purple {color:#663366;} /style /head body pa href=# class=clickmejQuery/a a href=Link/a/p ul id=orderedlist liHello ul liWorld/li /ul /li liThisis my ul liFriend/li liSam/li /ul /li /ul /body /html
[jQuery] Autocomplete - every item shown regardless of letter typed
Oops, sorry aboute the missing code $(document).ready(function(){ $(#client).autocomplete(data.json, { parse: function(data) { return $.map(eval(data), function(row) { customers = data; return { data: row, value: row.aname, result: row.name } }); }, minChars: 2, width: 263, formatItem: function(item){ return item.name; } }) }); the html is just a input-field, and the json have this structure: { customers:[ { name: A, project:[ {name: project1}, {name: project2}, {name: project3} ] }, { name: B, project:[ {name: project1}, {name: project2}, {name: project3}, {name: project4}, {name: project5} ] }, { name: C, project:[ {name: project1}, {name: project2} ] } ] } On 3 Sep, 00:44, MorningZ [EMAIL PROTECTED] wrote: What can cause this? that would be your code... but where and when and how is unknown with what little you provide
[jQuery] Re: need help with opacity
Ack, that's a bit of a blow :) Time to rethink my design concept... Thanks Tom. On 2 sep, 17:11, Cybernoxa [EMAIL PROTECTED] wrote: div img src=photo.jpg / /div and I'm doing a simple css thing to control theopacity: $(div).css({opacity: 0.11}); Hi Bob - sorry for my english ;) As img is a child of div it takes the opacity from it's parent, so there's nothing you can do. When you set opacity: 1 for img it just mean that it has the same opacity as its parent (11%). The only thing you can do IMHO is to place the img outside the div and position it into right place. I hope I helped ;) Tom
[jQuery] Re: best techniques to optimize loading of multiple libraries?
Thanks so much Mike! Got it! :) Cheers! Alex On Sep 2, 6:33 pm, Michael Geary [EMAIL PROTECTED] wrote: No worries on being pedantic, Alex. If I'd been working 24 hours straight, I'd be worried I might understand a critical detail too. Yes, I do mean to have you concatenate all of jquery.js along with the plugin and your code into a single large .js file, and have your loader.js create a dynamic script element to load that single file (or a packed/minified/gzipped version of it). No, it won't cause you any problems to concatenate jquery.js along with your other files. There's nothing special about jquery.js; it's just a .js file like any other. There is one problem you can run into when you concatenate files. If one source file has a missing semicolon at the very end, then when you append another file, the JS interpreter may combine statements in a way you didn't intend. This shouldn't be a problem for jquery.js and a typical plugin, but it you want to be absolutely sure, simply add a ; between each source file. You can make that part of a separator line if you want, perhaps like this: ;// jquery.js goes here ;// Plugin goes here ;// Your script goes here ;// That way you get a nice visual separation between the scripts, and the extra semicolons won't hurt anything. -Mike From: Alex Weber Sent: Tuesday, September 02, 2008 2:07 PM To: jQuery (English) Subject: [jQuery] Re: best techniques to optimize loading of multiple libraries? Thanks again Mike! I reckon I have it down to a 'T' now! :) Just one doubt (sorry i've taken so much of your time already!): When you say: Concatenate all of your scripts into a single file. Do you mean the entire jquery library as well? Is this feasible? Like, copy and paste the entire jquery library (uncompressed), one plugin, and my custom code into one huge .js file and then pack or minify it? And host it somewhere fast like cachefly? I can see doing this for the plugin and my custom js but jquery also seems asking for trouble no? Or am i not getting it? Did you mean dynamically append loader.js in the main document body, and then in loader.js have 3 separate script src? (wait does that even work?) sorry its late here ive been on a crazy reching on 24 hour work bender :S Thanks again and sorry for being so pedantic!! Alex On Sep 2, 4:40 pm, Michael Geary [EMAIL PROTECTED] wrote: From: Alex Weber So just to clear things up, you prefer using document.write() to insert script tags instead of appending the elements to the DOM: var finan = document.createElement('script'); finan.type = 'text/javascript'; finan.src = 'http://www.mydomain.com/js/mts_finan.js'; head.appendChild(finan); i guess its more efficient because you don't have to access the document object, but any other particular reasons? No, that isn't the reason at all. It's because it makes the code much simpler. You don't have to write any code to load the scripts in their proper sequence; it happens automatically. script tags are evaluated in the order they appear in the source code, and code you add with document.write is inserted immediately after the end of the script tag that does the document.write. Dynamically inserting a script element with createElement/appendChild is a great technique - in fact it's the basis for the popular JSONP method of cross-domain JSON downloads - but it doesn't automatically tell you when the script is loaded. That why your developer wrote that repeating interval code - to check when each script is ready and load the next one in sequence. Awesome, one huge problem out of the way! Well, maybe, maybe not... :-) See below... We're currently at a point where our server isn't exactly being overloaded so i think its safe to host jquery.min on google code and the plugin (yet to be minified) and custom code possibly combined in 1 file, since there won't be a lot of custom code to begin with. Also, to satisfy your curiosity, the whole purpose of using the mts_load.js function is because this code is a part of a banner we're planning to distribute and host in numerous websites, so a lot of them won't want scripts other than their own embedded directly, so we found that calling one simple function (mts_load) that would to all the dirty work was acceptable with them :) When I recommended document.write, I wasn't really thinking about the whole context. There may be one good reason to use the dynamic script elements instead. When you document.write the script tags,
[jQuery] Re: jquery validation plugin problem in textarea [validate]
The required method uses $.trim on the value first, before checking the length. \n is considered whitespace and therefore ignored. So a textarea that contains nothing but \n is invalid for the required method. Does that answer your question? Jörn On Tue, Sep 2, 2008 at 7:01 PM, Andy [EMAIL PROTECTED] wrote: I mean is it suppporting the newline (\n) character to be validated before passed through to another page? because mine doesnt seem to work On Sep 2, 11:55 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Work? Like submitting the form when pressing enter in a textarea? How is that related to the validation? Jörn On Tue, Sep 2, 2008 at 6:44 PM, Andy [EMAIL PROTECTED] wrote: If users press enter or newline on textareas it doesnt seem work On Sep 2, 10:47 pm, andy prasetyo [EMAIL PROTECTED] wrote: Ok, Jorn here it is :http://d661480.u34.strictlywebhosting.com/register.html..really appreciate your help and guidance Thanks On Sep 2, 10:40 pm, andy prasetyo [EMAIL PROTECTED] wrote: ok one min let me upload..it doesnt seem to pass the value if i use \n (newline) On Sep 2, 10:17 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Could you be more specific, eg. provide a testpage? Jörn On Tue, Sep 2, 2008 at 2:05 PM, andy prasetyo [EMAIL PROTECTED] wrote: I usejquery validationplugin from bassistance.de, but everytime i use it on textarea, it doesnt work (doesnt pass the value properly). Any suggestions?
[jQuery] Re: Autocomplete - every item shown regardless of letter typed
Looks like a typo in your parse implementation: value: row.aname, should be value: row.name, Jörn On Wed, Sep 3, 2008 at 8:32 AM, foxtrot [EMAIL PROTECTED] wrote: Oops, sorry aboute the missing code $(document).ready(function(){ $(#client).autocomplete(data.json, { parse: function(data) { return $.map(eval(data), function(row) { customers = data; return { data: row, value: row.aname, result: row.name } }); }, minChars: 2, width: 263, formatItem: function(item){ return item.name; } }) }); the html is just a input-field, and the json have this structure: { customers:[ { name: A, project:[ {name: project1}, {name: project2}, {name: project3} ] }, { name: B, project:[ {name: project1}, {name: project2}, {name: project3}, {name: project4}, {name: project5} ] }, { name: C, project:[ {name: project1}, {name: project2} ] } ] } On 3 Sep, 00:44, MorningZ [EMAIL PROTECTED] wrote: What can cause this? that would be your code... but where and when and how is unknown with what little you provide
[jQuery] Re: jquery in rails/rjs files
A quick Google turned up this: http://yehudakatz.com/2007/01/31/using-jquery-in-rails-part-i/ Karl Rudd On Wed, Sep 3, 2008 at 4:38 PM, Jochen Kaechelin [EMAIL PROTECTED] wrote: Is it possible to use jquery in rails rjs files? I have a lot of files like: page[:item].replace_html render :partial = foo page.call 'update_basket' . . . I just looked at jquery and I would like to replace all my prototype code. But when I do not include prototype page.call does not work with an error message: Ajax not defined Is there a way to solve this problem? Thanx
[jQuery] Why this simple code doesn't work ?!?
Hi, I have this simply code and I don't know where is the problem: The script: ** $(document).ready(function(){ $('#button').click(function(){ var data = 'input type=button value=push class=new_buttonbr /'; $('#test').append(data); lets_go(); }); }); function lets_go(){ $('.new_button').click(function(){ alert ('hello'); }); } *** And the HTML: *** input type=button id=button value=make a new button / br /br /br / div id=test/div Ok, that's all. Why when I make a few buttons and click, the alert-box pops as many times as buttons are below? Test on Firefox. How can I resolve this?? Thanks a lot!
[jQuery] Re: jquery validation plugin problem in textarea [validate]
Hi Jorn, thanks for replying What i meant was, if for example, an a'ddress' textarea, users will input his address and there will must be newline(\n) character there. It's validated for sure with jquery validation plugin but it doesnt seem to send the value in the textarea, as it is read as not as + (like on input field). However i have worked around this by adding a function to be activated in onblur condition. Here's the function : function doThing(t) { var v = t.value.replace(/\r\n|\n|\r/g, ); t.value = v; } It works, but just want to know if there are any other way simpler than this. Thanks On Sep 3, 5:58 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: The required method uses $.trim on the value first, before checking the length. \n is considered whitespace and therefore ignored. So a textarea that contains nothing but \n is invalid for the required method. Does that answer your question? Jörn On Tue, Sep 2, 2008 at 7:01 PM, Andy [EMAIL PROTECTED] wrote: I mean is it suppporting the newline (\n) character to be validated before passed through to another page? because mine doesnt seem to work On Sep 2, 11:55 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Work? Like submitting the form when pressing enter in a textarea? How is that related to the validation? Jörn On Tue, Sep 2, 2008 at 6:44 PM, Andy [EMAIL PROTECTED] wrote: If users press enter or newline on textareas it doesnt seem work On Sep 2, 10:47 pm, andy prasetyo [EMAIL PROTECTED] wrote: Ok, Jorn here it is :http://d661480.u34.strictlywebhosting.com/register.html..really appreciate your help and guidance Thanks On Sep 2, 10:40 pm, andy prasetyo [EMAIL PROTECTED] wrote: ok one min let me upload..it doesnt seem to pass the value if i use \n (newline) On Sep 2, 10:17 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Could you be more specific, eg. provide a testpage? Jörn On Tue, Sep 2, 2008 at 2:05 PM, andy prasetyo [EMAIL PROTECTED] wrote: I usejquery validationplugin from bassistance.de, but everytime i use it on textarea, it doesnt work (doesnt pass the value properly). Any suggestions?
[jQuery] Re: jQuery test suite on new Google Chrome browser
Matt Kruse wrote: On Sep 2, 2:45 pm, Guyon Morée [EMAIL PROTECTED] wrote: Even though, Chrome seems to be a little bit faster than FF and quite a lot faster than IE, it has 2 failed tests: - 64: core module: text(String) (1, 3, 4) I think everyone is missing the whole point of Chrome: It's designed to kill MSIE on corporate networks - http://tinyurl.com/68lvhb Guy
[jQuery] need to display a number of items based on browser size, before i get to run any js
Hi. Today, i've got a chicken-and-egg puzzle for your enjoyment :) In order to properly support google indexing of published content hosted by my CMS', which scales to browser-size, no matter what it is initially or how the user resizes it. Adding meta info for the many pictures hosted via my CMS would greatly increase natural search results. In order to get them indexed, i need to provide google with URLs that contain the complete page's content. Pictures and their descriptions included. How many thumbnails get displayed is therefore dependent on (initial) browser-size. So I need to know the browser size in the _initial_ php call to my site. To my knowledge, that's impossible. And besides, google (my target audience for all of this) doesnt execute JS, so i'll have to choose a browsersize for the user when he comes in no matter what. I've come up with this workaround that i'd like your comments and potential improvements on. In the html of some page that is crawled, i have a link that's sorta like this: http://mediabeez.ws/mediaBeez/ clink.php?cmd=desktopmodule=ajaxaction=viewCollectiontarget=misc This should call up a page with a photo-album. Currently, to get smoother loading graphic-performance, i split up the rendering of the desktop that holds the photo-album, and the actual photo-album content. First the desktop (and worker-JS-libs) would be properly loaded and displayed, then a loading icon displayed in the photo album, and then the contents of the photo-album loaded. This mechanism is currently used on the link above. The best solution i can come up with till now is to pre-load IMGs and descriptions for a desktop 1024x768 in size, then on running of the photoalbum js either remove some images or (if i have too few) call my render_album_contents() again via AJAX with the proper desktop size. With google analytics i could see what browsersize gets used most, and set the default to that, to reduce double-calls to the kinda-expensive render_album_contents() which calls up much meta-info related to the pictures. The main problem i see with this approach is for pagination. The initial link for the 'next page' button should be a static one per default browsersize (for google's indexing) but on running it this should change back to a JS call that takes that particular users' browser size in account. I guess that could be achieved with the photo-album js changing the link at pageLoad(), but it could be tricky. What i'd like to know from you is if you can see any other way to achieve google-indexing of all pages of a photo-album that resizes to browser size..
[jQuery] Re: Query String Object plugin help
Hi Brett, JavaScript is case-sensitive. You've declared the variable as BlueSky, with an uppercase S, but you're referring to it as Bluesky, with a lowercase s. It's been helpful for me to stick to a convention. For my JavaScript variables, I use the lower-camel-case convention: start with lowercase and then uppercase new words. So if I were writing the variable, I'd do it as blueSky. But that's just a personal preference on my part. The important thing is to choose a convention and stick to it. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Sep 3, 2008, at 3:54 AM, [EMAIL PROTECTED] wrote: Hi All, First time jQuery user and poster here. I'm trying to grab the value of a querystring using the Query String Object plugin. Here is my code (along with some 'curvy corners' jQuery): $(document).ready(function(){ $('.announce').corner({ tl: false, tr: { radius: 16 }, bl: { radius: 16 }, br: false, antiAlias: true, autoPad: true, validTags: [div] }); $('#reportOptions').corner({ tl: false, tr: { radius: 16 }, bl: { radius: 16 }, br: false, antiAlias: true, autoPad: true, validTags: [div] }); var BlueSky = $.query.get('BlueSky'); if (Bluesky == 1) { $('#header').hide(); $('#footer').hide(); $('#nav').hide(); } }); Whenever I load up my page I get 'Bluesky' is undefined. Obviously I want to check if Bluesky is 1 and hide my ids. Any ideas where I'm going wrong? Thanks, Brett
[jQuery] Re: best techniques to optimize loading of multiple libraries?
There's quite a few ways! :) You can use this link to do it directly from your browser: http://fmarcia.info/jsmin/test.html Or if you're more skeptical the original implementation and ports to every programming language you can eat with a spoon are here: http://javascript.crockford.com/jsmin.html Caution: When doing any sort of javascript (or code in general) compression do test thoroughly before and after... stuff like missing semicolons (as mentioned by Mike) can really fudge your code! :) On Sep 3, 12:44 am, viktor [EMAIL PROTECTED] wrote: How do you minify a .js file? On Aug 29, 11:04 pm, Bil Corry [EMAIL PROTECTED] wrote: Alex Weber wrote on 8/29/2008 10:15 AM: i'd rather use packed then minified though :) Use minified, not packed. Although a packed file is smaller, it's overall performance is worse when compared to minified: - This means, in the end, that using a minifed version of the code is much faster than the packed one - even though its file size is quite larger. http://ejohn.org/blog/library-loading-speed/ - - Bil
[jQuery] Re: Why this simple code doesn't work ?!?
It's because you are rebinding the existing buttons *again* with your event lets_go So like you start off with: - | Make a new button | - You create a new button and call lets_go - | Make a new button | - -- | push | -- You push that, and it alerts as it should Now you add another button - | Make a new button | - -- | push | -- -- | push | -- and after creating that second button, you call your lets_go function lets_go() { $('.new_button').click(function() { alert('hello'); }); } Well, for that *first* button, it already had that event attached to it, so you just attached it again, hence it will run twice! easy fix, one line to change function lets_go() { $('.new_button').unbind(click).click(function() { alert('hello'); }); } that will first clear out any existing click events before adding it back on
[jQuery] Re: jQuery test suite on new Google Chrome browser
According to a site called GetClicky, Chrome already has 2.8% market share: http://getclicky.com/chrome/ -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Kruse Sent: Tuesday, September 02, 2008 4:49 PM To: jQuery (English) Subject: [jQuery] Re: jQuery test suite on new Google Chrome browser On Sep 2, 2:45 pm, Guyon Morée [EMAIL PROTECTED] wrote: Even though, Chrome seems to be a little bit faster than FF and quite a lot faster than IE, it has 2 failed tests: - 64: core module: text(String) (1, 3, 4) This looks like a bug in Chrome to me. It doesn't escape characters when inserting text nodes. I would have to check the specs to be sure that escaping of is required. - 112: ajax module: jQuery.param() (1, 3, 4) This appears to be a bad assumption in the jQuery tests. The code in param() calls: for ( var j in a ) and makes the assumption that the keys will be returned in the same order they are specified. This is not an assumption that should be made, so the test should be changed to allow for the returned string to be in arbitrary key order. Otherwise it's great to see that everything else passes! Surely this will be a browser that will gain user share at some point, IMO, and it's better to be ahead of the curve than playing catch-up. Matt Kruse
[jQuery] Re: jQuery test suite on new Google Chrome browser
Makes sense because Chrome is based on WebKit just like Safari. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of timothytoe Sent: Tuesday, September 02, 2008 5:49 PM To: jQuery (English) Subject: [jQuery] Re: jQuery test suite on new Google Chrome browser That sounds suspiciously like what Safari does in some cases: http://dreaminginjavascript.wordpress.com/2008/07/06/a-challenge/ On Sep 2, 2:49 pm, Matt Kruse [EMAIL PROTECTED] wrote: On Sep 2, 2:45 pm, Guyon Morée [EMAIL PROTECTED] wrote: Even though, Chrome seems to be a little bit faster than FF and quite a lot faster than IE, it has 2 failed tests: - 64: core module: text(String) (1, 3, 4) This looks like a bug in Chrome to me. It doesn't escape characters when inserting text nodes. I would have to check the specs to be sure that escaping of is required. - 112: ajax module: jQuery.param() (1, 3, 4) This appears to be a bad assumption in the jQuery tests. The code in param() calls: for ( var j in a ) and makes the assumption that the keys will be returned in the same order they are specified. This is not an assumption that should be made, so the test should be changed to allow for the returned string to be in arbitrary key order. Otherwise it's great to see that everything else passes! Surely this will be a browser that will gain user share at some point, IMO, and it's better to be ahead of the curve than playing catch-up. Matt Kruse
[jQuery] Re: New Google Browser announced
Microsoft can't retire IE6 any more than Ford could retire 1996 Ford Explorers. It has to be the user's choice. What's a better suggestion is for WEBSITES to stop supporting IE6 (coding CSS and JS fixes and workarounds) and encourage people to upgrade on their own. _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of chris thatcher Sent: Wednesday, September 03, 2008 6:59 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: New Google Browser announced I hope it's enough for microsoft to retire ie6, but frankly I worry a little bit about the gas giant that google is becoming. I can't see any reason they couldn't simply have given some funding to mozilla and kept providing their services as is, except... to hone their tracking of my browser behavior to improve advertisement placement. Firefox is still my sweet heart, and we're going steady. On Wed, Sep 3, 2008 at 6:17 AM, Diego A. [EMAIL PROTECTED] wrote: I love it! No non-sense web browsing. I'll still keep firefox for development of course, but I'll definitelly recommend it for general use. 2008/9/2 Giovanni Battista Lenoci [EMAIL PROTECTED] Is out! :-) -- gianiaz.net - web solutions p.le bertacchi 66, 23100 sondrio (so) - italy +39 347 7196482 -- Cheers, Diego A. -- Christopher Thatcher
[jQuery] Simple Templates
Introducing a new jQuery plug-in, Simple Templates: http://andrew.hedges.name/blog/2008/09/03/introducing-jquery-simple-templates One thing I have missed from my Prototype days (shudder, I know!) is simple, built-in templating. I know there are other templating plugins, but I liked the Prototype syntax, so I wrote my own. It's only 1009 bytes! Enjoy! -Andrew
[jQuery] Re: jquery validation plugin problem in textarea [validate]
I still don't get what the actual issue. What do you mean with send? Sending via Ajax to the server? To a validation method? Jörn On Wed, Sep 3, 2008 at 1:15 PM, Andy [EMAIL PROTECTED] wrote: Hi Jorn, thanks for replying What i meant was, if for example, an a'ddress' textarea, users will input his address and there will must be newline(\n) character there. It's validated for sure with jquery validation plugin but it doesnt seem to send the value in the textarea, as it is read as not as + (like on input field). However i have worked around this by adding a function to be activated in onblur condition. Here's the function : function doThing(t) { var v = t.value.replace(/\r\n|\n|\r/g, ); t.value = v; } It works, but just want to know if there are any other way simpler than this. Thanks On Sep 3, 5:58 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: The required method uses $.trim on the value first, before checking the length. \n is considered whitespace and therefore ignored. So a textarea that contains nothing but \n is invalid for the required method. Does that answer your question? Jörn On Tue, Sep 2, 2008 at 7:01 PM, Andy [EMAIL PROTECTED] wrote: I mean is it suppporting the newline (\n) character to be validated before passed through to another page? because mine doesnt seem to work On Sep 2, 11:55 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Work? Like submitting the form when pressing enter in a textarea? How is that related to the validation? Jörn On Tue, Sep 2, 2008 at 6:44 PM, Andy [EMAIL PROTECTED] wrote: If users press enter or newline on textareas it doesnt seem work On Sep 2, 10:47 pm, andy prasetyo [EMAIL PROTECTED] wrote: Ok, Jorn here it is :http://d661480.u34.strictlywebhosting.com/register.html..really appreciate your help and guidance Thanks On Sep 2, 10:40 pm, andy prasetyo [EMAIL PROTECTED] wrote: ok one min let me upload..it doesnt seem to pass the value if i use \n (newline) On Sep 2, 10:17 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Could you be more specific, eg. provide a testpage? Jörn On Tue, Sep 2, 2008 at 2:05 PM, andy prasetyo [EMAIL PROTECTED] wrote: I usejquery validationplugin from bassistance.de, but everytime i use it on textarea, it doesnt work (doesnt pass the value properly). Any suggestions?
[jQuery] Anyone know why mouse position inside div is different in Firefox and IE
I have a div and I want to capture the x and y values when there is a click inside the div. This works great in Firefox and Safari but the offset seems to be wrong in IE7. There's a sample page here: http://static1.shopify.com/s/files/1/0003/0911/assets/testclick.html And this is the function that I'm using to get the x and y values: $(#special).click(function(e){ var x = e.pageX - this.offsetLeft + 1; var y = e.pageY - this.offsetTop + 1 ; $('#status2').html('x=' + x +', y='+ y); }); Anyone know what I'm doing wrong here?
[jQuery] Re: jQuery test suite on new Google Chrome browser
Yep. You probably got that from TechCrunch and I tend to agree with their comments that it's a spike due to the newness of the browser and can expect to see that figure drop as people go back to using their standard browsers. Rey Andy Matthews wrote: According to a site called GetClicky, Chrome already has 2.8% market share: http://getclicky.com/chrome/ -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Kruse Sent: Tuesday, September 02, 2008 4:49 PM To: jQuery (English) Subject: [jQuery] Re: jQuery test suite on new Google Chrome browser On Sep 2, 2:45 pm, Guyon Morée [EMAIL PROTECTED] wrote: Even though, Chrome seems to be a little bit faster than FF and quite a lot faster than IE, it has 2 failed tests: - 64: core module: text(String) (1, 3, 4) This looks like a bug in Chrome to me. It doesn't escape characters when inserting text nodes. I would have to check the specs to be sure that escaping of is required. - 112: ajax module: jQuery.param() (1, 3, 4) This appears to be a bad assumption in the jQuery tests. The code in param() calls: for ( var j in a ) and makes the assumption that the keys will be returned in the same order they are specified. This is not an assumption that should be made, so the test should be changed to allow for the returned string to be in arbitrary key order. Otherwise it's great to see that everything else passes! Surely this will be a browser that will gain user share at some point, IMO, and it's better to be ahead of the curve than playing catch-up. Matt Kruse
[jQuery] Re: jQuery test suite on new Google Chrome browser
It's funny how quickly people begin to forget how Firefox is the only browser to-date that has been able to wrestle any market share from Microsoft and force Microsoft back to the standards table. Yep, let's find a way for Google to kill Mozilla. Good thinking Bill. Rey... Bil Corry wrote: Guy Fraser wrote on 9/3/2008 5:22 AM: I think everyone is missing the whole point of Chrome: It's designed to kill MSIE on corporate networks - http://tinyurl.com/68lvhb Converting a few FF users over and saving on the USD $60+ million Google pays Mozilla every year probably doesn't hurt either... - Bil
[jQuery] Re: jQuery test suite on new Google Chrome browser
Rey Bango ha scritto: Yep. You probably got that from TechCrunch and I tend to agree with their comments that it's a spike due to the newness of the browser and can expect to see that figure drop as people go back to using their standard browsers. Rey I've tried chrome, very nice toy and for sure it will cause nightmare to all browsers vendors, but can we live without firefox extensions ? For now I can't change my habits :-) -- gianiaz.net - web solutions p.le bertacchi 66, 23100 sondrio (so) - italy +39 347 7196482
[jQuery] Re: jQuery test suite on new Google Chrome browser
According to getclicky.com, Chrome already has an almost 3% market share: getclicky.com/chrome/ -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Wednesday, September 03, 2008 9:01 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: jQuery test suite on new Google Chrome browser It's funny how quickly people begin to forget how Firefox is the only browser to-date that has been able to wrestle any market share from Microsoft and force Microsoft back to the standards table. Yep, let's find a way for Google to kill Mozilla. Good thinking Bill. Rey... Bil Corry wrote: Guy Fraser wrote on 9/3/2008 5:22 AM: I think everyone is missing the whole point of Chrome: It's designed to kill MSIE on corporate networks - http://tinyurl.com/68lvhb Converting a few FF users over and saving on the USD $60+ million Google pays Mozilla every year probably doesn't hurt either... - Bil
[jQuery] Re: jQuery test suite on new Google Chrome browser
That's a key thing. Firefox has a vast ecosystem of extensions (approx. 5,000+ add-ons). And in the interest of full disclosure,I work for Mozilla and I help manage Mozilla's Firefox extensions site, http://addons.mozilla.org. :D Rey... Giovanni Battista Lenoci wrote: Rey Bango ha scritto: Yep. You probably got that from TechCrunch and I tend to agree with their comments that it's a spike due to the newness of the browser and can expect to see that figure drop as people go back to using their standard browsers. Rey I've tried chrome, very nice toy and for sure it will cause nightmare to all browsers vendors, but can we live without firefox extensions ? For now I can't change my habits :-)
[jQuery] Re: jQuery test suite on new Google Chrome browser
I can see it growing for now. It's new and the whole Net is buzzing about it. Not surprising at all. Rey... Andy Matthews wrote: According to getclicky.com, Chrome already has an almost 3% market share: getclicky.com/chrome/ -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Wednesday, September 03, 2008 9:01 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: jQuery test suite on new Google Chrome browser It's funny how quickly people begin to forget how Firefox is the only browser to-date that has been able to wrestle any market share from Microsoft and force Microsoft back to the standards table. Yep, let's find a way for Google to kill Mozilla. Good thinking Bill. Rey... Bil Corry wrote: Guy Fraser wrote on 9/3/2008 5:22 AM: I think everyone is missing the whole point of Chrome: It's designed to kill MSIE on corporate networks - http://tinyurl.com/68lvhb Converting a few FF users over and saving on the USD $60+ million Google pays Mozilla every year probably doesn't hurt either... - Bil
[jQuery] Re: AutoComplete
Your data needs to be returned with a \n between each item returned. If you want to return more information about First and it's all related to that record, you separate that data with a pipe | [First\nSecond\nThird] or [First|Name\nSecond|Name] On Jul 21, 5:02 pm, shapper [EMAIL PROTECTED] wrote: Hello, I have a JQuery AutoComplete thats gets the value using JSon. Using Firebug I see that the values are being returned in the right way: [First,Second] But I get an error: value is undefined highlight()()JQuery.A...mplete.js (line 409) fillList()JQuery.A...mplete.js (line 648) display()()JQuery.A...mplete.js (line 666) receiveData()JQuery.A...mplete.js (line 316) success()()JQuery.A...mplete.js (line 355) success()JQuery.js (line 2818) onreadystatechange()()JQuery.js (line 2773) [Break on this error] return value.replace(new RegExp((?![^...^;] +;), gi), strong$1/strong); My AutoComplete is as follows: $(#Subjects).autocomplete(GetSubjects, { autoFill: true, cacheLength: 1, multiple: true, scrollHeight: 200, selectFirst: false, width: 260, parse: function(data) { return $.map(eval(data), function(row) { return { data: row, value: row.Value, result: row.Value } }); }, formatItem: function(item) { return item.Value; } }); What am I doing wrong? Thanks, Miguel
[jQuery] Re: jQuery test suite on new Google Chrome browser
OK. I think I see. By the way, I just did some light debugging in Chrome with Firebug Lite. You can poke around in the DOM, which is nice. If anyone wants to try it, the best way to do it is with the latest Firebug Lite (the one that actually FEELS like Firebug, based off the old Pi debugger). Run it as a bookmarklet. javascript:var %20firebug=document.createElement('script');firebug.setAttribute('src','http:// getfirebug.com/releases/lite/1.2/firebug-lite- compressed.js');document.body.appendChild(firebug);(function() {if(window.piwindow.firebug) {firebug.init();}else{setTimeout(arguments.callee);}}) ();void(firebug); On Sep 2, 4:52 pm, Michael Geary [EMAIL PROTECTED] wrote: From timothytoe I'm not 100% sure, but I think you misread Matt's post. Matt seemed to be saying the same thing you are--the order of keys should not be relied upon. If you take out Matt's post, the context for my reply may be more clear... From: Guy Fraser I've never seen an ECMA script compiler (JS, AS, etc) that doesn't iterate through named references in the expected order? From: Michael Geary But there is no expected order in a for..in loop. Any decent JavaScript reference book, such as Flanagan's, should point this out...
[jQuery] Re: jquery flot - integers only on x and/or y axis
did it work for ya On Tue, Sep 2, 2008 at 5:31 PM, faizal iqbaal [EMAIL PROTECTED]wrote: //modiefd ur file copy the code and run it /**/ !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head style type=text/css #graphHolder { border: none; padding: 0px; margin: 10px; height: 200px; width: 400px; font-family: tahoma; font-size: 11px; } #curveData { margin: 10px; } /style title/title script language=JavaScript type=text/javascript src=jquery.js/script script language=JavaScript type=text/javascript src=jquery.flot.js/script !--[if IE]script language=javascript type=text/javascript src=../version/scripts/flot/excanvas.js/script![endif]-- script type=text/javascript $().ready(function(){ $.plot($(#graphHolder),[]); $('#curveData input').change(function() { var d1 = []; $('#curveData tbody tr').each(function() { tr = $(this); pair = []; tr.find('input.qty').val() tr.find('input.price').val() pair.push( tr.find('input.qty').val(), tr.find('input.price').val() ) d1.push( pair ); }); var chartOptions={ yaxis: { min:0 }, color: #bb, data: d1, points: { show: true }, lines: { show: true, fill: true, fillColor: rgba(255, 000, 000, 0.2) } } ; /* $.plot($(#graphHolder), [ { yaxis: { min:0 }, color: #bb, data: d1, points: { show: true }, lines: { show: true, fill: true, fillColor: rgba(255, 000, 000, 0.2) } } ]); */ $.plot($(#graphHolder), [{ data: d1, color:#bb}],$.extend(true, {}, chartOptions, {yaxis: { min: 0 }})); }); }); /script /head body table cellpadding=0 cellspacing=0 id=curveData thead tr th#/th thQuantity/th thPrice/th /tr /thead tbody tr td1/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td2/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td3/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td4/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td5/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td6/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td7/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td8/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td9/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td10/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td11/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr /tbody /table
[jQuery] autocomplete onfocus and other dynamic input
Additional Dynamic Input: I have two input fields. The user types in something in the first field, then needs to type something in the second field. That second field is an autocomplete and needs to send two pieces of info to the server - the current input and the value of the first field. Since the autocomplete is created on the doc ready, if I try to add the first field in the extraParams liek extraParams: {firstfield: ($ ('#firstfield').val())} it sets it as the value at the time the page loads, which is blank. So, how do I send it the additional input? Total results onfocus: If I set the minChars to 0, it does not do an autocomplete on focus. However, if I type one letter then delete it, it sends the parameter as blank. How can I get it to do it onfocus? (This is in the case that the user has no idea what to type in this field, but then I would limit what is returned as they type.)
[jQuery] Re: make a div invisible when it is empty
You almost had it there. Your '#header div empty' selector, though, is looking for elements whose *tagname* is empty, like this: div id=header div emptynot a valid tag!/empty /div /div The selector you want is '#header div:empty'. See: http://docs.jquery.com/Selectors Also, I'm curious: Why are these divs visible in the first place, if they have no content? I guess there's some CSS that gives them some height and width or something? I wonder if you actually want .hide('slow') - maybe just .hide() to hide them without animation? -Mike I am Graphic designer and I use Jquery with Moss (sharepoint) CMS Microsoft, developers of this gas plant have no sense of aesthetics code and optimization. I assumed that with a little magic wand, I was going to do div disappear when they are empty, then yes I could have use easily use. empty (), but generates sharepoint nbsp; and I can not delete upstream. This small function is not much in this case. script type=text/javascript $(document).ready(function () { $(#header div empty).hide(slow); }); /script div id=header div id=Auteur style=nbsp;/div div id=Date style=nbsp;/div div id=accroche-page style=div dir=/ divnbsp;/div /div
[jQuery] Re: New Google Browser announced
Andy Matthews wrote: Microsoft can't retire IE6 any more than Ford could retire 1996 Ford Explorers. It has to be the user's choice. What's a better suggestion is for WEBSITES to stop supporting IE6 (coding CSS and JS fixes and workarounds) and encourage people to upgrade on their own. I think Chrome will sit alongside MSIE - allowing old stuff to be slowly retired while all the new stuff is done through Chrome. More verbose version: http://tinyurl.com/68lvhb Guy
[jQuery] Simple click event
I created an email link, that I want invoked (clicked) on page load. I thought I could simply do: $().ready(function() { $(#thelink).click() }) Do I need to do something else? Thanks.
[jQuery] Dynamic mask
Hey All,A problem so bad... Can I change mask to rich:inputText/? Like this: h:inputText value=(#any) id=edt rich:jQuery selector=#edt query=mask('999.999.999-99') !-- here change to mask('99.999.999/-99') dynamically timing=onload/ /h:inputText
[jQuery] Re: Clash between jQuery UI datepicker 1.5.2 and an ASP.net 3.5 CustomValidator
It works for me. However the syntax Jeff posted is wrong. It should be: $(ctl).datepicker({onSelect: function() {}}); On Sep 1, 5:08 pm, tekanet [EMAIL PROTECTED] wrote: This doesn't work for me: I can't set the onSelect with that syntax, I tried with .bind(onSelect,function(){}) but nothing. Maybe we're using different components.. mine is this: http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/ A further explanation will be much appreciated! On Aug 14, 11:16 pm, Jeff J. [EMAIL PROTECTED] wrote: I also experienced this error. After playing with a few things, doing several searches, and getting far too technical, I discovered a simple solution: $(ctl).datepicker(onSelect: function() {}); Assigning an empty function to the datepicker's onSelect property causes the validation function to not be fired on change. It still fires appropriately on submit. This potentially isn't the best client experience, but it's better than an error, and shouldn't be a problem with the datepicker setting the value. ~ Jeff J. On Jul 29, 6:15 am, Patrick J Collins [EMAIL PROTECTED] wrote: Hello everyone, I'm experiencing a clash between jQuery UI datepicker 1.5.2 and an ASP.net 3.5 CustomValidator. The problem occurs in Internet Explorer 7.0, not in Firefox 2.0. When I change the date using the little drop down calendar, IE throws the following error: Line 172 'length' has a null value or is not an object I did a bit of debugging in both IE and Firefox. Now, in ui.datepicker.js on line 730, the change event is automatically triggered once the user selects a day: else if (inst.input) inst.input.trigger('change'); // fire the change event From there, jquery.js on line 2020 triggers the actual event: if ( (!fn || (jQuery.nodeName(elem, 'a') type == click)) elem[on+type] elem[on+type].apply( elem, data ) === false ) val = false; And finally we wind up in the ASP.net javascript, to which I have added a few comments. function ValidatorOnChange(event) { if (!event) { event = window.event; } Page_InvalidControlToBeFocused = null; var targetedControl; if ((typeof(event.srcElement) != undefined) (event.srcElement != null)) { // Internet Explorer always enters this branch. event.srcElement contains a reference to an // anchor (tagName = “A”) targetedControl = event.srcElement; } else { // Firefox always enters this branch. event.target contains a reference to the input box. targetedControl = event.target; } var vals; if (typeof(targetedControl.Validators) != undefined) { vals = targetedControl.Validators; } else { if (targetedControl.tagName.toLowerCase() == label) { targetedControl = document.getElementById(targetedControl.htmlFor); vals = targetedControl.Validators; } } var i; // Internet Explorer fails on this line, as vals is undefined. for (i = 0; i vals.length; i++) { ValidatorValidate(vals[i], null, event); } ValidatorUpdateIsValid(); } I'm afraid I don't really understand javascript well enough to determine the reason for the difference in behavior. Could anyone else suggest why this is happening? After some Googling, I discovered this forum post which hints at a similar problem: http://www.zapatec.com/website/forums/viewtopic.php?t=164 I refer specifically to jahoog's post where he says: It seems the problem in IE is that the '.onchange()' syntax does not pass the event information correctly. Could that perhaps be the problem here? Must appreciated, Patrick Collins France
[jQuery] Re: jQuery test suite on new Google Chrome browser
Chrome is pretty exciting as it's not just another browser but one that sets to up-the-bar. I think it definitely gives other vendors food for thought. As to whether it would kill IE? I'm sure it will take some of IE's share but only after exhausting FF, Opera and Safari's market... I expected this list to be more excited about V8 rather than Chrome itself ;) -- Ca-Phun Ung + http://yelotofu.com
[jQuery] Change link dependant on select box.
Hello Guys, I'm looking for some help on getting started with a script that'll change the href attribute of a link dependant on the option selected in a select box. To add a little 'spice' the challenge the value of the href must be determined from a set of key value pairs. Let me try and offer an example. I have a select box like this: select name=customer id=customer option value=1Joe Bloggs/option option value=2Dave Something/option /select And the link which I want to change dependant on the selection looks something like this: a href=/view_customer_company.cfm?company_id=6View Customers Company/a I've highlighted the bits in red which I wish to make dynamic dependant on the option chosen in the select box. Where I've put 'customers' I want to dynamically change to the option text, such as 'Joe Bloggs' or 'Dave Something' and the company_id value I need to pull from a key/value set using the option value as the key, such as 1 or 2. The key/value pairs look something like this: Key:value 1: 50ccdae0-79bf-11dd-ad8b-0800200c9a66 2: 9c335820-d878-4db3-b90a-728046cb8849 So, as a quick summation of the expected results, If I select 'Joe Bloggs' in my select list, I want the link to be changed to: a href=/view_customer_company.cfm?company_id=50ccdae0-79bf-11dd-ad8b-0800200c 9a66View Joe Bloggs Company/a And likewise, if I chose 'Dave Something' in the select list the link would look like this: a href=/view_customer_company.cfm?company_id=9c335820-d878-4db3-b90a-728046cb 8849View Dave Something Company/a I'm really a novice with both JavaScript and jQuery for the moment, I'm learning well but this is a little bit beyond me, especially when you're looking at working with the key/value paris. I appreciate any help you can offer and thanks in advance for your time. Robert
[jQuery] superfish indicators
Hey All! Yay for swanky drop downs! I'm implemented super fish drop downs on a site I'm building and I was wondering if anyone could help me figure out how to do away with the arrow indicators altogether. They're pushing my layout around, and I would really just like to rid of them completely without breaking the code. I tried turning to the background color, but they still take up space. The superfish dropdowns I'm using are highlighted here: http://users.tpg.com.au/j_birch/plugins/superfish/#examples Please, any advice would be super appreciated! Thank you!
[jQuery] New Plugin - Agile Carousel - Looking For FeedBack
I just released vAlpha of a JQuery Plugin called agile carousel: http://code.google.com/p/agile-carousel/ Use Jquery UI effects as slide transitions (plus other, built-in transitios). Also use JQuery UI easing types. PHP is used, so you can specify the directory that contains your slides and your carousel is built according to the settings you enter (buttons, captions, watermark, etc). Automatically builds slides from Images, SWF's HTML docs. Any feedback would be greatly appreciated. Thanks in advance!
[jQuery] Re: I don't want to downoad a plugin
Is there a reason you don't want to download the library, or plugins? -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jjsanders Sent: Wednesday, September 03, 2008 9:09 AM To: jQuery (English) Subject: [jQuery] I don't want to downoad a plugin Currently I use jQuery and haven't downloaded the library, rather I am using the online version. So I have a link to my jQuery library. script type=text/javascript src=http://ajax.googleapis.com/ajax/ libs/jquery/1.2.6/jquery.min.js/script But now I want to use the UI tabs plugin. (http://docs.jquery.com/UI/ Tabs) Does anyone know wether it is possible to use this in the same way so that I don't need to download the package?
[jQuery] Re: I don't want to downoad a plugin
Currently I use jQuery and haven't downloaded the library, rather I am using the online version. So I have a link to my jQuery library. script type=text/javascript src=http://ajax.googleapis.com/ajax/ libs/jquery/1.2.6/jquery.min.js/script But now I want to use the UI tabs plugin. (http://docs.jquery.com/UI/ Tabs) Does anyone know wether it is possible to use this in the same way so that I don't need to download the package? http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.2/jquery-ui.min.js
[jQuery] position iframe elements in parent document?
I haven't tried this, but I'm wondering if this is even possible. Dragging a div from an iframe to somewhere outside of it. TIA!
[jQuery] Re: superfish indicators
Hi Jess, I'm replying from my iPod so will be brief. The extra space can be removed by deleting the padding from the .sub-with-ul class (i think thats what it's called) within superfish.css. However, if you still want to disable the arrows you can set autoArrows to false within the options object you pass into .superfish() upon initialisation. You can read about that in the documention for clarification. Good luck, Joel Birch On 04/09/2008, jess [EMAIL PROTECTED] wrote: Hey All! Yay for swanky drop downs! I'm implemented super fish drop downs on a site I'm building and I was wondering if anyone could help me figure out how to do away with the arrow indicators altogether. They're pushing my layout around, and I would really just like to rid of them completely without breaking the code. I tried turning to the background color, but they still take up space. The superfish dropdowns I'm using are highlighted here: http://users.tpg.com.au/j_birch/plugins/superfish/#examples Please, any advice would be super appreciated! Thank you!
[jQuery] Re: Autocomplete - every item shown regardless of letter typed
Well, when using remote JSON, your server code has to do the filtering. Your server returns all results, so the autocomplete displays them all. Here are several demos with local JSON, which may be closer to what you are looking for. You can even get the JSON via Ajax, then use it to initialize the autocomplete: http://jquery.bassistance.de/autocomplete/demo/ Jörn On Wed, Sep 3, 2008 at 4:17 PM, JD [EMAIL PROTECTED] wrote: Here is a test: http://aasenboligdesign.no/test/test.htm JD On 3 Sep, 15:43, Jörn Zaefferer [EMAIL PROTECTED] wrote: Okay. Can you post a testpage? Jörn On Wed, Sep 3, 2008 at 1:13 PM, JD [EMAIL PROTECTED] wrote: Hi again! hehe, it was just a typo from me when I pasted the code... The above code should be correct. Anyhow, I get all the data from JSON, but if I type D, every single item from the file shows in the autocomplete-box. Strange... But apart from this obvious error, it works great :-) On 3 Sep, 12:59, Jörn Zaefferer [EMAIL PROTECTED] wrote: Looks like a typo in your parse implementation: value: row.aname, should be value: row.name, Jörn On Wed, Sep 3, 2008 at 8:32 AM, foxtrot [EMAIL PROTECTED] wrote: Oops, sorry aboute the missing code $(document).ready(function(){ $(#client).autocomplete(data.json, { parse: function(data) { return $.map(eval(data), function(row) { customers = data; return { data: row, value: row.aname, result: row.name } }); }, minChars: 2, width: 263, formatItem: function(item){ return item.name; } }) }); the html is just a input-field, and the json have this structure: { customers:[ { name: A, project:[ {name: project1}, {name: project2}, {name: project3} ] }, { name: B, project:[ {name: project1}, {name: project2}, {name: project3}, {name: project4}, {name: project5} ] }, { name: C, project:[ {name: project1}, {name: project2} ] } ] } On 3 Sep, 00:44, MorningZ [EMAIL PROTECTED] wrote: What can cause this? that would be your code... but where and when and how is unknown with what little you provide
[jQuery] Re: Plugin developement
It depends on what the public method returns. If it returns the jQuery object (the 'this' inside the plugin) then you have to call $ ('#example').pluginname.doSomethingPublic().pluginname.doSomethingElse(). If you want to chain your methods directly you have to return 'this' inside your public methods, which refers to $.fn.pluginname (not to the jquery object!). But doing this will prevent you from chaining jquery methods (most of the plugins are chainable). If you don't like this and would like to get the jquery object back, you can do that with another public method: $.fn.pluginname.returnJQuery = function(){ return _jquery; } where _jquery is defined where your _options object: var _jquery=this; so $().pluginname.doSomethingPublic().doSomethingElse().returnJQuery() will return the original jQuery object. The only problem(?) with both is that it's a bit different from how jQuery is generally used. That's why, I think, the jMaps approach is somewhat better. On szept. 3, 14:32, mwk [EMAIL PROTECTED] wrote: Hi, Wow, thanks to both of you. Wouldn't have thought about such an construct. Maybe because i'm not that familiar with javascript at all. Somehow i thought you can't access an object while creating it. But also the way Balazs was mentioning about jmap looks interesting. I will have a closer look into it soon. For now i will try out the way mentioned above. The only thing i don't like in this solution is, that after calling the method u can't add another right after like : $('#example').pluginname.doSomethingPublic().doSomethingElse(); is there a solution to it, except the way jmap does.
[jQuery] Re: Simple click event
You can't trigger a link's default action with jQuery, but you can do something like this: $().ready(function() { $('#thelink').bind('click', function() { window.location = this.href; return false; }).trigger('click'); }); --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Sep 3, 2008, at 10:41 AM, byron wrote: I created an email link, that I want invoked (clicked) on page load. I thought I could simply do: $().ready(function() { $(#thelink).click() }) Do I need to do something else? Thanks.
[jQuery] csssupport
I wrote a css 2/3 support plugin: http://pastebin.com/f7c6c1e82 Call it like this $('link[href~=css3.css]').supportcss(2); sorry for my English ...
[jQuery] jQuery + Gears Data Dilemma
Greetings, An application I've been working on is in the process of trying to integrate Gears support into itself. The application is heavily driven by jQuery, UI and an assortment of plugins. The support for gears involves a number of get and set type calls, where data is retrieved and populated in a form or taken from a form and stored some where. We'd like to keep the implementation open enough that down the road we can work HTML5 support and potentially even Adobe AIR support into the app. Right now these particular requests are attached to click() or submit() handlers in jQuery and fire off various AJAX requests. I'm wondering if anyone has come with a good/decent solution to modularizing these types of requests within jQuery-style javascript code and what the pattern they use are. What I am trying to avoid is a click() handler with conditions for each of the various sources, and I also need to be able to turn a source off, plugin a different source and then optionally return back to that first source. Looking forward to feedback from anyone who's faced this predicament already. Pax, - Stan
[jQuery] Re: jquery in rails/rjs files
Am 03.09.2008 um 13:19 schrieb Karl Rudd: A quick Google turned up this: http://yehudakatz.com/2007/01/31/using-jquery-in-rails-part-i Thanx for this hint . I visited this site yesterday ... but I could not find any tips to use jquery inside rjs files.
[jQuery] Re: need help with opacity
Hey bob, you don't necessarily have to rethink your design, just use transparent png files (tiled for background) They can now render on all browsers (including IE 5 +) with this little fix : http://www.twinhelix.com/css/iepngfix/ Also, this dwld is quite handy for transparent backgrounds: http://css-tricks.com/examples/TranspFills.zip india
[jQuery] digitalBush Plugin newbie...losing text onblur()
Hey, My boss talk to me about Jquery, never done that before. We need to mask HTML input for phone number and date fields. So, I found this plugin digitalBush MaskInput and it works great but I don't know why, i'm losing the data in the field when the input loses the focus. html script function geredate(id){ $.noConflict( ) jQuery(function($){ $(#+id).mask(/99/99); }); } function geretel(id){ $.noConflict( ) jQuery(function($){ $(#+id).mask((999)999-); }); } /script /head body Telephone:nbsp;input TYPE=TEXT id=tel onclick=geretel('tel') br/ DDN:nbsp;input TYPE=TEXT id=ddn onclick=geredate('ddn') /body /html So, if anyone can help me, it would be very appreciate Thank
[jQuery] Re: superfish indicators
Oh RAD You rock, Joel. Thank you SO much! Woot! -jess On Sep 3, 11:40 am, Joel Birch [EMAIL PROTECTED] wrote: Hi Jess, I'm replying from my iPod so will be brief. The extra space can be removed by deleting the padding from the .sub-with-ul class (i think thats what it's called) within superfish.css. However, if you still want to disable the arrows you can set autoArrows to false within the options object you pass into .superfish() upon initialisation. You can read about that in the documention for clarification. Good luck, Joel Birch On 04/09/2008, jess [EMAIL PROTECTED] wrote: Hey All! Yay for swanky drop downs! I'm implemented super fish drop downs on a site I'm building and I was wondering if anyone could help me figure out how to do away with the arrow indicators altogether. They're pushing my layout around, and I would really just like to rid of them completely without breaking the code. I tried turning to the background color, but they still take up space. The superfish dropdowns I'm using are highlighted here: http://users.tpg.com.au/j_birch/plugins/superfish/#examples Please, any advice would be super appreciated! Thank you!
[jQuery] Re: jquery in rails/rjs files
What about: http://mad.ly/2007/05/17/jquery-ajax-rails/ http://ennerchi.com/projects/jrails --Klaus On Sep 3, 5:58 pm, Jochen Kaechelin [EMAIL PROTECTED] wrote: Am 03.09.2008 um 13:19 schrieb Karl Rudd: A quick Google turned up this: http://yehudakatz.com/2007/01/31/using-jquery-in-rails-part-i Thanx for this hint . I visited this site yesterday ... but I could not find any tips to use jquery inside rjs files.
[jQuery] jQuery dollar not defined
I can not find why $ (dollar) is not defined in my code. This is the include-part: style type=text/css media=all @import http://jquery.com/demo/thickbox/css/global.css;; @import http://jquery.com/demo/thickbox/thickbox-code/thickbox.css;; /style link rel=alternate stylesheet type=text/css href=http:// jquery.com/demo/thickbox/css/1024.css title=1024 x 768 / script src=http://jquery.com/demo/thickbox/js/ jquery-1.1.3.1.pack.js type=text/javascript/script script src=http://jquery.com/demo/thickbox/thickbox-code/thickbox- compressed.js type=text/javascript/script script src=http://jquery.com/demo/thickbox/js/global.js; type=text/ javascript/script Still the same error. I want to call a jquery-thickbox. Anybody?
[jQuery] different behavior with jquery1.2.6
Hello, I have an asp.net (vs2005) web-app. When i use jquery1.1.4, then, on submitting the form, the background gets grayed-out and an 'results being generated' image (that i have put in the asp.net code) gets displayed. i replaced the 1.1.4 file with 1.2.6, and now the background doesn't get grayed-out (aspnet code remains same, the only thing i changed was replacing 1.1.4 with 1.2.6) at all. The image gets displayed but since the background isn't grayed-out/disabled, the user-controls kind-of overwrites part of the image. My OS is XP/SP2. I am just starting to learn jquery, so don't know much about it. Any suggestions/advice/pointers? Thanks.
[jQuery] Re: jquery validation plugin problem in textarea [validate]
I meant, why if there is a \n character on textarea, it couldnt send its value? Thanks Andy On Sep 3, 8:46 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: I still don't get what the actual issue. What do you mean with send? Sending via Ajax to the server? To a validation method? Jörn On Wed, Sep 3, 2008 at 1:15 PM, Andy [EMAIL PROTECTED] wrote: Hi Jorn, thanks for replying What i meant was, if for example, an a'ddress' textarea, users will input his address and there will must be newline(\n) character there. It's validated for sure with jquery validation plugin but it doesnt seem to send the value in the textarea, as it is read as not as + (like on input field). However i have worked around this by adding a function to be activated in onblur condition. Here's the function : function doThing(t) { var v = t.value.replace(/\r\n|\n|\r/g, ); t.value = v; } It works, but just want to know if there are any other way simpler than this. Thanks On Sep 3, 5:58 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: The required method uses $.trim on the value first, before checking the length. \n is considered whitespace and therefore ignored. So a textarea that contains nothing but \n is invalid for the required method. Does that answer your question? Jörn On Tue, Sep 2, 2008 at 7:01 PM, Andy [EMAIL PROTECTED] wrote: I mean is it suppporting the newline (\n) character to be validated before passed through to another page? because mine doesnt seem to work On Sep 2, 11:55 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Work? Like submitting the form when pressing enter in a textarea? How is that related to the validation? Jörn On Tue, Sep 2, 2008 at 6:44 PM, Andy [EMAIL PROTECTED] wrote: If users press enter or newline on textareas it doesnt seem work On Sep 2, 10:47 pm, andy prasetyo [EMAIL PROTECTED] wrote: Ok, Jorn here it is :http://d661480.u34.strictlywebhosting.com/register.html..really appreciate your help and guidance Thanks On Sep 2, 10:40 pm, andy prasetyo [EMAIL PROTECTED] wrote: ok one min let me upload..it doesnt seem to pass the value if i use \n (newline) On Sep 2, 10:17 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Could you be more specific, eg. provide a testpage? Jörn On Tue, Sep 2, 2008 at 2:05 PM, andy prasetyo [EMAIL PROTECTED] wrote: I usejquery validationplugin from bassistance.de, but everytime i use it on textarea, it doesnt work (doesnt pass the value properly). Any suggestions?
[jQuery] shadowbox resize iframe after content loads
On our website I am using a shadowbox to view videos hosted on another site in the product page window. The problem is that recently the company hosting the videos have started providing several different size of videos. All the different video pages, however, have an element with an ID of container as the only child of the body element (in 2 cases it's a table, in a third a div, but all have an id of container). I found that if I can manually resize the shadowbox by getting the clientwidth and clientheight of the #container element and setting the width and height of the shadowbox to these values I can get the shadowbox to perfectly contain the video without excess space. The problem is that I can't find a way of grabbign the width and height from within a script and applying the new size. I tried typing $('#shadowbox_content').content().find ('#container') into the firebug console and got a permission denied error. Additionally, the iFrame doesn't exist until the shadowbox opens, so I need to find a way to get the iframt content when the iframe loads but to do it wit han iframe that doesn't exist until the containing shadowbox opens. Can anyone help? The only other solution I have it to just make the shadowbox big enough to hold any video size, but then there's a lot of white space in the shadowbox when the video is smaller than this. Here are a few pages that use the shadowbox that show the problem: http://www.pcwb.com/catalogue/item/A0234261 - Biggest size http://www.pcwb.com/catalogue/item/3DCONX01 - Most 3D Connexion videos http://www.pcwb.com/catalogue/item/WAC123 - Most videos on the site are this size
[jQuery] Re: jquery in rails/rjs files
Am 03.09.2008 um 18:08 schrieb Klaus Hartl: What about: http://mad.ly/2007/05/17/jquery-ajax-rails/ http://ennerchi.com/projects/jrails bong! exactly what i was looking 4! thanx!
[jQuery] jQuery search
Hi, I am looking for a jquery plugin that will show the results of a search form without refreshing the page. So when someone press search it wont reload the site but will show the founded results. Any one now a plugin? Erwom
[jQuery] Re: Change link dependant on select box.
Why wouldn't you just have select name=customer id=customer option value=50ccdae0-79bf-11dd-ad8b-0800200c9a66Joe Bloggs/option option value=9c335820-d878-4db3-b90a-728046cb8849Dave Something/option /select a id=CompanyLink/a script type=text/javascript $(document).ready(function() { $(#customer).change(SetLink); SetLink(); }); function SetLink() { var obj = document.getElementById(#customer); obj = obj.options[obj.selectedIndex]; $(#CompanyLink) .attr(href, '/view_customer_company.cfm?company_id=' + obj.value) .html('View ' + obj.text + ' Company'); } /script deeming the key/value lookup unnecessary?
[jQuery] Re: New Plugin - Agile Carousel - Looking For FeedBack
Looks like it still needs some work, as looking at the first demo page http://www.5bosses.com/examples/agile_carousel//jqueryui_example/slideshow.html going anywhere other than the first image reverts to the first image (Windows 2003 with FF3 is what i am browsing it with) Using IE7 for the same demo throws the error next_slide_id is undefined on line 15 I like the idea though, kinda like a VCR controlled slideshow
[jQuery] Re: jQuery search
Have you tried jqGrid? http://www.trirand.com/blog/ thanks, Michael - Original Message From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, September 3, 2008 9:35:16 AM Subject: [jQuery] jQuery search Hi, I am looking for a jquery plugin that will show the results of a search form without refreshing the page. So when someone press search it wont reload the site but will show the founded results. Any one now a plugin? Erwom
[jQuery] jCarousel doesn't parse UTF-8 charachters
Hi, I've added some text to images in the jCarousel, but the javascript doesn't parse and convert the UTF-8 characters in the text. It breaks the text, or replaces it with ??? characters. Can someone help please with how to modifiy the javascript code to make it parse and convert the UTF-8 characters correctly. Thanks in advance. The javascript code is: function videos_itemLoadCallback(carousel, state) { // Since we get all URLs in one file, we simply add all items // at once and set the size accordingly. if (state != 'init') return; jQuery.get('videos', function(data) { videos_itemAddCallback(carousel, carousel.first, carousel.last, data); }); }; function videos_itemAddCallback(carousel, first, last, data) { // Simply add all items at once and set the size accordingly. var items = data.split('[]'); for (i = 0; i items.length; i++) { carousel.add(i+1, videos_getItemHTML(items[i])); } carousel.size(items.length); }; function videos_getItemHTML(video_item) { return video_item; }; jQuery(document).ready(function() { jQuery('#videos').jcarousel({ scroll: 4, itemLoadCallback: videos_itemLoadCallback }); });
[jQuery] Re: New Google Browser announced
I don't think chrome his wanting to compete with firefox. From what i read, google as already put a lot of money into firefox so it would make no sense to build a browser to directly compete with it. From what people say, chrome is to compete with MSIE as a simple and easy to use browser, which currently it is. the interface of chrome is very simplistic and it does not seem too offer plug-ins or themes(yet). Now maybe it is going to compete with firefox(which i don't think is a good idea) but i will want until they start adding themes and plugin to say that. On Wed, Sep 3, 2008 at 7:58 AM, chris thatcher [EMAIL PROTECTED] wrote: I hope it's enough for microsoft to retire ie6, but frankly I worry a little bit about the gas giant that google is becoming. I can't see any reason they couldn't simply have given some funding to mozilla and kept providing their services as is, except... to hone their tracking of my browser behavior to improve advertisement placement. Firefox is still my sweet heart, and we're going steady. On Wed, Sep 3, 2008 at 6:17 AM, Diego A. [EMAIL PROTECTED] wrote: I love it! No non-sense web browsing. I'll still keep firefox for development of course, but I'll definitelly recommend it for general use. 2008/9/2 Giovanni Battista Lenoci [EMAIL PROTECTED] Is out! :-) -- gianiaz.net - web solutions p.le bertacchi 66, 23100 sondrio (so) - italy +39 347 7196482 -- Cheers, Diego A. -- Christopher Thatcher
[jQuery] Re: New Google Browser announced
I hope it's enough for microsoft to retire ie6, but frankly I worry a little bit about the gas giant that google is becoming. I can't see any reason they couldn't simply have given some funding to mozilla and kept providing their services as is, except... to hone their tracking of my browser behavior to improve advertisement placement. Firefox is still my sweet heart, and we're going steady. On Wed, Sep 3, 2008 at 6:17 AM, Diego A. [EMAIL PROTECTED] wrote: I love it! No non-sense web browsing. I'll still keep firefox for development of course, but I'll definitelly recommend it for general use. 2008/9/2 Giovanni Battista Lenoci [EMAIL PROTECTED] Is out! :-) -- gianiaz.net - web solutions p.le bertacchi 66, 23100 sondrio (so) - italy +39 347 7196482 -- Cheers, Diego A. -- Christopher Thatcher
[jQuery] Re: different behavior with jquery1.2.6
There were a number of jQuery API changes between 1.1.x and 1.2.x. If you find the part of your code that isn't working, you can update it to work with 1.2.x. JavaScript debugging tools such as Firebug and the Web Developer Toolbar will help greatly. In particular, you may find the error simply enabling Firebug's Console and Script tabs and then loading your page and submitting the form. With any luck, there will be an error message in Firebug's console pointing to the error. You can also probably get your code to work as is by loading the 1.1-1.2 compatibility plugin (after jquery.js and before your code): http://plugins.jquery.com/project/compat11 Reading the source code for this plugin will also show you the things that were changed and removed in 1.2; searching for those in your submit code may turn up something. -Mike I have an asp.net (vs2005) web-app. When i use jquery1.1.4, then, on submitting the form, the background gets grayed-out and an 'results being generated' image (that i have put in the asp.net code) gets displayed. i replaced the 1.1.4 file with 1.2.6, and now the background doesn't get grayed-out (aspnet code remains same, the only thing i changed was replacing 1.1.4 with 1.2.6) at all. The image gets displayed but since the background isn't grayed-out/disabled, the user-controls kind-of overwrites part of the image. My OS is XP/SP2. I am just starting to learn jquery, so don't know much about it. Any suggestions/advice/pointers? Thanks.
[jQuery] Re: jQuery search
I don't think thats what i am looking for. I just look for seome code to search the database but shows the results without a refresh. On 3 sep, 18:41, Michael Nelson [EMAIL PROTECTED] wrote: Have you tried jqGrid? http://www.trirand.com/blog/ thanks, Michael - Original Message From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, September 3, 2008 9:35:16 AM Subject: [jQuery] jQuery search Hi, I am looking for a jquery plugin that will show the results of a search form without refreshing the page. So when someone press search it wont reload the site but will show the founded results. Any one now a plugin? Erwom- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven -
[jQuery] Re: jquery flot - integers only on x and/or y axis
Yes - thanks Faizal. At least it pointed out the error I was making. I'm not (currently) using $.extend, but I did separate the data set options from the other chart options, and put them in a variable. Now I'm trying to add a select that will allow the user to switch chart styles - point, line, bar On Sep 2, 10:19 pm, faizal iqbaal [EMAIL PROTECTED] wrote: did it work for ya On Tue, Sep 2, 2008 at 5:31 PM, faizal iqbaal [EMAIL PROTECTED]wrote: //modiefd ur file copy the code and run it /**/ !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head style type=text/css #graphHolder { border: none; padding: 0px; margin: 10px; height: 200px; width: 400px; font-family: tahoma; font-size: 11px; } #curveData { margin: 10px; } /style title/title script language=JavaScript type=text/javascript src=jquery.js/script script language=JavaScript type=text/javascript src=jquery.flot.js/script !--[if IE]script language=javascript type=text/javascript src=../version/scripts/flot/excanvas.js/script![endif]-- script type=text/javascript $().ready(function(){ $.plot($(#graphHolder),[]); $('#curveData input').change(function() { var d1 = []; $('#curveData tbody tr').each(function() { tr = $(this); pair = []; tr.find('input.qty').val() tr.find('input.price').val() pair.push( tr.find('input.qty').val(), tr.find('input.price').val() ) d1.push( pair ); }); var chartOptions={ yaxis: { min:0 }, color: #bb, data: d1, points: { show: true }, lines: { show: true, fill: true, fillColor: rgba(255, 000, 000, 0.2) } } ; /* $.plot($(#graphHolder), [ { yaxis: { min:0 }, color: #bb, data: d1, points: { show: true }, lines: { show: true, fill: true, fillColor: rgba(255, 000, 000, 0.2) } } ]); */ $.plot($(#graphHolder), [{ data: d1, color:#bb}],$.extend(true, {}, chartOptions, {yaxis: { min: 0 }})); }); }); /script /head body table cellpadding=0 cellspacing=0 id=curveData thead tr th#/th thQuantity/th thPrice/th /tr /thead tbody tr td1/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td2/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td3/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td4/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td5/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td6/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td7/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td8/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td9/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price
[jQuery] Re: make a div invisible when it is empty
I know was as strange script, in fact I can not change the server side, so I sought a way to remove the div that contain spaces !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 titletest jquery/title script type=text/javascript src=jquery-1.2.6.min.js/script script type=text/javascript $(document).ready(function() { $('#header div').each(function(i) { if ($(this).html()=='nbsp;') { $(this).remove(); } } }); /script /head body h1Titre/h1 div id=header div id=Auteurnbsp;/div div id=Datenbsp;/div div id=accroche-pagediv dir=/divnbsp;/div /div ptexte/p /body /html
[jQuery] Re: best techniques to optimize loading of multiple libraries?
On Sep 3, 2008, at 6:44 AM, viktor wrote: How do you minify a .js file? http://www.crockford.com/javascript/jsmin.html On bottom of the page is link for implementations in several languages. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jQuery test suite on new Google Chrome browser
Rey Bango wrote on 9/3/2008 9:01 AM: Yep, let's find a way for Google to kill Mozilla. Good thinking Bill. If your comment is directed to me, then you've misunderstood. I use Firefox. I haven't installed Chrome, nor do I plan to. - Bil
[jQuery] Re: jquery in rails/rjs files
On Sep 3, 2008, at 8:38 AM, Jochen Kaechelin wrote: Is it possible to use jquery in rails rjs files? JRails should provide drop in replacement for Prototype. http://ennerchi.com/projects/jrails -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jQuery test suite on new Google Chrome browser
Hi Bill, I was replying to your comment here: Converting a few FF users over and saving on the USD $60+ million Google pays Mozilla every year probably doesn't hurt either... Did I misread this or was it said in a context that I missed? Rey... Bil Corry wrote: Rey Bango wrote on 9/3/2008 9:01 AM: Yep, let's find a way for Google to kill Mozilla. Good thinking Bill. If your comment is directed to me, then you've misunderstood. I use Firefox. I haven't installed Chrome, nor do I plan to. - Bil
[jQuery] Two .ajax POSTS not working?
Hi all, I have the following code run when a button is clicked: // Check the username isn't taken var dataString = 'username='+ username + 'password=' + password; //alert (dataString);return false; $.ajax({ type: POST, url: bin/login-check.php, data: dataString, success: function(msg) { if(msg=='yes') { errors = 1; $(div#username-error).addClass(red);s $(div#username-error).show(); $(div#username-error).html('Your username and/or password are incorrect.'); $(input#username).focus(); var username_error = 1; return false; } else { // If there are no errors, post the form if(errors != 1) { var dataString2 = 'username='+ username + 'password=' + password; //alert (dataString);return false; $.ajax({ type: POST, url: bin/login-process.php, data: dataString2, success: function(msg) { $('#page').html(msg); } }); return false; } } }); But for some reason it isn't running correctly.. If I remove this piece of code, the rest of the button works so I guess it's to do with this bit, but I have NO idea why! Thank you, Rometh
[jQuery] Overriding original handler/callback on dependent autocomplete fields
Hi. I'm trying to deploy a form with dependent autocomplete fields in Drupal 6. The second dependent field is a Drupal node reference field which has its own callback function specified by a native module. Once the user has made their first selection, I need to prevent that callback from happening and execute the custom URI based on a new parameter. When drupal attaches the autocomplete behavior it checks to see if the behavior is already set via the autocomplete-processed class so I've tried unbinding the original handler as well as removing the class before reattaching the autocomplete behavior. However, in the following code, the parameter (company) is set but the new URI is not. Can anyone tell me what's wrong with the URI assignment and also if the unbind and removeClass is the right way to override the original handler? $(document).ready(function() { $(#edit-field-ticket-company-0-nid-nid).blur(function() { companyvalue = $(#edit-field-ticket-company-0-nid- nid).attr(value); re = /\[nid:(.*)\]/; resarray = re.exec(companyvalue); if (resarray) company = resarray[1]; //This line below is wrong ??? $(#edit-field-ticket-contact-0-nid-nid).value =http:// localhost:/drupal64/intranet/ticket/contact/autocomplete/ + company; $(#edit-field-ticket-contact-0-nid-nid).unbind('keydown'); $(#edit-field-ticket-contact-0-nid-nid).unbind('keyup'); $(#edit-field-ticket-contact-0-nid-nid).unbind('blur'); $(#edit-field-ticket-contact-0-nid-nid).removeClass('autocomplete- processed'); Drupal.attachBehaviors(document); }) })
[jQuery] Re: different behavior with jquery1.2.6
Thanks Mike, for showing three ways to handle this. Of these 3, first two appears to be non-working (am using IE so not sure if can use firebug and i tried adding a line for compatibility .js file that i downloaded, but still the same results). I guess i will look at the 3rd option that you have listed. Thanks. On Sep 3, 1:11 pm, Michael Geary [EMAIL PROTECTED] wrote: There were a number of jQuery API changes between 1.1.x and 1.2.x. If you find the part of your code that isn't working, you can update it to work with 1.2.x. JavaScript debugging tools such as Firebug and the Web Developer Toolbar will help greatly. In particular, you may find the error simply enabling Firebug's Console and Script tabs and then loading your page and submitting the form. With any luck, there will be an error message in Firebug's console pointing to the error. You can also probably get your code to work as is by loading the 1.1-1.2 compatibility plugin (after jquery.js and before your code): http://plugins.jquery.com/project/compat11 Reading the source code for this plugin will also show you the things that were changed and removed in 1.2; searching for those in your submit code may turn up something. -Mike I have an asp.net (vs2005) web-app. When i use jquery1.1.4, then, on submitting the form, the background gets grayed-out and an 'results being generated' image (that i have put in the asp.net code) gets displayed. i replaced the 1.1.4 file with 1.2.6, and now the background doesn't get grayed-out (aspnet code remains same, the only thing i changed was replacing 1.1.4 with 1.2.6) at all. The image gets displayed but since the background isn't grayed-out/disabled, the user-controls kind-of overwrites part of the image. My OS is XP/SP2. I am just starting to learn jquery, so don't know much about it. Any suggestions/advice/pointers? Thanks.
[jQuery] Re: jQuery test suite on new Google Chrome browser
The lack of a plugin system is a major drawback that will hinder adoption dramatically, especially among tech crowds. I have tried out Chrome and admit that I am impressed with it's speed, simplicity and specs, But I will not be able to even think about using it as a primary browser till a plugin architecture gets developed and a plugin community gets built. I am fairly certain this will happen down the road, unless of course the corporate intra net thing is true. I guess we will see... On Sep 3, 7:51 am, Ca-Phun Ung [EMAIL PROTECTED] wrote: Chrome is pretty exciting as it's not just another browser but one that sets to up-the-bar. I think it definitely gives other vendors food for thought. As to whether it would kill IE? I'm sure it will take some of IE's share but only after exhausting FF, Opera and Safari's market... I expected this list to be more excited about V8 rather than Chrome itself ;) -- Ca-Phun Ung +http://yelotofu.com
[jQuery] Re: jQuery search
Take a look at the loading data demo: http://www.trirand.com/jqgrid/jqgrid.html You'll still need server side code to actually query the database. That's described, along w/ a php sample here (under Tutorial: creating your first grid): http://www.secondpersonplural.ca/jqgriddocs/index.htm The server side code can be adapted to pretty much any platform. I'm currently using jqGrid with castle monorail. - Michael - Original Message From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, September 3, 2008 10:10:55 AM Subject: [jQuery] Re: jQuery search I don't think thats what i am looking for. I just look for seome code to search the database but shows the results without a refresh. On 3 sep, 18:41, Michael Nelson [EMAIL PROTECTED] wrote: Have you tried jqGrid? http://www.trirand.com/blog/ thanks, Michael - Original Message From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, September 3, 2008 9:35:16 AM Subject: [jQuery] jQuery search Hi, I am looking for a jquery plugin that will show the results of a search form without refreshing the page. So when someone press search it wont reload the site but will show the founded results. Any one now a plugin? Erwom- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven -
[jQuery] Re: jQuery test suite on new Google Chrome browser
Ca-Phun Ung wrote: I totally agree, a plugin acrhitecture is a must! And it does exist in Chrome! Plugins are referred to quite a bit in this excellent comic strip [1] by Scott McCloud. Ah, just correcting myself (I hope that's allowed here :) As for plugins, Chrome will support plugins like Flash and PDF but it doesn’t have extensions like those found in Firefox. Google does, however, plan to provide an extension API in the future. Source: http://www.techcrunch.com/2008/09/02/google-officially-announces-chrome/ The comic strip refers to plugins like Flash etc not what I stipulated them to be previously, i.e. extensions. But they are coming by all means! -- Ca-Phun Ung + http://yelotofu.com
[jQuery] Re: jQuery test suite on new Google Chrome browser
Rey Bango wrote on 9/3/2008 1:09 PM: I was replying to your comment here: Converting a few FF users over and saving on the USD $60+ million Google pays Mozilla every year probably doesn't hurt either... Did I misread this or was it said in a context that I missed? My comment was written in the context of the quote I replied to. Guy Fraser wrote that Chrome was designed to kill MSIE on corporate networks. If that is the case, then the fact that Google will also save money from the conversion of Firefox users certainly doesn't hurt either (from Google's perspective). I was subtly suggesting that while it may be accidental that Google is saving itself some revenue, it may also be intentional. It'll be interesting to see if Google ever offers Chrome-only features or services, which would entice users to switch to Chrome. And for the record, my comment was never intended to champion ways to kill Mozilla. Apologies if that's how it read. - Bil
[jQuery] Re: need help with opacity
Yes, I realised this a few hours ago. I was focussing too much on the solid bg color. On 3 sep, 17:48, turbodurso [EMAIL PROTECTED] wrote: Hey bob, you don't necessarily have to rethink your design, just use transparent png files (tiled for background) They can now render on all browsers (including IE 5 +) with this little fix : http://www.twinhelix.com/css/iepngfix/ Also, this dwld is quite handy for transparent backgrounds: http://css-tricks.com/examples/TranspFills.zip india
[jQuery] Re: jQuery test suite on new Google Chrome browser
Dana wrote: The lack of a plugin system is a major drawback that will hinder adoption dramatically, especially among tech crowds. I have tried out Chrome and admit that I am impressed with it's speed, simplicity and specs, But I will not be able to even think about using it as a primary browser till a plugin architecture gets developed and a plugin community gets built. I am fairly certain this will happen down the road, unless of course the corporate intra net thing is true. I guess we will see... I totally agree, a plugin acrhitecture is a must! And it does exist in Chrome! Plugins are referred to quite a bit in this excellent comic strip [1] by Scott McCloud. Mozilla have set the bar very high with their plugins system and community surrounding it so Google has much work to do in that area. So it is a matter of time and only time will tell... [1] http://www.google.com/googlebooks/chrome/index.html -- Ca-Phun Ung + http://yelotofu.com
[jQuery] Re: Not selector help
This should do it... $(input:checkbox:not(#myid)).attr(checked,false); -- Josh - Original Message - From: Brad [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, September 03, 2008 11:57 AM Subject: [jQuery] Not selector help I'm looking for the quickest way to uncheck all of the checkboxes on a page except for one with a given idea. I realize I could uncheck all, then check one, but I'm curious if I can leverage not: to accomplish what I want to do?
[jQuery] sorting digits
Hi all, Currently i am working on tablesorter plugin with jqery to sort column values in a table. My problem is when there is mixed data in a column like some numbers and - (when there is no data to display) its sorting the digits treating as string. e.g. in a column if the values are 7, 12, 9, 15, - then it treats 9 as a highest value. When i sort it it arranges like 9,7,15, 12, -. Please let me know the solutions. Thanks, Swaroop -- Thanks and Regards, Swaroop Kumar Patra Email: [EMAIL PROTECTED] Mobile: +91-9886003849
[jQuery] Not selector help (Solved)
How to use :not in the selector was throwing me. Docs were down, but back up (but very slow). $ ([type=checkbox]:not('#specific_checkbox_id')).removeAttr('checked') On Sep 3, 12:57 pm, Brad [EMAIL PROTECTED] wrote: I'm looking for the quickest way to uncheck all of the checkboxes on a page except for one with a given idea. I realize I could uncheck all, then check one, but I'm curious if I can leverage not: to accomplish what I want to do?
[jQuery] make a div invisible when it is empty
Good morning, I am Graphic designer and I use Jquery with Moss (sharepoint) CMS Microsoft, developers of this gas plant have no sense of aesthetics code and optimization. I assumed that with a little magic wand, I was going to do div disappear when they are empty, then yes I could have use easily use. empty (), but generates sharepoint nbsp; and I can not delete upstream. This small function is not much in this case. script type=text/javascript $(document).ready(function () { $(#header div empty).hide(slow); }); /script div id=header div id=Auteur style=nbsp;/div div id=Date style=nbsp;/div div id=accroche-page style=div dir=/ divnbsp;/div /div Can you help me please
[jQuery] Re: Anyone know why mouse position inside div is different in Firefox and IE
I think default browser value for padding margin issue difference result. for same result i put css code like this: style type=text/css * {margin: 0; padding: 0} /style On Sep 3, 6:41 am, Artzone [EMAIL PROTECTED] wrote: I have a div and I want to capture the x and y values when there is a click inside the div. This works great in Firefox and Safari but the offset seems to be wrong in IE7. There's a sample page here:http://static1.shopify.com/s/files/1/0003/0911/assets/testclick.html And this is the function that I'm using to get the x and y values: $(#special).click(function(e){ var x = e.pageX - this.offsetLeft + 1; var y = e.pageY - this.offsetTop + 1 ; $('#status2').html('x=' + x +', y='+ y); }); Anyone know what I'm doing wrong here?
[jQuery] Re: jQuery test suite on new Google Chrome browser
Chrome also has its own DOM viewer/console. To use it, right-click somewhere in the document and choose Inspect Element. Not sure how it compares to Firebug Lite, but it's another option. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Sep 2, 2008, at 10:08 PM, timothytoe wrote: OK. I think I see. By the way, I just did some light debugging in Chrome with Firebug Lite. You can poke around in the DOM, which is nice. If anyone wants to try it, the best way to do it is with the latest Firebug Lite (the one that actually FEELS like Firebug, based off the old Pi debugger). Run it as a bookmarklet. javascript:var %20firebug =document.createElement('script');firebug.setAttribute('src','http:// getfirebug.com/releases/lite/1.2/firebug-lite- compressed.js');document.body.appendChild(firebug);(function() {if(window.piwindow.firebug) {firebug.init();}else{setTimeout(arguments.callee);}}) ();void(firebug); On Sep 2, 4:52 pm, Michael Geary [EMAIL PROTECTED] wrote: From timothytoe I'm not 100% sure, but I think you misread Matt's post. Matt seemed to be saying the same thing you are--the order of keys should not be relied upon. If you take out Matt's post, the context for my reply may be more clear... From: Guy Fraser I've never seen an ECMA script compiler (JS, AS, etc) that doesn't iterate through named references in the expected order? From: Michael Geary But there is no expected order in a for..in loop. Any decent JavaScript reference book, such as Flanagan's, should point this out...
[jQuery] Re: jquery flot - integers only on x and/or y axis
cool...let me have the code as well i'll also learn a new approach or is it the same url On Wed, Sep 3, 2008 at 1:30 PM, rolfsf [EMAIL PROTECTED] wrote: Yes - thanks Faizal. At least it pointed out the error I was making. I'm not (currently) using $.extend, but I did separate the data set options from the other chart options, and put them in a variable. Now I'm trying to add a select that will allow the user to switch chart styles - point, line, bar On Sep 2, 10:19 pm, faizal iqbaal [EMAIL PROTECTED] wrote: did it work for ya On Tue, Sep 2, 2008 at 5:31 PM, faizal iqbaal [EMAIL PROTECTED] wrote: //modiefd ur file copy the code and run it /**/ !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head style type=text/css #graphHolder { border: none; padding: 0px; margin: 10px; height: 200px; width: 400px; font-family: tahoma; font-size: 11px; } #curveData { margin: 10px; } /style title/title script language=JavaScript type=text/javascript src=jquery.js/script script language=JavaScript type=text/javascript src=jquery.flot.js/script !--[if IE]script language=javascript type=text/javascript src=../version/scripts/flot/excanvas.js/script![endif]-- script type=text/javascript $().ready(function(){ $.plot($(#graphHolder),[]); $('#curveData input').change(function() { var d1 = []; $('#curveData tbody tr').each(function() { tr = $(this); pair = []; tr.find('input.qty').val() tr.find('input.price').val() pair.push( tr.find('input.qty').val(), tr.find('input.price').val() ) d1.push( pair ); }); var chartOptions={ yaxis: { min:0 }, color: #bb, data: d1, points: { show: true }, lines: { show: true, fill: true, fillColor: rgba(255, 000, 000, 0.2) } } ; /* $.plot($(#graphHolder), [ { yaxis: { min:0 }, color: #bb, data: d1, points: { show: true }, lines: { show: true, fill: true, fillColor: rgba(255, 000, 000, 0.2) } } ]); */ $.plot($(#graphHolder), [{ data: d1, color:#bb}],$.extend(true, {}, chartOptions, {yaxis: { min: 0 }})); }); }); /script /head body table cellpadding=0 cellspacing=0 id=curveData thead tr th#/th thQuantity/th thPrice/th /tr /thead tbody tr td1/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td2/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td3/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td4/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td5/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td6/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td7/td tdinput type=text class=qty size=8/input/td tdinput type=text class=price size=8/input/td /tr tr td8/td
[jQuery] Re: New Google Browser announced
For those interested in more information on Chrome, checkout their comic book here: http://www.google.com/googlebooks/chrome/ It does a nice job of explaining some of the thinking behind Chrome. I have been playing around with it since yesterday and it's great! Super fast and super simple.
[jQuery] Re: jQuery test suite on new Google Chrome browser
I wonder how come google load pages half the time that firefox 3.0 does ... thats so interesting..right now I use firefox for its firebug and plugins and I use safari 3 because it takes small memory... it is amazing that CHrone has 3% of hits in the internet
[jQuery] Re: jQuery test suite on new Google Chrome browser
That was me. I was up all night trying every site I could think of. On Sep 3, 1:38 pm, [EMAIL PROTECTED] wrote: I wonder how come google load pages half the time that firefox 3.0 does ... thats so interesting..right now I use firefox for its firebug and plugins and I use safari 3 because it takes small memory... it is amazing that CHrone has 3% of hits in the internet