[jQuery] Re: More efficient animation for multiple elements
Thanks Karl. That was actually stupidity of my part, that single replace() call must be slower than most of the script. Number also seems to be slower than parseInt on all modern browsers (despite being 6x faster on IE6) - I like the looks of Number(...) though :] - ricardo On 25 out, 20:54, Karl Swedberg [EMAIL PROTECTED] wrote: that looks great, Ricardo. I'm interested to hear why you chose to write this: var normal = Number(this.find('a:first').css('paddingLeft').replace('px','')); instead of this: var normal = parseInt(this.find('a:first').css('paddingLeft'),10); Is there an advantage to your line? I wouldn't have thought to write it that way. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Oct 25, 2008, at 4:25 PM, ricardobeat wrote: It's working again:http://jsbin.com/evodi/ On Oct 25, 4:18 pm, ricardobeat [EMAIL PROTECTED] wrote: In case Remy Sharp is reading this: jsbin is not working here.. when I try to save to a new URL, it goes tohttp://edit/ Also, pressing backspace results in lag, using delete doesn't. I turned your code into a plugin, and made some changes. Now you pass an object with parameters and only need to specify an 'offset' in padding, the values are calculated from the element's current padding. I tried hard to keep the overall width constant but it seems impossible. Here's the code I ended up with (same html/css): (function($) { $.fn.shrinkHover = function(options){ var normal = Number(this.find('a:first').css('paddingLeft').replace('px','')); var length = this.find('li a').length; var opt = { size: 12, speed: 350, easing: easeOutExpo}; jQuery.extend(opt,options); var large = normal+opt.size; var small = normal-(opt.size/length), small = (small0) ? 0 : small; var extra = Math.round( (small%1)*length ), small = Math.floor(small); large += extra; this.find('li').hover(function(){ //Mouse over $(this).children('a').animate({ paddingLeft: large, paddingRight: large },opt.speed,opt.easing).dequeue(); $(this).siblings('li').children('a').animate({ paddingLeft: small, paddingRight: small },opt.speed,opt.easing).dequeue(); }, function() { // Mouse out $(this).siblings().andSelf().children('a').animate({ paddingLeft: normal, paddingRight: normal },opt.speed,opt.easing).dequeue(); }); }; })(jQuery); $(document).ready(function(){ $('#subNavigation').shrinkHover(); }); cheers, - ricardo On Oct 25, 2:28 am, c.barr [EMAIL PROTECTED] wrote: Cool, I've never seen that site before. I made a small demo using my code above:http://jsbin.com/abuxe Strangely enough it's not working properly, and that's a direct copy of what I wrote that works. Basically they are all shrinking, and the on your mouse is over does not get larger. Not sure what I've done wrong here. Anyway, there's a 90% working demo... On Oct 24, 9:58 pm, ricardobeat [EMAIL PROTECTED] wrote: Maybe you could post a working sample to jsbin.com, that would make things a lot easier. On Oct 24, 4:00 pm, c.barr [EMAIL PROTECTED] wrote: Hate to bump this, but it might get lost otherwise!
[jQuery] [autocomplete] Some random questions
1. Is there any difference between Jorn's autocomplete from his webpage (http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/) and the one included in jQuery.ui 1.6rc2 ? I can see the copyright info is the same, but don't see a version number for the autocomplete element... 2. Using the jquery.ui version of autocomplete, what steps are needed to make the autocomplete work properly in a modal dialog via jquery.ui's dialog? (my initial tests show the code working, but the result area is not showing - I'm using a theme from the themeroller if that matters). I'm using a local data set for now. 3. It's been about a year since I last looked at autocomplete. Anything new that I should be aware off? (I was using Jorn's plugin back then as well...) Thanks for any info. Shawn
[jQuery] Re: jquery ui tabs - screen jumps to top when clicked
That doesn't happen for me. Do you use the latest version? Which browser does that happen in? Could you post a demo or show us some code? --Klaus On 26 Okt., 03:16, Ed [EMAIL PROTECTED] wrote: I have jquery ui tabs at the bottom of my page. When a tab is clicked, the screen jumps/scrolls to top. How can I prevent this?
[jQuery] Re: jquery ui tabs - screen jumps to top when clicked
i dont know anything about jquery ui, but i think i might know your problem. are you using a for each tab? are you using a href=#? are you making sure the click is returning false? On Oct 25, 7:16 pm, Ed [EMAIL PROTECTED] wrote: I have jquery ui tabs at the bottom of my page. When a tab is clicked, the screen jumps/scrolls to top. How can I prevent this?
[jQuery] Re: [autocomplete] do search on input focus
Try $(this).click().click() then. Jörn On Sat, Oct 25, 2008 at 5:22 PM, blasto333 [EMAIL PROTECTED] wrote: That works for when the field is focused by clicking in it, but now when tabbing into it (even though the focus event does occur!) Any other ideas? On Oct 23, 3:57 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Try this: $(...).autocomplete(url, { minChars: 0 }).focus(function() { $(this).click(); }); Jörn On Thu, Oct 23, 2008 at 9:38 PM,blasto333[EMAIL PROTECTED] wrote: Still no luck, the plugin I am using is: http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ On Oct 23, 6:21 am, Isaak Malik [EMAIL PROTECTED] wrote: Oups, I think it should be: $(function() { $(#category).focus(function(){this.autocomplete(do_search.php,{max:100, minChars:0,delay:10}) }); }); On Thu, Oct 23, 2008 at 12:16 AM,blasto333[EMAIL PROTECTED] wrote: That didn't work either. If I double click in the field, the expected behavior occurs. On Oct 22, 10:41 am, Isaak Malik [EMAIL PROTECTED] wrote: I have no idea which autocomplete plugin you're using but does the following work for you? $(function() { $(#category).focus(function(){$(this).autocomplete(do_search.php,{max:1 00,minChars:0,delay:10}) }); }); On Wed, Oct 22, 2008 at 4:19 PM,blasto333[EMAIL PROTECTED] wrote: Is there a way to force a field to do a search on focus of the input? (I basically want the user to be suggested a default set of items before typing anything. I tried this $(#category).autocomplete(do_search.php,{max:100,minChars:0,delay: 10}); -- Isaak Malik Web Developer -- Isaak Malik Web Developer
[jQuery] clickable block + fancybox jquery plugin trouble
Hello everyone! I tried to find the solution all around the web, but no luck, so I came here. I am using a jQuery plugin called FancyBox (http://fancy.klade.lv), which is a LightWindow clone, and it works great. Now, I want to have a clickable DIV that will allow me to call the FancyBox function to show the content of another page in a window like it does when I click on a single A link. The problem is that upon clicking on the DIV the new page opens the usual way, not in a FancyBox window. I need to somehow make jQuery tell the browser that clicking within that specified DIV should display the page using the FancyBox function. - $(document).ready(function() { $(a.imgA).fancybox(); $(.clients).click(function(){ window.location=$(this).find(a.imgA).attr(href); return false; }); }); - div class=clients div class=clientsImg a href=gov.html class=imgAimg src=images/client- gov.jpg alt= //a /div div class=clientsText h3 id=h-govspanGovernment and Law Enforcement Agencies/ span/h3 Blah, blah... /div /div !-- /clients -- - I presume it has something to do with window.location and the fact that the browser jumps straight to the URL jQuery fetches from that link bypassing the FancyBox function. Hope this is enough code to understand my issue. Some help will be immensely appreciated!
[jQuery] clickable block + fancybox jquery plugin trouble
Hello everyone! I tried to find the solution all around the web, but no luck, so I came here. I am using a jQuery plugin called FancyBox (http://fancy.klade.lv), which is a LightWindow clone, and it works great. Now, I want to have a clickable DIV that will allow me to call the FancyBox function to show the content of another page in a window like it does when I click on a single A link. The problem is that upon clicking on the DIV the new page opens the usual way, not in a FancyBox window. I need to somehow make jQuery tell the browser that clicking within that specified DIV should display the page using the FancyBox function. - $(document).ready(function() { $(a.imgA).fancybox(); $(.clients).click(function(){ window.location=$(this).find(a.imgA).attr(href); return false; }); }); - div class=clients div class=clientsImg a href=gov.html class=imgAimg src=images/client- gov.jpg alt= //a /div div class=clientsText h3 id=h-govspanGovernment and Law Enforcement Agencies/ span/h3 Blah, blah... /div /div !-- /clients -- - I presume it has something to do with window.location and the fact that the browser jumps straight to the URL jQuery fetches from that link bypassing the FancyBox function. Hope this is enough code to understand my issue. Some help will be immensely appreciated!
[jQuery] Re: jqGrid 3.3 version
hi,I can't connect to http://trirand.com/blog. could you send me a copy of jqgrid to me? my email is [EMAIL PROTECTED] thank you. you do a great job.
[jQuery] Re: [autocomplete] Some random questions
My plugin was planned for inclusion in 1.6, but won't be part of the final release, it was deferred to 1.7. The UI version is adapter to the UI API and has two or three new features. A list of changes since the 1.0 release is here: http://jquery.bassistance.de/autocomplete/changelog.txt (1.0.2 just fixed some missing semicolon) There hasn't been any testing or documentation effort for integration of dialog and autocomplete. I've created a ticket for that: http://ui.jquery.com/bugs/ticket/3519 Jörn On Sun, Oct 26, 2008 at 8:42 AM, Shawn [EMAIL PROTECTED] wrote: 1. Is there any difference between Jorn's autocomplete from his webpage (http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/) and the one included in jQuery.ui 1.6rc2 ? I can see the copyright info is the same, but don't see a version number for the autocomplete element... 2. Using the jquery.ui version of autocomplete, what steps are needed to make the autocomplete work properly in a modal dialog via jquery.ui's dialog? (my initial tests show the code working, but the result area is not showing - I'm using a theme from the themeroller if that matters). I'm using a local data set for now. 3. It's been about a year since I last looked at autocomplete. Anything new that I should be aware off? (I was using Jorn's plugin back then as well...) Thanks for any info. Shawn
[jQuery] Re: how to submit variables as POST submit (no AJAX)
I have a regular javascript object (with key/values) and would like to submit it to server by POST with complete page reload through jQuery. Just as with regular HTML forms. I searched for a few hours for some solution and have not found any. There are many examples for jQuery AJAX forms but I do not want AJAX. For instance there is $.post method, which accepts JS object as second parameter, however this is also AJAX method. I look for some soultion to send variables and completely re-request the page. Can anybody point me how that should be done? For that you would want to dynamically create a form and then submit it. For example: var s = 'form action=myURL method=POST'; // add inputs corresponding to your javascript object for (p in myObject) { s += 'input type=text name=' + encodeURIComponent(p) + ' value=' + encodeURIComponent(myObject[p]) + ' /'; } s += '/form'; // add the form to the document var $form = $(s).appendTo('body'); // submit it $form.submit();
[jQuery] how to submit variables as POST submit (no AJAX)
Hello, I have a regular javascript object (with key/values) and would like to submit it to server by POST with complete page reload through jQuery. Just as with regular HTML forms. I searched for a few hours for some solution and have not found any. There are many examples for jQuery AJAX forms but I do not want AJAX. For instance there is $.post method, which accepts JS object as second parameter, however this is also AJAX method. I look for some soultion to send variables and completely re-request the page. Can anybody point me how that should be done? thanx -- View this message in context: http://www.nabble.com/how-to-submit-variables-as-POST-submit-%28no-AJAX%29-tp20166315s27240p20166315.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Validate. Password Bug?
this.optional(element) || /^([a-zA-Z0-9]{8,24}) || /^([a-zA-Z0-9]{8,24})$/.test(element.value); Jörn On Sat, Oct 25, 2008 at 7:29 PM, shapper [EMAIL PROTECTED] wrote: You mean using: $.validator.addMethod('password', function (value, element) { return this.optional(element.value) || /^([a-zA-Z0-9]{8,24}) $/.test(value); }, 'Use 8 to 24 letters or numbers only'); I have tried it before and I got the following error in Firebug: element.nodeName is undefined switch (element.nodeName.toLowerCase()) { What am I doing wrong? Thanks, Miguel On Oct 25, 3:47 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Its not a bug, but could be considered bad design. The first argument, value, is the trimmed value. Using element.value should fix the issue. Jörn On Fri, Oct 24, 2008 at 10:50 PM, shapper [EMAIL PROTECTED] wrote: Hello, I am validating a password field as follows: $.validator.addMethod('password', function (value, element) { return this.optional(element) || /^([a-zA-Z0-9]{8,24}) $/.test(value); }, 'Use 8 to 24 letters or numbers only'); I write 8 numbers and letters. The message disappears. Fine ... Then I write a few spaces and the message do not fire even when I submit the form. Then I write a few letters or numbers after the empty spaces and the message fires again ... Is this a bug? Thanks, Miguel
[jQuery] Event.target is Parent Child in IE but in Firefox it is child Element
I have used Hover Event When I try to get event.target.id, I get the inner child element in Firefox but in IE I get the parent element in IE. The example is at http://tradeera.com/sapphire/ ? Is this a bug or some mistake from my side? Thanks in advance CSJakharia
[jQuery] Re: how to submit variables as POST submit (no AJAX)
I'd make those :text into :hidden, or set the form to display:none. -- Ariel Flesler http://flesler.blogspot.com/ On Oct 26, 10:38 am, Mike Alsup [EMAIL PROTECTED] wrote: I have a regular javascript object (with key/values) and would like to submit it to server by POST with complete page reload through jQuery. Just as with regular HTML forms. I searched for a few hours for some solution and have not found any. There are many examples for jQuery AJAX forms but I do not want AJAX. For instance there is $.post method, which accepts JS object as second parameter, however this is also AJAX method. I look for some soultion to send variables and completely re-request the page. Can anybody point me how that should be done? For that you would want to dynamically create a form and then submit it. For example: var s = 'form action=myURL method=POST'; // add inputs corresponding to your javascript object for (p in myObject) { s += 'input type=text name=' + encodeURIComponent(p) + ' value=' + encodeURIComponent(myObject[p]) + ' /';} s += '/form'; // add the form to the document var $form = $(s).appendTo('body'); // submit it $form.submit();
[jQuery] Re: Use JSON from .post
If you are indeed returning an array from PHP, then the received JSON should be a js array. Got this online ? -- Ariel Flesler http://flesler.blogspot.com/ On Oct 25, 6:26 pm, jfrymann [EMAIL PROTECTED] wrote: Hi, I have just started using jQuery and am trying to get data back from a mysql database in json format. I am using PHP to query the database and returning it with the json_encode method. (Basically I am following the example in the documentation -http://docs.jquery.com/Ajax/jQuery.post#urldatacallbacktype) The problem I am having is that the example only returns one json object rather than an array of them and I'm not sure how to modify the calls to either the php encode json or how to access the data when it is returned through jquery. At the moment my php looks like this: while($row = mysql_fetch_array($result)) { echo json_encode(array(file=$row['name'],byline= $row['byline'])); } and the jQuery: $.post(getimages.php, { location: opt_choice, curr_img: img_cnt, limit: img_lim }, function(data){ alert(data); }, json); How can I set it up to access multiple objects? Thanks for the help!
[jQuery] Re: putting jquery inline
And type=text/javascript with no typos. -- Ariel Flesler http://flesler.blogspot.com/ On Oct 24, 9:04 pm, tres [EMAIL PROTECTED] wrote: Not to state the obvious, but did you make sure that the path to the jquery is correct? Trey On Oct 25, 4:39 am, snacktime [EMAIL PROTECTED] wrote: When I include jquery inline in the body via a script tag I'm getting jquery not defined errors. Is there a reason why this approach can't work, or does it sounds like I'm doing something else wrong? The only reason I'm doing this is because it's a requirement on the opensocial container surface I'm developing on. Chris
[jQuery] Re: how to submit variables as POST submit (no AJAX)
I'd make those :text into :hidden, or set the form to display:none. Good point!
[jQuery] Re: Use JSON from .post
The example PHP code would actually echo a series of JSON objects all concatenated together, each one having two properties named file and byline. You wouldn't get any kind of valid JSON out of this. It would look something like this (probably without the whitespace): { file: something, byline: something } { file: something, byline: something } { file: something, byline: something } { file: something, byline: something } json_encode looks at an array you give it and decides whether to render it as a JSON array or a JSON object depending on whether it has named properties or only numeric indices. jfryman, if you want to return an *array* of these objects, then make an array of them. Perhaps: $array = array(); while( $row = mysql_fetch_array($result) ) { $array[] = array(file=$row['name'],byline= $row['byline']); } echo json_encode($array); Then, in your jQuery code, replace this: alert( data ); with: console.log( data ); And load your page in Firefox with Firebug. After the data downloads, you should have an entry in the Firebug console. Click on that and you can see the details of the array and drill down into its elements. -Mike From: Ariel Flesler If you are indeed returning an array from PHP, then the received JSON should be a js array. Got this online ? From: jfrymann Hi, I have just started using jQuery and am trying to get data back from a mysql database in json format. I am using PHP to query the database and returning it with the json_encode method. (Basically I am following the example in the documentation http://docs.jquery.com/Ajax/jQuery.post#urldatacallbacktype The problem I am having is that the example only returns one json object rather than an array of them and I'm not sure how to modify the calls to either the php encode json or how to access the data when it is returned through jquery. At the moment my php looks like this: while($row = mysql_fetch_array($result)) { echo json_encode(array(file=$row['name'],byline= $row['byline'])); } and the jQuery: $.post(getimages.php, { location: opt_choice, curr_img: img_cnt, limit: img_lim }, function(data){ alert(data); }, json); How can I set it up to access multiple objects? Thanks for the help!
[jQuery] Re: jquery ui tabs - screen jumps to top when clicked
Thanks Klaus, I see the issue in FireFox 3 and Internet Explorer 7 (screen jumps up when tab is clicked). Here is an example that shows the issue: http://5bosses.com/examples/tabs/sample_tabs.html I'm using the following parts of Jquery: http://dev.jquery.com/view/tags/ui/latest/ui/ui.core.js http://dev.jquery.com/view/tags/ui/latest/ui/ui.tabs.js In a previous version, I also tried: jquery-ui-personalized-1.6rc2.min.js My goal is for the screen not to jump/scroll when the user clicks a tab. Here is a code sample (from the above linked page): script $(document).ready(function(){ $(#example ul).tabs(); }); /script table tr td valign=top style=height: 400px; background-color: #ccc;The tabs are located beneath this table/td /tr /table div id=example class=flora ul lia href=#fragment-1spanOne/span/a/li lia href=#fragment-2spanTwo/span/a/li lia href=#fragment-3spanThree/span/a/li /ul div id=fragment-1 pFirst tab is active by default:/p /div div id=fragment-2 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. /div div id=fragment-3 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. /div /div Thanks for your help. On Oct 26, 3:20 am, Klaus Hartl [EMAIL PROTECTED] wrote: That doesn't happen for me. Do you use the latest version? Which browser does that happen in? Could you post a demo or show us some code? --Klaus On 26 Okt., 03:16, Ed [EMAIL PROTECTED] wrote: I have jquery ui tabs at the bottom of my page. When a tab is clicked, the screen jumps/scrolls to top. How can I prevent this?
[jQuery] Re: Validate. Not working with Radio input
Please, anyone? On Oct 24, 6:00 pm, shapper [EMAIL PROTECTED] wrote: Hello, I am trying to validate a form with radio inputs. I want to the form to be submitted only if an option was selected: form action=/Poll/Vote/1 class=Poll id=Poll method=post fieldset label for=OptionsArrayDo you like to travel?/label input type=radio name=OptionsArray id=1 value=1 class=Radio / label for=1Yes/label input type=radio name=OptionsArray id=2 value=2 class=Radio / label for=2No/label input id=Submit name=Submit type=submit value=Vote / /fieldset /form I used: $(#Poll).each(function() { $(this).validate({ errorClass: Error, errorElement: label, rules: { OptionsArray: { required: true } }, messages: { OptionsArray: { required: You didn't choose your vote } } }); }); The form is submitted even if I don't choose an option! If I select an option I get an error on Firebug: validator.settings[on + even... + event.type].call(validator, this[0]); Could someone tell me what am I doing wrong? Thank you, Miguel
[jQuery] Re: [OT] please check website before launch
hi mindstormkid, thank you for the feedback! According to your comment and christoph's comment about the loading time: it's a photographer 's portfolio site, it is bound to be image-heavy. So why then load them all up toether instead of streaming them? The barcode cannot work with only partial images. So what i'm thinking is to use the loading time to actually explain what will come up next as rotating text messages. I also am considering displaying each image as a thumbnail once it's loaded. So basically, work on the preloading phase so that it communicates much more. thanks and keep them coming! alexandre On Sat, Oct 25, 2008 at 9:42 PM, MindstormsKid [EMAIL PROTECTED] wrote: ...Wow... That's what I call COOL! It took maybe 30 seconds to load. The nav is interesting (though somewhat confusing, but not too much) Anyway, amazing effects :D Windows XP, Firefox 3.3, Laptop Alexandre Plennevaux-2 wrote: Hi mates, May i ask you guys to have a look at my latest project,a bit on the experimental side in terms of UI : a barcode image gallery for a spanish photographer: http://www.pixeline.be/test/lisapram/ Let me know of any bugs you find? AFAIK everything should run smooth (except for the long loading time). Please indicate your OS platform, browser and hardware specs. The initial load time is quite long so stick around please... Looking forward to your feedback! Thanks a lot, Alexandre -- View this message in context: http://www.nabble.com/-OT--please-check-website-before-launch-tp20157819s27240p20167761.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: please check website before launch
Hi Alex, Glad to see you managed to iron the bugs out. But as I said before, load time is definitely a huge downside to the website. Are the galleries dynamic? If they are not you could just cache/hardcode the bar sizes and then load on demand, or just make the bar sizes relative to the number of pictures, not their dimension. Took about 30 seconds to load here too (4mbps) but that is way too much waiting to expect from regular users. Some points on the interface: 1. It's not clear at first sight that the bars contain pictures, specially if you hover the ones that display a solid white/grey/black background 2. some bars are just too thin, that makes navigation clumsy 3. hover animations could be more responsive, it takes some time to start fading the image in, and the expanding animation is too slow, gets annoying very soon 4. there is no indication that the bars on the bottom are an alternative set navigation, at first it looks like it's relative only to pictures in that set. some coloring in the main 'barcode' and repeated on this one could help make the connection clearer. 5. the right/left arrows are too discrete and look quirky, a simple styled arrow without the vertical bar would be more beautiful and useful 6. after entering a set, there is no apparent way back to the home page/barcode 7. clicking the category names at the top is a mistery. I guess it adds (underline) or removes (no underline) categories from the barcode, but that is far from intuitive and there is no animation, it just pops a new barcode instantly I know this sounds like 'destroying' the original idea of an innovative interface, but you have to make some concessions, I've been through that too. It's not like a game where people enjoy discovering their way through, in this case it's a stone in their path. Great designs for the web are the ones that innovate but still have a natural feel to it, there is no guessing or confusion for the end- user. I'm sure you can figure it out and get this site closer to perfection :) cheers, - ricardo On Oct 24, 7:05 pm, pixeline [EMAIL PROTECTED] wrote: Hi mates, May i ask you guys to have a look at my latest project,a bit on the experimental side in terms of UI : a barcode image gallery for a spanish photographer: http://www.pixeline.be/test/lisapram/ Let me know of any bugs you find? AFAIK everything should run smooth (except for the long loading time). Please indicate your OS platform, browser and hardware specs. The initial load time is quite long so stick around please... Looking forward to your feedback! Thanks a lot, Alexandre
[jQuery] Re: please check website before launch
h Ricardo thanks a lot for the thorought report. Are the galleries dynamic? If they are not you could just cache/hardcode the bar sizes and then load on demand, or just make the bar sizes relative to the number of pictures, not their dimension. that's actually something that could be possible, i'll have to test if it can be a solution. in fact i only need the first image of each set (the one shown on hover), the rest could be loaed on demand. the galleries are dynamic (just wished i could show you the beautiful / ergonomic CMS behind but it's private zone :) ) . but the CMS produces a static output and an xml. The xml is loaded in a noscript tag for non javascript users, and the json is loaded by the rest of us, who have javascript enabled. 5. the right/left arrows are too discrete and look quirky, a simple styled arrow without the vertical bar would be more beautiful and useful they were actually designed by the customer, and i personally find them quite good looking but it's all amount to taste in the end. and you know, it's just arrows. Once you know they are there, you won' spend much time admiring their beauty. 7. clicking the category names at the top is a mistery. I guess it adds (underline) or removes (no underline) categories from the barcode, but that is far from intuitive and there is no animation, it just pops a new barcode instantly it actually filters the barcode, only showing the images related to the keywords underlined. The customer, when encoding an image set, associates one or more of the 5 tags. These keywords enable the visitor to select which images to actually see. note that the current images are just a dummy encoding, so the current associaiton is not relevant, hence your probable confusion? thanks a lot again alexandre On Sun, Oct 26, 2008 at 8:10 PM, ricardobeat [EMAIL PROTECTED] wrote: Hi Alex, Glad to see you managed to iron the bugs out. But as I said before, load time is definitely a huge downside to the website. Are the galleries dynamic? If they are not you could just cache/hardcode the bar sizes and then load on demand, or just make the bar sizes relative to the number of pictures, not their dimension. Took about 30 seconds to load here too (4mbps) but that is way too much waiting to expect from regular users. Some points on the interface: 1. It's not clear at first sight that the bars contain pictures, specially if you hover the ones that display a solid white/grey/black background 2. some bars are just too thin, that makes navigation clumsy 3. hover animations could be more responsive, it takes some time to start fading the image in, and the expanding animation is too slow, gets annoying very soon 4. there is no indication that the bars on the bottom are an alternative set navigation, at first it looks like it's relative only to pictures in that set. some coloring in the main 'barcode' and repeated on this one could help make the connection clearer. 5. the right/left arrows are too discrete and look quirky, a simple styled arrow without the vertical bar would be more beautiful and useful 6. after entering a set, there is no apparent way back to the home page/barcode 7. clicking the category names at the top is a mistery. I guess it adds (underline) or removes (no underline) categories from the barcode, but that is far from intuitive and there is no animation, it just pops a new barcode instantly I know this sounds like 'destroying' the original idea of an innovative interface, but you have to make some concessions, I've been through that too. It's not like a game where people enjoy discovering their way through, in this case it's a stone in their path. Great designs for the web are the ones that innovate but still have a natural feel to it, there is no guessing or confusion for the end- user. I'm sure you can figure it out and get this site closer to perfection :) cheers, - ricardo On Oct 24, 7:05 pm, pixeline [EMAIL PROTECTED] wrote: Hi mates, May i ask you guys to have a look at my latest project,a bit on the experimental side in terms of UI : a barcode image gallery for a spanish photographer: http://www.pixeline.be/test/lisapram/ Let me know of any bugs you find? AFAIK everything should run smooth (except for the long loading time). Please indicate your OS platform, browser and hardware specs. The initial load time is quite long so stick around please... Looking forward to your feedback! Thanks a lot, Alexandre
[jQuery] Re: jQuery Treeview 1.4 by Joern Zaefferer
Bueller? Bueller? On Oct 24, 9:50 am, Cruizer [EMAIL PROTECTED] wrote: Has anyone come across this before? This is the only thing from making this menu perfect in my opinion. Thanks, Brent On Oct 23, 4:29 pm, Cruizer [EMAIL PROTECTED] wrote: I am using this menu for a clients website, and I am having some problems with functionality. I may be reading it wrong, but in the documentation under persist: 'location' it states looks within all tree nodes with link anchors that match the document's current URL (location.href), and if found, expands that node (including its parent nodes). I am under the impression that when I create a URL for a menu item, when clicked it will expand the sub-menu's under that menu item, as well as directing you to the appropriate URL. This is where I am having the problem, it does not expand that menu item to expose the sub menu's when the menu item is a URL When you create the menu item as href=# it works fine, but obviously doesn't take you to the appropriate URL page. If the URL is href=something.html or href=something.php it doesn't work. It starts to expand the menu, then closes right up. To see an example of what I am speaking of, please go to the foloowing website. There click on services, then Engineering. Engineering will take you to a new page but the sub menu's won't show until you click one of the links on the engineering page itself. http://radtke.cgsart.com/v7.0/index.php I thought this might have been a problem related to Persist: location but when I removed that from the .js, the problem still existed. Thanks!- Hide quoted text - - Show quoted text -
[jQuery] SimpleModal containerCSS not working in Firefox or Chrome
Good Afternoon, I tried to override the settings in the default stlyesheet that comes with the simplemodal jquery plugin with containerCSS which is working fine in IE7 but not Firefox or Chrome. Not sure if this is a bug or I am doing something wrong. jQuery: $(document).ready(function() { $(#ButtonPopup).click(function() { $(#addEditTask).modal({ onOpen: modalOpen, persist: true, containerCss: ({ width: 300, height: 200, marginLeft: -150 }) }); return false; }); }); HTML: button id=ButtonPopupPopup/button div id=addEditTask style=display:none; pAliquam nonummy adipiscing augue. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna./ p button id=ButtonSaveSave/button button id=ButtonCancelCancel/button /div Please see http://beckelman.net/issues/simplemodalfirefoxproblem/default.aspx for a working demo and zip download of the code that you can test for yourself. Thanks for the help in advance. Bill
[jQuery] Re: History Plugin
Dear Folks, consider we have page A which has 4 links we filter these Links with javascipt History Plugin which we have, as you can see in below now Our History Plugin Works and it is Bookmarkable and everything is Ok right now, now consider each of these Links Do some Ajax Calls and Load Page B, so we have to give these links the ability to be bookmarkable and support History , so What I did is in to solve this problem , I used Livequery plugin , so I added 1,2...link to it and then Imported the History on it , but what accually happend ,Page I'm working in Page A Links there is no Problem , but when I start to click on the Page B links , You know I could not get back , so page B history works for Page B links , And Page A history works in Page A Links , I think at the first because Page B is not Loaded to the System , It can not realize what it is in it , so ... this happens , I don't know what exactly to do , Just I want to make Dynamic Portal with History support , Dear Karl,Mike Alsup, Jorn ... guys Help ... !---Page A --- div a href='#1' id='1'1/a a href='#2' id='2'2/a a href='#3' id='3'3/a a href='#4' id='4'4/a div id=''load Ajax Contenct Comes here/div /div !---Page B --- div a href='#5' id='5' 5/a a href='#6' id='6' 6/a a href='#7' id='7' 7/a a href='#8' id='8' 8/a /div !-Script - $(document).ready(function(){ $(#1,#2,#3,#4,#5,#6,#7,#8).livequery(function(){ $(this).history(function() { alert($ (this).attr(''id)); $ (this).load('pageb.php') }); }); $.ajaxHistory.initialize(); }); Regards Pedram .
[jQuery] Re: Securing JSON data type
That's an interesting point, and certainly sounds like a good idea. I have to wonder, though, what's the actual security risk? If you're running this bit of code, then by definition you're getting the JSON data from your own domain. So presumably you have control over the data that you're receiving? If you're doing cross-domain JSON, then you are using JSONP, and the downloaded data *will* be eval'ed. There's no way around that; it's how cross-domain JSONP works - it has to be executable JavaScript so that it can be loaded with a dynamic script element instead of XMLHttpRequest. I've probably missed something obvious, so please bring me up to date. :-) I just wanted to point out that there's no way to substitute a more secure parser in the cross-domain JSONP case. For the same-domain case, if you want a more secure parser with the existing jQuery code, simply specify the data type as text instead of json. Then you can parse the JSON text with your choice of parser. -Mike From: Andrew Right now (jquery 1.2.6), the httpData function does this with JSON data: // Get the JavaScript object, if JSON is used. if ( type == json ) data = eval(( + data + )); This is not very secure. It would be better to allow users to choose a JSON parser to use to parse the data into a json object. Now, I can easily override this method, but it is not listed as a public API method. I would prefer that, to prevent breaking myself, that this be split into a separate function: parseJSON: function (string) { return eval(( + data + )); } then document this method as part of the API. now someone can switch this method to use a JSON parser instead (there are several parsers out there and at least one already written as a jq plugin)
[jQuery] Re: Event.target is Parent Child in IE but in Firefox it is child Element
On your sample site both IE and FF alert nav nav. - ricardo On Oct 26, 12:14 pm, csplrj [EMAIL PROTECTED] wrote: I have used Hover Event When I try to get event.target.id, I get the inner child element in Firefox but in IE I get the parent element in IE. The example is athttp://tradeera.com/sapphire/? Is this a bug or some mistake from my side? Thanks in advance CSJakharia
[jQuery] jscrollpane hiding content
jscrollpane somehow sets the width and height of the jScrollPaneContainer to 0 and the scroll-pane height to 0 which hides the content but if i reload the page one or two times it functions. this happens when i am loading the page in an iframe otherwise jscrollpane functions. this is how the html is after i call the jscrollpane. div id=record-scroll-pane-holder div class=jScrollPaneContainer style=height: 0px; width: 0px; div id=record-scroll-pane class=scroll-pane style=height: 0px; padding-right: 5px; width: 272px; /div /div /div i thought it was an issue of the content not being loaded when jscrollpane is called but i used firebug to call jscrollpane after and it didnt function.
[jQuery] Re: jscrollpane not functioning in iframes
thanks ricardo! i am another issue when using jscrollpanes in pages which are loaded in iframes. jscrollpane sets the width and height of the scrollpanecontainer to 0 and the height of the scrollpane to 0. although when i load the page outside of the iframe jscrollpane functions. this issue is inconsistent and there is no error thrown. do you have thoughts why this is happening? thanks! ekene On Oct 6, 9:42 pm, ricardobeat [EMAIL PROTECTED] wrote: It is functioning, but the scrollbar overflows theiframe. Give theiframea width of 292px and you'll see it. - ricardo On Oct 6, 4:06 pm, ekene [EMAIL PROTECTED] wrote: i made two test html pages. this is the link for the child page which callsjscrollpanehttp://ekeneijeoma.com/clients/lrany/recordTest.html this is the script in the recordTest.html page $(document).ready(function(){ $('#record-scroll-pane').jScrollPane(); }); this is the link for the root/parent pagehttp://ekeneijeoma.com/clients/lrany/recordScrollPaneTest.html does anyone see any issues related to why thejscrollpaneis not functioning? using firebug you can see that the divs forjscrollpaneare added to the dom but nothing is displayed. -- View this message in context:http://www.nabble.com/jscrollpane-not-functioning-in-iframes-tp198399... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: please check website before launch
5. the right/left arrows are too discrete and look quirky, a simple styled arrow without the vertical bar would be more beautiful and useful they were actually designed by the customer, and i personally find them quite good looking but it's all amount to taste in the end. and you know, it's just arrows. Once you know they are there, you won' spend much time admiring their beauty. what I meant to say is that they don't look like arrows, their function is not implicit until you hover and realize it's clickable. 7. clicking the category names at the top is a mistery. I guess it adds (underline) or removes (no underline) categories from the barcode, but that is far from intuitive and there is no animation, it just pops a new barcode instantly it actually filters the barcode, only showing the images related to the keywords underlined. The customer, when encoding an image set, associates one or more of the 5 tags. These keywords enable the visitor to select which images to actually see. note that the current images are just a dummy encoding, so the current associaiton is not relevant, hence your probable confusion? similar to above, I think behaviour is not clear. If you click Editorial for example nothing happens, and advertising causes unoticeable changes in the barcode. When you have Professional and Experimental selected, if you click People nothing changes also. In those cases one could think that the interface is not working, because there are no visible changes. I assume all sets tagged People are also tagged as Experimental, that could be the issue. thanks a lot again you're welcome, hope my critics are useful :] - ricardo
[jQuery] Re: please check website before launch
I assume all sets tagged People are also tagged as Experimental, that could be the issue. Exactly. i should have paid more attention to that when setting up the test bed. your critics are very useful! i'll debrief with the customer. but you know, she wanted this experimental interface, so i guess many comments on the usability side will not make any visible UI changes. But i foresee more explanatory instructions during loading time (plus the load-on-demand features) will be direct results of you guys comments. thanks much! alex On Sun, Oct 26, 2008 at 10:41 PM, ricardobeat [EMAIL PROTECTED] wrote: 5. the right/left arrows are too discrete and look quirky, a simple styled arrow without the vertical bar would be more beautiful and useful they were actually designed by the customer, and i personally find them quite good looking but it's all amount to taste in the end. and you know, it's just arrows. Once you know they are there, you won' spend much time admiring their beauty. what I meant to say is that they don't look like arrows, their function is not implicit until you hover and realize it's clickable. 7. clicking the category names at the top is a mistery. I guess it adds (underline) or removes (no underline) categories from the barcode, but that is far from intuitive and there is no animation, it just pops a new barcode instantly it actually filters the barcode, only showing the images related to the keywords underlined. The customer, when encoding an image set, associates one or more of the 5 tags. These keywords enable the visitor to select which images to actually see. note that the current images are just a dummy encoding, so the current associaiton is not relevant, hence your probable confusion? similar to above, I think behaviour is not clear. If you click Editorial for example nothing happens, and advertising causes unoticeable changes in the barcode. When you have Professional and Experimental selected, if you click People nothing changes also. In those cases one could think that the interface is not working, because there are no visible changes. I assume all sets tagged People are also tagged as Experimental, that could be the issue. thanks a lot again you're welcome, hope my critics are useful :] - ricardo
[jQuery] Re: jscrollpane not functioning in iframes
thanks ricardo. im also having 2 more issues... jscrollpane somehow sets the width and height of the jScrollPaneContainer to 0 and the scroll-pane height to 0 which hides the content but if i reload the page one or two times it functions. this happens when i am loading the page in an iframe otherwise jscrollpane functions. this is how the html is after i call the jscrollpane. div id=record-scroll-pane-holder div class=jScrollPaneContainer style=height: 0px; width: 0px; div id=record-scroll-pane class=scroll-pane style=height: 0px; padding-right: 5px; width: 272px; /div /div /div i thought it was an issue of the content not being loaded when jscrollpane is called but i used firebug to call jscrollpane after and it didnt function. this issue is inconsistent and there is no error thrown. i also have another issue in IE which throws an error at line 114 of jscrollpane.js. this issue is also inconsistent. any thoughts? ekene On Oct 6, 9:42 pm, ricardobeat [EMAIL PROTECTED] wrote: It is functioning, but the scrollbar overflows the iframe. Give the iframe a width of 292px and you'll see it. - ricardo On Oct 6, 4:06 pm, ekene [EMAIL PROTECTED] wrote: i made two test html pages. this is the link for the child page which calls jscrollpanehttp://ekeneijeoma.com/clients/lrany/recordTest.html this is the script in the recordTest.html page $(document).ready(function(){ $('#record-scroll-pane').jScrollPane(); }); this is the link for the root/parent pagehttp://ekeneijeoma.com/clients/lrany/recordScrollPaneTest.html does anyone see any issues related to why the jscrollpane is not functioning? using firebug you can see that the divs for jscrollpane are added to the dom but nothing is displayed. -- View this message in context:http://www.nabble.com/jscrollpane-not-functioning-in-iframes-tp198399... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: please check website before launch
Does your client want *customers*? This UI is going to drive them away fast. No offense to you, Alexandre - I know you're a talented designer and developer doing the best you can to satisfy a completely misguided client - but really it's a terrible user experience. -Mike From: Alexandre Plennevaux your critics are very useful! i'll debrief with the customer. but you know, she wanted this experimental interface, so i guess many comments on the usability side will not make any visible UI changes. But i foresee more explanatory instructions during loading time (plus the load-on-demand features) will be direct results of you guys comments.
[jQuery] Re: SimpleModal containerCSS not working in Firefox or Chrome
Bill, Try adding the units for the width, height, and margin: $(#addEditTask).modal({ onOpen: modalOpen, persist: true, containerCss: {width: 300px, height: 200px, marginLeft: -150px} }); -Eric On Oct 26, 1:01 pm, Bill [EMAIL PROTECTED] wrote: Good Afternoon, I tried to override the settings in the default stlyesheet that comes with the simplemodal jquery plugin with containerCSS which is working fine in IE7 but not Firefox or Chrome. Not sure if this is a bug or I am doing something wrong. jQuery: $(document).ready(function() { $(#ButtonPopup).click(function() { $(#addEditTask).modal({ onOpen: modalOpen, persist: true, containerCss: ({ width: 300, height: 200, marginLeft: -150 }) }); return false; }); }); HTML: button id=ButtonPopupPopup/button div id=addEditTask style=display:none; pAliquam nonummy adipiscing augue. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna./ p button id=ButtonSaveSave/button button id=ButtonCancelCancel/button /div Please seehttp://beckelman.net/issues/simplemodalfirefoxproblem/default.aspx for a working demo and zip download of the code that you can test for yourself. Thanks for the help in advance. Bill
[jQuery] Re: [autocomplete] Some random questions
Thanks Jorn. I can say that I've tested the integration of autocomplete and dialog now. :) So far so good. What I was missing was the change from .autocomplete(url/data, options) to .autocomplete({url: , data:, etc.}). Once I found that the plugin worked fine. I have not seen any errors per se. However I did notice the .result() is not binding (or perhaps I'm using it wrong... was planning on looking into that today). But, if autocomplete will not be included until 1.7, then I should probably just use your plugin, rather than UI's version. Thanks for the info. Shawn On Sunday 26 October 2008 06:27:30 Jörn Zaefferer wrote: My plugin was planned for inclusion in 1.6, but won't be part of the final release, it was deferred to 1.7. The UI version is adapter to the UI API and has two or three new features. A list of changes since the 1.0 release is here: http://jquery.bassistance.de/autocomplete/changelog.txt (1.0.2 just fixed some missing semicolon) There hasn't been any testing or documentation effort for integration of dialog and autocomplete. I've created a ticket for that: http://ui.jquery.com/bugs/ticket/3519 Jörn On Sun, Oct 26, 2008 at 8:42 AM, Shawn [EMAIL PROTECTED] wrote: 1. Is there any difference between Jorn's autocomplete from his webpage (http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/) and the one included in jQuery.ui 1.6rc2 ? I can see the copyright info is the same, but don't see a version number for the autocomplete element... 2. Using the jquery.ui version of autocomplete, what steps are needed to make the autocomplete work properly in a modal dialog via jquery.ui's dialog? (my initial tests show the code working, but the result area is not showing - I'm using a theme from the themeroller if that matters). I'm using a local data set for now. 3. It's been about a year since I last looked at autocomplete. Anything new that I should be aware off? (I was using Jorn's plugin back then as well...) Thanks for any info. Shawn
[jQuery] Problem with simplemodal bug?? error?
i have an error when calling twice a function inside iframe with simplemodal. With IE works ok With Firefox i have the error. Prueba.shtml the parent script: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/ TR/html4/strict.dtd html headtitleORCA: CRM Comercial/title meta http-equiv=Content-Type content=text/html; charset=utf-8 style #modalOverlay {background-color:#000; cursor:wait;} #modalContainer { height:400px; width:600px; left:50%; top:15%; margin-left:-300px; /* half the width, to center */ background-color:#fff; border:3px solid #ccc; } #modalContainer a.modalCloseImg { background:url(/gestioncomercial/Scripts/JQuery30/CRM_Modal/basic/ img/x.png) no-repeat; width:25px; height:29px; display:inline; z-index:3200; position:absolute; top:-14px; right:-18px; cursor:pointer; } /style script type=text/javascript src=/gestioncomercial/Scripts/JQuery30/ jquery.js/script script src='/gestioncomercial/Scripts/JQuery30/CRM_Modal/basic/js/ jquery.simplemodal-1.1.1.js' type='text/javascript'/script /headbody a href=javascript:Presenta_Formulario_CRM('Prueba2.shtml')pulsa/ a script type=text/javascript function Presenta_Formulario_CRM (param) { var CRM_Formulario = diva href='javascript:window.frames[\CRM_Dialog \].CRM_Graba_Accion()'Grabar/a/div; CRM_Formulario += 'diviframe src='+param+' name=CRM_Dialog width=100% marginwidth=0 height=750px marginheight=0 scrolling=no frameborder=0 id=CRM_Dialog/iframe/div'; $(CRM_Formulario).modal({ persist: true, closeTitle: ('Cerrar'), containerCss: { height:'600px', width:'800px', left:'30%', top:'5%'}, }); } /script /body/html Prueba2.shtml The script inside the IFRAME: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/ TR/html4/strict.dtd htmlhead meta http-equiv=Content-Type content=text/html; charset=utf-8 titleORCA: CRM Gesti�n Comercial/title script type=text/javascript function CRM_Graba_Accion() {alert (entra);} /script /head body /body/html Launch Prueba.shtml then click pulsa opens the modal then inside the modal click Grabar Works ok (display alert). close the modal and repeat when click Grabar again te function is not recognized WHY?? any help? Regards Enrique
[jQuery] Re: SimpleModal containerCSS not working in Firefox or Chrome
Eric, Awesome. I knew it had to be something simple that I was missing. Adding the units fixed it straight away. Bill
[jQuery] Firefox is showing error console with no errors?
Hi there, I'm creating a one page ordering system that lets kids and parents order lunch. http://clients.blazemelbourne.com.au/cc/order.php It's designed to allow multiple kids and weeks per page, swapping the active ones around using jquery. Works splendidly in almost every browser except Firefox. On Firefox 3 it's just really really slow and jerky. On Firefox 1-2 it's just as slow and particulary on 1 and 1.5 the animation is displayed very poorly - the biggest problem is that Firefox 1-2 are throwing up the error console every time a function is executed - and there are no errors displayed, it's just bringing an empty window up. Here is my code: $(document).ready(function(){ // Get container width var contWidth = 0; $(#container div).each(function() { var object = $(this); contWidth += object.width(); }); $(#container).width(contWidth); // Mark first kid as selected $(#container .kid:first-child).addClass(selected); $(#kidmenu li:first-child).children().addClass(active); // Mark first weeks as selected $(#container .kid .week:first-child).addClass(selected); $(#weekmenu li:first-child).children().addClass(active); // Change kid $(#kidmenu li a).click(function() { changeKid(this); }); function changeKid(item) { // Calculates index var ki = $(#kidmenu li a).index(item); // Selects current kid var sk = $(#container .kid:eq( + ki + )); sk.addClass(selected); sk.siblings().removeClass(selected); // Marks menu item as active $(item).addClass(active); $(item).parent().siblings().children().removeClass(active); // Correct active week menu var swi = $('.week',sk).index($('.week.selected',sk)); $(#weekmenu li:eq( + swi + ) a).addClass(active); $(#weekmenu li:eq( + swi + )).siblings().children().removeClass(active); // Moves container var distance = ki*870; $(#container).animate({left:-(distance)},1000); }; // Change week $(#weekmenu li a).click(function() { changeWeek(this); }); function changeWeek(item) { // Calculates index var wi = $(#weekmenu li a).index(item); // Select current week var sw = $(#container .selected .week:eq( + wi +)); sw.addClass(selected); sw.siblings().removeClass(selected); // Mark menu item as active $(item).addClass(active); $(item).parent().siblings().children().removeClass(active); // Moves kid var distance = wi*600; $(#container .selected).animate({marginTop:-(distance)},1000); }; // label tables odd/even $(document).ready(function(){ $(#container table.menu:even).addClass(even); $(#container table.menu:odd).addClass(odd); }); }); I'm currently using the uncompressed version of jquery 1.2.6. Check out the actual link for the html. If anyone has had any similar problems with sliding jquery windows and error console windows in Firefox it be great to here what you did to fix em up. All the best
[jQuery] jquery.validate.js remote validation issue
I have a registration form that I'm trying to validate using jquery.validate.js v1.2 with jQuery 1.2.6. On the username field, I am doing remote validation to verify the username does not already exist. When I blur out of the field, I *always* get an error under the field telling me the username is already taken, before the remote validation even has a chance to run. If I then refocus the field, the error message goes away; when I blur again, the error message doesn't re-appear. The remote method is clearly returning the proper values (true if the username is available, false if the username is taken). However, I don't understand why the field is being marked invalid before the remote method even runs. Any ideas? Thanks, Rebeca
[jQuery] state - region - suburb drill down using image maps
Hi Everyone, I wonder if I could get some help. I am trying to build a sort of search tool where a user can click a state, then region (maybe a sub region) then suburb to help define a location for where they want to search. This will be used in conjunction with the search location text box. i.e. they can click the map or start typing where they want, and the text and map will be in synch. I have a demo here: http://www.sixfive.co.uk/mapdemo.cfm The flow is like this: user clicks state on map, submit where they clicked to ajax. get new map image, location text and image map back. wash, and repeat. The database will continue to give back the next map and image from state, through regions until there are no more. The problem is that when I redraw the image map, the clicks dont work anymore (i.e. the jquery $(.mapOpt).click(function(){ ) and also the new imagemap insertion didnt work with $(#imgmap).html(r.IMAGEMAP); I had to use the old way var oldskool = document.getElementById('imgmap'); oldskool.innerHTML = r.IMAGEMAP; Any help on how to get the click function to work would be much appreciated. -- Duncan I Loxton [EMAIL PROTECTED]
[jQuery] Re: state - region - suburb drill down using image maps
On 13:26:09 Oct 27, Duncan wrote: The problem is that when I redraw the image map, the clicks dont work anymore (i.e. the jquery $(.mapOpt).click(function(){ ) and also the new imagemap insertion didnt work with $(#imgmap).html(r.IMAGEMAP); I had to use the old way var oldskool = document.getElementById('imgmap'); oldskool.innerHTML = r.IMAGEMAP; You should not be doing this if you are using jQuery. ;) jQuery helps you write beautiful javascript. Any help on how to get the click function to work would be much appreciated. Yeah sure. What you need is the livequery plugin. I use it several times in my application and it works like a charm. The problem you are facing is that after AJAX the event bindings stop working and livequery solves that in an unobtrusive way. Thanks. -Girish
[jQuery] Re: Use JSON from .post
Thank you, that was exactly what I needed to know. Got it all working. Also, the tip about looking at the contents in Firebug is very useful. I have also just started using Firebug and am starting to discover all its useful features. On Oct 26, 9:37 am, Michael Geary [EMAIL PROTECTED] wrote: The example PHP code would actually echo a series of JSON objects all concatenated together, each one having two properties named file and byline. You wouldn't get any kind of valid JSON out of this. It would look something like this (probably without the whitespace): { file: something, byline: something } { file: something, byline: something } { file: something, byline: something } { file: something, byline: something } json_encode looks at an array you give it and decides whether to render it as a JSON array or a JSON object depending on whether it has named properties or only numeric indices. jfryman, if you want to return an *array* of these objects, then make an array of them. Perhaps: $array = array(); while( $row = mysql_fetch_array($result) ) { $array[] = array(file=$row['name'],byline= $row['byline']);} echo json_encode($array); Then, in your jQuery code, replace this: alert( data ); with: console.log( data ); And load your page in Firefox with Firebug. After the data downloads, you should have an entry in the Firebug console. Click on that and you can see the details of the array and drill down into its elements. -Mike From: Ariel Flesler If you are indeed returning an array from PHP, then the received JSON should be a js array. Got this online ? From: jfrymann Hi, I have just started using jQuery and am trying to get data back from a mysql database in json format. I am using PHP to query the database and returning it with the json_encode method. (Basically I am following the example in the documentation http://docs.jquery.com/Ajax/jQuery.post#urldatacallbacktype The problem I am having is that the example only returns one json object rather than an array of them and I'm not sure how to modify the calls to either the php encode json or how to access the data when it is returned through jquery. At the moment my php looks like this: while($row = mysql_fetch_array($result)) { echo json_encode(array(file=$row['name'],byline= $row['byline'])); } and the jQuery: $.post(getimages.php, { location: opt_choice, curr_img: img_cnt, limit: img_lim }, function(data){ alert(data); }, json); How can I set it up to access multiple objects? Thanks for the help!
[jQuery] Re: state - region - suburb drill down using image maps
You should not be doing this if you are using jQuery. ;) heh - I KNOW! but I couldnt get the image map tags to be replaced properly the jquery ways. Thanks for the livequery hint - I will check that out now. On Oct 27, 2:08 pm, Girish Venkatachalam [EMAIL PROTECTED] wrote: On 13:26:09 Oct 27, Duncan wrote: The problem is that when I redraw the image map, the clicks dont work anymore (i.e. the jquery $(.mapOpt).click(function(){ ) and also the new imagemap insertion didnt work with $(#imgmap).html(r.IMAGEMAP); I had to use the old way var oldskool = document.getElementById('imgmap'); oldskool.innerHTML = r.IMAGEMAP; You should not be doing this if you are using jQuery. ;) jQuery helps you write beautiful javascript. Any help on how to get the click function to work would be much appreciated. Yeah sure. What you need is the livequery plugin. I use it several times in my application and it works like a charm. The problem you are facing is that after AJAX the event bindings stop working and livequery solves that in an unobtrusive way. Thanks. -Girish
[jQuery] Re: jscrollpane not functioning in iframes
The first issue sounds like something I experienced when using jscrollpane and ui-tabs I resolved this by calling jscrollpane before tabs. So perhaps you have somethings conflicting with each other (or causing the issue with jscrollpane) 2008/10/26 ekene [EMAIL PROTECTED] thanks ricardo. im also having 2 more issues... jscrollpane somehow sets the width and height of the jScrollPaneContainer to 0 and the scroll-pane height to 0 which hides the content but if i reload the page one or two times it functions. this happens when i am loading the page in an iframe otherwise jscrollpane functions. this is how the html is after i call the jscrollpane. div id=record-scroll-pane-holder div class=jScrollPaneContainer style=height: 0px; width: 0px; div id=record-scroll-pane class=scroll-pane style=height: 0px; padding-right: 5px; width: 272px; /div /div /div i thought it was an issue of the content not being loaded when jscrollpane is called but i used firebug to call jscrollpane after and it didnt function. this issue is inconsistent and there is no error thrown. i also have another issue in IE which throws an error at line 114 of jscrollpane.js. this issue is also inconsistent. any thoughts? ekene On Oct 6, 9:42 pm, ricardobeat [EMAIL PROTECTED] wrote: It is functioning, but the scrollbar overflows the iframe. Give the iframe a width of 292px and you'll see it. - ricardo On Oct 6, 4:06 pm, ekene [EMAIL PROTECTED] wrote: i made two test html pages. this is the link for the child page which calls jscrollpanehttp:// ekeneijeoma.com/clients/lrany/recordTest.html this is the script in the recordTest.html page $(document).ready(function(){ $('#record-scroll-pane').jScrollPane(); }); this is the link for the root/parent pagehttp:// ekeneijeoma.com/clients/lrany/recordScrollPaneTest.html does anyone see any issues related to why the jscrollpane is not functioning? using firebug you can see that the divs for jscrollpane are added to the dom but nothing is displayed. -- View this message in context: http://www.nabble.com/jscrollpane-not-functioning-in-iframes-tp198399... Sent from the jQuery General Discussion mailing list archive at Nabble.com.