[jQuery] Re: JQuery XML parsing is not working in IE?
Yes I tried JSON laterly, and it works so greatly. On Fri, Feb 20, 2009 at 5:30 AM, akzhan wrote: > > How to reproduce this problem? > > By the way, Json format is more attractive way for data exchange (Json > included into core or additional modules of all known Web server > platforms)... > > On 20 фев, 12:02, Samuel wrote: > > Is there any solutions for this? I have a similar problem. > > > > I've added mimetype="text/xml" in Django's views.py > > > > It works well on firefox, opera and chrome, but not working on all IE > > browsers, and the webkit kerneled browser on adroid. > > > > Thanks for your helps. > > > > > > > > > > > > On Sat, Feb 14, 2009 at 9:26 PM, cindy wrote: > > > > > Hi, all, > > > > > I have used following code to parse XML file, it works very well for > > > firefox, but not for IE. Can any one told me why and solution ? > > > Thanks! > > > > > (rXml).find("wired_port").each(function() > > >{ > > >var o=new Object(); > > >o.port=$("number",this).text(); > > >o.mac_address=$("mac_addr",this).text(); > > > > >var enabled=$("enable",this).text(); > > >var > > > interface_status=$("interface_status",this).text(); > > >var link_status=$("link_status",this).text(); > > > > >if(link_status==1) > > >o.status ="Connected"; > > >else if(interface_status == 1) > > >o.status = "Link Down"; > > >else if (enabled== 0) > > >o.status = "Disabled"; > > >else > > >o.status = "Error"; > > > > >var speed=$("speed",this).text(); > > >var auto_neg=$("auto_neg",this).text(); > > > > >if(auto_neg==1) > > >o.speed=speed+"(auto)"; > > >else > > >o.speed=speed; > > > > >var duplex=$("duplex",this).text(); > > >if(duplex==0) > > >o.duplex_type="Half"; > > >else > > >o.duplex_type="Full"; > > > > > o.fwd_mode=rap_util.formatFwdMode($("fwd_mode",this).text()); > > >o.wired_port_empty=""; > > >o.user=$("user_count",this).text(); > > > > > o.tx_packets=rap_util.formatPackets($("tx_packets",this).text()); > > > > > o.rx_packets=rap_util.formatPackets($("rx_packets",this).text()); > > >wiredPorts.push(o); > > >}); > > > > -- > > Samuel Wu > -- Samuel(吴焱红)
[jQuery] Re: Loading More Entries According to the Users Screen Size
Hi Pete, First of all, thanks for replying. loadEntries() will always return 20 results each time. I can't make it return 20 results one time and 23 results the next time. Basically I want to call it enough times to fill the whole page with entries so that the scroll bar shows up. So for a larger screen I would need to call loadEntries() a few more times than for a smaller screen. How many times loadEntries() is called depends on screen size. Basically the goal is to get the scroll bar to show up so that when the user scrolls my onScroll function is called. Without the scrollbar the onScroll function doesn't get called and more entries don't load. Obviously the number of entries loaded onPageLoad can't be static due to varying user screen sizes. Basically I was trying to do the following in setup(): start = 0; getMaxEntries(); var docHeight = document.body.clientHeight; while(docHeight < window.innerHeight) { if(start > 0) { loadEntries(); docHeight += 500; } } Note: getMaxEntries() sets the value of start. So when getMaxEntries() is called start will hold the number for the total amount of entries. But the problem is that the above code gives me a unresponsive script error. -- Sid "Veni, vidi, vici" --- http://blog.sidkalra.com http://www.sidkalra.com On Mon, Mar 9, 2009 at 11:59 PM, pedalpete wrote: > > > I hope I understand you problem correctly, a bit difficult to get the > visual. > > Two things you didn't specify > 1) how many results you expect to get per screen size > 2) will subsequent requests result number be equal no matter what > size? or also depend on the screen size? > > What i would suggest is to get the window size (I assume we are > talking length) and see if you can get a number from that. For > instance 600px/30=20. So if the user had a window height of 600px you > would get 20 results. > 800px would give you 23. > > > is that too simplistic for what you're looking for?
[jQuery] Re: Loading More Entries According to the Users Screen Size
I hope I understand you problem correctly, a bit difficult to get the visual. Two things you didn't specify 1) how many results you expect to get per screen size 2) will subsequent requests result number be equal no matter what size? or also depend on the screen size? What i would suggest is to get the window size (I assume we are talking length) and see if you can get a number from that. For instance 600px/30=20. So if the user had a window height of 600px you would get 20 results. 800px would give you 23. is that too simplistic for what you're looking for?
[jQuery] Re: location.hash -scrolling to the middle of the page
> > I avoid using scrollTo because I wanna have #about in the url so that > > i can refer to specific part of my page. > > So I didn't use scrollTo plugin but using the mothed posted from here: > >http://www.zachstronaut.com/posts/2009/01/18/jquery-smooth-scroll-bug... You can keep the hash (#about) in the url and even react to it on page load, automatically. You need to use localScroll[1], which is a wrapper for the aforementioned scrollTo. When the option 'hash' is set to true, it'll update the hash as it'd normally do. [1]http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html Cheers -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: location.hash -scrolling to the middle of the page
> > I avoid using scrollTo because I wanna have #about in the url so that > > i can refer to specific part of my page. > > So I didn't use scrollTo plugin but using the mothed posted from here: > >http://www.zachstronaut.com/posts/2009/01/18/jquery-smooth-scroll-bug... You can keep the hash (#about) in the url and even react to it on page load, automatically. You need to use localScroll[1], which is a wrapper for the aforementioned scrollTo. When the option 'hash' is set to true, it'll update the hash as it'd normally do. [1]http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html Cheers -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Loading More Entries According to the Users Screen Size
I'm a novice user of JQuery and there is something I want to do but I'm not sure whether JQuery can help me with this or not. Here is what I want to do: Basically I have an on scroll feature that loads more entries when a user scrolls down. So I have that working, np there. But the problem is that the scroll bar doesn't show up on the page because the initial number of entries, onPageLoad aren't enough. onPageLoad, I want to be able to dynamically add more entries according to the users screen size. The following are the functions I have: loadEntries() --> xmlhttpRequest that gets the data and appends it on the screen getMaxEntries() --> xmlhttpRequest that gets the total number of entries that can be retrieved $(window).scroll(function() --> calls loadEntries() I also have setup() --> calls getMaxEntries(), here is where I would like call loadEntries() a few times (according to the screen size) The only way I could get entries to load dynamically, onPageLoad was via a loop that called loadEntries() but that gave me an unresponsive script error, which I want to avoid. Is there any way that JQuery can help me in solving this problem? Thanks, Sid "Veni, vidi, vici" --- http://blog.sidkalra.com http://www.sidkalra.com
[jQuery] Re: superfish problem
long menu item » subitem 1a subitem 1b subitem 1c subitem 1d . On Mar 9, 5:19 am, droidster wrote: > Hi i downloaded and read the instructions for the superfish module but > i have alot of problems getting the menu to work in nav bar menu > style. > > I tried to paste the superfish-navbar.css to the main superfish.css > but i dun understand this part "add the class sf-navbar to the parent > ul along with the usual sf-menu class, and initialise as normal." > > Can u tell me exactly where do i add in order to achieve this nav bar > effect thanks!
[jQuery] Re: Getting text from a div
That works too :), although much more dependent upon your markup. On Mar 9, 7:10 pm, RobG wrote: > On Mar 10, 9:14 am, bawestcott wrote: > > > I am using the jquery windows plugin and i would like to be able to > > get the title of each window that is created. An example of the html > > that the plugin creates for the windows title bar is: > > > > Click Example5 > > - > > O > > X > > > > > In this case I would like to get the value "Click Example 5" from this > > particular window. I can get the values of all of the divs in > > windowTitleBar ("Click Example5-0X"), but I can't figure out how to > > get the firat value only. > > Can someone plase help? > > Where div is a reference to the div you want: > > div.firstChild.data; > > -- > Rob
[jQuery] Re: Getting text from a div
I had no idea that it was as complicated as it is. I downloaded the plugin and it worked great. Thanks. On Mar 9, 6:29 pm, mkmanning wrote: > There's at least one plugin (http://plugins.learningjquery.com/ > textchildren/); you might want to search the plugin repository. If you > aren't going to take advantage of it's other features, and don't want > to incur an additional http request just for this, you can do it with > jQuery: > > $.trim($('div.window-titleBar').clone().children().remove().end().text > ()); > > On Mar 9, 4:14 pm, bawestcott wrote: > > > > > I am using the jquery windows plugin and i would like to be able to > > get the title of each window that is created. An example of the html > > that the plugin creates for the windows title bar is: > > > > Click Example5 > > - > > O > > X > > > > > In this case I would like to get the value "Click Example 5" from this > > particular window. I can get the values of all of the divs in > > windowTitleBar ("Click Example5-0X"), but I can't figure out how to > > get the firat value only. > > Can someone plase help?- Hide quoted text - > > - Show quoted text -
[jQuery] Re: Getting text from a div
On Mar 10, 9:14 am, bawestcott wrote: > I am using the jquery windows plugin and i would like to be able to > get the title of each window that is created. An example of the html > that the plugin creates for the windows title bar is: > > Click Example5 > - > O > X > > > In this case I would like to get the value "Click Example 5" from this > particular window. I can get the values of all of the divs in > windowTitleBar ("Click Example5-0X"), but I can't figure out how to > get the firat value only. > Can someone plase help? Where div is a reference to the div you want: div.firstChild.data; -- Rob
[jQuery] nsIXMLHttpRequest.open error
I get the error [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: http://tjshafer.com/projects/boyd/js/jquery-1.3.2.min.js :: anonymous :: line 19" data: no] [Break on this error] (function(){var R=/((?:\((?:\([^()]+\)|[... (J,typeof K==="string"?K:K+"px")}})})(); Here is the page it is on http://tjshafer.com/projects/boyd/home.php click on add new on the left menu, a form will pop open and when you click next you can see the error in firebug please let me know what it might be -thanks, tj
[jQuery] Re: location.hash -scrolling to the middle of the page
Just use what's in the article, and modify the value that goes into this line: var targetOffset = $(this.hash).offset().top; with something like: var offset = 0 - Math.round( $(window).height() / 2 ); var targetOffset = $(this.hash).offset().top - offset; > I avoid using scrollTo because I wanna have #about in the url so that > i can refer to specific part of my page. > So I didn't use scrollTo plugin but using the mothed posted from here: > http://www.zachstronaut.com/posts/2009/01/18/jquery-smooth-scroll-bugs.html > > Do u have any idea that i can still using location.hash? > > thanks On Mar 9, 11:58 pm, James wrote: > Try using the ScrollTo > plugin:http://flesler.blogspot.com/2007/10/jqueryscrollto.html > > Use the anchor/div element as the element to scroll to, and calculate > the offset (based on height of a user's viewport) so the it'll scroll > to somewhere just above that, leaving the element in the center. > > On Mar 9, 11:50 am, mangajin wrote: > > > Hi, > > > Normally when we have this url :www.mypage.html#aboutt, the browser > > will jump to the area that anchor or div element has #about. By > > default the browser will show that anchor or div at the top most of > > the page. Are there any ways in jQuery that show that specific anchor > > in the middle of bottom of the page? > > > Thanks On Mar 9, 12:58 pm, James wrote: > Try using the ScrollTo > plugin:http://flesler.blogspot.com/2007/10/jqueryscrollto.html > > Use the anchor/div element as the element to scroll to, and calculate > the offset (based on height of a user's viewport) so the it'll scroll > to somewhere just above that, leaving the element in the center. > > On Mar 9, 11:50 am, mangajin wrote: > > > Hi, > > > Normally when we have this url :www.mypage.html#aboutt, the browser > > will jump to the area that anchor or div element has #about. By > > default the browser will show that anchor or div at the top most of > > the page. Are there any ways in jQuery that show that specific anchor > > in the middle of bottom of the page? > > > Thanks > >
[jQuery] [Quite OT] charsets, chr values, & errant characters
My apologies in advance for posting this question here - but I feel I've exhausted other avenues available/known to me and I don't know where else to seek help. Even direction to more appropriate forums to post such a query would be very helpful. I'm having difficulty identifying a strange character that is being entered by forum users through a WYSIWIG editor (tinyMCE) running on a MS ASP site with an Access database. The character appears as a box in IE and diamond/question mark in FF. I've tried the following attempted fixes: 1. I've changed the charset from iso-8859-1 to UTF-8 without success. (see http://lifewriting226.massey.ac.nz/dumpthis.asp (iso-8859-1 charset) and http://lifewriting226.massey.ac.nz/dumpthis2.asp (UTF-8 charset). 2. I've added 'accept-charset="UTF-8"' to the form - without success. 3. I've made sure that the charset meta tag comes immediately after the head statement - no improvement. 4. I've tried to identify the chr() value of the character. However, when I load an "infected" file into a hex viewer, 3 characters 'occupy' the space of the character - EF BF BD - but when I enter their chr() equivalents - 239, 191, 189 - in a 'search and destroy' operation, I cannot erase the character. 5. I've changed the WYSIWIG editor but still get the problem. 6. I've tried Experts Exchange for a solution without success. This character seems to be mainly associated with either a space character - if I use the spacebar to insert two spaces between a word then one of those spaces is often 'translated' into the errant character - or if I add a blank line between two paragraphs - the character will appear between the p tags of the blank line that the editor inserts. How can I solve this problem? How can I identify the character so that I can strip it out of the data stream before it is stored? Thanks - Bruce
[jQuery] Re: Jquery.param encoding wrong
jQuery.param encodes the string in UTF-8 because it uses encodeURIComponent internally. If you know your parameters only contain accented characters and not ones like "&", perhaps you could build the URL yourself and let the browser do its default encoding? http://dev.jquery.com/ticket/3611 http://code.google.com/p/browsersec/wiki/Part1#Unicode_in_URLs
[jQuery] Re: Getting text from a div
There's at least one plugin (http://plugins.learningjquery.com/ textchildren/); you might want to search the plugin repository. If you aren't going to take advantage of it's other features, and don't want to incur an additional http request just for this, you can do it with jQuery: $.trim($('div.window-titleBar').clone().children().remove().end().text ()); On Mar 9, 4:14 pm, bawestcott wrote: > I am using the jquery windows plugin and i would like to be able to > get the title of each window that is created. An example of the html > that the plugin creates for the windows title bar is: > > Click Example5 > - > O > X > > > In this case I would like to get the value "Click Example 5" from this > particular window. I can get the values of all of the divs in > windowTitleBar ("Click Example5-0X"), but I can't figure out how to > get the firat value only. > Can someone plase help?
[jQuery] Re: blur(). not working good enough
Typo: last line should be: edit.val(spn.text()).show()[0].focus(); otherwise you'll grab text outside the span. On Mar 9, 5:07 pm, mkmanning wrote: > A couple of notes. Rather than create and then re-create the input and > span with every double-click and constantly reattach the blur event, > you can just create the input once, and then show/hide the span/input. > > Here's a suggested refactoring: > > //turn all titles into textfields > $('ul li').dblclick(function(){ > var el = $(this), spn = el.children('span').hide(); > var edit = el.find('input.wtf'); > edit = edit.length>0?edit:$('').attr('type','text').addClass > ('wtf').appendTo(el).blur(function(){ > spn.text($(this).hide().val()).show(); > }); > edit.val(el.text()).show()[0].focus(); > > }); > > On Mar 9, 5:00 pm, Hector Virgen wrote: > > > Try focusing the text field right after it is created by calling focus() > > directly on the element. That's the only way to make sure blur is fired when > > the user clicks somewhere else. > > > -Hector > > > On Mon, Mar 9, 2009 at 4:18 PM, bart wrote: > > > > Hi all, > > > > I've set something up which runs at > > >http://www.vliegendepijl.nl/pages/test/ > > > > As you can see it's an unordered list with some list items in it. If > > > you doubleclick the list item the text in it is being replaced by a > > > textfield with the same value in it. This works like it should, no > > > problems. > > > > Now what I'd like to have is that as soon as the field is not focussed > > > anymore (blur?) it's should go back to the text in the list item again > > > only then with the updated info (assuming the textfield value has been > > > changed). This is the point where it doesn't behave as I'd like it to. > > > > When I doubleclick the first and immediately after that the second > > > they're both left "open", so I guess the blur(). method is not > > > completely doing the trick. How can I improve my code so that there > > > can be no more than one textfield "open"? > > > > Safari 3.2.1 (mac os 10.5) gets it right as it is now, the rest of > > > browsers I've tested on all work like I've described. (firefox, opera, > > > camino, chrome, IE)
[jQuery] Getting text from a div
I am using the jquery windows plugin and i would like to be able to get the title of each window that is created. An example of the html that the plugin creates for the windows title bar is: Click Example5 - O X In this case I would like to get the value "Click Example 5" from this particular window. I can get the values of all of the divs in windowTitleBar ("Click Example5-0X"), but I can't figure out how to get the firat value only. Can someone plase help?
[jQuery] Re: blur(). not working good enough
A couple of notes. Rather than create and then re-create the input and span with every double-click and constantly reattach the blur event, you can just create the input once, and then show/hide the span/input. Here's a suggested refactoring: //turn all titles into textfields $('ul li').dblclick(function(){ var el = $(this), spn = el.children('span').hide(); var edit = el.find('input.wtf'); edit = edit.length>0?edit:$('').attr('type','text').addClass ('wtf').appendTo(el).blur(function(){ spn.text($(this).hide().val()).show(); }); edit.val(el.text()).show()[0].focus(); }); On Mar 9, 5:00 pm, Hector Virgen wrote: > Try focusing the text field right after it is created by calling focus() > directly on the element. That's the only way to make sure blur is fired when > the user clicks somewhere else. > > -Hector > > On Mon, Mar 9, 2009 at 4:18 PM, bart wrote: > > > Hi all, > > > I've set something up which runs at > >http://www.vliegendepijl.nl/pages/test/ > > > As you can see it's an unordered list with some list items in it. If > > you doubleclick the list item the text in it is being replaced by a > > textfield with the same value in it. This works like it should, no > > problems. > > > Now what I'd like to have is that as soon as the field is not focussed > > anymore (blur?) it's should go back to the text in the list item again > > only then with the updated info (assuming the textfield value has been > > changed). This is the point where it doesn't behave as I'd like it to. > > > When I doubleclick the first and immediately after that the second > > they're both left "open", so I guess the blur(). method is not > > completely doing the trick. How can I improve my code so that there > > can be no more than one textfield "open"? > > > Safari 3.2.1 (mac os 10.5) gets it right as it is now, the rest of > > browsers I've tested on all work like I've described. (firefox, opera, > > camino, chrome, IE)
[jQuery] Re: Bug w/ AjaxSubmit?
> I'm using Validate and AjaxSubmit on a form of mine. > It's on a "long" webpage, where you need to scroll to reach the form. > > For this reason in the action i've added index.php#contact > If people w/ JS disabled submit the form, they will be taken back to > the form. > > Only, IE & AjaxSubmit seem to freeze on a hash in the action. Any > clues? > FF & AjaxSubmit / Safari & AjaxSubmit are just fine. I'm on Windows. > > It took me a while to figure out it was the hash in the action. Fixed. v2.22 is now available: http://www.malsup.com/jquery/form/#download
[jQuery] Re: blur(). not working good enough
Try focusing the text field right after it is created by calling focus() directly on the element. That's the only way to make sure blur is fired when the user clicks somewhere else. -Hector On Mon, Mar 9, 2009 at 4:18 PM, bart wrote: > > Hi all, > > I've set something up which runs at > http://www.vliegendepijl.nl/pages/test/ > > As you can see it's an unordered list with some list items in it. If > you doubleclick the list item the text in it is being replaced by a > textfield with the same value in it. This works like it should, no > problems. > > Now what I'd like to have is that as soon as the field is not focussed > anymore (blur?) it's should go back to the text in the list item again > only then with the updated info (assuming the textfield value has been > changed). This is the point where it doesn't behave as I'd like it to. > > When I doubleclick the first and immediately after that the second > they're both left "open", so I guess the blur(). method is not > completely doing the trick. How can I improve my code so that there > can be no more than one textfield "open"? > > Safari 3.2.1 (mac os 10.5) gets it right as it is now, the rest of > browsers I've tested on all work like I've described. (firefox, opera, > camino, chrome, IE)
[jQuery] Re: Using .ajax to do XMLRPC - I must be doing something very stupid
Aha. Thanks. I googled more: http://www.mail-archive.com/jquery-en@googlegroups.com/msg04570.html On Mon, Mar 9, 2009 at 4:27 PM, Karl Rudd wrote: > > Not sure what's happening. I think "data" is actually a string, so you > might have to convert it to XML nodes before you can search it. I > could be wrong though. > > Karl Rudd > > On Tue, Mar 10, 2009 at 10:23 AM, Ritesh Nadhani wrote: >> >> Thanks. >> >> I had look into that first link earlier but I had hoped that there >> would be a simpler solution. Anyway, I tried using that code and even >> though I am getting XML like: http://paste.pocoo.org/show/107174/ from >> my XMLRPC server, the jquery selector is never satified and ret.result >> is always undefined. >> >> On Mon, Mar 9, 2009 at 1:53 PM, Karl Rudd wrote: >>> >>> jQuery "consumes" JSON fairly well but you'd need a plugin/other >>> functionality (like from json.org or that RPC plugin) to "produce" >>> JSON. >>> >>> Karl Rudd >>> >>> On Tue, Mar 10, 2009 at 4:00 AM, Ritesh Nadhani wrote: Aha. And I though I was doing something wrong. That clears up lot of things. PS: Does jQuery has better support for json? I can modify my XML-RPC to JSON-RPC. On Sun, Mar 8, 2009 at 9:44 PM, Karl Rudd wrote: > > jQuery doesn't include XML serialisation in it's core. A quick search > of the plugins repository came up with two projects that might help > (there may be more): > > RPC > http://plugins.jquery.com/project/rpc > The is rpc(remote procedure call) client implementation based on > JQuery. It creates an rpc object and adds ability to call them. It > supports both xml and json rpc... > > XML > http://plugins.jquery.com/project/xml > Methods to generate XML/HTML tags programmatically. By default, they > output XHTML compliant tags. > > Karl Rudd > > On Mon, Mar 9, 2009 at 1:18 PM, riteshn wrote: >> >> Hi >> >> So my first time using jQuery. >> >> http://paste.pocoo.org/show/107037/ >> >> I have a simple django based xml-rpc server which works perfect when I >> test it with my python based XML-rpc client. >> >> I am always getting error when sending data using jQuery. >> >> When I set processData: true - the server is getting value as: >> >> var1=val1&var2=val2 >> >> as a consequence of which my dispatcher in the server side fails with >> XML parsing error. >> >> If I set processData: false, then POST content is just ''. >> >> Looks like jquery is not serializing the data to XML. I did lot of >> Googling (maybe I didnt do enough) and nowhere I found a similar >> error. Though it threw up: http://drupalbin.com/1173 which is doing >> the serializing by itself. I am doubtful if this is required. >> >> Thoughts? >> > -- Ritesh http://www.riteshn.com >>> >> >> >> >> -- >> Ritesh >> http://www.riteshn.com >> > -- Ritesh http://www.riteshn.com
[jQuery] Re: jMap Gray Box - Google logo, no joy
A final clue: - The css 'reset' *{position:relative;overflow:hidden;padding:0;} seems to be causing the trouble. The page gets a little messed up without it, but the map images do show (with map in it's odd, spring- to-center state) Go go fine minds of the internet ... James
[jQuery] Re: A simple jQuery script that throws errors and fails in IE6-7. Thoughts?
On Mar 9, 2009, at 4:05 PM, Thomas Allen wrote: Oh, I thought that was a recommended practice to reduce bugs when changing the number of items in an object. Thanks! It is a recommended practice in PHP, but not in JavaScript. --Karl On Mar 9, 9:58 am, pete higgins wrote: .css({ 'display': 'block', 'text-align': 'right', }) stray comma, after 'right' http://jslint.com Regards, Peter
[jQuery] Re: jMap Gray Box - Google logo, no joy
A little extra to go on: - When I comment out the main css file link, the map renders its images but markers don't show and the viewport springs back to the centre whenever the map is panned. There's nowt funky going on in the css, and I can't identify any particular styles which cause the problem. I find it a little bizarre... James
[jQuery] Re: Using .ajax to do XMLRPC - I must be doing something very stupid
Not sure what's happening. I think "data" is actually a string, so you might have to convert it to XML nodes before you can search it. I could be wrong though. Karl Rudd On Tue, Mar 10, 2009 at 10:23 AM, Ritesh Nadhani wrote: > > Thanks. > > I had look into that first link earlier but I had hoped that there > would be a simpler solution. Anyway, I tried using that code and even > though I am getting XML like: http://paste.pocoo.org/show/107174/ from > my XMLRPC server, the jquery selector is never satified and ret.result > is always undefined. > > On Mon, Mar 9, 2009 at 1:53 PM, Karl Rudd wrote: >> >> jQuery "consumes" JSON fairly well but you'd need a plugin/other >> functionality (like from json.org or that RPC plugin) to "produce" >> JSON. >> >> Karl Rudd >> >> On Tue, Mar 10, 2009 at 4:00 AM, Ritesh Nadhani wrote: >>> >>> Aha. >>> >>> And I though I was doing something wrong. That clears up lot of things. >>> >>> PS: Does jQuery has better support for json? I can modify my XML-RPC >>> to JSON-RPC. >>> >>> On Sun, Mar 8, 2009 at 9:44 PM, Karl Rudd wrote: jQuery doesn't include XML serialisation in it's core. A quick search of the plugins repository came up with two projects that might help (there may be more): RPC http://plugins.jquery.com/project/rpc The is rpc(remote procedure call) client implementation based on JQuery. It creates an rpc object and adds ability to call them. It supports both xml and json rpc... XML http://plugins.jquery.com/project/xml Methods to generate XML/HTML tags programmatically. By default, they output XHTML compliant tags. Karl Rudd On Mon, Mar 9, 2009 at 1:18 PM, riteshn wrote: > > Hi > > So my first time using jQuery. > > http://paste.pocoo.org/show/107037/ > > I have a simple django based xml-rpc server which works perfect when I > test it with my python based XML-rpc client. > > I am always getting error when sending data using jQuery. > > When I set processData: true - the server is getting value as: > > var1=val1&var2=val2 > > as a consequence of which my dispatcher in the server side fails with > XML parsing error. > > If I set processData: false, then POST content is just ''. > > Looks like jquery is not serializing the data to XML. I did lot of > Googling (maybe I didnt do enough) and nowhere I found a similar > error. Though it threw up: http://drupalbin.com/1173 which is doing > the serializing by itself. I am doubtful if this is required. > > Thoughts? > >>> >>> >>> >>> -- >>> Ritesh >>> http://www.riteshn.com >>> >> > > > > -- > Ritesh > http://www.riteshn.com >
[jQuery] Shadowbox and JQuery
Can anyone tell me why this isn't working: http://acanthus.sunshine-design.co.uk/projects.htm It's telling me that there's no skin loaded but the shadowboc css is included here: http://acanthus.sunshine-design.co.uk/Css/shadowbox.css Do i need to tell it where the skin is somehow? Or is this a bug?
[jQuery] Re: Using .ajax to do XMLRPC - I must be doing something very stupid
Thanks. I had look into that first link earlier but I had hoped that there would be a simpler solution. Anyway, I tried using that code and even though I am getting XML like: http://paste.pocoo.org/show/107174/ from my XMLRPC server, the jquery selector is never satified and ret.result is always undefined. On Mon, Mar 9, 2009 at 1:53 PM, Karl Rudd wrote: > > jQuery "consumes" JSON fairly well but you'd need a plugin/other > functionality (like from json.org or that RPC plugin) to "produce" > JSON. > > Karl Rudd > > On Tue, Mar 10, 2009 at 4:00 AM, Ritesh Nadhani wrote: >> >> Aha. >> >> And I though I was doing something wrong. That clears up lot of things. >> >> PS: Does jQuery has better support for json? I can modify my XML-RPC >> to JSON-RPC. >> >> On Sun, Mar 8, 2009 at 9:44 PM, Karl Rudd wrote: >>> >>> jQuery doesn't include XML serialisation in it's core. A quick search >>> of the plugins repository came up with two projects that might help >>> (there may be more): >>> >>> RPC >>> http://plugins.jquery.com/project/rpc >>> The is rpc(remote procedure call) client implementation based on >>> JQuery. It creates an rpc object and adds ability to call them. It >>> supports both xml and json rpc... >>> >>> XML >>> http://plugins.jquery.com/project/xml >>> Methods to generate XML/HTML tags programmatically. By default, they >>> output XHTML compliant tags. >>> >>> Karl Rudd >>> >>> On Mon, Mar 9, 2009 at 1:18 PM, riteshn wrote: Hi So my first time using jQuery. http://paste.pocoo.org/show/107037/ I have a simple django based xml-rpc server which works perfect when I test it with my python based XML-rpc client. I am always getting error when sending data using jQuery. When I set processData: true - the server is getting value as: var1=val1&var2=val2 as a consequence of which my dispatcher in the server side fails with XML parsing error. If I set processData: false, then POST content is just ''. Looks like jquery is not serializing the data to XML. I did lot of Googling (maybe I didnt do enough) and nowhere I found a similar error. Though it threw up: http://drupalbin.com/1173 which is doing the serializing by itself. I am doubtful if this is required. Thoughts? >>> >> >> >> >> -- >> Ritesh >> http://www.riteshn.com >> > -- Ritesh http://www.riteshn.com
[jQuery] blur(). not working good enough
Hi all, I've set something up which runs at http://www.vliegendepijl.nl/pages/test/ As you can see it's an unordered list with some list items in it. If you doubleclick the list item the text in it is being replaced by a textfield with the same value in it. This works like it should, no problems. Now what I'd like to have is that as soon as the field is not focussed anymore (blur?) it's should go back to the text in the list item again only then with the updated info (assuming the textfield value has been changed). This is the point where it doesn't behave as I'd like it to. When I doubleclick the first and immediately after that the second they're both left "open", so I guess the blur(). method is not completely doing the trick. How can I improve my code so that there can be no more than one textfield "open"? Safari 3.2.1 (mac os 10.5) gets it right as it is now, the rest of browsers I've tested on all work like I've described. (firefox, opera, camino, chrome, IE)
[jQuery] TypeError: Result of expression '(o.fx.step[this.prop]||o.fx.step._default)' [0] is not a function.
I really don't know what's causing this error because I don't get it in any other browser except Safari 4 with WebKit r41521 (latest as of 3/9/09): http://nightly.webkit.org/ http://users.tpg.com.au/j_birch/plugins/superfish/#examples You can see the error here when you hover over the blue menu a dropdown should appear, but alas it does not. http://fancy.klade.lv/example Also on this page when you click any of the images.
[jQuery] superfish scroll 1px in IE7
When I click on a superfish menu item, in IE7 the page sometimes scrolls 1px down... It happens also on the demo page of superfish. Eg. basic style demo, click on 3rd menu item in IE (make sure the browser initially is scrolled all the way to the top), then the page is scrolled 1px
[jQuery] Re: A loading image in the centre of the screen
There is a way for the BlockUI to also show an image. By passing in an empty message (and possibly tweaking the CSS) I believe you can get it to do what you want. On Mar 9, 4:18 pm, phicarre wrote: > Ok but it is for a message, not for a loading image > > On 9 mar, 19:26, James wrote: > > > Check out the BlockUI plugin:http://malsup.com/jquery/block/ > > > On Mar 9, 8:21 am,phicarre wrote: > > > > I would like with jQuery to show a loading image in the centre of the > > > screen that waits for everything to load. And whatever the browser ! > > > Any solutions ? plugins ?
[jQuery] Re: location.hash -scrolling to the middle of the page
Try using the ScrollTo plugin: http://flesler.blogspot.com/2007/10/jqueryscrollto.html Use the anchor/div element as the element to scroll to, and calculate the offset (based on height of a user's viewport) so the it'll scroll to somewhere just above that, leaving the element in the center. On Mar 9, 11:50 am, mangajin wrote: > Hi, > > Normally when we have this url :www.mypage.html#aboutt, the browser > will jump to the area that anchor or div element has #about. By > default the browser will show that anchor or div at the top most of > the page. Are there any ways in jQuery that show that specific anchor > in the middle of bottom of the page? > > Thanks
[jQuery] jMap Gray Box - Google logo, no joy
Hello, While there are many posts on gr[ae]y boxes showing up, I've ruled out a few of the obvious culprits and still can't get the map images to show: - I'm using a valid API key (can send geocode requests successfully) - The dimensions of the element to be made a map are defined before the call is made, and not changed. Things: - I'm running a host of other plugins (.ui, .tablesorter, .popupwindow, .form, .JSON, .livequery, .layout, .rightclick). I have read of the potential for clashes but have run a simple page with the same scripts included (but not used) and the map images load as they should. Is this a conclusive test? - The map is served within a series of ajax-loaded panes in the document, a livequery listens for the map classed element to hit the page and then calls .jmap on it - Unfortunately, I'm unable to link to a sample (without a lot of work) as it runs on a secure session, and contains sensitive customer info. Feel a little out of my depth, any suggestions much appreciated. Cheers, James
[jQuery] Re: jquery.validate chokes on square brackets in name attribute.
How does your validation options look like? Make sure to put quotes on the name of the field: { rules: { 'customer[payment_method][number]': { required: true } } } On Mar 9, 9:23 am, GulDam wrote: > Hello, > I have a static html file with jquery and jquery.validate plugin that > works perfectly until an engineer starts to plug in his code. The > code is being served up for credit card processing, and we have name, > and expiration fields working and validating correctly. But the Credit > Card field validation fails when he puts [] inside the name attribute > of the credit card field. The credit card company requires these > brackets inside the name attribute but jquery no longer validates the > field as long as they are present. Remove them and it validates. > > Ideas on how to get this field validating? > > This does not work: > > onclick="document.getElementById('ccnumber').value=''" /> id="ccnumber" class="textfield required" name="customer > [payment_method][number]" value="" type="text" maxlength="19" > autocomplete="off" /> > > This works: > > onclick="document.getElementById('ccnumber').value=''" /> id="Text3" class="textfield required" name="ccnumber" value="" > type="text" /> > > Thanks, > > GulDam
[jQuery] Re: A loading image in the centre of the screen
Ok but it is for a message, not for a loading image On 9 mar, 19:26, James wrote: > Check out the BlockUI plugin:http://malsup.com/jquery/block/ > > On Mar 9, 8:21 am,phicarre wrote: > > > I would like with jQuery to show a loading image in the centre of the > > screen that waits for everything to load. And whatever the browser ! > > Any solutions ? plugins ?
[jQuery] [validate]
I have found a possible bug and a possible solution. When I validate my form select box, its label goes red (gets the error class added) as does the element itself. When I update my selected value, the label disappears altogether. Work around: errorElement: "em", If I set errorElement to something other than label I get the expected result (label remains and error class is removed). I decided to have a quick look at your source code and found that the change shown below to the errorsFor function filters out any non- generated labels from being removed. You may have a better solution, if you do please share :). I hope this helps someone else. // *** // Filename: jquery.validate.js // *** Original Code: errorsFor: function(element) { return this.errors().filter("[for='" + this.idOrName(element) + "']"); }, Suggested Code: errorsFor: function(element) { return this.errors().filter("[generated][for='" + this.idOrName (element) + "']"); }, // *** // Example validator: // *** jQuery.validator.messages.required = ""; $("#criteriaForm").validate({ invalidHandler: function(form, validator) { var errors = validator.numberOfInvalids(); if (errors) { var message = errors == 1 ? 'You missed 1 field. It has been highlighted' : 'You missed ' + errors + ' fields. They have been highlighted'; $("div.errorText span").html(message); $("div.errorText").show(); } else { $("div.errorText").hide(); } }, highlight: function(element, errorClass) { $(element).addClass(errorClass); $(element.form).find("label[for=" + element.id + "]") .addClass(errorClass); }, unhighlight: function(element, errorClass) { $(element).removeClass(errorClass); $(element.form).find("label[for=" + element.id + "]") .removeClass(errorClass); }, ignoreTitle: true, //errorElement: "em", rules: { selMyAnswer: { required: true } } }); // *** // Example HTML: // *** This is the label that gets highlighted when there is nothing selected? Yes No
[jQuery] Re: Validate form labels disappear
I have found a possible bug and a possible solution. When I validate my form select box, its label goes red (gets the error class added) as does the element itself. When I update my selected value, the label disappears altogether. Work around: errorElement: "em", If I set errorElement to something other than label I get the expected result (label remains and error class is removed). I decided to have a quick look at your source code and found that the change shown below to the errorsFor function filters out any non- generated labels from being removed. You may have a better solution, if you do please share :). I hope this helps someone else. // *** // Filename: jquery.validate.js // *** Original Code: errorsFor: function(element) { return this.errors().filter("[for='" + this.idOrName(element) + "']"); }, Suggested Code: errorsFor: function(element) { return this.errors().filter("[generated][for='" + this.idOrName (element) + "']"); }, // *** // Example validator: // *** jQuery.validator.messages.required = ""; $("#criteriaForm").validate({ invalidHandler: function(form, validator) { var errors = validator.numberOfInvalids(); if (errors) { var message = errors == 1 ? 'You missed 1 field. It has been highlighted' : 'You missed ' + errors + ' fields. They have been highlighted'; $("div.errorText span").html(message); $("div.errorText").show(); } else { $("div.errorText").hide(); } }, highlight: function(element, errorClass) { $(element).addClass(errorClass); $(element.form).find("label[for=" + element.id + "]") .addClass(errorClass); }, unhighlight: function(element, errorClass) { $(element).removeClass(errorClass); $(element.form).find("label[for=" + element.id + "]") .removeClass(errorClass); }, ignoreTitle: true, //errorElement: "em", rules: { selMyAnswer: { required: true } } }); // *** // Example HTML: // *** This is the label that gets highlighted when there is nothing selected? Yes No On Feb 26, 10:45 pm, LVR wrote: > First, let me say my skill level with jQuery and javascript is low. > Apparently too low to figure this out. I am currently using > theValidateplugin for form validation. It works well, except for this > problem: when an element validates, the label element disappears. > I'm using the following code straight from this page > :http://docs.jquery.com/Plugins/Validation/validate#toptions > > $(".selector").validate({ > highlight: function(element, errorClass) { > $(element).addClass(errorClass); > $(element.form).find("label[for=" + element.id + "]") > .addClass(errorClass); > }, > unhighlight: function(element, errorClass) { > $(element).removeClass(errorClass); > $(element.form).find("label[for=" + element.id + "]") > .removeClass(errorClass); > } > > }); > > My goal is to use the labels as error indicators, turning them red on > error. The code above, together with some css, works great for this. > But when the error is corrected, the label disappears completely > (theValidateplugin adds display:none to the label tag). > > To correct this Jorn said: > Don't add the error class to the label. The validation plugin searches > for the error label based on that error class - adding it to the > actual label causes the label to disappear. > You could add a different class to the actual label so that the error > label can be hidden or removed entirely (via errorPlacement, or > showErrors). > > I have tried this to the best of my limited ability - without > success. Can anyone give me a coded example of this? Should I not be > using the code sample above? I can't figure out how to highlight the > label on error, but not "add the error class to the label." Again, > I'm somewhat javascript-challenged, so code examples would be > appreciated. > > Thanks!
[jQuery] Re: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE)
Looks like you tried to make a cross-domain ajax request. --Klaus On 9 Mrz., 21:14, Tom Shafer wrote: > what does this error mean > > [Exception... "Component returned failure code: 0x80070057 > (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult: > "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame > ::http://tjshafer.com/projects/boyd/js/jquery-1.3.2.min.js:: > anonymous :: line 19" data: no] > > -tj
[jQuery] location.hash -scrolling to the middle of the page
Hi, Normally when we have this url :www.mypage.html#about t, the browser will jump to the area that anchor or div element has #about. By default the browser will show that anchor or div at the top most of the page. Are there any ways in jQuery that show that specific anchor in the middle of bottom of the page? Thanks
[jQuery] Re: [Listnav] Extra characters
Hi, The letters array does double-duty: it's used to create the nav strip and it's also used to add a class to each LI in your list, based on the first text character inside your list item. An exception is the '_', which is added to LI's that start with a number. So, for example, after listnav is applied you'll have LI's like: An item that starts with 'a' (notice the ln-a class) I'm not familiar enough with non-english languages to know if letters like the ones you're adding can be used as css class names. If they are, it seems like it would work by adding those letters to the letters array. If they're not, we'd have to think out a workaround. - Jack jdg wrote: I would like to use some extra characters for the first letter like á, é or ő. I can extend the "letters" array with those chars but when i click them on the interface it shows the full list of LIs instead of the chars i expect. I'm using the newest version (2.0) with jquery 1.2.6. Could u give me some hint how to solve this? Thanks.
[jQuery] Re: Call for contributors: A simple, fast and flexible grid/spreadsheet component.
One more point. While this may not be immediately obvious from what you see in the examples and in the code, the key use of the grid is in MVC applications where the grid is wired to respond to events in the Model. In our application we have spreadsheet component of a Gantt chart, and the Model is a "filtered" view of the tasks (rows) in the original datasource. Suppose you collapse or expand a parent task or enter some text in a Quick Filter textbox. The Model then recalculates which rows are now visible, compares that with what was visible before and fires two events - onRowCountChanged & onRowsChanged. The latter one tells all subscribed Views, such as the grid, that the rows in specific positions changed. The grid then only has to invalidate/remove those rows and call grid.renderViewport() to make sure that whatever is in the viewport is visible. The onRowCountChanged event triggers the recalculation of the virtual canvas - grid.resizeCanvas(). Together, this pattern makes for an incredibly efficient, flexible and, most importantly, scalable implementation. I hope this helps explain some of the design elements behind SlickGrid. +Michael On Mar 9, 6:58 pm, Tin wrote: > Ricardo, > > Not using tables is actually key to making the virtual rendering > aspect of the grid work. > Each row is an absolutely positioned DIV containing DIV cells set to > "float:left". > Rows can then be easily added and removed without triggering cascading > DOM changes. In fact, this is done all the time in SlickGrid - as you > scroll, only the content of the viewport plus a small buffer is > actually rendered, leaving the browser's DOM nice and small. > > +Michael > > On Mar 9, 5:40 pm, ricardobeat wrote: > > > > > Looks great. I like how the editing works. > > > One thing: why are you using DIVs instead of a table? That's precisely > > the only case where tables should be used, to display tabular data. > > It's semantically correct and can offer performance improvements, as > > table elements have native properties like their index and direct > > access to their children. > > > cheers, > > - ricardo > > > On Mar 8, 9:31 pm, Tin wrote: > > > > Hey All, > > > > I've been working on a grid/spreadsheet control prototype during the > > > last couple of weeks. Seeing how there doesn't seem to be a lot of > > > other choices for this sort of thing, I had to write my own. I've put > > > the project up on Google Code and am looking for experienced > > > developers who can pick this up and turn it into something that > > > everybody can use (a jQuery UI grid plugin?). > > > > The project is hosted athttp://code.google.com/p/slickgrid/. > > > Below is a copy of the project home page. > > > > Looking forward to your feedback! > > > > Michael Leibman > > > michael.leib...@gmail.com > > > Principal Engineer > > > Daptiv Inc. > > > > --- > > > --- > > > > SlickGrid > > > > What it is > > > > Quite simply, SlickGrid is a JavaScript grid/spreadsheet component. > > > > Some highlights: > > > > Virtual scrolling/rendering (hundreds of thousands of rows) > > > Extremely fast rendering speed > > > Configurable & customizable > > > Full keyboard navigation > > > Resizable/reorderable columns > > > Custom cell formatters & editors > > > Support for editing and creating new rows. > > > "GlobalEditorLock" to manage concurrent edits in cases where multiple > > > Views on a page can edit the same data. > > > Why? > > > > This is pretty much a work-in-progress prototype, so I don't feel like > > > spending a lot of time documenting it at this stage. I do think it is > > > quite promising though, so I'm putting it up for everybody to see and > > > play with. In its current form, it satisfies nearly all of the > > > requirements for the project I am working on where I am utilizing it > > > in an MVC application, so I'm not sure how much time I can afford on > > > turning SlickGrid into something that would work for everybody. If you > > > are willing to help out - let me know, and I'll add you to the project > > > so that you can contribute. > > > > Examples > > > > Basic use:http://slickgrid.googlecode.com/svn/trunk/example1-simple.html > > > > Adding some > > > formatting:http://slickgrid.googlecode.com/svn/trunk/example2-formatters.html > > > > Turning it into a > > > spreadsheet:http://slickgrid.googlecode.com/svn/trunk/example3-editing.html > > > > A more comprehensive test > > > page:http://slickgrid.googlecode.com/svn/trunk/grid.html > > > > Documentation > > > > See comments at the top > > > ofhttp://slickgrid.googlecode.com/svn/trunk/slick.grid.js.
[jQuery] Bug w/ AjaxSubmit?
Hi there, I'm using Validate and AjaxSubmit on a form of mine. It's on a "long" webpage, where you need to scroll to reach the form. For this reason in the action i've added index.php#contact If people w/ JS disabled submit the form, they will be taken back to the form. Only, IE & AjaxSubmit seem to freeze on a hash in the action. Any clues? FF & AjaxSubmit / Safari & AjaxSubmit are just fine. I'm on Windows. It took me a while to figure out it was the hash in the action. Thanks, knal
[jQuery] Re: UI - datepicker - feedback regarding button bar configuration
Please post to the jQuery UI list: http://groups.google.com/group/jquery-ui Thanks. - Richard On Mon, Mar 9, 2009 at 4:04 PM, webRat wrote: > > So, I was assembling the datepicker to use in an app. Easy enough to > do. I enabled the "button bar" configuration ( > http://www.jqueryui.com/demos/datepicker/#buttonbar ). I came across > something odd with the "Today" button. > > I personally think the "Today" button is mislabeled. > > Today changes the calendar view back to "this month" - but, does not > select "today." I fear this is going to confuse my client.
[jQuery] Re: Jquery.param encoding wrong
%C3%A9 is the correct percent encoding for URIs using UTF-8 code units. I suspect you're using escape()/unescape() instead of encodeURIComponent (or encodeURI() )/decodeURIComponent (or decodeURI ()). escape() fails to handle non-ASCII characters correctly, so you should avoid the use of escape() whenever possible. On Mar 9, 7:32 am, thibaultdelor wrote: > Hello, I think that the param function doesn't work well, it doesn't > encode to the url format. For example : > > jQuery.param({test:"béton"}) > > return : > > test=b%C3%A9ton > > while it has to return : > > test=b%E9ton > > This problem is present in the form plugin, the ajax.submit function > use "param" and so it doesn't work well too. > > Thanks!
[jQuery] jquery and sortable table
Hi, I notice when I load a page and perform the following call var str = ""; $.ajax( { url: 'core/getIngredients.php', type: 'POST', data: str, success: function(xml) { $(xml).find("table").each(function() { var t = $(this).text(); var table = $("#list_ingredients"); $("#list_ingredients tr").each(function() { if($(this).attr("id").indexOf("tr") >= 0) { $("#" + $(this).attr("id")).remove(); } }); table.append(t); }); } } ); it works just fine and populates this table Ingredient Action If i try to get the jquery sort to work on top of this call, it won't notice the table has values and gives a parser error. I can code around the parser error with $('#list_ingredients:has(tbody tr)').tablesorter({ sortList:[[0,0]], widgets: ['zebra']}); My question is if you run a jquery call to load a table when the page loads, how do you get the jquery.tablesorter to understand the table is populated. If I do inline population of the table via php mysql_query and loop structures, it works fine. I'd rather have jquery do the call at the time of loading so I can separate out my presentation and logic. Any thoughts would be grately appreciated. J
[jQuery] Re: Change direction of 'animate' function
Apologies. I assumed the function would continue its down/right movement and push the window. It handled itself and moved down/left as needed. Sorry about the deadthread On Mar 9, 4:04 pm, Ed Lerner wrote: > I need to use the animate function (slide, show, etc won't do) on a > project. Typically, 'animate' expands down and to the right. How can I > alter this? For example, I am putting thumbnails of images on both > sides of a site. When hovered, a larger version animates into view. > Because of the down/right direction, the left-hand side works fine. I > need the right-hand side one to animate down/left. Is this possible?
[jQuery] Change direction of 'animate' function
I need to use the animate function (slide, show, etc won't do) on a project. Typically, 'animate' expands down and to the right. How can I alter this? For example, I am putting thumbnails of images on both sides of a site. When hovered, a larger version animates into view. Because of the down/right direction, the left-hand side works fine. I need the right-hand side one to animate down/left. Is this possible?
[jQuery] gallery with galleria js-lib looks weird on page loads with IE7
Hi, I am using nice galleria lib, but it looks ugly on IE page loads (either when visiting the site first time or jumping back to gallery page). It looks very weird, because IE loads the images first places them as list items and after that applies the galleria-magic. Firefox does this (as usual) much better, it does not display the pictures until galleria is ready to display the whole gallery view. Has somebody faced same ui-problem with IE7 (or generally with IEs) and knows a solution? My code is roughly: list of pics - My server sends back ETag and Last-Modified headers. thanks. - manuel aldana aldana((at))gmx.de software-engineering blog: http://www.aldana-online.de -- View this message in context: http://www.nabble.com/gallery-with-galleria-js-lib-looks-weird-on-page-loads-with-IE7-tp22420818s27240p22420818.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Call for contributors: A simple, fast and flexible grid/spreadsheet component.
Ricardo, Not using tables is actually key to making the virtual rendering aspect of the grid work. Each row is an absolutely positioned DIV containing DIV cells set to "float:left". Rows can then be easily added and removed without triggering cascading DOM changes. In fact, this is done all the time in SlickGrid - as you scroll, only the content of the viewport plus a small buffer is actually rendered, leaving the browser's DOM nice and small. +Michael On Mar 9, 5:40 pm, ricardobeat wrote: > Looks great. I like how the editing works. > > One thing: why are you using DIVs instead of a table? That's precisely > the only case where tables should be used, to display tabular data. > It's semantically correct and can offer performance improvements, as > table elements have native properties like their index and direct > access to their children. > > cheers, > - ricardo > > On Mar 8, 9:31 pm, Tin wrote: > > > > > Hey All, > > > I've been working on a grid/spreadsheet control prototype during the > > last couple of weeks. Seeing how there doesn't seem to be a lot of > > other choices for this sort of thing, I had to write my own. I've put > > the project up on Google Code and am looking for experienced > > developers who can pick this up and turn it into something that > > everybody can use (a jQuery UI grid plugin?). > > > The project is hosted athttp://code.google.com/p/slickgrid/. > > Below is a copy of the project home page. > > > Looking forward to your feedback! > > > Michael Leibman > > michael.leib...@gmail.com > > Principal Engineer > > Daptiv Inc. > > > --- > > --- > > > SlickGrid > > > What it is > > > Quite simply, SlickGrid is a JavaScript grid/spreadsheet component. > > > Some highlights: > > > Virtual scrolling/rendering (hundreds of thousands of rows) > > Extremely fast rendering speed > > Configurable & customizable > > Full keyboard navigation > > Resizable/reorderable columns > > Custom cell formatters & editors > > Support for editing and creating new rows. > > "GlobalEditorLock" to manage concurrent edits in cases where multiple > > Views on a page can edit the same data. > > Why? > > > This is pretty much a work-in-progress prototype, so I don't feel like > > spending a lot of time documenting it at this stage. I do think it is > > quite promising though, so I'm putting it up for everybody to see and > > play with. In its current form, it satisfies nearly all of the > > requirements for the project I am working on where I am utilizing it > > in an MVC application, so I'm not sure how much time I can afford on > > turning SlickGrid into something that would work for everybody. If you > > are willing to help out - let me know, and I'll add you to the project > > so that you can contribute. > > > Examples > > > Basic use:http://slickgrid.googlecode.com/svn/trunk/example1-simple.html > > > Adding some > > formatting:http://slickgrid.googlecode.com/svn/trunk/example2-formatters.html > > > Turning it into a > > spreadsheet:http://slickgrid.googlecode.com/svn/trunk/example3-editing.html > > > A more comprehensive test > > page:http://slickgrid.googlecode.com/svn/trunk/grid.html > > > Documentation > > > See comments at the top > > ofhttp://slickgrid.googlecode.com/svn/trunk/slick.grid.js.
[jQuery] Re: Using .ajax to do XMLRPC - I must be doing something very stupid
jQuery "consumes" JSON fairly well but you'd need a plugin/other functionality (like from json.org or that RPC plugin) to "produce" JSON. Karl Rudd On Tue, Mar 10, 2009 at 4:00 AM, Ritesh Nadhani wrote: > > Aha. > > And I though I was doing something wrong. That clears up lot of things. > > PS: Does jQuery has better support for json? I can modify my XML-RPC > to JSON-RPC. > > On Sun, Mar 8, 2009 at 9:44 PM, Karl Rudd wrote: >> >> jQuery doesn't include XML serialisation in it's core. A quick search >> of the plugins repository came up with two projects that might help >> (there may be more): >> >> RPC >> http://plugins.jquery.com/project/rpc >> The is rpc(remote procedure call) client implementation based on >> JQuery. It creates an rpc object and adds ability to call them. It >> supports both xml and json rpc... >> >> XML >> http://plugins.jquery.com/project/xml >> Methods to generate XML/HTML tags programmatically. By default, they >> output XHTML compliant tags. >> >> Karl Rudd >> >> On Mon, Mar 9, 2009 at 1:18 PM, riteshn wrote: >>> >>> Hi >>> >>> So my first time using jQuery. >>> >>> http://paste.pocoo.org/show/107037/ >>> >>> I have a simple django based xml-rpc server which works perfect when I >>> test it with my python based XML-rpc client. >>> >>> I am always getting error when sending data using jQuery. >>> >>> When I set processData: true - the server is getting value as: >>> >>> var1=val1&var2=val2 >>> >>> as a consequence of which my dispatcher in the server side fails with >>> XML parsing error. >>> >>> If I set processData: false, then POST content is just ''. >>> >>> Looks like jquery is not serializing the data to XML. I did lot of >>> Googling (maybe I didnt do enough) and nowhere I found a similar >>> error. Though it threw up: http://drupalbin.com/1173 which is doing >>> the serializing by itself. I am doubtful if this is required. >>> >>> Thoughts? >>> >> > > > > -- > Ritesh > http://www.riteshn.com >
[jQuery] Re: unintrusive jQuery on Rails
Solved. Actually i tried again today and works. Perhaps yesterday I misspelled something. Have a good 1! On Mar 8, 8:15 pm, macsig wrote: > Hello folks, > I'm trying to integrate jQuery within a Rails application (instead > scriptaculous+prototype) and I would like to make it unintrusive and I > have already an issue with that. > > I'm using fancyzoom: > > Small Box! > > Here is the contents that will appear in the zoom. > > > $('#small').fancyZoom(); > > > and I wish to put $('#small').fancyZoom(); within my application.js > file but how can I call it when the contents are loaded? > If I use > > $(document).ready(function() { > $('#small').fancyZoom(); > > };) > > the code is executed after the DOM is loaded but before the contents > are loaded so it doesn't work. > > THANKS FOR YOUR HELP.
[jQuery] IE7 memory leak solution
Hi. Update on the IE7 memory leak problem Original problem: I'm having problems with all ajax updates, $("#element").load() etc., as well as just setting html content with html(). Doing this over and over will gradually eat up IE 7's memory. Test case to reproduce: http://mif86.com/memtest3.htm It periodically loads another page's html content (http://mif86.com/ memtest2.htm) into a div using jQuery's $("#element").load ("memtest2.htm"). If you watch the memory usage in internet explorer, it keeps growing endlessly. Solution: But doing this before updating element content prevents the memory leak completely, it seems: document.getElementById('test').innerHTML = ''; Should this perhaps be patched to the jQuery remove() method somehow, so that it will not leak? Ref.: http://www.outofhanwell.com/ieleak/index.php?title=Fixing_Leaks
[jQuery] Superfish - Horizontal Internet Explorer Width Problem
I have a horizontal navbar that if the persons screen is under 1024 wide it sticks out of the table. In Firefox it works fine so it's only an IE problem but one I need fixed. link http://dev2.azaz.com/scott/ahno/index_testnav.html If you just shrink the browser down until you see the nav break free of the table you'll see what I mean. Again, doesn't happen in Firefox. IE fix please?
[jQuery] Re: unintrusive jQuery on Rails
Any idea at all? THANKS. I appreciate any help On Mar 8, 8:15 pm, macsig wrote: > Hello folks, > I'm trying to integrate jQuery within a Rails application (instead > scriptaculous+prototype) and I would like to make it unintrusive and I > have already an issue with that. > > I'm using fancyzoom: > > Small Box! > > Here is the contents that will appear in the zoom. > > > $('#small').fancyZoom(); > > > and I wish to put $('#small').fancyZoom(); within my application.js > file but how can I call it when the contents are loaded? > If I use > > $(document).ready(function() { > $('#small').fancyZoom(); > > };) > > the code is executed after the DOM is loaded but before the contents > are loaded so it doesn't work. > > THANKS FOR YOUR HELP.
[jQuery] [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE)
what does this error mean [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: http://tjshafer.com/projects/boyd/js/jquery-1.3.2.min.js :: anonymous :: line 19" data: no] -tj
[jQuery] Re: A simple jQuery script that throws errors and fails in IE6-7. Thoughts?
Oh, I thought that was a recommended practice to reduce bugs when changing the number of items in an object. Thanks! Thomas On Mar 9, 9:58 am, pete higgins wrote: > > .css({ > > 'display': 'block', > > 'text-align': 'right', > > }) > > stray comma, after 'right' > > http://jslint.com > > Regards, > Peter
[jQuery] UI - datepicker - feedback regarding button bar configuration
So, I was assembling the datepicker to use in an app. Easy enough to do. I enabled the "button bar" configuration ( http://www.jqueryui.com/demos/datepicker/#buttonbar ). I came across something odd with the "Today" button. I personally think the "Today" button is mislabeled. Today changes the calendar view back to "this month" - but, does not select "today." I fear this is going to confuse my client.
[jQuery] jquery.validate chokes on square brackets in name attribute.
Hello, I have a static html file with jquery and jquery.validate plugin that works perfectly until an engineer starts to plug in his code. The code is being served up for credit card processing, and we have name, and expiration fields working and validating correctly. But the Credit Card field validation fails when he puts [] inside the name attribute of the credit card field. The credit card company requires these brackets inside the name attribute but jquery no longer validates the field as long as they are present. Remove them and it validates. Ideas on how to get this field validating? This does not work: This works: Thanks, GulDam
[jQuery] [validate]
Hello, I have a static html file with jquery and jquery.validate plugin that works perfectly until an engineer starts to plug in his code. The code is being served up for credit card processing, and we have name, and expiration fields working and validating correctly. But the Credit Card field validation fails when he puts [] inside the name attribute of the credit card field. The credit card company requires these brackets inside the name attribute but jquery no longer validates the field as long as they are present. Remove them and it validates. Ideas on how to get this field validating? This does not work: This works: Thanks, GulDam
[jQuery] Troubles with animate in IE (possible bug)
Alright so I'm trying to build a custom accordion type functionality, now it works fine in Firefox, Chrome and Safari but IE is throwing me an error. An example of the functionality can bee seen at: http://www.rememberwhencruisers.com/ My javascript can be found at : http://www.rememberwhencruisers.com/js/site.js And I'm using the google hosted jquery at: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js Now IE keeps telling me "Invalid Argument" in the jquery library at line 4166 character 5, which is the following code. fx.elem.style[ fx.prop ] = fx.now + fx.unit; The line that is causing this error in my javascript is the following: parent.animate({ height: targetSize }); Is this a bug or is there something wrong with my code?
[jQuery] Re: Call for contributors: A simple, fast and flexible grid/spreadsheet component.
Looks great. I like how the editing works. One thing: why are you using DIVs instead of a table? That's precisely the only case where tables should be used, to display tabular data. It's semantically correct and can offer performance improvements, as table elements have native properties like their index and direct access to their children. cheers, - ricardo On Mar 8, 9:31 pm, Tin wrote: > Hey All, > > I've been working on a grid/spreadsheet control prototype during the > last couple of weeks. Seeing how there doesn't seem to be a lot of > other choices for this sort of thing, I had to write my own. I've put > the project up on Google Code and am looking for experienced > developers who can pick this up and turn it into something that > everybody can use (a jQuery UI grid plugin?). > > The project is hosted athttp://code.google.com/p/slickgrid/. > Below is a copy of the project home page. > > Looking forward to your feedback! > > Michael Leibman > michael.leib...@gmail.com > Principal Engineer > Daptiv Inc. > > -- > > SlickGrid > > What it is > > Quite simply, SlickGrid is a JavaScript grid/spreadsheet component. > > Some highlights: > > Virtual scrolling/rendering (hundreds of thousands of rows) > Extremely fast rendering speed > Configurable & customizable > Full keyboard navigation > Resizable/reorderable columns > Custom cell formatters & editors > Support for editing and creating new rows. > "GlobalEditorLock" to manage concurrent edits in cases where multiple > Views on a page can edit the same data. > Why? > > This is pretty much a work-in-progress prototype, so I don't feel like > spending a lot of time documenting it at this stage. I do think it is > quite promising though, so I'm putting it up for everybody to see and > play with. In its current form, it satisfies nearly all of the > requirements for the project I am working on where I am utilizing it > in an MVC application, so I'm not sure how much time I can afford on > turning SlickGrid into something that would work for everybody. If you > are willing to help out - let me know, and I'll add you to the project > so that you can contribute. > > Examples > > Basic use:http://slickgrid.googlecode.com/svn/trunk/example1-simple.html > > Adding some > formatting:http://slickgrid.googlecode.com/svn/trunk/example2-formatters.html > > Turning it into a > spreadsheet:http://slickgrid.googlecode.com/svn/trunk/example3-editing.html > > A more comprehensive test > page:http://slickgrid.googlecode.com/svn/trunk/grid.html > > Documentation > > See comments at the top > ofhttp://slickgrid.googlecode.com/svn/trunk/slick.grid.js.
[jQuery] Re: Help with selectors and :not()
:not(tr[id^="review"]) that says: trs which do NOT contain an id that does NOT equal "review". in other words, TRs which DO contain the word "review" in it's id. You want "not contains" instead: $('#replies tr[id^=r]:not ([id*=review])'); cheers, - ricardo On Mar 9, 1:55 am, Yansky wrote: > Hi, I'm trying to get all table rows on a page that have an id that starts > with the letter "r", but not any table rows that have id's which contain the > word "review". > > I've tried to use the :not() method, but I don't think I'm using it > correctly as it doesn't seem to be filtering out table rows that have id's > which contain the word "review". > > My attempt: > $('#replies tr[id^="r"]:not(tr[id^="review"])'); > > I've figured out how to do it with regular xpath, but I'm not sure how to > convert that to a jQuery selector statement. > > var mems = document.evaluate( '//tr[contains(@id, "r")][ not(contains(@id, > "review") )]' ,document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null > ); > > for (var l = 0; l < mems.snapshotLength; l++){ > > console.log(mems.snapshotItem(l)); > > } > > -- > View this message in > context:http://www.nabble.com/Help-with-selectors-and-%3Anot%28%29-tp22407206... > Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: JQuery Sliding Panels
Those sliding effects are pretty simple to replicate with just some basic jQuery and JavaScript. Plugins are nice for encapsulating functionality that you use often, but many times it's just as easy to write something yourself; it often takes fewer lines of code as well, since you're not having to account for multiple use cases. Here's a quick example in jQuery to replicate the bi-directional sliding from the link you posted: HTML (slightly modified from the example): Navigate by index: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Panel 1 Panel 2 Panel 3 Panel 4 Panel 5 Panel 6 Panel 7 Panel 8 Panel 9 CSS (modified and condensed from the example): #example { overflow:hidden; position:absolute; height:300px; width:300px; } #example .SlidingPanelsContentGroup { float:left; width:900px; top:0; left:0; margin:0; padding:0; position:relative; } .SlidingPanelsContent { float:left; height:300px; width:300px; } .p1 { background-color:#66; } .p2 { background-color:#CC; } .p3 { background-color:#6699FF; } .p4 { background-color:#99; } .p5 { background-color:#FF99CC; } .p6 { background-color:#339933; } .p7 { background-color:#9933FF; } .p8 { background-color:#669966; } .p9 { background-color:#00FFCC; } JS: $(document).ready(function(){ var navindex = $('p a'); navindex.click(function(){ var pos = navindex.index(this), topPos = -(Math.floor((pos/3)%3)*300), leftPos = -(Math.floor((pos)%3)*300); $('.SlidingPanelsContentGroup').animate({'top':topPos +'px','left':leftPos+'px'}); return false; }); }); The above code only uses the index of the div to slide to, but it would be simple to use the ID as well. I'll leave it as an exercise for you :) On Mar 9, 8:35 am, Jon wrote: > I'm looking for something that replicates the functionality of the > below: > > http://labs.adobe.com/technologies/spry/samples/slidingpanels/Sliding... > > I'm sure i've seen something somewhere that did this in JQuery but i > can't find anything similar! I've search the plugin repository and > Google but i can't find anything! Sometimes the net is just too big, > though i'm starting to think that maybe i was imagining it? > > The one i remember had different types of transitions. Sliding > diagonally or sliding New York city block style.
[jQuery] Re: Altering external links
Exactly what I was looking for. Thanks. On Mar 9, 10:16 am, ToTalTim wrote: > http://www.front-end.nu/?p=6 > > On 9 mrt, 15:48, Ed Lerner wrote: > > > How would I modify the following to only target anchors with an href > > beginning with "http"? > > > $('a').each(function(index) { > > $(this).attr({ > > 'target': 'blank' > > }); > > > });- Tekst uit oorspronkelijk bericht niet weergeven - > > > - Tekst uit oorspronkelijk bericht weergeven -
[jQuery] Re: Auto update PHP session variables using Ajax/JQuery
Thanks for the reply, Now I have another situation. I have decided to use JSON with JQuery to send data to a php script, this works well, however, I would like to add a please wait/loading message while this is still executing please see my code below: $().ready(function() { $("#limitBox").change(function () { var JSONObject = new Object; ; JSONObject.datalimit = this.value; JSONObject.sessionVarName = 'data_limit'; JSONstring = JSON.stringify(JSONObject); alert(JSONstring); $.get('parser.php?json=' + JSONstring,'', showDataTableResult, "text"); }); function showDataTableResult(res) { $("#fullresponse").html("response: " +res); } }); Thank you. Michael Lawson wrote: > Make a post request to a php page that changes the value. The session > variable gets set to whatever the value of the parameter in the post array > is set to. > > cheers > > Michael Lawson > Content Tools Developer, Global Solutions, ibm.com > Phone: 1-828-355-5544 > E-mail: mjlaw...@us.ibm.com > > 'Examine my teachings critically, as a gold assayer would test gold. If you > find they make sense, conform to your experience, and don't harm yourself > or others, only then should you accept them.' > > > > From: themba > > To: "jQuery (English)" > > Date: 03/05/2009 02:45 PM > > Subject:[jQuery] Auto update PHP session variables using Ajax/JQuery > > > > > > > > Hi Guys, > > I need help with updating a Session Variable using Javascript, my goal > is to have a text filed that will accept numeric input, then onblur or > onChange, the PHP session variable must be updated with the new > numeric value, how can I do this? > > Thank you in advance.
[jQuery] Re: A loading image in the centre of the screen
Check out the BlockUI plugin: http://malsup.com/jquery/block/ On Mar 9, 8:21 am, phicarre wrote: > I would like with jQuery to show a loading image in the centre of the > screen that waits for everything to load. And whatever the browser ! > Any solutions ? plugins ?
[jQuery] A loading image in the centre of the screen
I would like with jQuery to show a loading image in the centre of the screen that waits for everything to load. And whatever the browser ! Any solutions ? plugins ?
[jQuery] simple $.post code not working in safari
I'm a javascript and jquery newbie. That said, the following code works in firefox/opera/camino but not safari 4 (beta) and I'd like to know why. Is the code correct? Maybe a better and more browser friendly way exists? The form (id = myform) submits to an external site (different domain) but upon submit posts information to a local file (save.php). In safari it does not make the request to save.php. The form is simple, no javascript, just this. I'd like to keep it that way. $(function () { $("#myform").submit(function() { var inputs = $("form").serialize(); $.post("save.php", { inputs : inputs }); return true; }); }); Important note: When changing 'return true;' to 'return false;' it in fact executes save.php in safari, however, of course it then won't actually submit the form to the external site.
[jQuery] JCarousel - set offset via class rather than number?
Can JCaroursel be set up so the list is offset via a class name? (Example: six list items in the carousel, but the list item with class="active" is shown as the first visible item in the list) Thanks
[jQuery] Re: $.get Reponse issue
Instead of returning something, you have to echo it out. jQuery and PHP can't directly exchange data like that so it just takes anything that is echoed out as the returned value. So do, DO SOMETHING echo $random_string; Knucklehead00 wrote: > > Hello all. > > I am relatively new to JQuery. Been a Mootools user for about a year now > and finally decided to make the switch. > > I have run into an issue with a $.get request and the response that I am > trying to get back. > > JS code: > > var token > > $.get("includes/dsvideoplayer_script.php", function(data){ > token = data; > }); > > PHP code: > > DO SOMETHING > > return $random_string > > I am not entirely sure how to get PHP to send back the response to the > $.get request. > > Any help would be appreciated. > > Thanks. > > -- View this message in context: http://www.nabble.com/%24.get-Reponse-issue-tp22413677s27240p22413709.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Having trouble with animate in IE. (possible bug)
Alright so I'm trying to build a custom accordion type functionality and IE is throwing me an error. Now it works fine in Firefox, Chrome and Safari, IE is the only one that gives me an error. An example of the functionality can bee seen at: http://www.rememberwhencruisers.com/ My javascript can be found at : http://www.rememberwhencruisers.com/js/site.js And I'm using the google hosted jquery at: http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.js Now IE keeps telling me "Invalid Argument" in the jquery library at line 4166 character 5, which is the following code. fx.elem.style[ fx.prop ] = fx.now + fx.unit; Is this a bug or is there something wrong with my code? -- View this message in context: http://www.nabble.com/Having-trouble-with-animate-in-IE.-%28possible-bug%29-tp22413705s27240p22413705.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Using .ajax to do XMLRPC - I must be doing something very stupid
Aha. And I though I was doing something wrong. That clears up lot of things. PS: Does jQuery has better support for json? I can modify my XML-RPC to JSON-RPC. On Sun, Mar 8, 2009 at 9:44 PM, Karl Rudd wrote: > > jQuery doesn't include XML serialisation in it's core. A quick search > of the plugins repository came up with two projects that might help > (there may be more): > > RPC > http://plugins.jquery.com/project/rpc > The is rpc(remote procedure call) client implementation based on > JQuery. It creates an rpc object and adds ability to call them. It > supports both xml and json rpc... > > XML > http://plugins.jquery.com/project/xml > Methods to generate XML/HTML tags programmatically. By default, they > output XHTML compliant tags. > > Karl Rudd > > On Mon, Mar 9, 2009 at 1:18 PM, riteshn wrote: >> >> Hi >> >> So my first time using jQuery. >> >> http://paste.pocoo.org/show/107037/ >> >> I have a simple django based xml-rpc server which works perfect when I >> test it with my python based XML-rpc client. >> >> I am always getting error when sending data using jQuery. >> >> When I set processData: true - the server is getting value as: >> >> var1=val1&var2=val2 >> >> as a consequence of which my dispatcher in the server side fails with >> XML parsing error. >> >> If I set processData: false, then POST content is just ''. >> >> Looks like jquery is not serializing the data to XML. I did lot of >> Googling (maybe I didnt do enough) and nowhere I found a similar >> error. Though it threw up: http://drupalbin.com/1173 which is doing >> the serializing by itself. I am doubtful if this is required. >> >> Thoughts? >> > -- Ritesh http://www.riteshn.com
[jQuery] bassistance.de Jörn's Enhancement
Hello everybody, I made some updates on the script, mainly to include the resources below: - default formatResult unformats the result, keeping it text-only; - option bool selectButton: chooses whether the arrow for options is displayed or not; - option integer width: now resizes the input and div to match the size specified, even if the arrow part is displayed; - JQuery showDiv(): shows the result's div even if the input is not clicked (used by the arrow to display the results); - boolean menuClicked(): returns whether the click in the screen was in the result's div or not. The best part, in my opinion, is the second item. With this option set to true, the autocompleter can simulate a select box, and it seems very nice. Also, with the "width" option, it is not needed to create a new class for each instance of the input in the page. I am trying to make it the more generic possible, in order to reuse it many times in each page, and keeping it simple. If anybody wants the code, or have new ideas that would like to share with me, let me know! Best regards, Tyron.
[jQuery] Re: How to remove li inside UL
A jQuery object is array-like; you can access elements with brackets, like $(li)[0]. However, that will return the element. If you want to use a jQuery method with that element, you need to wrap it with $(). Joseph's second example will work (his first will fail for the same reason). There are several ways to access an element in a collection, depending upon which element you want. Martijn's is a good choice if you only want the first element. On Mar 9, 4:51 am, Martijn Houtman wrote: > On Mar 9, 11:53 am, niraj wrote: > > > var li = $('.items'); > > li[0].remove(); > > $(".items:first").remove();
[jQuery] Re: jQuery plugin of bassistance -> Howto enhance functionality?
The ".result" event will trigger when an option is selected so $("#suggestion").autocomplete( ... your existing code }).result(a, data, c) { // Variable "data" has the option the user selected // Make your call here }); On Mar 9, 11:21 am, visionmaster wrote: > Hello together, > > I'm using the Autocomplete jQuery plugin from bassistance, > seehttp://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ > > It actually works fine. When I click on an element from the > autosuggest-list, it's value is correctly transfered to the associated > input field. > > Now I want to enhance the functionality as the following. When I click > an element from the autosuggest-list, I want to trigger a PHP script, > which does a search over the passed value right away. > > I unfortunately have no idea how to do that. Anyone have an idea? > > Here my code: > > > script>