[jQuery] Help on form plugin Malsup :)
I am having an issue with the form plug in i cant access my ajax json response data. $(function(){ $('#ticket-form').ajaxForm({ dataType: json, success: function(data){ alert(data.event); } }); }); my responce {event:editSuccess,msg:w00t refresh} I cant seem to access event it just spits out the whole damn string :@ Jason Y www.purepressure.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Help on form plugin Malsup :)
Yeah i nipped it ARG it was a template if statement that got me :( thx for quick response :) love the plugin Jason Y www.purepressure.com Mike Alsup wrote: I am having an issue with the form plug in i cant access my ajax json response data. $(function(){ $('#ticket-form').ajaxForm({ dataType: json, success: function(data){ alert(data.event); } }); }); my responce {event:editSuccess,msg:w00t refresh} Hi Jason, I suspect you have a javascript error on your page somewhere and so submitting the form is causing a page navigation instead of an ajaxSubmit. The code you posted works fine for me. Did you streamline your test to include only this code? Can you post your page somewhere? Here's the test page I used: html head script type=text/javascript src=jquery-1.0.4.js/script script type=text/javascript src=form.js/script script type=text/javascript $(function(){ $('form').ajaxForm({ dataType: json, success: function(data){ alert(data.event); } }); }); /script /head body id=body form method=get action=json2.txt input type=submit / /form /body /html Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Having an issue accessing a node.
$('#blog[headline]').val('newvalue'); input type=text id=blog[headline] name=blog[headline] value= / It seems i cant access the node for [] in the name breaks the ability to access it unless i am doing something wrong? Jason Y www.purepressure.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Having an issue accessing a node.
Blast but it groups them in to an array and is so nice sometimes lol *shrugs* I just changed the names no issue thought i thought _ was not a good id and people had issues with it i guess that is not true? Jason Y Michael Geary wrote: $('#blog[headline]').val('newvalue'); input type=text id=blog[headline] name=blog[headline] value= / It seems i cant access the node for [] in the name breaks the ability to access it unless i am doing something wrong? [] are not valid characters in an id attribute: http://www.w3.org/TR/html4/types.html#type-name Browsers and jQuery don't necessarily enforce this, but there are no guarantees that anything will work when there are invalid characters in an id. -Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery 1.1 by the end of Nov
I think over all do a mootools like download / interface jquery lib download were the user can pick and choose components. Just to be fair the only reason it has two was to make perl regex users happy :) I do use the perl regex though lol. Jason Y www.purepressure.com dave.methvin wrote: John Resig wrote: Right now, the jQuery compressed build is teetering around 18-19KB, I really want to try and cut this down. Any thoughts on particular features that should be extracted into a plugin? I know the macros don't account for _that_ much core code but they do complicate the documentation significantly. We have nice short names like .attr and .css yet those represent the most-macroed properties. Then we end up with (justifiable IMO) situations where valuable names like .height() are taken by the .css(height) macro to save five--count 'em--five characters. The same goes for the event macros, I think they account for more than half the names in the API documentation at this point and they end up creating situations like .unload() that are pretty hard to explain. I would like to see jQuery take more of a Perl path than a PHP one, using a small number of consistent and powerful concepts plus the ability to extend things with plugins. Perl has one simple consistent regexp operator; PHP has two completely different regexp engines, each served by a dozen or more differently named functions. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Replacing Accordion plugins
Jörn, YOU ROX thx for the activate :) w00t w00t Jason y www.purepressure.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Tabs plugin 2.0
Klaus, How much work is it to change the css to be a vertical layout on the left or right side? It would be intresting if you could pass in a value to place the tab position around the content. thx for the great work so far the plug in is a must have no doubt! Jason Y www.purepressure.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] The jQuery Design/Coding Process
pretty sure Aptana is cross-platform java :) Jason Y www.purepressure.com Karl Swedberg wrote: On Nov 9, 2006, at 11:45 PM, Chinmay Kulkarni wrote: On a related note, any editors that support autocomplete/suggest and code-folding for jQuery? If you own a Mac, you can try TextMate and download the jQuery bundle. Instructions here: http://www.learningjquery.com/2006/09/textmate-bundle-for-jquery (needs to be updated a little, but most of the core functionality has tab triggers for autocomplete.) For Windows, I've heard that Aptana has jQuery support, but I haven't tried it. Karl ___ Karl Swedberg www.englishrules.com www.learningjquery.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Thickbox tweak need help :)
I am attempting to give the remove options so i can pass back a flag to refresh the parent page or load a url in the parent page that was constructed in the thickbox. function TB_remove( options ) { $(#TB_imageOff).unclick(); $(#TB_overlay).unclick(); $(#TB_closeWindowButton).unclick(); $(#TB_window).fadeOut(fast,function(){$('#TB_window,#TB_overlay,#TB_HideSelect').remove();}); $(#TB_load).remove(); options = options || {}; if(options['refresh']) { var sURL = unescape(window.location.pathname); window.location.reload( false ); } if(options['url']) { var sURL = unescape(window.location.pathname); window.location.url(options['url']); } return false; } i am assigning the link a click action to execute the tb remove with options. $(.external).click(function(){ TB_remove({url:this.href}); }); snippet of the applied to html td class=lefta href=/blog.php?id={key} class=external{data.headline}/a/td Jason Yeckel www.purepressure.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] 2 New jquery plugins: collapseRows collapseRows
hey o, The vertical collapse works but the horizontal expanding doesn't work in ie6. Jason Y www.purepressure.com Enrique Meléndez wrote: Uhmm, strange, I have IE6/WinXpSP2 and works!!! Please, anyone could check this? Thanxs, Enrique Meléndez Estrada Servicios Informáticos Organización y Servicios Internos Instituto Tecnológico de Aragón -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Dragan Krstic Enviado el: martes, 07 de noviembre de 2006 18:53 Para: jQuery Discussion. Asunto: Re: [jQuery] 2 New jquery plugins: collapseRows collapseRows In IE6/WinXpSP2 rows doesn't expand - Original Message - From: Enrique Meléndez [EMAIL PROTECTED] To: discuss@jquery.com Sent: Tuesday, November 07, 2006 5:54 PM Subject: [jQuery] 2 New jquery plugins: collapseRows collapseRows Hi everybody, Here I release my first two jquery plugins in a beta version (complete doc is missing): http://www.ita.es/jquery These plugins add to a table the behaviour of collapsing/expanding columns and rows (animated in IE6.0+) Please, check the speed optimizations for IE (By the way, something I miss in general in jquery docs/forums/cookbook, etc.. and I think that is essential for programming new complicated web2.0 applications with javascript/jquery in different browsers). I must point out the bad implementation of events in IE which are SLOOOW, as well as the speed for changing DOM and CSS stuff (adding/removing classNames are painfully slow in IE) in contrast with Firefox or Opera. Any suggestions, improvements, fixes, optimizations, etc... are very welcome!!! Enrique Meléndez Estrada Servicios Informáticos Organización y Servicios Internos Instituto Tecnológico de Aragón ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Append body
// wire the 'Loading...' ajax indicator $('div id=busyLoading.../div') .ajaxStart(function() {$(this).show();}) .ajaxStop(function() {$(this).hide();}) .appendTo('#main'); That is from the form example that emulate a google like load hope that helps ;) url: http://www.malsup.com/jquery/form/ Jason Yeckel 3spn LLC - Programmer sdkester wrote: I tried appending the body with a div using the following in a js file: $(body).append('div id=ajaxBusy class=ajaxBusyp ../../loading2.gif nbsp;nbsp;/p/div'); It is not working. Maybe I'm going about it wrong. I simply want to insert the above html anywhere in the body. Is my code wrong and/or am I approching it from the wrong angle. TIA, Shaun Kester ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] John's Pager Plugin?
Is there any CSS that goes with this plugin? I also had the issue just plugin it in that the page list was in vertical form not horizontal. As well when i go to a few pages in and sort it shows another pages data at the bottom totaling 20 lines and sorts only the bottom half. I figure it might be me who knows jquery code below - I first apply the pager because i am default sorting my data set by date from a db call. $(table#large).pager().tableSorter({ sortClassAsc: 'sortUp', // class name for asc sorting action sortClassDesc: 'sortDown', // class name for desc sorting action headerClass: 'largeHeaders', // class name for headers (th's) disableHeader: ['Game','Location', 'View'] // disable column can be a string / number or array containing string or number. }); John Resig wrote: I've never seen that plugin and I would love to be introduced to it! I wrote a pager plugin to power the http://jquery.com/api/ site. It works with both numbers, alpha characters, and words. Additionally, it works on ul, ol, and table elements (with dl elements in the works). After I squish some more bugs, I'll document it and release it. For now, however, you can find it on this page: http://jquery.com/api/js/pager.js I made sure that this plugin works really really fast. I tested it against all of Christian's large table samples and it performs wonderfully. Roughly, this is how you use it: 1) If all you want is a numbered-page pager, just do: $(ul).pager(); (or on any other ul/ol/table element) It defaults to 10 per page, you can change that, though: $(ul).pager(20); 2) If you want an alphanumeric pager, it's a little bit trickier: With the structure: ul liTest/li liAnother Test/li /ul do: $(ul).alphaPager(); (This extracts the text contents from the text contents of each element and gets the first character) this gets the first word instead: $(ul).alphaPager(0,word); With the structure: ul libTitle:/b Test/li libTitle:/b Another Test/li /ul do: $(ul).alphaPager(1); (This gets the Nth child element and extracts the first character from its contents) this does the same for a word: $(ul).alphaPager(1,word); It simply handles more 'simple' use cases, for anything more complex, you can write your own parsing function like so: $(ul).alphaPager(function(elem){ // Must return the string that you want sorted on return elem.firstChild.firstChild.nodeValue.substr(0,1); }); Let me know if you have any questions concerning how it works. --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] update a div within a submit
Pretty sure http://jquery.com/dev/svn/plugins/form/form.js is a newer more general version of that script i could be wrong. Jason Y 3spn.net Jonathan Chaffer wrote: On Sep 6, 2006, at 13:32 , kain wrote: I just want to ask what's the equivalent code of updating a div with the results of a form action when hitting a submit button of jquery instead of scriptaculous and prototype. I think you're going to want to use the forms plugin for this. On this page: http://jquery.com/plugins you'll want Forms Plugin (with AJAX). With that included, you can simply do: $('#id-of-my-form').ajaxSubmit('#id-of-my-div'); and the form will automagically populate the div with its results. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] ajaxStart etc. (still) not working
Florian, Pretty sure he told you not to use 1.0a ;) give the svn a try it also now has ajax error handling for bad responses. This issue should be resolved in the latest SVN build: http://jquery.com/src/jquery-svn.js http://jquery.com/src/jquery-svn.js On 8/24/06, *Florian* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I'm using the 1.0a version, and with $.load ajaxStart/stop doesn't work... :( Florian On 7/20/06, * John Resig* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Has there been any resolution on this? I'm having a rough time figuring out why it's not working. This issue should be resolved in the latest SVN build: http://jquery.com/src/jquery-svn.js http://jquery.com/src/jquery-svn.js --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Dom creation
Hey things seem to be going along nicely just need a push over the edge :) http://3spn.net/jQuery/dom_creation.html I have constructed a dummy array i need to figure out how to transverse and access the data i know it should be simple reading around now might not need help. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] JSON Arrays *tad off topic hehe*
I am useing JSON.php to convert my mutli demional array in to json. I am just posting it in to a var for now testing the innerhtml creates i need some help on figuring out how to access the array once in the js block. http://3spn.net/jQuery/dom_creation.html I have constructed a dummy array that is the same as the php ajax responce will put out. I did double post this to a point i moved it out side of the dom creation topic header! :) ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Dom creation
I think i am getting a tad closer i am trying to find out how i can make multi rows with a for loop then insert them in to the table or just put them in a var in the deleration of the table it self. I have been looking at this callender.js and i am a tad confused :( var days = []; for (var i=0; ithis.data['days'].length; i++) days[i] = { 'node' : th, 'class' : this.classes['day-name'], 'content' : this.data['days'][i] }; return [ 'tr', {}, [ $.tpl( days, this.tpl['cell'] ) ] ]; This code look sto be what i need just de coding it is a tad hard hehe. I am assuming that $.tpl will do what i want? It takes a json array then produces multi rows from it? There is also this method http://mg.to/2006/02/27/easy-dom-creation-for-jquery-and-prototype#comment-176 I am assuming it is the same author? and the example there shows that it has the ability to create rows? var json = [ {'name' : John, 'surname' : Smith}, {'name' : Sarra, 'surname' : Smith} ]; $.tpl(json, function(){ return [ 'tr', { 'class':MyTableRow }, [ 'td', { 'class':MyTableCol1 }, [ this.name ], 'td', { 'class':MyTableCol2 }, [ this.surname ]] ]; }).appendTo($('#fill-table tbody').get(0)); Dave Methvin wrote: How would i go about making a table and then inserting rows in the body in a for loop. I am wanting to create a stats board for a post match. I figured i would create the table and then append to it am i right in how to go about this? How would i append to a tag in the table i just created? http://3spn.net/jQuery/dom_creation.html I wanted to add more player rows how would i do that? hehe I tried to do a append($table tr) deal but it didnt work. The tr elements descend from either thead or tbody, so tabletr won't match anything. There's a workaround in the latest jQuery that will catch the case of appending tr to table and put it in tbody, but it's best to say it yourself. Instead of applying a style to each td, use a colgroup and apply the styles (or classes) to the col elements. It will save you a lot of messy coding. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Improvements in Ajax facilities
Good looking out i take it this all works with the ajax wrapper. Jason Y 3spn.net Taku Sano (Mikage Sawatari) wrote: With Ajax facilities of jQuery, it is not easy to deal with errors. In addition, it is inconvenient to repeat reloading the same URL to observe changes. Please confirm my patch handles these issues. [patch for svn.208] http://pepper.sherry.jp/jquery/newajaxpatch-svn208.patch [test page] http://pepper.sherry.jp/jquery/newajaxfunc.html Problems: - $().load() replaces the HTML regardless of whether the request has succeeded or failed. Therefore it is impossible to customize an error message to show. - Callback functions can't learn if the request has succeeded or not. - It's true that there are methods that are called on error. But even if it failed, DOM elements are always replaced, and callbacks are always called. - There are no ways to set timeout. In case of a server doesn't respond, we can't abort the request after a few seconds and display an error. Improvements: - Callbacks for $().load(), $.get, $.post now takes the second argument which represents a state (success, failure, notmodified). - $().load() no longer replaces the HTML on error, if a callback is supplied. Without a callback, it replaces the HTML on error as it used to do. - $().load(), $.get, $.post now can timeout. When it timed out, the state becomes failure and treated as an error. $.ajaxTimeout(1000); // ms $().load(); - Added 2 ajax methods: $().loadIfModified(); $.getIfModified(); These methods set If-Modified-Since header to Ajax requests. They are useful when we periodically reload the same URL to see changes. They work the same way as $().load and $.get if the URL is updated. When it is unchanged, ().load doesn't replace the URL but does callback. In that case, the state will be notmodified. Since IE always returns the same cached content for the same URL, it is normally impossible to check changes. It's true that it is possible to force not to use cache by appending some random characters as query of the URL, but then we waste the traffic needlessly. $().loadIfModified() and $.getIfModified() solve this problem. Taku Sano ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Javascript HTML WYSIWYG editor
I have used TinyMCE and it works great to. Dylan Verheul wrote: Use TinyMCE, I have no problem getting it to work. It doesn't interfere with jQuery. On 8/13/06, Remko [EMAIL PROTECTED] wrote: I am looking for Javascript HTML WYSIWYG editor JQUERY style? Not a fancy one but a very basic one. Anyone create such a plugin? -- View this message in context: http://www.nabble.com/Javascript-HTML-WYSIWYG-editor-tf2099160.html#a5785306 Sent from the JQuery forum at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Dom creation
Working great. How would i go about making a table and then inserting rows in the body in a for loop. I am wanting to create a stats board for a post match. I figured i would create the table and then append to it am i right in how to go about this? How would i append to a tag in the table i just created? http://3spn.net/jQuery/dom_creation.html I wanted to add more player rows how would i do that? hehe i tried to do a append($table tr) deal but it didnt work. Aloyzas Rimeika wrote: Ups. :) http://www.aloyzas.lt/javascript/jquery-dev/dom.js Basically I am waiting for jQuery 1.0 release... On 8/9/06, Jason Yeckel [EMAIL PROTECTED] wrote: Does not work with the latest svn but it works with 1.0a. you gave me the same link :) i did try a newier svn first though just to check still no go. Aloyzas Rimeika wrote: Maybe this one will work :) http://www.aloyzas.lt/javascript/jquery/dom.js On 8/9/06, Jason Yeckel [EMAIL PROTECTED] wrote: ttp://www.aloyzas.lt/javascript/jquery/dom.js Will this be updated for the 1.0b ? or svn anytime soon? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Dom creation
Does not work with the latest svn but it works with 1.0a. you gave me the same link :) i did try a newier svn first though just to check still no go. Aloyzas Rimeika wrote: Maybe this one will work :) http://www.aloyzas.lt/javascript/jquery/dom.js On 8/9/06, Jason Yeckel [EMAIL PROTECTED] wrote: http://www.aloyzas.lt/javascript/jquery/dom.js Will this be updated for the 1.0b ? or svn anytime soon? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/