[jQuery] Re: Form got submitted when I hit enter on select the value in autocomplete box
Any help on this? On Mon, Aug 24, 2009 at 11:14 PM, pankaj sharmapankaj1...@gmail.com wrote: Hi All, In my application,there are several autocomplte field is available. When I type pank and then it list out the several matching in the autocomplete field and select one and then hit the enter then it submitted the entire form, which will cause the error message. Because there are several more mandatory field are there, which i need to fill up. I was trying to restrict in this way, but i believe this is the wrong way. The following will disable enter-to-submit for the entire form. $(#myForm).bind(keypress, function(event) { if(event.keyCode == 13) { return false; } }); Please help me how to resolve this issue in Jquery autocomplete plugin, so that the should not sumbit on hitting enter in autocomplete text box. I am new to this forum, please let me know if you need any more info on this? Thanks
[jQuery] Re: setData and extraParams problem
Hi Joern, I found one thing while debugging. If I changed this code var fieldname = this.id; To var fieldname = this.id.replace(/([{}])/g, '\\$1'); Above fieldname values may come in this format: xyz or abc{1} or mnp{2} Then the previous working application (old jquery) is also got break. So culprit is this code. If I change that in our current application then this.id creates a javascript error as uncaught exception: Syntax error, unrecognized expression: {1}. Any help will be appreciated. Thanks On Tue, Aug 25, 2009 at 8:20 PM, pankaj sharmapankaj1...@gmail.com wrote: Thanks Jorn for your response. I have recently working on this. I could not found the exact version from the file jquery.autocomplete.js . At the top of the .js its as follows. What is the way to get the version? /* * jQuery UI Autocomplete @VERSION * * Copyright (c) 2007, 2008 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörnn Zaefferer * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Autocomplete * * Depends: * ui.core.js */ Yes i have already tried this option autocomplete(option, extraParams, ...) instead of setData. But that also does not solve my issue. Thanks On Fri, Aug 21, 2009 at 12:51 AM, Jörn Zaeffererjoern.zaeffe...@googlemail.com wrote: What exact version of the autocomplete plugin are you using? Have you tried autocomplete(option, extraParams, ...) instead of setData? Jörn On Sat, Aug 8, 2009 at 6:19 PM, pankajpankaj1...@gmail.com wrote: Actually this part was working previously.I found one difference here, maybe that help us to find out the actual root cause. Please let me know if any of you are aware of this issue. Here is OLD and NEW difference of calling auto-completion. = OLD: // Pass along field dependency values to filter auto-completion list. $textbox.focus(function() { var fieldname = this.id; $(this).flushCache(); params = { fname:fieldname }; $(this).setOptions({ extraParams:add_deps(autocomplete_drilldowns, fieldname, params) }); }); NEW: // Pass along field dependency values to filter auto-completion list. $textbox.focus(function() { var fieldname = this.id.replace(/([{}])/g, '\\$1'); $(this).autocomplete('flushCache'); params = { fname:fieldname }; $(this).autocomplete('setData', { extraParams:add_deps (autocomplete_drilldowns, fieldname, params) }); }); === Is this causing any issue? Thanks On Aug 8, 2:19 pm, pankaj pankaj1...@gmail.com wrote: Hi All, When I do focus is on the autocompletion textbox, that triggers the function right below where the autocompletion plugin is initialized , which is supposed to add the key=value values to form the remote url. Based on this remote url I am getting the filtered output, which will list out in the autocompletion textbox but its not adding key=value. So I am getting all the list. I think the setData is not setting the extraParams. help? For example: If i select one field in the Html form say product xyz and based on this the release field should 3 values 1.1 | 1.2 | 1.3, but it displays all the list (almost 300 values). Its because when i select something in the autocompletion textbox then the url format should be something like this: http://mdx.lt.com/xyz/abc/ac-list?q=1.limit=300timestamp=1249677100...{1}product=mmm Instead of the above it is formating as. Here product field is missing, due to which it displays all the release value. http://mdx.lt.com/xyz/abc/ac-list?q=1.limit=300timestamp=1249677100...{1}. This is my autocomplete call: $field.autocomplete({ url:ac_url, cacheLength:1, matchContains:true, max:300, width:'50%', scrollHeight:320, minChars:1, extraParams:{ fname:fieldname }, formatItem: function(data, i, max, value, term) { // data will be an array of value, description return 'span class=ui-autocomplete-value' + value + '/spanspan class=ui-autocomplete-info' + data[1] + '/ span'; } }); $field.autocomplete('result', function() { $field.change(); // Notify mass edit that the field's value has changed. $field.blur(); // Trigger auto-set. }); }); // Pass along field dependency values to filter auto-completion list. $textbox.focus(function() { var fieldname = this.id.replace(/([{}])/g, '\\$1'); $(this).autocomplete('flushCache'); params = { fname:fieldname }; $(this).autocomplete('setData', { extraParams:add_deps (autocomplete_drilldowns
[jQuery] Re: setData and extraParams problem
Thanks Jorn for your response. I have recently working on this. I could not found the exact version from the file jquery.autocomplete.js . At the top of the .js its as follows. What is the way to get the version? /* * jQuery UI Autocomplete @VERSION * * Copyright (c) 2007, 2008 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörnn Zaefferer * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Autocomplete * * Depends: * ui.core.js */ Yes i have already tried this option autocomplete(option, extraParams, ...) instead of setData. But that also does not solve my issue. Thanks On Fri, Aug 21, 2009 at 12:51 AM, Jörn Zaeffererjoern.zaeffe...@googlemail.com wrote: What exact version of the autocomplete plugin are you using? Have you tried autocomplete(option, extraParams, ...) instead of setData? Jörn On Sat, Aug 8, 2009 at 6:19 PM, pankajpankaj1...@gmail.com wrote: Actually this part was working previously.I found one difference here, maybe that help us to find out the actual root cause. Please let me know if any of you are aware of this issue. Here is OLD and NEW difference of calling auto-completion. = OLD: // Pass along field dependency values to filter auto-completion list. $textbox.focus(function() { var fieldname = this.id; $(this).flushCache(); params = { fname:fieldname }; $(this).setOptions({ extraParams:add_deps(autocomplete_drilldowns, fieldname, params) }); }); NEW: // Pass along field dependency values to filter auto-completion list. $textbox.focus(function() { var fieldname = this.id.replace(/([{}])/g, '\\$1'); $(this).autocomplete('flushCache'); params = { fname:fieldname }; $(this).autocomplete('setData', { extraParams:add_deps (autocomplete_drilldowns, fieldname, params) }); }); === Is this causing any issue? Thanks On Aug 8, 2:19 pm, pankaj pankaj1...@gmail.com wrote: Hi All, When I do focus is on the autocompletion textbox, that triggers the function right below where the autocompletion plugin is initialized , which is supposed to add the key=value values to form the remote url. Based on this remote url I am getting the filtered output, which will list out in the autocompletion textbox but its not adding key=value. So I am getting all the list. I think the setData is not setting the extraParams. help? For example: If i select one field in the Html form say product xyz and based on this the release field should 3 values 1.1 | 1.2 | 1.3, but it displays all the list (almost 300 values). Its because when i select something in the autocompletion textbox then the url format should be something like this: http://mdx.lt.com/xyz/abc/ac-list?q=1.limit=300timestamp=1249677100...{1}product=mmm Instead of the above it is formating as. Here product field is missing, due to which it displays all the release value. http://mdx.lt.com/xyz/abc/ac-list?q=1.limit=300timestamp=1249677100...{1}. This is my autocomplete call: $field.autocomplete({ url:ac_url, cacheLength:1, matchContains:true, max:300, width:'50%', scrollHeight:320, minChars:1, extraParams:{ fname:fieldname }, formatItem: function(data, i, max, value, term) { // data will be an array of value, description return 'span class=ui-autocomplete-value' + value + '/spanspan class=ui-autocomplete-info' + data[1] + '/ span'; } }); $field.autocomplete('result', function() { $field.change(); // Notify mass edit that the field's value has changed. $field.blur(); // Trigger auto-set. }); }); // Pass along field dependency values to filter auto-completion list. $textbox.focus(function() { var fieldname = this.id.replace(/([{}])/g, '\\$1'); $(this).autocomplete('flushCache'); params = { fname:fieldname }; $(this).autocomplete('setData', { extraParams:add_deps (autocomplete_drilldowns, fieldname, params) }); }); What is the right way to see what the above function (add_deps) is returning? Any help will be greatly appreciated. Thanks,
[jQuery] Form got submitted when I hit enter on select the value in autocomplete box
Hi All, In my application,there are several autocomplte field is available. When I type pank and then it list out the several matching in the autocomplete field and select one and then hit the enter then it submitted the entire form, which will cause the error message. Because there are several more mandatory field are there, which i need to fill up. I was trying to restrict in this way, but i believe this is the wrong way. The following will disable enter-to-submit for the entire form. $(#myForm).bind(keypress, function(event) { if(event.keyCode == 13) { return false; } }); Please help me how to resolve this issue in Jquery autocomplete plugin, so that the should not sumbit on hitting enter in autocomplete text box. I am new to this forum, please let me know if you need any more info on this? Thanks
[jQuery] setData and extraParams problem
Hi All, When I do focus is on the autocompletion textbox, that triggers the function right below where the autocompletion plugin is initialized , which is supposed to add the key=value values to form the remote url. Based on this remote url I am getting the filtered output, which will list out in the autocompletion textbox but its not adding key=value. So I am getting all the list. I think the setData is not setting the extraParams. help? For example: If i select one field in the Html form say product xyz and based on this the release field should 3 values 1.1 | 1.2 | 1.3, but it displays all the list (almost 300 values). Its because when i select something in the autocompletion textbox then the url format should be something like this: http://mdx.lt.com/xyz/abc/ac-list?q=1.limit=300timestamp=1249677100317fname=release{1}product=mmm Instead of the above it is formating as. Here product field is missing, due to which it displays all the release value. http://mdx.lt.com/xyz/abc/ac-list?q=1.limit=300timestamp=1249677100317fname=release{1}. This is my autocomplete call: $field.autocomplete({ url:ac_url, cacheLength:1, matchContains:true, max:300, width:'50%', scrollHeight:320, minChars:1, extraParams:{ fname:fieldname }, formatItem: function(data, i, max, value, term) { // data will be an array of value, description return 'span class=ui-autocomplete-value' + value + '/spanspan class=ui-autocomplete-info' + data[1] + '/ span'; } }); $field.autocomplete('result', function() { $field.change(); // Notify mass edit that the field's value has changed. $field.blur(); // Trigger auto-set. }); }); // Pass along field dependency values to filter auto-completion list. $textbox.focus(function() { var fieldname = this.id.replace(/([{}])/g, '\\$1'); $(this).autocomplete('flushCache'); params = { fname:fieldname }; $(this).autocomplete('setData', { extraParams:add_deps (autocomplete_drilldowns, fieldname, params) }); }); What is the right way to see what the above function (add_deps) is returning? Any help will be greatly appreciated. Thanks,
[jQuery] Re: setData and extraParams problem
Actually this part was working previously.I found one difference here, maybe that help us to find out the actual root cause. Please let me know if any of you are aware of this issue. Here is OLD and NEW difference of calling auto-completion. = OLD: // Pass along field dependency values to filter auto-completion list. $textbox.focus(function() { var fieldname = this.id; $(this).flushCache(); params = { fname:fieldname }; $(this).setOptions({ extraParams:add_deps(autocomplete_drilldowns, fieldname, params) }); }); NEW: // Pass along field dependency values to filter auto-completion list. $textbox.focus(function() { var fieldname = this.id.replace(/([{}])/g, '\\$1'); $(this).autocomplete('flushCache'); params = { fname:fieldname }; $(this).autocomplete('setData', { extraParams:add_deps (autocomplete_drilldowns, fieldname, params) }); }); === Is this causing any issue? Thanks On Aug 8, 2:19 pm, pankaj pankaj1...@gmail.com wrote: Hi All, When I do focus is on the autocompletion textbox, that triggers the function right below where the autocompletion plugin is initialized , which is supposed to add the key=value values to form the remote url. Based on this remote url I am getting the filtered output, which will list out in the autocompletion textbox but its not adding key=value. So I am getting all the list. I think the setData is not setting the extraParams. help? For example: If i select one field in the Html form say product xyz and based on this the release field should 3 values 1.1 | 1.2 | 1.3, but it displays all the list (almost 300 values). Its because when i select something in the autocompletion textbox then the url format should be something like this: http://mdx.lt.com/xyz/abc/ac-list?q=1.limit=300timestamp=1249677100...{1}product=mmm Instead of the above it is formating as. Here product field is missing, due to which it displays all the release value. http://mdx.lt.com/xyz/abc/ac-list?q=1.limit=300timestamp=1249677100...{1}. This is my autocomplete call: $field.autocomplete({ url:ac_url, cacheLength:1, matchContains:true, max:300, width:'50%', scrollHeight:320, minChars:1, extraParams:{ fname:fieldname }, formatItem: function(data, i, max, value, term) { // data will be an array of value, description return 'span class=ui-autocomplete-value' + value + '/spanspan class=ui-autocomplete-info' + data[1] + '/ span'; } }); $field.autocomplete('result', function() { $field.change(); // Notify mass edit that the field's value has changed. $field.blur(); // Trigger auto-set. }); }); // Pass along field dependency values to filter auto-completion list. $textbox.focus(function() { var fieldname = this.id.replace(/([{}])/g, '\\$1'); $(this).autocomplete('flushCache'); params = { fname:fieldname }; $(this).autocomplete('setData', { extraParams:add_deps (autocomplete_drilldowns, fieldname, params) }); }); What is the right way to see what the above function (add_deps) is returning? Any help will be greatly appreciated. Thanks,
[jQuery] Re: JQuery autocomplete got broke after i update it.
Hi All, Can someone please help me to fix this issue? i am not sure if I am posting in the right alias? Thanks, Pankaj On Wed, Aug 5, 2009 at 9:02 PM, pankaj pankaj1...@gmail.com wrote: Hi All, After I update JQuery autocomplete plugin (jQuery UI Autocomplete @VERSION), I found one issue. The issue is as follows. When I type jua in the autocomplete field. Four matches are returned for users with the first name juan. Then add an n.Only the first match remains in the list. I have come out from this issue by changing the parameter cacheLength: 0 in place of 1. $field.autocomplete({ url:ac_url, cacheLength:1, For the autocompletion data, it reads from the configuration files. Say in the files the data are in this way. jflores:Juan Flores:jflo...@gmail.com flores%3ajflo...@gmail.com jgomez:Juan Gomez:jgo...@gmail.com gomez%3ajgo...@gmail.com jrafaela:Juan Carlos Rafaela:jrafa...@gmail.comrafaela%3ajrafa...@gmail.com jromo:Juan Romo:jr...@gmail.com romo%3ajr...@gmail.com juanw:Juan Wang:ju...@gmail.com wang%3aju...@gmail.com It works for previous issue, But creates another problem, If i change cacheLength to 0 then if i add some new name in the configuration file then it is not taking that updataed data. If i change to 1 then after i type juan it displays the last one. That is juanw and it not displays the other 4name. I could not understand what is missing here. Please help me to resolve this issue. Please let me know if you need more info on this? Thanks,
[jQuery] A script on this page is causing Internet explorer to run slowly
Hi, I got this message when i try to open the main page of my application pankaj.site in IE 6 or IE 7. This is working fine in Firefox, Safari etc. Stop running the script? A script on this page is causing IE to run slowly. If it continues to run, your computer may become unresponsive. After I clicked the Yes button, then the loading message came up and stopped there. Any help will be greatly appreciated. Thanks
[jQuery] JQuery autocomplete got broke after i update it.
Hi All, After I update JQuery autocomplete plugin (jQuery UI Autocomplete @VERSION), I found one issue. The issue is as follows. When I type jua in the autocomplete field. Four matches are returned for users with the first name juan. Then add an n.Only the first match remains in the list. I have come out from this issue by changing the parameter cacheLength: 0 in place of 1. $field.autocomplete({ url:ac_url, cacheLength:1, For the autocompletion data, it reads from the configuration files. Say in the files the data are in this way. jflores:Juan Flores:jflo...@gmail.com jgomez:Juan Gomez:jgo...@gmail.com jrafaela:Juan Carlos Rafaela:jrafa...@gmail.com jromo:Juan Romo:jr...@gmail.com juanw:Juan Wang:ju...@gmail.com It works for previous issue, But creates another problem, If i change cacheLength to 0 then if i add some new name in the configuration file then it is not taking that updataed data. If i change to 1 then after i type juan it displays the last one. That is juanw and it not displays the other 4name. I could not understand what is missing here. Please help me to resolve this issue. Please let me know if you need more info on this? Thanks,
[jQuery] Treeview : how to add selected class to clicked item.
I would like to highlight current selected node to the user, making current selection more visually clear using CSS If we use persist:Location, node is hightlighted [adds the selected class], but only when u refresh the page. Can some one guide me how to implement it on per click basis ? Regards, Pankaj
[jQuery] jquery file upload with form plugin
Hi.. Trying to upload file with jquery form plugin , file was uploading but i was not getting json response still i have set frame parameter as true in ajax submit request options. please suggest Thanks in advance.
[jQuery] Seat reservation using jquery
Hi, I am working on an application where I need to book online seats. For that i need to first populate my page with the seat info (ie: how many seats are vacant, how many are booked, how many are at special prices). This needs to be done dynamically as it will change on the fly according to the database. can someone please help me with this?? Its very urgent. Will be really grateful.. Thanks :)
[jQuery] jQuery ui-interface sortable: contents of callback funciton parameter, ui
Hi, ui-interface sortable has many callbacks. For example update:function(e,ui) etc. The contents of the object ui varies for different callbacks. Can any one tell what are the contents for this object. In documentation on jquery site only partial information is given. * ui.options - options used to initialize the sortable * ui.position - current position of the helper * ui.absolutePosition - current absolute position of the helper * ui.helper - the current helper element (most often a clone of the item) * ui.placeholder - the placeholder (if you defined one). Wheras on the demo page ohter things such as ui.item, ui.sender can be seen. Can any one provide a complete list or how to get one Thanks, Pankaj