[jQuery] Re: encoding(charset) problem
that came up a while ago I added a patch to jQuery ajax.js that enables you to roll your own encoding... and it makes the source smaller! It is scheduled (I hope) to go in to jQuery 1.2 http://jqueryjs.googlecode.com/svn/branches/jake-dev/ http://jqueryjs.googlecode.com/svn/branches/jake-dev/src/ajax/ajax.js down towards the bottom: pair is new, and param was changed... we've used it for iso8859-1 encoding, you should be able to use any custom encoding, if you add your own pair function $.fn.pair = function(f,v) {return encodeURIComponent(f) + = + encodeURIComponent(v)} is the new core function... you just need a function to encode utf into gb2312 On 7/5/07, Rhapidophyllum [EMAIL PROTECTED] wrote: I think you don't have to change the entire server setting, but header information in your individual server responses should be set to gb. On Jul 4, 2007, at 11:29 AM, Guoliang Cao wrote: Hi, I'm using jQuery 1.1.3 in my AJAX-based game viewer. I download game data through ajax calls. Game data are mostly encoded in gb2312. I currently have a problem: if I don't change the server side setting to send data in gb2312 format, I got unreadable characters on client side. Is it possible to set encoding/charset when I make an ajax call? The reason I don't like to change server side setting is I want to minimize the effort of installing my application to any web site. For those who are interested, here is my game viewer: http://www.daoqigame.com/jsgameviewer/index1.html Thank you. Guoliang -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Binding actions after an ajax call?
$('#myEventList div.itemContent a.event').bind('click',function(){ should be the same as $('a.event',this).bind('click',function(){ faster and shorter! On 6/30/07, Tobias Parent [EMAIL PROTECTED] wrote: Answering my own question... I tried it out, and this works beautifully, so far: $('#myEventList div.itemContent').load('/events/quicklist', function(){ $('#myEventList div.itemContent a.event').bind('click', function(){ showEventDetails(this.id); }) }); ... And then showEventDetails() strips out what it needs, and does the same load() for each related DIV. Woo-hoo!! jQuery ROCKS! And it makes rapid development simple with CakePHP!! Regards, -Toby -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: SELECTOR CHALLENGE
var myResults = $('form').filter(function(){return ! $(this).html().match('coop:manage')}) // untested, and rather sloppy... but it should do the job On 6/25/07, John Farrar [EMAIL PROTECTED] wrote: NOTE: I can select the forms and loop through them using var myResults = new Array(); jQuery('form').each(function(){ if(this.attr('coop:manage') == true) myResults[myResults.length] = this; }); return myResults; ...but that gives me an array that is non-jquery and it isn't as good as it should be! again, how about a guru showing your stuff on this one. John On Jun 25, 7:30 pm, John Farrar [EMAIL PROTECTED] wrote: OK here it is short and simple. If I have more than one form on a page I would like to select on the forms like this... form coop:manage=true I would like this to be returned as a jQuery object that can be itterated through with .each! Thanks oh guru in advance for your great knowledge, :). John Farrar -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: SELECTOR CHALLENGE
ouch! namespaces are second class citizens in the JavaScript world! I think the latest version of jQuery handles it better. so Sean's should work. http://jqueryjs.googlecode.com/svn/branches/1.2/ On 6/25/07, John Farrar [EMAIL PROTECTED] wrote: This didn't seem to match attributes. On Jun 25, 8:34 pm, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: var myResults = $('form').filter(function(){return ! $(this).html().match('coop:manage')}) // untested, and rather sloppy... but it should do the job On 6/25/07, John Farrar [EMAIL PROTECTED] wrote: NOTE: I can select the forms and loop through them using var myResults = new Array(); jQuery('form').each(function(){ if(this.attr('coop:manage') == true) myResults[myResults.length] = this; }); return myResults; ...but that gives me an array that is non-jquery and it isn't as good as it should be! again, how about a guru showing your stuff on this one. John On Jun 25, 7:30 pm, John Farrar [EMAIL PROTECTED] wrote: OK here it is short and simple. If I have more than one form on a page I would like to select on the forms like this... form coop:manage=true I would like this to be returned as a jQuery object that can be itterated through with .each! Thanks oh guru in advance for your great knowledge, :). John Farrar -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: SELECTOR CHALLENGE
oops http://jqueryjs.googlecode.com/svn/trunk/jquery/ On 6/25/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: ouch! namespaces are second class citizens in the JavaScript world! I think the latest version of jQuery handles it better. so Sean's should work. http://jqueryjs.googlecode.com/svn/branches/1.2/ On 6/25/07, John Farrar [EMAIL PROTECTED] wrote: This didn't seem to match attributes. On Jun 25, 8:34 pm, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: var myResults = $('form').filter(function(){return ! $(this).html().match('coop:manage')}) // untested, and rather sloppy... but it should do the job On 6/25/07, John Farrar [EMAIL PROTECTED] wrote: NOTE: I can select the forms and loop through them using var myResults = new Array(); jQuery('form').each(function(){ if(this.attr('coop:manage') == true) myResults[myResults.length] = this; }); return myResults; ...but that gives me an array that is non-jquery and it isn't as good as it should be! again, how about a guru showing your stuff on this one. John On Jun 25, 7:30 pm, John Farrar [EMAIL PROTECTED] wrote: OK here it is short and simple. If I have more than one form on a page I would like to select on the forms like this... form coop:manage=true I would like this to be returned as a jQuery object that can be itterated through with .each! Thanks oh guru in advance for your great knowledge, :). John Farrar -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Loosing access to 'this' objects in callback method!
in which no constructor was called and therefore is not working against the original instance I created. But then again I always look for the most obscure explanation instead of noticing the simple error I've made. I've included the code below. If anyone can show me the errors of my ways, I'd be very grateful. The line causing me a problem is commented with // THIS LINE FAILS WITH AN this.woffers has no properties ERROR // Use jQuery 'document.ready' selector to define the function to call when page is ready. $(main); // // The main entry function hopefully called by the jQuery 'ready' selector // function main() { try { //create a new 'Woffers' instance var woffers = new Woffers(woffersdata.xml, xml); } // Catch any exceptions... catch(e) { // ...and report them. TODO: remove this for live alert(e); } } // // Constructor for a 'Woffers' class which will contain all our 'Woffer' items // and some methods to retrieve them. // // Expects: // sourceURL - a String containing the location of the file containing the // data to be used to construct our object. // sourceType - a String containing the type of file we are using to // construct the object. Can be xml or json // function Woffers(sourceURL, sourceType) { if(sourceType != xml) { throw new Error(Invalid source type ( + sourceType + ) supplied to Woffers constructor.); } // Store parameters for later use by any method this.sourceURL = sourceURL; this.sourceType = sourceType; // Create a property to hold a list of Woffer objects this.woffers = new Array(); // -- This property should get populated by the $.ajax callback method switch(this.sourceType) { case xml: { $.ajax( { type: POST, // type of http request url: this.sourceURL, // where to get file from dataType: xml, // type of file to retrieve complete: this.parseXML // Function to run on completion which will populate this.woffers } ) break; } // End case(xml) case json: { $.ajax( { type: POST, // type of http request url: this.sourceURL, // where to get file from dataType: json, // type of file to retrieve complete: this.parseJson // Function to run on completion } ) break; } // End case(json) } } // End Woffers constructor // // // Woffers.prototype.parseXML = function(woffersDOM, resultStatus) { if(resultStatus != success) { throw new Error(Encountered a problem retreiving the XML file. + Reported status is + ResultStatus + .); } // retrieve a list of woffers from the response var retrievedWoffers = woffersDOM.responseXML.documentElement.getElementsByTagName(route); // Go through each woffer and use it to create a new 'Woffer' object for(var index = 0; index retrievedWoffers.length; ++index) { // // THIS LINE FAILS WITH AN this.woffers has no properties ERROR // // Create a new woffer and add it to 'this.woffers' this.woffers.push(new Object()); } } Any feedback, much appreciated Regards, Glenn -- View this message in context: http://www.nabble.com/Loosing-access-to-%27this%27-objects-in-callback-method%21-tf3970581s15494.html#a11277167 Sent from the JQuery mailing list archive at Nabble.com. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Is it possible to attach codes to body.onload via document.ready?
I take it all back! script type=text/javascript $(function(){ eval($('body').attr('onload')); }); /script /head body onload='alert(hi)' ok /body alerted 2 times!! On 6/23/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: yes... it overrides onload=test() ... but it should still be in the dom, so you can still get at it! // untested jQuery(document).ready(function() { eval($('body').attr('onload')); }) On 6/23/07, howa [EMAIL PROTECTED] wrote: Thanks...but how to handle this? html head script src=jquery.js/script script jQuery(document).ready(function() { // Assign event to window.onload jQuery(window).load(function() { alert('Everything is loaded!'); }); }); function test() { alert('test'); } /script /head body onload=test(); TEST123 /body /html I don't want to override the original onload: test() also... why jQuery(body) or jQuery(body) didn't work? thanks. On 6月23日, 下午9時31分, Karl Swedberg [EMAIL PROTECTED] wrote: Hi Howa, Try jQuery(window) without the quotes around window. That should do it! :) --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jun 23, 2007, at 9:20 AM, howa wrote: Hello Gilles Erik, the codes below never work with IE7 FF2.0 html head script src= jquery.js/script script jQuery(document).ready(function() { alert('ready'); // Assign event to window.onload jQuery('window').load(function() { alert('Everything is loaded!'); }); }); /script /head body TEST123 /body /html howa On 6月23日, 下午7時09分, Gilles (Webunity) [EMAIL PROTECTED] wrote: As i see your question, i think you mean this: jQuery(document).ready(function() { // Assign event to window.onload jQuery('body').load(function() { alert('Everything is loaded!'); }); }); On 23 jun, 12:52, howa [EMAIL PROTECTED] wrote: Hello, is it possible to attach some codes to the body.onload via document.ready , or other methods to attach body.onload? thanks.- 隱藏被引用文字 - - 顯示被引用文字 - -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Is it possible to attach codes to body.onload via document.ready?
yes... it overrides onload=test() ... but it should still be in the dom, so you can still get at it! // untested jQuery(document).ready(function() { eval($('body').attr('onload')); }) On 6/23/07, howa [EMAIL PROTECTED] wrote: Thanks...but how to handle this? html head script src=jquery.js/script script jQuery(document).ready(function() { // Assign event to window.onload jQuery(window).load(function() { alert('Everything is loaded!'); }); }); function test() { alert('test'); } /script /head body onload=test(); TEST123 /body /html I don't want to override the original onload: test() also... why jQuery(body) or jQuery(body) didn't work? thanks. On 6月23日, 下午9時31分, Karl Swedberg [EMAIL PROTECTED] wrote: Hi Howa, Try jQuery(window) without the quotes around window. That should do it! :) --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jun 23, 2007, at 9:20 AM, howa wrote: Hello Gilles Erik, the codes below never work with IE7 FF2.0 html head script src=jquery.js/script script jQuery(document).ready(function() { alert('ready'); // Assign event to window.onload jQuery('window').load(function() { alert('Everything is loaded!'); }); }); /script /head body TEST123 /body /html howa On 6月23日, 下午7時09分, Gilles (Webunity) [EMAIL PROTECTED] wrote: As i see your question, i think you mean this: jQuery(document).ready(function() { // Assign event to window.onload jQuery('body').load(function() { alert('Everything is loaded!'); }); }); On 23 jun, 12:52, howa [EMAIL PROTECTED] wrote: Hello, is it possible to attach some codes to the body.onload via document.ready, or other methods to attach body.onload? thanks.- 隱藏被引用文字 - - 顯示被引用文字 - -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: displaying an offscreen row
Klaus, do you know which browsers scrollIntoView works with? On 6/23/07, Klaus Hartl [EMAIL PROTECTED] wrote: Phil Glatz wrote: I have a table inside a div; the div has a fixed height and overflow set to scroll. When the page is opened, the row containing the last selected data is highlighted, via jquery/DOM. the problem I have is that if the list (number of rows in the table) is bigger than can fit in the div, and the current element is below the visible area, you have to scroll down to see it. Is there a way to make the div scroll up to make the row I want to see visible, using DOM? I don't think so, but thought I'd ask. Do any of the add-ons for jquery that deal with tables handle this? Try the scrollIntoView method: $('tr')[0].scrollIntoView(); http://developer.mozilla.org/en/docs/DOM:element.scrollIntoView --Klaus -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: encodeURIComponent localized for custom encoding
diff is a unix file compare ... the -u option is the prettiest and most understandable option. any compare utility will do! On 6/22/07, oscar esp [EMAIL PROTECTED] wrote: diff -u ¿? I don't know diff prg. :-( Thanks. On 21 jun, 18:41, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: do a diff -u between the 2 versions is there anything more than a slight change in param: ? On 6/21/07, oscar esp [EMAIL PROTECTED] wrote: I have some issues with jquery . When I use the jquery from your branch I get some error in code that works fine with official 1.2 version. I have ajax calls that returns a html in order tu full a div. Seems that if data has html doesn't work Seems that type param doesn't work. Example: 1- This work fine with official version var url = test2.asp var pars= method=getEstadoConscmpAction=outType=1idComponent=COD_EST_CONS_SelidName=COD_EST_CONS jQuery.ajax({ type: post, url: url, data: pars, async: false, dataType: html, success: function(data) { jQuery(#dRes).html(data); } }); (data is = SELECT id='COD_EST_CONS_Sel' name='COD_EST_CONS' class='undefined' OPTION value='-1'Seleccione un valor/ OPTIONOPTION value='1' Nuevo/OPTIONOPTION value='2' A reformar/ OPTIONOPTION value='3' Semi Nuevo/OPTION/SELECT) But it doesn't work fine with your jquery version. Never enter in success method, however the call to test2.asp (that returns the select) is done. If I delete the dataType then success function is executed. Seems that there are some issue with dataType param. Maybe it is not possible but: Could we add the charset setup into 1.2 official version? I need to be sure that putting the cahrset we don't crash other things... Seems that be never fix! the problem. Thanks Jake. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ- Ocultar texto de la cita - - Mostrar texto de la cita - -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Test
you really should return false; On 6/22/07, Benjamin Sterling [EMAIL PROTECTED] wrote: passed :) On 6/22/07, Rey Bango [EMAIL PROTECTED] wrote: Test -- BrightLight Development, LLC. 954-775- (o) 954-600-2726 (c) [EMAIL PROTECTED] http://www.iambright.com -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Easebox
extremely nice I'll gladly help you with plugin conversion! On 6/22/07, Glen Lipka [EMAIL PROTECTED] wrote: I had a little bit of free time, so I started an easeBox. Like thickbox, but with easing transitions. http://www.commadot.com/jquery/easebox/# I made a list of things I want to do to it on it. Any suggestions to add to the list? Any suggestions of how I could improve the code? I have no idea how to make it into a plugin. Continuing to work on it, but help is greatly appreciated. Glen -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: encodeURIComponent localized for custom encoding
do a diff -u between the 2 versions is there anything more than a slight change in param: ? On 6/21/07, oscar esp [EMAIL PROTECTED] wrote: I have some issues with jquery . When I use the jquery from your branch I get some error in code that works fine with official 1.2 version. I have ajax calls that returns a html in order tu full a div. Seems that if data has html doesn't work Seems that type param doesn't work. Example: 1- This work fine with official version var url = test2.asp var pars= method=getEstadoConscmpAction=outType=1idComponent=COD_EST_CONS_SelidName=COD_EST_CONS jQuery.ajax({ type: post, url: url, data: pars, async: false, dataType: html, success: function(data) { jQuery(#dRes).html(data); } }); (data is = SELECT id='COD_EST_CONS_Sel' name='COD_EST_CONS' class='undefined' OPTION value='-1'Seleccione un valor/ OPTIONOPTION value='1' Nuevo/OPTIONOPTION value='2' A reformar/ OPTIONOPTION value='3' Semi Nuevo/OPTION/SELECT) But it doesn't work fine with your jquery version. Never enter in success method, however the call to test2.asp (that returns the select) is done. If I delete the dataType then success function is executed. Seems that there are some issue with dataType param. Maybe it is not possible but: Could we add the charset setup into 1.2 official version? I need to be sure that putting the cahrset we don't crash other things... Seems that be never fix! the problem. Thanks Jake. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: json-in-script and getJSON
it won't work! getJSON uses ajax... ajax can't go to another site. On 6/20/07, LVCHEN [EMAIL PROTECTED] wrote: I am doing some hack for blogger. Blogger API has offered JSON feed for user to load recent posts. This allows you to query a blog's public feed and get the resulting entries returned as JSON objects. The way to use the new JSON feed is creating a script element whose src value is http://blogname.blogspot.com/feeds/posts/default?alt=json-in-scriptcallback=myFunc where blogname is the blog you want to retrieve, and myFunc is the name of your callback function that is passed the JSON object. http://code.google.com/apis/gdata/json.html Now I am confused with this json-in-script and json A simple example shows the usage / function a_comprc(a,b) { order= Date.parse(a.published.$t.replace(/^(\d{4})-(\d{2})- (\d{2})T([0-9:]*)([.0-9]*)(.)(.*)$/, '$1/$2/$3 $4 GMT')) - Date.parse(b.published.$t.replace(/^(\d{4})-(\d{2})- (\d{2})T([0-9:]*)([.0-9]*)(.)(.*)$/, '$1/$2/$3 $4 GMT')); return 0-order; } function a_rc(json) { g_szComments = json.feed.entry.sort(a_comprc); } document.write('lt;script src=quot;http://' + g_szBlogDomain + '/ feeds/comments/default?alt=json-in- scriptamp;callback=a_rcquot;gt;lt;/scriptgt;'); / If I use $.getJSON, will I get the same result? What is the difference between these two method? function a_comprc(a,b) { order= Date.parse(a.published.$t.replace(/^(\d{4})-(\d{2})- (\d{2})T([0-9:]*)([.0-9]*)(.)(.*)$/, '$1/$2/$3 $4 GMT')) - Date.parse(b.published.$t.replace(/^(\d{4})-(\d{2})- (\d{2})T([0-9:]*)([.0-9]*)(.)(.*)$/, '$1/$2/$3 $4 GMT')); return 0-order; } jQuery.getJSON( 'http://' + g_szBlogDomain + '/feeds/comments/default? alt=json', function(json) { g_szComments = json.feed.entry.sort(a_comprc); }) I hope I am not asking a too stupid question... -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Reading HTML from XML
I don't agree when I want to pull html out of an ajax response I use : jQuery.xml as I would use jQuery.html()... if html() actually worked. $.fn.xml = function () {return $.xml(this[0])} $.xml = function(xml) { // dump the xml back to html text if (!xml) return var res = var tag = xml.nodeName var showTheTag = tag.charAt(0) != # if (showTheTag) res += '' + tag if (xml.hasAttributes()) { var attrs = xml.attributes for (var i = 0; i attrs.length; i++){ var attr=attrs[i] if (attr.specified) res +=' ' + attr.name + '=' + attr.value + '' } } if (showTheTag) res+= if (xml.nodeType == 8){ res += !-- + xml.nodeValue + -- } else if (xml.nodeValue != null){ res += xml.nodeValue.replace(/\/g,amp;).replace(/\/g,lt;) } if (xml.hasChildNodes()) { var children = xml.childNodes for (var i = 0; i children.length; i++){ var child = children[i] res += $.xml(child) } } if (showTheTag) res += '/' + tag + '' return res } On 6/19/07, Benjamin Sterling [EMAIL PROTECTED] wrote: I second Rob's suggestion, this is what I am doing on a few current projects. On 6/19/07, RobG [EMAIL PROTECTED] wrote: On Jun 19, 9:46 am, Lovecannon [EMAIL PROTECTED] wrote: I use CodeIgniter and jQuery for my frameworks, and i was using the AJAX functions and I tried using XML for a return type, and when id have an error message, it would return a div like this format: responsestatusdiv class=errorerrormsg)/div/status/ response Put the HTML inside a CDATA section. response status![CDATA[div ... /div]]/status /response Or you could encode the content, but I think CDATA is the way to go. -- Rob -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: german umlauts
it looks like your page is not being served as utf-8 or if it is, it's not valid utf-8. If your html editing program doesn't do utf... you have to encode it yourself. On 6/19/07, Michael Stuhr [EMAIL PROTECTED] wrote: hi list, i'm having a utf-8 encoded html document, where i'm adding some elements with jquery. i'm updating some selectboxes with this plugin http://www.texotela.co.uk/code/jquery/select/ but i'm having difficulties adding values to selectboxes where i'm getting unknown characters like �. my guess is that the plugin is causing this. cause when i'm doing a simple: $j('body').prepend('p style=color:#FF;auml;ÖÜß/p'); i'm getting ä��� so i guess i have to encode those, which would be ok. weird, it's always the encoding of strings that cause me so much trouble! dang! micha -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: encodeURIComponent localized for custom encoding
var pars= text1=+jQuery(#Text1).val(); should be a normal object! var pars= {text1:jQuery(#Text1).val()}; or a result from $.serialize On 6/19/07, oscar esp [EMAIL PROTECTED] wrote: Hi finally I got a public server to puplish the link: http://www.grupofusion.com/testcharset/testtBlock.asp the code: _ testtBlock.asp html head META http-equip=Content-Type content=text/html; charset=iso-8859-1 titleGeneración Cartel/title script src=/InmoFusion2/libs_Ext/jquery/jquery.js/script script jQuery.noConflict(); /script script src=/InmoFusion2/libs_Ext/jquery/jquery.form.js/script script src=/test/testpo.js/script /head body form id=test1 action=test2.asp method=post INPUT id=Text1 type=text name=Text1 INPUT id=td type=button onclick=guardarApunte(); value=Submit name=Submit1 /form div id=dRes /div /body /html the js function guardarApunte() { debugger; jQuery.ajaxSetup({contentType: application/x-www-form-urlencoded; charset=iso-8859-1}) ; jQuery.pair = function(f,v) {return escape(f) + = + escape(v)}; var url = test2.asp var pars= text1=+jQuery(#Text1).val(); jQuery.ajax({ type: post, url: url, data: pars, async: false, success: function(data) { debugger; jQuery(#dRes).html(data); } }); } __ the page that get the post META http-equip=Content-Type content=text/html; charset=iso-8859-1 % Response.AddHeader Content-Type, text/html; charset=iso-8859-1 Response.Write(response: +request.Form(text1).item) % -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: german umlauts
I don't see a charset there what is the server putting in for it??? php isn't very clever with utf, so you have to be very careful! a live link would help to see the headers and the encoding!! On 6/19/07, Michael Stuhr [EMAIL PROTECTED] wrote: Ⓙⓐⓚⓔ schrieb: it looks like your page is not being served as utf-8 or if it is, it's not valid utf-8. If your html editing program doesn't do utf... you have to encode it yourself. On 6/19/07, *Michael Stuhr* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: well the page is ok, afaict. i'm using php with smarty to bake my page, and as far as i'm only using this i'm getting an ä for an ä, if you know what i mean :-) . my js file is sent through php by using .htaccess and: ?php header ('Content-type: text/javascript'); ? in my js. when i'm directly calling my js i see the correct encoding. any ideas ? micha -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: How to create an endless animation?
in a one liner: (untested) $('#whatever').bind('a', function(){$(this).animate({ /* properties */ }, 200, $(this).trigger('a'))}).trigger('a'); On 6/18/07, Klaus Hartl [EMAIL PROTECTED] wrote: Arne-Kolja Bachstein wrote: Hi there, well, it's all in the topic: What is the best (least CPU usage is important I think) way to create an endless animation? I know how to generally use effects, but I do not know how to loop an animation. Any hints are welcome… or maybe even links to tutorials or something like that, I'm of course willing to learn it from a resource, but simply didn't find one yet. Thanks in advance, Arne You can use a recursive function maybe... (untested): function endless() { $('#whatever').animate({ /* properties */ }, 200, endless); } -- Klaus -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: How to disable (or properly remove) meta refresh?
As Sigmund Freud might have said, It's all in your head... but he wasn't talking about html very little in the html head is normal. meta's are read from the head (by the server, not the client) and sent as headers! So it's too late for you to do anything... but at least you know how long until the browser will refresh you away! --- Connection: close Date: Sun, 17 Jun 2007 16:54:27 GMT Server: Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.7l DAV/2 PHP/5.2.1 mod_perl/2.0.3 Perl/v5.8.6 Content-Type: text/html; charset=UTF-8 Client-Date: Sun, 17 Jun 2007 16:54:27 GMT Client-Peer: 127.0.0.1:80 Client-Response-Num: 1 Client-Transfer-Encoding: chunked Refresh: 10;URL=/ Title: stars ?xml version=1.0 encoding=utf-8 ? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en head title stars /title meta http-equiv=refresh content=10;URL=/ / script type=text/javascript src=/js/jquery.js/script script type=text/javascript $(function(){ alert ($([EMAIL PROTECTED]).attr('content')) }); /script /head body /body /html --- On 6/17/07, Michael Andreas [EMAIL PROTECTED] wrote: Hi group, just a quick question here. Does anyone know how can I disable the refresh effect of the following meta element: meta http-equiv=refresh content=10;URL=index.htm / ? I've tried $([EMAIL PROTECTED]).remove(); but it didn't work. I'm so hopeful of a solution. Thank you. -Michael- -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: jQuery may add $.browser.isiPhone
hopefully we won't need to care that it's an iPhone! We'll know more on the 29th On 6/17/07, Bob den Otter [EMAIL PROTECTED] wrote: maybe jQuery may add a new function, $.browser.isiPhone, for further, since iPhone allows developers do more in its safari... :) This should be as easy as adding a line with iphone: /iphone/.test(b), inside jQuery.browser = { }.. But, if it's added to the core: please, please name it $.browser.iphone for consistency. Just because Apple uses odd capitalisation, that doesn't mean we should use it in jQuery like that. Best, Bob. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Safari 3 and onload
I've used this a a test to see when things load... quite different loading times!! ?xml version=1.0 encoding=utf-8 ? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en head title blackout /title script type=text/javascript src=../js/jquery.js/script script type=text/javascript src=../plugins/debug/jquery.debug.js/script script type=text/javascript console.time('a'); var blackout = $('div style=width: 100%; height: 100%; position: absolute; top: 0px; left: 0px; z-index: 100; background-color: black/div') .prependTo($('html')); $(function(){ console.timeEnd('a'); console.time('b'); blackout.css('background-color','gray').debug('grayed') }); $(window).load(function() { console.timeEnd('b'); blackout.fadeOut(slow,function(){blackout.remove()}).debug('done') }); /script /head body h1la la la/h1 pimg src=pix/jake.jpg width=54 height=68 border=2 //p pimg src=pix/Lost%20Map.jpg width=128 height=72 border=2 //p pimg src=http://www.visualjquery.com/images/arrow-forward_16.gif; border=20 //p pimg src=../Cruella%20uses%20jQuery%3F.jpg width=43 height=58 border=2 //p pimg src=http://banners.wunderground.com/banner/smalltemptr/US/CA/San_Francisco.gif; //p pimg src=http://mystatus.skype.com/balloon/jakecigar; //p !-- pimg src=http://corndog.com/pancake/pumpkin; //p -- /body /html On 6/16/07, Erik Beeson [EMAIL PROTECTED] wrote: $(document).ready(...) is when the dom and scripts are ready. $(window).load(...) is when the layout has been calculated and all images have been loaded. What other events might be useful? --Erik On 6/15/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: very interesting! what is loaded to you? loaded to me means the dom scripts are ready... not when images are loaded or the after css layout is processed. perhaps we should have more events in jQuery to deal with the different times. On 6/15/07, Bil Corry [EMAIL PROTECTED] wrote: Via Ajaxian, interesting browser behavior: - Safari does not fire onload at the same time as other browsers. With most browsers, they will wait until the page is loaded, all images and stylesheets and scripts have run, and the page has been displayed before they fire onload. Safari does not. In Safari, it seems onload fires before the page has been displayed, before layout has been calculated, before any costly reflows have taken place. It fires before images have completed loading (this can also happen in rare cases in Opera, but Safari seems to do it everywhere), meaning that a substantial part of the load time is not included. http://www.howtocreate.co.uk/safaribenchmarks.html - - Bil -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: encodeURIComponent localized for custom encoding
form plugin uses the same encoding that ajax will use... it's ajax... with the 2 lines to override it should work... I would like to see a live page, I can peek at the headers with firebug to see what is actually being sent (in the headers) but to see what is actually sent you need to add a little logging... do you have a live demo? are you serving everything in iso8859?? Perhaps we should take the testing off the main jQuery list! On 6/16/07, oscar esp [EMAIL PROTECTED] wrote: I have tested using FORM Plugin. Then It doesn't work by post either get. Sumary: test done with the patch. using ajax call: -works by get -doesn't work by post using ajaxForms: -doesn't work by post -doesn't work by get. Any other suggestion ake? Thanks for your help. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Insert table row next to last row
use a tfoot for your table and append to the tbody instead of the table. table thead tr thHeader 1/th thHeader 2/th thHeader 3/th /tr /thead *tfoot* tr tdFooter 1/td tdFooter 2/td tdFooter 3/td /tr */tfoot* tbody tr tdCell data 1/td tdCell data 2/td tdCell data 3/td /tr tr tdCell data 4/td tdCell data 5/td tdCell data 6/td /tr tr tdCell data 7/td tdCell data 8/td tdCell data 9/td /tr /tbody /table On 6/16/07, Brad Perkins [EMAIL PROTECTED] wrote: I'm hoping this is just a simple selector question. I currently have this code which inserts a row at the end of a table. $('tr class=datarow').appendTo(#my_table).html(rowcells); I need to add a footer row to the same table. Is there a simple modification to the the above code so that it would insert a row above the last table row? -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: encodeURIComponent localized for custom encoding
there is supposed to be a space before the word charset. Not sure if that's causing the problem... keep testing! jQuery.ajaxSetup({contentType: application/x-www-form-urlencoded; charset=iso-8859-1}) On 6/15/07, oscar esp [EMAIL PROTECTED] wrote: Hi I have test this code: jQuery.ajaxSetup({contentType: application/x-www-form- urlencoded;charset=iso-8859-1}) jQuery.pair = function(f,v) {return escape(f) + = + escape(v)}; var url = test2.asp pars= text2=áéíáéáa jQuery.ajax({ type: get, url: url, data: pars, async: false, dataType: html }); Works fine. I get áéíáéáa However: type:post seems that doesn't work I get áÃ(c)à ç áÃ(c)áa We can fix it ¿? Tomorrow I will try with plugin Form. Just to keep it in mind: Your jQuery branch is standar 1.2+patch UTF8¿? PD:Thanks for your help!!! For me this issue is a critical, and to mantain my current project too.. because I decide to use jquery and teacher begins to be scare.. On 14 jun, 20:00, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: $.pair = function(f,v) {return escape(f) + = + escape(v)}; is the key, otherwise you would have the standard utf behaviour On 6/14/07, oscar esp [EMAIL PROTECTED] wrote: Hi I have been on holidays and I have not time to test it. In order to keep in mind: I need to dowload from your brach. I am using jquery 1.2 .. Then If I take the jquery from your brach it is a standar jquery 1.2 + your modifications for enconding? I am worry ... to be sure that are the same versión that I am using. Then: 1- set set ajaxSetup: ajaxSetup({contentType: application/x-www-form-urlencoded; charset=iso-8859-1}) 2- After that all params of ajaxCall like: jQuery.ajax({ type: POST, url: url, data: param, async: false, dataType: html }; Params will be in iso-8859-1¿? On 10 jun, 19:53, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: keep me posted!! You may also need : ajaxSetup({contentType: application/x-www-form-urlencoded; charset=whatever charset you want to call it}) On 6/10/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: Oscar, you can play with the jQuery from my branch (not released, and just to try it... no guarantees!!) http://jqueryjs.googlecode.com/svn/branches/jake-dev/dist/ On 6/10/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: oops! that's on the googlegroups site. On 6/10/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: $.pair = function(f,v) {return escape(f) + = + escape(v)}; and all your 'get' parameters use the new encoding. If you care to test... I'll save up a full version on the escape is brain dead , as it won't work with the full range of UTF... but the classic hi-ascii chars seem to work.. I tested with a ö (only) On 6/10/07, oscar esp [EMAIL PROTECTED] wrote: You are the man :-P In order to use it. then I only need add the js ¿? or I need to call a extra code!!! On 10 jun, 18:44, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: Hey Oscar, You were the reason I wrote this patch!!! Plus I had no beautiful way to do non-utf encoding A couple people came up with other solutions, but I like mine best, and it shrinks the jQuery size a few bytes. On 6/10/07, oscar esp [EMAIL PROTECTED] wrote: Hi I have a problem realted with charsets as you know. Could I use this code in order to fix my problem? On 10 jun, 06:00, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: http://dev.jquery.com/ticket/1289 On 6/9/07, Brandon Aaron [EMAIL PROTECTED] wrote: Be sure to add this to trac. -- Brandon Aaron On 6/9/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: I also added to the patch renaming the parameter 'xml' and sometimes 'r' to 'xhr'. I think it makes it easier to read. http://jqueryjs.googlecode.com/svn/branches/jake-dev/src/ajax/ajax.js On 6/7/07, Mike Alsup [EMAIL PROTECTED] wrote: I like this patch. Jörn? Brandon? John? Anyone? alternate encoding done cleanly... http://jqueryjs.googlecode.com/svn/branches/jake-dev/src/ajax/ajax.js a small patch allows escape (or other) instead of encodeURIComponent while localizing all calls to encodeURIComponent this patch seems to make the packed size of jQuery even smaller. $.pair is used in param (serialize) and can easily be overriden. as in $.pair = function(f,v) {return escape(f) + = + escape(v)}; $.ajax({ url: /test.cgi, data: {foo:'Jörn'}, success: function(){ console.log(arguments
[jQuery] Re: Can Jquery be used to provide an image backup system?
complete is cute, but the onload handler is cool! $('img').load(function (){ /*play with it */}) On 6/15/07, Sean Catchpole [EMAIL PROTECTED] wrote: Thanks Karl, I had no idea there was a complete property. Is this only for images, or all DOM elements? ~Sean -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Can Jquery be used to provide an image backup system?
argh! it's always something that IE doesn't do! On 6/15/07, Karl Swedberg [EMAIL PROTECTED] wrote: Jake, .load() is cool, but it doesn't work in IE if the image is already in the cache. Sean, .complete is only for images (afaik). It's a non-standard property, but widely implemented. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jun 15, 2007, at 3:57 PM, Ⓙⓐⓚⓔ wrote: complete is cute, but the onload handler is cool! $('img').load(function (){ /*play with it */}) On 6/15/07, Sean Catchpole [EMAIL PROTECTED] wrote: Thanks Karl, I had no idea there was a complete property. Is this only for images, or all DOM elements? ~Sean -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Safari 3 and onload
very interesting! what is loaded to you? loaded to me means the dom scripts are ready... not when images are loaded or the after css layout is processed. perhaps we should have more events in jQuery to deal with the different times. On 6/15/07, Bil Corry [EMAIL PROTECTED] wrote: Via Ajaxian, interesting browser behavior: - Safari does not fire onload at the same time as other browsers. With most browsers, they will wait until the page is loaded, all images and stylesheets and scripts have run, and the page has been displayed before they fire onload. Safari does not. In Safari, it seems onload fires before the page has been displayed, before layout has been calculated, before any costly reflows have taken place. It fires before images have completed loading (this can also happen in rare cases in Opera, but Safari seems to do it everywhere), meaning that a substantial part of the load time is not included. http://www.howtocreate.co.uk/safaribenchmarks.html - - Bil -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: ANNOUNCE: Please Welcome New jQuery Team Member Glen Lipka
Great news! It's always good to hear from Glen! He comes to jQuery from a different place than most of us geeks! -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: encodeURIComponent localized for custom encoding
$.pair = function(f,v) {return escape(f) + = + escape(v)}; is the key, otherwise you would have the standard utf behaviour On 6/14/07, oscar esp [EMAIL PROTECTED] wrote: Hi I have been on holidays and I have not time to test it. In order to keep in mind: I need to dowload from your brach. I am using jquery 1.2 .. Then If I take the jquery from your brach it is a standar jquery 1.2 + your modifications for enconding? I am worry ... to be sure that are the same versión that I am using. Then: 1- set set ajaxSetup: ajaxSetup({contentType: application/x-www-form-urlencoded; charset=iso-8859-1}) 2- After that all params of ajaxCall like: jQuery.ajax({ type: POST, url: url, data: param, async: false, dataType: html }; Params will be in iso-8859-1¿? On 10 jun, 19:53, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: keep me posted!! You may also need : ajaxSetup({contentType: application/x-www-form-urlencoded; charset=whatever charset you want to call it}) On 6/10/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: Oscar, you can play with the jQuery from my branch (not released, and just to try it... no guarantees!!) http://jqueryjs.googlecode.com/svn/branches/jake-dev/dist/ On 6/10/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: oops! that's on the googlegroups site. On 6/10/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: $.pair = function(f,v) {return escape(f) + = + escape(v)}; and all your 'get' parameters use the new encoding. If you care to test... I'll save up a full version on the escape is brain dead , as it won't work with the full range of UTF... but the classic hi-ascii chars seem to work.. I tested with a ö (only) On 6/10/07, oscar esp [EMAIL PROTECTED] wrote: You are the man :-P In order to use it. then I only need add the js ¿? or I need to call a extra code!!! On 10 jun, 18:44, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: Hey Oscar, You were the reason I wrote this patch!!! Plus I had no beautiful way to do non-utf encoding A couple people came up with other solutions, but I like mine best, and it shrinks the jQuery size a few bytes. On 6/10/07, oscar esp [EMAIL PROTECTED] wrote: Hi I have a problem realted with charsets as you know. Could I use this code in order to fix my problem? On 10 jun, 06:00, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: http://dev.jquery.com/ticket/1289 On 6/9/07, Brandon Aaron [EMAIL PROTECTED] wrote: Be sure to add this to trac. -- Brandon Aaron On 6/9/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: I also added to the patch renaming the parameter 'xml' and sometimes 'r' to 'xhr'. I think it makes it easier to read. http://jqueryjs.googlecode.com/svn/branches/jake-dev/src/ajax/ajax.js On 6/7/07, Mike Alsup [EMAIL PROTECTED] wrote: I like this patch. Jörn? Brandon? John? Anyone? alternate encoding done cleanly... http://jqueryjs.googlecode.com/svn/branches/jake-dev/src/ajax/ajax.js a small patch allows escape (or other) instead of encodeURIComponent while localizing all calls to encodeURIComponent this patch seems to make the packed size of jQuery even smaller. $.pair is used in param (serialize) and can easily be overriden. as in $.pair = function(f,v) {return escape(f) + = + escape(v)}; $.ajax({ url: /test.cgi, data: {foo:'Jörn'}, success: function(){ console.log(arguments)} }) -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ- Ocultar texto de la cita - - Mostrar texto de la cita - -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ- Ocultar texto de la cita - - Mostrar texto de la cita - -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ- Ocultar texto de la cita - - Mostrar texto de la cita - -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: encodeURIComponent localized for custom encoding
this patch is changes ajax, form uses ajax, so it should work! That's what I hope we will know after you test! On 6/14/07, oscar esp [EMAIL PROTECTED] wrote: Another questionbefore to test it... I am using form prlugin to send the info as far I undestand if I put this patch in jquery the form plugion will mantain the new charset? On 10 jun, 19:53, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: keep me posted!! You may also need : ajaxSetup({contentType: application/x-www-form-urlencoded; charset=whatever charset you want to call it}) On 6/10/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: Oscar, you can play with the jQuery from my branch (not released, and just to try it... no guarantees!!) http://jqueryjs.googlecode.com/svn/branches/jake-dev/dist/ On 6/10/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: oops! that's on the googlegroups site. On 6/10/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: $.pair = function(f,v) {return escape(f) + = + escape(v)}; and all your 'get' parameters use the new encoding. If you care to test... I'll save up a full version on the escape is brain dead , as it won't work with the full range of UTF... but the classic hi-ascii chars seem to work.. I tested with a ö (only) On 6/10/07, oscar esp [EMAIL PROTECTED] wrote: You are the man :-P In order to use it. then I only need add the js ¿? or I need to call a extra code!!! On 10 jun, 18:44, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: Hey Oscar, You were the reason I wrote this patch!!! Plus I had no beautiful way to do non-utf encoding A couple people came up with other solutions, but I like mine best, and it shrinks the jQuery size a few bytes. On 6/10/07, oscar esp [EMAIL PROTECTED] wrote: Hi I have a problem realted with charsets as you know. Could I use this code in order to fix my problem? On 10 jun, 06:00, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: http://dev.jquery.com/ticket/1289 On 6/9/07, Brandon Aaron [EMAIL PROTECTED] wrote: Be sure to add this to trac. -- Brandon Aaron On 6/9/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: I also added to the patch renaming the parameter 'xml' and sometimes 'r' to 'xhr'. I think it makes it easier to read. http://jqueryjs.googlecode.com/svn/branches/jake-dev/src/ajax/ajax.js On 6/7/07, Mike Alsup [EMAIL PROTECTED] wrote: I like this patch. Jörn? Brandon? John? Anyone? alternate encoding done cleanly... http://jqueryjs.googlecode.com/svn/branches/jake-dev/src/ajax/ajax.js a small patch allows escape (or other) instead of encodeURIComponent while localizing all calls to encodeURIComponent this patch seems to make the packed size of jQuery even smaller. $.pair is used in param (serialize) and can easily be overriden. as in $.pair = function(f,v) {return escape(f) + = + escape(v)}; $.ajax({ url: /test.cgi, data: {foo:'Jörn'}, success: function(){ console.log(arguments)} }) -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ- Ocultar texto de la cita - - Mostrar texto de la cita - -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ- Ocultar texto de la cita - - Mostrar texto de la cita - -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ- Ocultar texto de la cita - - Mostrar texto de la cita - -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Request to all developers: Put version number in file name please
I will start a plugin with (function($) { var version = 'Beta V0.2 '; and ending with }(jQuery)); But anything that has the word version in it would be very helpful. /* billy bob's hacked version 3.2 */ I would quickly grep my files and find the version in use. On 6/13/07, Bil Corry [EMAIL PROTECTED] wrote: Sean Catchpole wrote on 6/13/2007 12:42 PM: Pro: Easily glance at script version. This becomes more important when taking over an existing project that you didn't code. For example, imagine if the project used the tableFilter plugin (randomly picked). By looking at the filename and source, can you tell if this the first beta or the second? http://ideamill.synaptrixgroup.com/jquery/tablefilter/_dist/jquery.tableFilter-packed.js There's no quick way to know. - Bil -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Request to all developers: Put version number in file name please
I thought about that! I tend to download both versions ... I sometimes want to look at what I'm using! On 6/13/07, Bil Corry [EMAIL PROTECTED] wrote: Ⓙⓐⓚⓔ wrote on 6/13/2007 1:27 PM: I would quickly grep my files and find the version in use. How would you grep the version from jquery-latest.pack.js? http://code.jquery.com/jquery-latest.pack.js The version shows up as: ... 6.E=6.8p={3Y:1.1.2,8q ... - Bil -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: link's $(this) in MSIE6
this is not this! this is the window! a href=... onclick=myaction(this); return false; passes this as a parameter for later use. function myaction(that) { $(that).blur(); // blurs that which was this ...some animation and another actions... } On 6/13/07, Erik Beeson [EMAIL PROTECTED] wrote: I think you maybe want this.blur() instead of $(this).blur() --Erik On 6/13/07, Sergei [EMAIL PROTECTED] wrote: Hello, I have a problem in MSIE 6 using such code: a href=... onclick=myaction(); return false; JS: function myaction() { $(this).blur(); // blurs a whole window in MSIE6! ...some animation and another actions... } The problem is, that in MSIE6 $(this).blur(); blurs NOT the link, but a WINDOW. What's a workaround? Or is this a bug? Note that it works in Firefox 2 and Opera 9. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: link's $(this) in MSIE6
but you probably want that.blur() On 6/13/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: this is not this! this is the window! a href=... onclick=myaction(this); return false; passes this as a parameter for later use. function myaction(that) { $(that).blur(); // blurs that which was this ...some animation and another actions... } On 6/13/07, Erik Beeson [EMAIL PROTECTED] wrote: I think you maybe want this.blur() instead of $(this).blur() --Erik On 6/13/07, Sergei [EMAIL PROTECTED] wrote: Hello, I have a problem in MSIE 6 using such code: a href=... onclick=myaction(); return false; JS: function myaction() { $(this).blur(); // blurs a whole window in MSIE6! ...some animation and another actions... } The problem is, that in MSIE6 $(this).blur(); blurs NOT the link, but a WINDOW. What's a workaround? Or is this a bug? Note that it works in Firefox 2 and Opera 9. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: link's $(this) in MSIE6
here's another alternate horrible syntax to get this a href=# onclick='myAction.apply(this);return false'... On 6/13/07, Erik Beeson [EMAIL PROTECTED] wrote: Bah! I should have obeyed the cardinal rule of event binding: Thou shalt not bind events in markup! function myAction() { this.blur(); // this this is not that this } function myProperAction { this.blur(); // this this is that this return false; } $('a...').bind('click', myProperAction); ... a ... onclick=myAction(); return false;... --Erik On 6/13/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: but you probably want that.blur() On 6/13/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: this is not this! this is the window! a href=... onclick=myaction(this); return false; passes this as a parameter for later use. function myaction(that) { $(that).blur(); // blurs that which was this ...some animation and another actions... } On 6/13/07, Erik Beeson [EMAIL PROTECTED] wrote: I think you maybe want this.blur() instead of $(this).blur() --Erik On 6/13/07, Sergei [EMAIL PROTECTED] wrote: Hello, I have a problem in MSIE 6 using such code: a href=... onclick=myaction(); return false; JS: function myaction() { $(this).blur(); // blurs a whole window in MSIE6! ...some animation and another actions... } The problem is, that in MSIE6 $(this).blur(); blurs NOT the link, but a WINDOW. What's a workaround? Or is this a bug? Note that it works in Firefox 2 and Opera 9. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: textNodes Plugin 0.2
the benefit of using this plugin is to keep the chain, using chainable events instead of dropping into each loops. On 6/12/07, Jörn Zaefferer [EMAIL PROTECTED] wrote: Ⓙⓐⓚⓔ wrote: a new, and I think very useful function, match() I find that last one quite interesting: I through that rather than copying the script (and sometimes forgetting to). one button, with a toggle script to copy and show the inline script... I was thinking about a quick adding a little more to the chain to color the reserved words. since it's still in the chain, an additional few transforms will be easy. Your method never has the text nodes in the chain, so you would have to drop into an each to get different scripts. in the page it's just the last script... so it doesn't really matter! |$(#showScript).toggle( function(){$(script:last).clone().textNodes().wrap(code/).parent().appendTo(body)} ,function(){$(code).remove()} ); | Could you explain a bit what is actually happening there? Without textNodes I would do something like this: var script = $(code).html( $(script:last).html() ).hide().appendTo(body); on click: script.show(); -- Jörn Zaefferer http://bassistance.de -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Macrumors running live udpates of WWDC
thanks Shelane! I've been tuned in since 10 am!!! On 6/11/07, Shelane Enos [EMAIL PROTECTED] wrote: Macrumors.com is running a continuous AJAX update of the keynote address of WWDC. No more update in 60 seconds countdown. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Macrumors running live udpates of WWDC
10:49 amusing safari to make widgets from web pages Woo hoo! On 6/11/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: thanks Shelane! I've been tuned in since 10 am!!! On 6/11/07, Shelane Enos [EMAIL PROTECTED] wrote: Macrumors.com is running a continuous AJAX update of the keynote address of WWDC. No more update in 60 seconds countdown. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Macrumors running live udpates of WWDC
11:09 amSafari On WINDOWS11:09 am18 Million Safari users Marketshare has climbed to 4.9% IE has 78%, Firefox 15%, others 2% We Dream Big On 6/11/07, Shelane Enos [EMAIL PROTECTED] wrote: That's a feature they've previously announced that I'm looking forward to. On 6/11/07 10:52 AM, ?ⓐⓚⓔ [EMAIL PROTECTED] wrote: 10:49 amusing safari to make widgets from web pages Woo hoo! On 6/11/07, *?ⓐⓚⓔ* [EMAIL PROTECTED] wrote: thanks Shelane! I've been tuned in since 10 am!!! On 6/11/07, *Shelane Enos* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: Macrumors.com http://Macrumors.com http://Macrumors.com is running a continuous AJAX update of the keynote address of WWDC. No more update in 60 seconds countdown. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Macrumors running live udpates of WWDC
11:17 amInnovative new way for developing for mobile applications. based on iphone having full safari engine...gives us tremendous capability web 2.0 + AJAX apps11:16 amHave been trying to come up with a solution to letting developers write Apps for the iPhone and keep it secure. We've come up with a very sweet solution11:16 amWhat about developers?11:15 am18 days from now11:15 amShips June 29th - 6pm11:15 amONE LAST THING: iPhone THAT MEANS jQuery!! On 6/11/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: 11:09 amSafari On WINDOWS11:09 am18 Million Safari users Marketshare has climbed to 4.9% IE has 78%, Firefox 15%, others 2% We Dream Big On 6/11/07, Shelane Enos [EMAIL PROTECTED] wrote: That's a feature they've previously announced that I'm looking forward to. On 6/11/07 10:52 AM, ?ⓐⓚⓔ [EMAIL PROTECTED] wrote: 10:49 amusing safari to make widgets from web pages Woo hoo! On 6/11/07, *?ⓐⓚⓔ* [EMAIL PROTECTED] wrote: thanks Shelane! I've been tuned in since 10 am!!! On 6/11/07, *Shelane Enos* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: Macrumors.com http://Macrumors.com http://Macrumors.com is running a continuous AJAX update of the keynote address of WWDC. No more update in 60 seconds countdown. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Macrumors running live udpates of WWDC
get Safari 3.0 for Windows (or os x) ! http://www.apple.com/safari/download/ It didn't install on my os x but the windows version may work. On 6/11/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: 11:17 amInnovative new way for developing for mobile applications. based on iphone having full safari engine...gives us tremendous capability web 2.0 + AJAX apps11:16 amHave been trying to come up with a solution to letting developers write Apps for the iPhone and keep it secure. We've come up with a very sweet solution11:16 amWhat about developers?11:15 am18 days from now11:15 am Ships June 29th - 6pm11:15 amONE LAST THING: iPhone THAT MEANS jQuery!! On 6/11/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: 11:09 amSafari On WINDOWS11:09 am18 Million Safari users Marketshare has climbed to 4.9% IE has 78%, Firefox 15%, others 2% We Dream Big On 6/11/07, Shelane Enos [EMAIL PROTECTED] wrote: That's a feature they've previously announced that I'm looking forward to. On 6/11/07 10:52 AM, ?ⓐⓚⓔ [EMAIL PROTECTED] wrote: 10:49 amusing safari to make widgets from web pages Woo hoo! On 6/11/07, *?ⓐⓚⓔ* [EMAIL PROTECTED] wrote: thanks Shelane! I've been tuned in since 10 am!!! On 6/11/07, *Shelane Enos* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: Macrumors.com http://Macrumors.com http://Macrumors.com is running a continuous AJAX update of the keynote address of WWDC. No more update in 60 seconds countdown. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Macrumors running live udpates of WWDC
did you try it on any jQuery pages? On 6/11/07, Howard Jones [EMAIL PROTECTED] wrote: Ⓙⓐⓚⓔ wrote: get Safari 3.0 for Windows (or os x) ! http://www.apple.com/safari/download/ It didn't install on my os x but the windows version may work. It installed just fine on Vista64, and then crashed while reading the (just updated) Leopard preview page on Apple's own site. Definitely a beta. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] textNodes Plugin 0.1
a set of plugins to work with textNodes inside the dom. textNodes() replace() split() span() acronyms() more! get it here: http://jqueryjs.googlecode.com/svn/trunk/plugins/textNodes/ see it here: http://cigar.dynalias.org/plugins/textNodes/textNodes.html -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: IDEA: Plugin Registering
I keep my plugins on http://jqueryjs.googlecode.com/svn/trunk/plugins/ the google repository for jQuery plugins. On 6/11/07, Glen Lipka [EMAIL PROTECTED] wrote: I just had an idea, and thought Id share. Imagine http://plugins.jquery.com Besides listing all the plugins with ratings and everything (the usual)... You could REGISTER your site as using a particular plugin. So when there is a new version, I would receive an email saying, Hey, you use this plugin and you might want to upgrade. It has the following enhancements. Right now, I can't keep track of all the plugins I've used and what version they are. What is the status of the enhanced plugin site anyway? Glen -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: IDEA: Plugin Registering
an idea would be to place an innocuous tag in our pages, thus making it searchable by google and others span class='display:none'Powered by jQuery/span On 6/11/07, Andy Matthews [EMAIL PROTECTED] wrote: It's a great idea. Could also allow for a dynamic listing of sites using jQuery. -- *From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Glen Lipka *Sent:* Monday, June 11, 2007 4:11 PM *To:* jquery-en@googlegroups.com *Subject:* [jQuery] IDEA: Plugin Registering I just had an idea, and thought Id share. Imagine http://plugins.jquery.com Besides listing all the plugins with ratings and everything (the usual)... You could REGISTER your site as using a particular plugin. So when there is a new version, I would receive an email saying, Hey, you use this plugin and you might want to upgrade. It has the following enhancements. Right now, I can't keep track of all the plugins I've used and what version they are. What is the status of the enhanced plugin site anyway? Glen -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: textNodes Plugin 0.1
it's release 0.1 ... more sample and code to follow. If we had a dev list, I would have posted there first. it started with fudging textNodes into a jQuery... it was messy, but worked... I needed some more tools, so I cleaned it all up... and wrote the plugin. the acronym method is especially cute. On 6/11/07, Jörn Zaefferer [EMAIL PROTECTED] wrote: Michael Stuhr wrote: Ⓙⓐⓚⓔ schrieb: a set of plugins to work with textNodes inside the dom. textNodes() replace() split() span() acronyms() more! get it here: http://jqueryjs.googlecode.com/svn/trunk/plugins/textNodes/ see it here: http://cigar.dynalias.org/plugins/textNodes/textNodes.html Interesting stuff Jake. I'm missing some examples that are easier to grasp (while quickly scanning over the page). I didn't get yet what those are actually good for, though it feels like there is a lot. Maybe an interactive demo would help: Offer a textbox where a user can enter scripts to run and select or manipulate stuff on the page, with hints about which stuff to try out. And/or checkboxes to turn plugin options on/off. Pointing users to page source doesn't help much when you don't have any idea what to look for. great idea, i ever wondered if there are more like this e.g. to maipulate array etc. Have you checked these? http://dev.jquery.com/browser/trunk/plugins/methods/ -- Jörn Zaefferer http://bassistance.de -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Macrumors running live udpates of WWDC
I'm so old, my mac 512k is still in the closet, I still have a drawer full of floppies! My PC is used for 1 thing, testing IE! It took Safari very well. On 6/11/07, Shelane Enos [EMAIL PROTECTED] wrote: I AM a Mac user and have been for more that 15 years now. My PC is the machine that sits in the corner b/c I only use it when I have to, and that's for testing web apps only. It's a laptop, so it doesn't have to get in my way. I just VNC to it from my Mac when I test. :-) On 6/11/07 5:17 PM, Erik Beeson [EMAIL PROTECTED] wrote: Sounds like you haven't switched yet. Some of us know the PC in the corner scenario well :) Seriously, I got a Mac because I needed it to test code on, and it's now my only computer. I'm not a mac user, I'm still a diehard PC user, but my brand of hardware has changed (same Intel processor though :) ). This Mac is the best PC I've ever used. Windows boots so much faster on Parallels than it ever did on PC hardware (like 15 seconds from launching parallels to surfing the web in XP). Even going from powered off to XP is faster than booting XP on my PC. My excuse was always one of cost, but I did the math, and it really isn't much more expensive anymore. And it certainly isn't more expensive if you factor in the increase in productivity and the time that I've saved from not fighting with windows so much anymore. Ok, /rant. Back to work. --Erik On 6/11/07, *Chris W. Parker* [EMAIL PROTECTED] wrote: On Monday, June 11, 2007 3:58 PM Shelane Enos said: Works fine on my XP (the one that sits in the corner of my office), though I haven't used it extensively. Oh *that* computer? The one in the corner of your office? For minute there I thought you were talking about a different computer... -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: textNodes Plugin 0.1
John, I posted once... it never went through! 2 posts came out from the list... but that's all. perhaps it's clogged?? On 6/11/07, John Resig [EMAIL PROTECTED] wrote: The dev list is back up - I was able to get it back up and running last week. You can find it here: http://groups.google.com/group/jquery-dev --John On 6/11/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: it's release 0.1 ... more sample and code to follow. If we had a dev list, I would have posted there first. it started with fudging textNodes into a jQuery... it was messy, but worked... I needed some more tools, so I cleaned it all up... and wrote the plugin. the acronym method is especially cute. On 6/11/07, Jörn Zaefferer [EMAIL PROTECTED] wrote: Michael Stuhr wrote: Ⓙⓐⓚⓔ schrieb: a set of plugins to work with textNodes inside the dom. textNodes() replace() split() span() acronyms() more! get it here: http://jqueryjs.googlecode.com/svn/trunk/plugins/textNodes/ see it here: http://cigar.dynalias.org/plugins/textNodes/textNodes.html Interesting stuff Jake. I'm missing some examples that are easier to grasp (while quickly scanning over the page). I didn't get yet what those are actually good for, though it feels like there is a lot. Maybe an interactive demo would help: Offer a textbox where a user can enter scripts to run and select or manipulate stuff on the page, with hints about which stuff to try out. And/or checkboxes to turn plugin options on/off. Pointing users to page source doesn't help much when you don't have any idea what to look for. great idea, i ever wondered if there are more like this e.g. to maipulate array etc. Have you checked these? http://dev.jquery.com/browser/trunk/plugins/methods/ -- Jörn Zaefferer http://bassistance.de -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: textNodes Plugin 0.1
http://cigar.dynalias.org/plugins/textNodes/ has another quasi-homepage and another demo. On 6/11/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: Thanks John! and stop hijacking my thread! Any comments??? On 6/11/07, John Resig [EMAIL PROTECTED] wrote: Ok - I just opened the gates, apparently everything was getting moderated. Sorry about that! --John On 6/11/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: John, I posted once... it never went through! 2 posts came out from the list... but that's all. perhaps it's clogged?? On 6/11/07, John Resig [EMAIL PROTECTED] wrote: The dev list is back up - I was able to get it back up and running last week. You can find it here: http://groups.google.com/group/jquery-dev --John On 6/11/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: it's release 0.1 ... more sample and code to follow. If we had a dev list, I would have posted there first. it started with fudging textNodes into a jQuery... it was messy, but worked... I needed some more tools, so I cleaned it all up... and wrote the plugin. the acronym method is especially cute. On 6/11/07, Jörn Zaefferer [EMAIL PROTECTED] wrote: Michael Stuhr wrote: Ⓙⓐⓚⓔ schrieb: a set of plugins to work with textNodes inside the dom. textNodes() replace() split() span() acronyms() more! get it here: http://jqueryjs.googlecode.com/svn/trunk/plugins/textNodes/ see it here: http://cigar.dynalias.org/plugins/textNodes/textNodes.html Interesting stuff Jake. I'm missing some examples that are easier to grasp (while quickly scanning over the page). I didn't get yet what those are actually good for, though it feels like there is a lot. Maybe an interactive demo would help: Offer a textbox where a user can enter scripts to run and select or manipulate stuff on the page, with hints about which stuff to try out. And/or checkboxes to turn plugin options on/off. Pointing users to page source doesn't help much when you don't have any idea what to look for. great idea, i ever wondered if there are more like this e.g. to maipulate array etc. Have you checked these? http://dev.jquery.com/browser/trunk/plugins/methods/ -- Jörn Zaefferer http://bassistance.de -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Macrumors running live udpates of WWDC
the OS X command is defaults write com.apple.Safari IncludeDebugMenu 1 I guess it's somewhere in the registry... it it exists! On 6/11/07, Mike Alsup [EMAIL PROTECTED] wrote: Anyone know how to enable the debugging tools (console, etc) in v3.0 for Win? I AM a Mac user and have been for more that 15 years now. My PC is the machine that sits in the corner b/c I only use it when I have to, and that's for testing web apps only. It's a laptop, so it doesn't have to get in my way. I just VNC to it from my Mac when I test. :-) -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: getting the caller of an event
this is for objects , that is not, use that as the name of your parameter. var myEvent = function(that){ alert(that.id http://this.id/); } But in jQuery... you drop all those bogus hrefs for place holders href=# and code $(a).click(alert(this.id);return false); On 6/11/07, james_027 [EMAIL PROTECTED] wrote: Hi, I have a a calling a javascript function, but there will be several a calling the same javascript function, and I want to know which a calls it, I have assign different id attribute for each a, then I don't know how to proceed ... here is my html: a id=one href=javascript:myEvent(this)Caller One/ a id=two href=javascript:myEvent(this)Caller Two/ a id=three href=javascript:myEvent(this)Caller Three/ here is my javascript var myEvent = function(this){ alert(this.id); } Well, this doesn't work for me, I hope you got what I mean. Thanks in advance. james -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: textNodes Plugin 0.1
version 0.1 first release, before lots of demos and docs tested in the big 4 browsers most current releases. FF 2.004, IE7, Safari 23, Opera 9.2 plans include lots more mini-plugs like acronym... more examples. The base is solid, as long as you don't let the bastards (text nodes are different than normal dom nodes) get you down! On 6/11/07, Michael Stuhr [EMAIL PROTECTED] wrote: are these in release state? i couldn't see any version numbers in the files, just the trac ones. that makes it somewhat difficult to keep trac ... micha -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: encodeURIComponent localized for custom encoding
keep me posted!! You may also need : ajaxSetup({contentType: application/x-www-form-urlencoded; charset=whatever charset you want to call it}) On 6/10/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: Oscar, you can play with the jQuery from my branch (not released, and just to try it... no guarantees!!) http://jqueryjs.googlecode.com/svn/branches/jake-dev/dist/ On 6/10/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: oops! that's on the googlegroups site. On 6/10/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: $.pair = function(f,v) {return escape(f) + = + escape(v)}; and all your 'get' parameters use the new encoding. If you care to test... I'll save up a full version on the escape is brain dead , as it won't work with the full range of UTF... but the classic hi-ascii chars seem to work.. I tested with a ö (only) On 6/10/07, oscar esp [EMAIL PROTECTED] wrote: You are the man :-P In order to use it. then I only need add the js ¿? or I need to call a extra code!!! On 10 jun, 18:44, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: Hey Oscar, You were the reason I wrote this patch!!! Plus I had no beautiful way to do non-utf encoding A couple people came up with other solutions, but I like mine best, and it shrinks the jQuery size a few bytes. On 6/10/07, oscar esp [EMAIL PROTECTED] wrote: Hi I have a problem realted with charsets as you know. Could I use this code in order to fix my problem? On 10 jun, 06:00, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: http://dev.jquery.com/ticket/1289 On 6/9/07, Brandon Aaron [EMAIL PROTECTED] wrote: Be sure to add this to trac. -- Brandon Aaron On 6/9/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: I also added to the patch renaming the parameter 'xml' and sometimes 'r' to 'xhr'. I think it makes it easier to read. http://jqueryjs.googlecode.com/svn/branches/jake-dev/src/ajax/ajax.js On 6/7/07, Mike Alsup [EMAIL PROTECTED] wrote: I like this patch. Jörn? Brandon? John? Anyone? alternate encoding done cleanly... http://jqueryjs.googlecode.com/svn/branches/jake-dev/src/ajax/ajax.js a small patch allows escape (or other) instead of encodeURIComponent while localizing all calls to encodeURIComponent this patch seems to make the packed size of jQuery even smaller. $.pair is used in param (serialize) and can easily be overriden. as in $.pair = function(f,v) {return escape(f) + = + escape(v)}; $.ajax({ url: /test.cgi, data: {foo:'Jörn'}, success: function(){ console.log(arguments)} }) -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ- Ocultar texto de la cita - - Mostrar texto de la cita - -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ- Ocultar texto de la cita - - Mostrar texto de la cita - -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] [ot] String.split in Opera.
javascript:alert(hello there Opera.split(/\b/).length) Firefox says 5 , safari says 6, Opera says 15! it really got me confused while writing some jQuery code! now I use $.browser.opera ? /(\s+)/ : /\b/ ; instead. Ouch, I didn't realize there was that much of a difference!
[jQuery] Re: [ot] String.split in Opera.
safari says 3 for javascript:alert(hello there Opera.split(/(\s+)/).length) On 6/10/07, Matt Stith [EMAIL PROTECTED] wrote: why not just use /(\s+)/ in firefox too then? It gives me the correct number of 5. On 6/10/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: javascript:alert(hello there Opera.split(/\b/).length) Firefox says 5 , safari says 6, Opera says 15! it really got me confused while writing some jQuery code! now I use $.browser.opera ? /(\s+)/ : /\b/ ; instead. Ouch, I didn't realize there was that much of a difference! -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: [ot] String.split in Opera.
WWIED? What would IE do? On 6/10/07, Matt Stith [EMAIL PROTECTED] wrote: o.O damn, like you said, i didnt know there was that big of a difference! On 6/10/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: safari says 3 for javascript:alert(hello there Opera.split(/(\s+)/).length) On 6/10/07, Matt Stith [EMAIL PROTECTED] wrote: why not just use /(\s+)/ in firefox too then? It gives me the correct number of 5. On 6/10/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: javascript:alert(hello there Opera.split(/\b/).length) Firefox says 5 , safari says 6, Opera says 15! it really got me confused while writing some jQuery code! now I use $.browser.opera ? /(\s+)/ : /\b/ ; instead. Ouch, I didn't realize there was that much of a difference! -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: [ot] String.split in Opera.
going for a split that when concatenated returns the original ... \b is what I tried... it works for all but opera. I didn't care that safari thinks there's an extra at the end... but when Opera came back with 15 (each character) I laughed! hello there Opera should split into 5 strings , 2 of which are the blanks. On 6/10/07, Michael Geary [EMAIL PROTECTED] wrote: What result you are looking for? \b and \s+ are radically different from each other. \b is an anchor that matches no characters. \s+ is a pattern that matches one or more whitespace characters. It's kind of unusual to use a non-matching anchor like \b in a .split, so I guess it's not too surprising that each browser gets it different. Parenthesizing the \s+ changes things a lot too. The parentheses mean that you want the matching delimiter strings to show up in the result array. If you just want to split the string into words, delimited by any amount of whitespace, use .split(/\s+/) - but is that the result you want? hello thereOpera.split(/\s+/).length should be 3 in any browser. (I added some spaces for illustration.) -Mike javascript:alert(hello there Opera.split(/\b/).length) Firefox says 5 , safari says 6, Opera says 15! it really got me confused while writing some jQuery code! now I use $.browser.opera ? /(\s+)/ : /\b/ ; instead. Ouch, I didn't realize there was that much of a difference! -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: encodeURIComponent localized for custom encoding
http://dev.jquery.com/ticket/1289 On 6/9/07, Brandon Aaron [EMAIL PROTECTED] wrote: Be sure to add this to trac. -- Brandon Aaron On 6/9/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: I also added to the patch renaming the parameter 'xml' and sometimes 'r' to 'xhr'. I think it makes it easier to read. http://jqueryjs.googlecode.com/svn/branches/jake-dev/src/ajax/ajax.js On 6/7/07, Mike Alsup [EMAIL PROTECTED] wrote: I like this patch. Jörn? Brandon? John? Anyone? alternate encoding done cleanly... http://jqueryjs.googlecode.com/svn/branches/jake-dev/src/ajax/ajax.js a small patch allows escape (or other) instead of encodeURIComponent while localizing all calls to encodeURIComponent this patch seems to make the packed size of jQuery even smaller. $.pair is used in param (serialize) and can easily be overriden. as in $.pair = function(f,v) {return escape(f) + = + escape(v)}; $.ajax({ url: /test.cgi, data: {foo:'Jörn'}, success: function(){console.log(arguments)} }) -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] encodeURIComponent localized for custom encoding
alternate encoding done cleanly... http://jqueryjs.googlecode.com/svn/branches/jake-dev/src/ajax/ajax.js a small patch allows escape (or other) instead of encodeURIComponent while localizing all calls to encodeURIComponent this patch seems to make the packed size of jQuery even smaller. $.pair is used in param (serialize) and can easily be overriden. as in $.pair = function(f,v) {return escape(f) + = + escape(v)}; $.ajax({ url: /test.cgi, data: {foo:'Jörn'}, success: function(){console.log(arguments)} }) PS posted here because the dev list is pretty down. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: select td 2 levels up
Matt, you're assuming this is simple! if this is centerbiHa Ha/i/b/center yours breaks Josh, tables are ugly, accessing them is ugly too! If you have one or two lines like that it's ok to be ugly. $.fn.grandTD = function(){return this.parents(td:first).parents(td:first)} might make get a bit shorter On 6/7/07, Matt Stith [EMAIL PROTECTED] wrote: You could just do $(this).parent().parent().addClass(greenback); That should work fine. On 6/7/07, Josh Nathanson [EMAIL PROTECTED] wrote: I am trying to select the first td element two levels up from the clicked div element. I have this, which works, but it's ugly. $(this).parents(td:first).parents(td:first).attr(class,greenback); Is there a cleaner way? - Josh -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: select td 2 levels up
oops Matt. if this is the i in centerbiHa Ha/i/b/center yours breaks
[jQuery] Re: select td 2 levels up
did you try .parents(td:eq(1)) On 6/7/07, Josh Nathanson [EMAIL PROTECTED] wrote: You're right...it doesn't work with just the parent() and no specific element selector. I need the td's in there. I would like to use divs to make the layout simpler, but I just couldn't get it looking the way I want in IE6. Oh well, ugly it is! - Original Message - *From:* Ⓙⓐⓚⓔ [EMAIL PROTECTED] *To:* jquery-en@googlegroups.com *Sent:* Thursday, June 07, 2007 11:09 AM *Subject:* [jQuery] Re: select td 2 levels up oops Matt. if this is the i in centerbiHa Ha/i/b/center yours breaks -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: QuickTime control bar disappearing after .remove() and .load()
object classid=clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B codebase= http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0 width=320 height=256 align=middle param name=src value=sample.mov / param name=autoplay value=true / embed src=sample.mov autoplay=true width=320 height=256 align=middle bgcolor=black pluginspage=http://www.apple.com/quicktime/download/; /embed /object from http://developer.apple.com/internet/ieembedprep.html anything else won't work as well. On 6/6/07, Aaron Scott [EMAIL PROTECTED] wrote: Yes, that method or creating the element should work just fine. Can you post a sample page? Maybe there's just a minor typo or something causing the problem. Sure. http://www.andcuriouser.com/sandbox/jqueryqt/test.html The error: Error: uncaught exception: [Exception... String contains an invalid character code: 5 nsresult: 0x80530005 (NS_ERROR_DOM_INVALID_CHARACTER_ERR) location: http:// www.andcuriouser.com/sandbox/jqueryqt/test.html Line: 7] Thanks, Aaron -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] processData:false in ajax calls?
I'm a bit confused about processData parameter in the ajax call. From the doc it talks about sending a dom node to the server, that sounds pretty strange. What is it used for? From the code it looks like a perfect hook to send non utf-8 data (iso-8859-1). Has anyone used it??? -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: QuickTime control bar disappearing after .remove() and .load()
I hit your page, and got the error you showed... I notice your object didn't look like my objects... so I went back to where I got my info... I do some jQuery + qt video on my dog's site. http://jpassoc.com/junior/puppy-movies.html validating is for html code, not for JavaScript... we can abuse the dom in the script and still pass validation. On 6/6/07, Aaron Scott [EMAIL PROTECTED] wrote: anything else won't work as well. Right now, my sample code is FF-only until I can get that up and running (since FF is better for JS debugging). After that, I'll work on IE (using the double-object method). Apple's method works, but it doesn't validate. Compare it to this: object classid=clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B codebase=http://www.apple.com/qtactivex/qtplugin.cab; width=?php echo $moviewidth; ? height=?php echo $movieheight; ? param name=src value=?php echo $filename ? / param name=controller value=true / param name=autoplay value=false / !--[if !IE]-- object type=video/quicktime data=?php echo $filename ? width=?php echo $moviewidth; ? height=?php echo $movieheight; ? param name=autoplay value=false / param name=controller value=true / /object !--![endif]-- /object Anyway, this doesn't have any bearing on my JS problem. Aaron -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: processData:false in ajax calls?
has anyone used it to send an xml doc??? That's what the doc says... I guess I'll just have to try it! On 6/6/07, Jörn Zaefferer [EMAIL PROTECTED] wrote: Ⓙⓐⓚⓔ wrote: I'm a bit confused about processData parameter in the ajax call. From the doc it talks about sending a dom node to the server, that sounds pretty strange. What is it used for? From the code it looks like a perfect hook to send non utf-8 data (iso-8859-1). Has anyone used it??? Its possible to send an XML document via XmlHttpRequest, at least it should be. To stop attempts at serializing that document, you can set processData to false. -- Jörn Zaefferer http://bassistance.de -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: processData:false in ajax calls?
I trie $.ajax({ url: /test.cgi, processData: false, data: $('html'), success: function(){console.log(arguments)} }) and data: $(html)[0] both might be what John meant by xml ... no magic happens! data: 'foo=Jörn', gave me: foo=J%C3%B6rn data: 'foo='+ escape('Jörn'), gave me foo=J%F6rn which looks like pretty good ascii encoding.. ! perhaps we need an alternate $.serialize for these non-utf users??? On 6/6/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: has anyone used it to send an xml doc??? That's what the doc says... I guess I'll just have to try it! On 6/6/07, Jörn Zaefferer [EMAIL PROTECTED] wrote: Ⓙⓐⓚⓔ wrote: I'm a bit confused about processData parameter in the ajax call. From the doc it talks about sending a dom node to the server, that sounds pretty strange. What is it used for? From the code it looks like a perfect hook to send non utf-8 data (iso-8859-1). Has anyone used it??? Its possible to send an XML document via XmlHttpRequest, at least it should be. To stop attempts at serializing that document, you can set processData to false. -- Jörn Zaefferer http://bassistance.de -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: jQuery core charset???????????(please help!!!!me!)
Oscar, I've put together an ajax call that passes iso8859-1 instead of utf-8. It's not pretty but shows that by doing your own serialize the server sees iso chars instead of utf. script type=text/javascript src=../js/jquery.js/script script type=text/javascript src=../plugins/debug/jquery.debug-pack.js /script script type=text/javascript $(function(){ $.ajax({ url: /test.cgi, processData: false, data: 'foo='+ escape('Jörn'), success: function(){console.log(arguments)} }) }); /script hope it helps you.
[jQuery] Re: jQuery core charset???????????(please help!!!!me!)
in the case where escape doesn't work for you, you would have to substitute a function that does what you want... I tried 1 letter ö. On 6/6/07, Mike Alsup [EMAIL PROTECTED] wrote: Remember that escape and unescape don't work properly for non-ASCII characters and have been deprecated. http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Deprecated_Features#Escape_Sequences Mike On 6/6/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: Oscar, I've put together an ajax call that passes iso8859-1 instead of utf-8. It's not pretty but shows that by doing your own serialize the server sees iso chars instead of utf. script type=text/javascript src=../js/jquery.js/script script type=text/javascript src=../plugins/debug/jquery.debug-pack.js/script script type=text/javascript $(function(){ $.ajax({ url: /test.cgi, processData: false, data: 'foo='+ escape('Jörn'), success: function(){console.log (arguments)} }) }); /script hope it helps you. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: processData:false in ajax calls?
very sweet! On 6/6/07, Mike Alsup [EMAIL PROTECTED] wrote: All the encoding is done in $.param using encodeURIComponent. I agree that it makes sense to modularize that a bit more. Maybe add a $.encode method like: $.encode = function(s) { return encodeURIComponent(s) }; That would make it much easier for someone to pop in their own encoder by simply overwriting $.encode. MIke On 6/6/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: I trie $.ajax({ url: /test.cgi, processData: false, data: $('html'), success: function(){console.log(arguments)} }) and data: $(html)[0] both might be what John meant by xml ... no magic happens! data: 'foo=Jörn', gave me: foo=J%C3%B6rn data: 'foo='+ escape('Jörn'), gave me foo=J%F6rn which looks like pretty good ascii encoding.. ! perhaps we need an alternate $.serialize for these non-utf users??? On 6/6/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: has anyone used it to send an xml doc??? That's what the doc says... I guess I'll just have to try it! On 6/6/07, Jörn Zaefferer [EMAIL PROTECTED] wrote: Ⓙⓐⓚⓔ wrote: I'm a bit confused about processData parameter in the ajax call. From the doc it talks about sending a dom node to the server, that sounds pretty strange. What is it used for? From the code it looks like a perfect hook to send non utf-8 data (iso-8859-1). Has anyone used it??? Its possible to send an XML document via XmlHttpRequest, at least it should be. To stop attempts at serializing that document, you can set processData to false. -- Jörn Zaefferer http://bassistance.de -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: processData:false in ajax calls?
I guess so... but it seems very scary! On 6/6/07, Erik Beeson [EMAIL PROTECTED] wrote: You can already do that now: encodeURIComponent = function(s) { // your own encoding }; But, you know, good luck with that :) --Erik On 6/6/07, Mike Alsup [EMAIL PROTECTED] wrote: All the encoding is done in $.param using encodeURIComponent. I agree that it makes sense to modularize that a bit more. Maybe add a $.encode method like: $.encode = function(s) { return encodeURIComponent(s) }; That would make it much easier for someone to pop in their own encoder by simply overwriting $.encode. MIke On 6/6/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: I trie $.ajax({ url: /test.cgi, processData: false, data: $('html'), success: function(){console.log(arguments)} }) and data: $(html)[0] both might be what John meant by xml ... no magic happens! data: 'foo=Jörn', gave me: foo=J%C3%B6rn data: 'foo='+ escape('Jörn'), gave me foo=J%F6rn which looks like pretty good ascii encoding.. ! perhaps we need an alternate $.serialize for these non-utf users??? On 6/6/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: has anyone used it to send an xml doc??? That's what the doc says... I guess I'll just have to try it! On 6/6/07, Jörn Zaefferer [EMAIL PROTECTED] wrote: Ⓙⓐⓚⓔ wrote: I'm a bit confused about processData parameter in the ajax call. From the doc it talks about sending a dom node to the server, that sounds pretty strange. What is it used for? From the code it looks like a perfect hook to send non utf-8 data (iso-8859-1). Has anyone used it??? Its possible to send an XML document via XmlHttpRequest, at least it should be. To stop attempts at serializing that document, you can set processData to false. -- Jörn Zaefferer http://bassistance.de -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] [ot] hijacking threads for non-threaded readers.
Some time ago I was lectured about hijacking a thread... I thought what the ___? Some e-mail programs keep track of the internal headers of e-mails and group them by those headers instead of by the subject. While this can be good if everyone knows about it, and uses it... it can lead to hijacks. So, for us gmail users, we have to remember to compose a new message , rather then hitting reply and changing the subject. and for you threaded mailer users, don't assume that a changed subject will be kept together with the other messages. As a side note, for those of you who don't use gmail, gmail intelligently shades new lines in a reply... so the changes stand out.. and this gets shot to ___ when you use another e-mailler. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: [ot] hijacking threads for non-threaded readers.
that is the normal behavior! You just did it... and so did I! On 6/5/07, Sean Catchpole [EMAIL PROTECTED] wrote: On 6/5/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: So, for us gmail users, we have to remember to compose a new message , rather then hitting reply and changing the subject. Just to make sure I understand you. Gmail users can still hit reply as long as they don't change the subject right? ~Sean -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: What event is fired when all images are loaded and displayed?
I was playing with this code, the window load code should help: var blackout = $('div style=width: 100%; height: 100%; position: absolute; top: 0px; left: 0px; z-index: 100; background-color: black/div') .prependTo($('html')); $(function(){ blackout.css('background-color','gray').debug() }); $(window).load(function() { blackout.fadeOut(slow,function(){blackout.remove()}).debug() }); On 6/5/07, Daemach [EMAIL PROTECTED] wrote: I'm using body onload to reset a menu, but the onload event seems to be fired before the images are actually displayed. This causes the menu to be in the wrong position on the initial load, though it works correctly once the images are cached. Is there another event that gets fired when absolutely everything is ready? I don't know of one... -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Processing ajax load content before it gets added to DOM ?
the A in Ajax is for Asynchronous! just because you .load() something doesn't mean it's there. It will be there later. the callbacks are called back when it load is done. load(url, params, callback) Load HTML from a remote file and inject it into the DOM. Returns jQuery Parameters - *url* (String): The URL of the HTML file to load. - *params* (Object): (optional) A set of key/value pairs that will be sent as data to the server. - *callback* (Function): (optional) A function to be executed whenever the data is loaded (parameters: responseText, status and response itself). Example jQuery Code $(#feeds).load(feeds.html); Before div id=feeds/div jQuery Code $(#feeds).load(feeds.html, {limit: 25}, function() { alert(The last 25 entries in the feed have been loaded); } ); On 6/5/07, ZebZiggle [EMAIL PROTECTED] wrote: Hi again, I have a snippit of code that ajax loads content for me. I want to add target='_blank' to all the anchors before displaying it. I'm trying thing: function ... $('#foo').load(/get/733/).find('a').each(function() { this.target = _blank; }); A similar scheme works fine when I first load the page (non-ajax) ... but the find/each is not working for load()'ed content. What am I missing here ... it seems to me the find is not working because the content is not in the DOM yet. Even if I do: function ... $('#foo').load(/get/733/); $('#foo a').each(function() { this.target = _blank; }); It doesn't work. Again, perhaps because the DOM update doesn't occur until the function returns? Is this correct? Any ideas what I could be doing wrong here? Thx, Sandy -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Slideshow with unknown amount of images
My dog does that! Actually we do it for him... he just sits for pictures... I wrote a plugin http://jqueryjs.googlecode.com/svn/trunk/plugins/traverseDir/ that I use all over his site http://jpassoc.com/junior On 6/4/07, Arne-Kolja Bachstein [EMAIL PROTECTED] wrote: Hi there, this is more a general question than a jQuery based one, but maybe jQuery really is the thing to implement this. I have to create a slideshow with an unknown amount of images. The person that is managing the content doesn't want to edit any source code or something when uploading new images, so the best method would be to just cycle a whole directory of images, at least if I want to avoid server side scripting. Is this possible in any way using JavaScript and/or jQuery? I fear it's not, but maybe you have a hint or something… Thanks in advance, Arne -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Slideshow with unknown amount of images
Junior is 10 months old. the pages are some 3-4 months old. I've re-used the code many times!!! I hope it works well for everyone! On 6/4/07, Glen Lipka [EMAIL PROTECTED] wrote: Nice! Is this still in development or ready to go? Glen On 6/4/07, Michael Stuhr [EMAIL PROTECTED] wrote: Ⓙⓐⓚⓔ schrieb: My dog does that! Actually we do it for him... he just sits for pictures... I wrote a plugin http://jqueryjs.googlecode.com/svn/trunk/plugins/traverseDir/ http://jqueryjs.googlecode.com/svn/trunk/plugins/traverseDir/ that I use all over his site http://jpassoc.com/junior omg ! micha -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Slideshow with unknown amount of images
thanks Mike... I wrote all the techniques before jQuery... but jQuery really pulled it together. If anyone requires tweeks or new features, let me know. I also used it in a little demo I did... http://jpassoc.com/junior/story/again... no files are known and no keywords are known... it just searches the dir and hooks the text, then diddles the links. using http://jpassoc.com/js/jquery-kidsbook.js On 6/4/07, Mike Alsup [EMAIL PROTECTED] wrote: Jake, this plugin is really cool! Thanks. Mike http://jqueryjs.googlecode.com/svn/trunk/plugins/traverseDir/ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: jQuery core charset???????????(please help!!!!me!)
the horrible circle of iso8859-1 starts with the way the charset of the html page. I think without setting another thing, you get iso8859-1 ajax calls, a header added in the beforesubmit might help... not sure! I always recommend going full utf when you have this kind of problem... Good luck! On 6/3/07, oscar esp [EMAIL PROTECTED] wrote: Many thanks!!! The problem is that my application is a old asp application and I can not change all the charsets... Are there any way to setup ajax (I think something like jQuery.ajax(...)) in order to set the charset to iso-8859-1 On 2 jun, 21:00, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: jQuery has no core character set, nor does JavaScript. When you don't specify it everywhere you get mixed sets. Your asp is getting utf-8, but you are expecting one of the ascii iso8859 sets. My advice is to use utf-8 everywhere and make sure you properly handle the utf-8 in your asp. You can also use your choice of the other sets... but that limits you to a certain fraction of the world's languages. On 6/2/07, oscar esp [EMAIL PROTECTED] wrote: I am doing some test and I have problems with specials chars... are there any way to define charset into jQueryCore? My code to post a form: main.asp . . script src=jquery.js/script script jQuery.noConflict(); /script script src=jquery.form.js/script body form id=test1 action=test2.asp method=get INPUT id=Text1 type=text name=Text1 INPUT id=td type=button onclick=saveTest(); value=Send name=Submit1 /form . . JavaScriptFunction: function saveTest() { var options = { beforeSubmit: preSubmitAgenda, // pre-submit callback success: postSubmitAgenda // callback }; jQuery(#test1).ajaxSubmit(options); } THE PROBLEM: 1)Execute the code 2) Into text Field I write : ú 3) click on button 4) in test2.asp (I get the request), when I check Request.QueryString(text1) value is =á -- instead of ú I think that problem is related with charset or something like that, because If i execute a normal form without ajaxsubmit i get the right value: ú I am not sure if problem is related with jQuery core or form plugin -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ- Ocultar texto de la cita - - Mostrar texto de la cita - -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: jQuery core charset???????????(please help!!!!me!)
I don't think there is a quick and dirty solution. You need to update the asp. http://groups.google.com/group/jquery-en/browse_thread/thread/0d65588467a4704a On 6/3/07, Mike Alsup [EMAIL PROTECTED] wrote: I always recommend going full utf when you have this kind of problem... Same here. jQuery is only going to submit UTF-8 because it uses encodeURIComponent (as it should). If you need a different charset on the server then that's where you'll need to convert it. Mike -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: jQuery core charset???????????(please help!!!!me!)
ok the long and tedious method (as I see it) would be using an extra header when you post all ajax requests, doing your own manual encoding of get parameters OR just making sure your cgi/asp/php program handle utf if they get it. Perhaps someone cares to do the testing and recoding that would be require to make iso8859 easy??? I assumed a simple beforesubmit to add the header would have enabled iso8859 or other 8 bit character set, On 6/3/07, joomlafreak [EMAIL PROTECTED] wrote: I am also frustrated with this issue and have been reading on internet every bit I can make sense of but still have no clue on how to solve this, I have problem with Norwegian language. I am using $.get to get content from database processed by a php file nsdb.php. This file takes out the html content from database and send by echo. After I inject this echoed html in my div, I get ? instead of special characters. The meta on my page is this meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 / does it really set the header or just the meta? What's in the response headers??? and the header requesst as I see in firebug is this Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Acceot-Charset is what you will accept, not what you are sending. I just don't understand this charset issue. May some learned solul throw some light on this issue in a little detail. thanks in advance. On Jun 3, 3:00 pm, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: I don't think there is a quick and dirty solution. You need to update the asp. http://groups.google.com/group/jquery-en/browse_thread/thread/0d65588... On 6/3/07, Mike Alsup [EMAIL PROTECTED] wrote: I always recommend going full utf when you have this kind of problem... Same here. jQuery is only going to submit UTF-8 because it uses encodeURIComponent (as it should). If you need a different charset on the server then that's where you'll need to convert it. Mike -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Plugin to link words/phrases
what my plugin does is change p now is the time for all good programmer .../p to p now is the time for all span class=hookedgood/span programmer .../p if good is in the hash to be hooked... then you can get all your span.hookedto do whatever you want. On 6/3/07, Rhapidophyllum [EMAIL PROTECTED] wrote: Could you be more specific on what you mean by 'link text'? That could be interpreted a number of different ways. On Jun 1, 2007, at 11:11 PM, Michael Edmondson wrote: I am working on writing a plugin that, given a list of words/phrases, will link text. That sounds so ... less than spectacular. The concept is similar to those in-text ads, except without the popups/bubbles. (Even less spectacular-sounding.) I was wondering if there already existed a plugin for this or similar functionality. I was also wondering if it would be of interest to anyone else. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: jQuery core charset???????????(please help!!!!me!)
your response header has nothing about a charset! and you need to set it in the request header... I have no idea if it will ever work, as I went UTF-8 long before I met jQuery! On 6/3/07, joomlafreak [EMAIL PROTECTED] wrote: Hi This the response header DateMon, 04 Jun 2007 03:11:27 GMT Server Apache/1.3.37 (Unix) PHP/4.4.6 mod_throttle/3.1.2 FrontPage/ 5.0.2.2635 mod_psoft_traffic/0.2 mod_ssl/2.8.28 OpenSSL/0.9.7a X-Powered-ByPHP/4.4.6 Connection close Transfer-Encoding chunked Content-Typetext/html I don't know if it should be utf-8 or something anywhere in this. I read on this thread or some other thread that the javascript will deal with this encoding in utf-8. As for my script I am just sending two integer values to the php file and that php file is reading the database to echo the content. After that content is sent to the jquery to inject it into a div, it gets screwed up. The reasponse I see in firebug also contains the same ?? so actually it means that the content echoed itself is wrong and it is not jquery that is doing something. I am lost. I have no basic education in programming so things get complicated for me when people mention things in technical terms. Hope you can use little layman terms to explain in this thread as to how is it happening and what can be done. I am sure many would be benefited by this explanation. Thanks again On Jun 3, 10:38 pm, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: ok the long and tedious method (as I see it) would be using an extra header when you post all ajax requests, doing your own manual encoding of get parameters OR just making sure your cgi/asp/php program handle utf if they get it. Perhaps someone cares to do the testing and recoding that would be require to make iso8859 easy??? I assumed a simple beforesubmit to add the header would have enabled iso8859 or other 8 bit character set, On 6/3/07, joomlafreak [EMAIL PROTECTED] wrote: I am also frustrated with this issue and have been reading on internet every bit I can make sense of but still have no clue on how to solve this, I have problem with Norwegian language. I am using $.get to get content from database processed by a php file nsdb.php. This file takes out the html content from database and send by echo. After I inject this echoed html in my div, I get ? instead of special characters. The meta on my page is this meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 / does it really set the header or just the meta? What's in the response headers??? and the header requesst as I see in firebug is this Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Acceot-Charset is what you will accept, not what you are sending. I just don't understand this charset issue. May some learned solul throw some light on this issue in a little detail. thanks in advance. On Jun 3, 3:00 pm, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: I don't think there is a quick and dirty solution. You need to update the asp. http://groups.google.com/group/jquery-en/browse_thread/thread/0d65588... On 6/3/07, Mike Alsup [EMAIL PROTECTED] wrote: I always recommend going full utf when you have this kind of problem... Same here. jQuery is only going to submit UTF-8 because it uses encodeURIComponent (as it should). If you need a different charset on the server then that's where you'll need to convert it. Mike -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Plugin to link words/phrases
take a look at http://jpassoc.com/js/jquery-kidsbook.js as used in http://jpassoc.com/junior/story/ On 6/1/07, Michael Edmondson [EMAIL PROTECTED] wrote: I am working on writing a plugin that, given a list of words/phrases, will link text. That sounds so ... less than spectacular. The concept is similar to those in-text ads, except without the popups/bubbles. (Even less spectacular-sounding.) I was wondering if there already existed a plugin for this or similar functionality. I was also wondering if it would be of interest to anyone else. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: jQuery core charset???????????(please help!!!!me!)
jQuery has no core character set, nor does JavaScript. When you don't specify it everywhere you get mixed sets. Your asp is getting utf-8, but you are expecting one of the ascii iso8859 sets. My advice is to use utf-8 everywhere and make sure you properly handle the utf-8 in your asp. You can also use your choice of the other sets... but that limits you to a certain fraction of the world's languages. On 6/2/07, oscar esp [EMAIL PROTECTED] wrote: I am doing some test and I have problems with specials chars... are there any way to define charset into jQueryCore? My code to post a form: main.asp . . script src=jquery.js/script script jQuery.noConflict(); /script script src=jquery.form.js/script body form id=test1 action=test2.asp method=get INPUT id=Text1 type=text name=Text1 INPUT id=td type=button onclick=saveTest(); value=Send name=Submit1 /form . . JavaScriptFunction: function saveTest() { var options = { beforeSubmit: preSubmitAgenda, // pre-submit callback success: postSubmitAgenda // callback }; jQuery(#test1).ajaxSubmit(options); } THE PROBLEM: 1)Execute the code 2) Into text Field I write : ú 3) click on button 4) in test2.asp (I get the request), when I check Request.QueryString(text1) value is =á -- instead of ú I think that problem is related with charset or something like that, because If i execute a normal form without ajaxsubmit i get the right value: ú I am not sure if problem is related with jQuery core or form plugin -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Vertical Positioning
the dimension plugin get you half way. $.fn.showAt = function(jel){ var loc = {display:inline} jel.offset({scroll:false,padding:true},loc)// dimensions! loc.top+=2 loc.left+=6*(1+jel.val().length) return this.css(loc) } took me further... it may work for you. On 6/2/07, SamCKayak [EMAIL PROTECTED] wrote: I have an element in one div, when clicked, I'd like to blindDown() another element in another div. No problem so far. I'd like to set the vertical positioning of the latter element to the same vertical positioning of the element clicked, before the blindDown() is executed. The divs containing the elements are position:relative, so the vertical positions should be identical. I can position the latter element using position:absolute; I need a value for top:value-here. What would be the jQuery command which would return the vertical positioning of the first element? $('element1').positionY() ??? BTW: $('element1').css('top') returns 'auto' Sam -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Chaining - Best Practices?
glad you found it... it was a beautiful chain! On 5/31/07, latinomigs [EMAIL PROTECTED] wrote: Well I realized my mistake in the code above... It is meant for the following HTML: div id=wrapAll div id=aBox div id=aChildp/p/div /div p id=bottomText/p /div So my error was in using the .children() selector to find both #aBox and #aChild. If I use .find() instead of .children() then it works perfectly. On May 31, 12:56 pm, Sean Catchpole [EMAIL PROTECTED] wrote: Chaining is more useful for quick compact statements. ex: $(p).hide().addClass(bar).click(function(){ alert(this.innerHTML); }).slideDown(); ~Sean -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Adding Parameters in a function
onFindValue:function(li){findValue(li,1,2,3,4)}, On 5/31/07, tuliopaiva [EMAIL PROTECTED] wrote: I would like to add a parameter with the id of the hidden input that will have the hidden value of the item. something like this: = function findValue(li, hidden_id) { //add the hidden_id parameter if( li == null ) return alert(No match!); // if coming from an AJAX call, let's use the id as the value if( !!li.extra ) var sValue = li.extra[0]; // otherwise, let's just display the value in the text box else var sValue = li.selectValue; alert(The value you selected was: + sValue); $(#+hidden_id).value = sValue; //add this line } = I dont't know if this is the best thing to do it...:P []'s On 31 maio, 17:29, Dan G. Switzer, II [EMAIL PROTECTED] wrote: createAutoComplete = function() { return $(#input_box).autocomplete(/buscarServidor/, { delay:10, minChars:2, matchSubset:1, matchContains:1, cacheLength:10, onItemSelect:selectItem, onFindValue:findValue, //how can I add parameters here??? formatItem:formatItem, autoFill:true }); }; function findValue(li) { if( li == null ) return alert(No match!); // if coming from an AJAX call, let's use the id as the value if( !!li.extra ) var sValue = li.extra[0]; // otherwise, let's just display the value in the text box else var sValue = li.selectValue; alert(The value you selected was: + sValue); } So, how can I add parameters in the findValue function? What are you actually trying to do? What kind of parameters are you looking to add? -Dan -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: DIV onresize
As far as I know, nothing works but window.onresize On 5/31/07, Glen Lipka [EMAIL PROTECTED] wrote: Is there a way of putting a listener on a DIV that listens for it's height changing? Resize didnt do it I think. Glen -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Determining show / hide state
.is(:hidden) On 5/30/07, SamCKayak [EMAIL PROTECTED] wrote: Does jQuery .show() and .hide() set a flag anywhere on an object to indicate if it was last show()n or hide()n? Sam -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Determining show / hide state
is is anything and everything! all jQuery selectors work. On 5/30/07, Geoffrey Knutzen [EMAIL PROTECTED] wrote: Wow, .is saves the day again. That little guy always gets me. http://docs.jquery.com/DOM/Traversing#is.28_expr_.29 Is there a more extensive list of what could be done with .is? -- *From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of * *Sent:* Wednesday, May 30, 2007 3:34 PM *To:* jquery-en@googlegroups.com *Subject:* [jQuery] Re: Determining show / hide state .is(:hidden) On 5/30/07, *SamCKayak* [EMAIL PROTECTED] wrote: Does jQuery .show() and .hide() set a flag anywhere on an object to indicate if it was last show()n or hide()n? Sam -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Finding first text element
something like this (untested) returns an array of all the plain text nodes in a jQuery object. jQuery.fn.plainText = function() { var text=[]; this.each(function(){ var children =this.childNodes; for (var i = 0; i children.length; i++){ var child = children[i]; if (child.nodeType == 3) text[text.length] = $.trim(child.nodeValue); } }) return text; }; On 5/29/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: Dave, I was shocked when you got the first answer. I don't think there is any way to get just the text using jQuery core functions. If you get .html() you can use regexps to remove the complete nodes, it seems messy. if you write a plugin (there may already be one) it can go thru the dom nodes and return the concatenation of the simple text nodes. jQuery likes to shield us from the nastiness of the real dom objects and incompatibilities of lesser browser. On 5/29/07, DaveG [EMAIL PROTECTED] wrote: I didn't find a way to do this yet, but I did discover a way to crash my browser: Warning: locks up FF2 Input: div id=id1phere is/p some text/div jQ: $(#id1).text() I also discovered a way to get the text of the first element: Input: div id=id1phere is/p some text/div jQ: $(#id1).text() Output: here is ~ ~ Dave On Tue, 29 May 2007 15:48:30 -0400, DaveG [EMAIL PROTECTED] wrote: How do I find the first text-node of a given DOM object? Input: divphere is/p some text/div Output: some text Input: h1a href=#id1/aHeader 1/h1 Output: Header 1 ~ ~ Dave -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: trigger $(document).ready manually
don't use an anonymous function with ready. use a named one, and then just call it again (and again). On 5/29/07, Brandon Aaron [EMAIL PROTECTED] wrote: ready() is just a special method that handles the DOM Ready event. I can't think of a use-case where one would need to force the call to ready but you can do so by calling jQuery.ready(). Once the function runs, it won't run again. I'm not sure what, if any, the consequences of doing this are. Perhaps the problem can be solved in a better way? -- Brandon Aaron On 5/29/07, MathiasBank [EMAIL PROTECTED] wrote: Good evening, It is possible to call 1. $('#field').trigger(click); 2. $(document).trigger(myOwnEvent); But it seems, that this is not possible to call $(ducument).trigger(ready); Is ready not an event? (Yes, I mean ready from $ (document).ready(function() {...})). I need to recall this event, because I have changed a big part of my page. Mathias -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Finding first text element
Dave, I was shocked when you got the first answer. I don't think there is any way to get just the text using jQuery core functions. If you get .html() you can use regexps to remove the complete nodes, it seems messy. if you write a plugin (there may already be one) it can go thru the dom nodes and return the concatenation of the simple text nodes. jQuery likes to shield us from the nastiness of the real dom objects and incompatibilities of lesser browser. On 5/29/07, DaveG [EMAIL PROTECTED] wrote: I didn't find a way to do this yet, but I did discover a way to crash my browser: Warning: locks up FF2 Input: div id=id1phere is/p some text/div jQ: $(#id1).text() I also discovered a way to get the text of the first element: Input: div id=id1phere is/p some text/div jQ: $(#id1).text() Output: here is ~ ~ Dave On Tue, 29 May 2007 15:48:30 -0400, DaveG [EMAIL PROTECTED] wrote: How do I find the first text-node of a given DOM object? Input: divphere is/p some text/div Output: some text Input: h1a href=#id1/aHeader 1/h1 Output: Header 1 ~ ~ Dave -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Finding first text element
tested. html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en head title plainText() /title script type=text/javascript src=/js/jquery.js/script script type=text/javascript src=/js/my.js/script script type=text/javascript $(function(){ $(div,h1).each(function(){ alert ($(this).plainText().join()) }) }); /script /head body divphere is/p some text/div h1a href=#id1nice/aHeader 1/h1 /body /html On 5/29/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: something like this (untested) returns an array of all the plain text nodes in a jQuery object. jQuery.fn.plainText = function() { var text=[]; this.each(function(){ var children =this.childNodes; for (var i = 0; i children.length; i++){ var child = children[i]; if (child.nodeType == 3) text[text.length] = $.trim(child.nodeValue); } }) return text; }; On 5/29/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: Dave, I was shocked when you got the first answer. I don't think there is any way to get just the text using jQuery core functions. If you get .html() you can use regexps to remove the complete nodes, it seems messy. if you write a plugin (there may already be one) it can go thru the dom nodes and return the concatenation of the simple text nodes. jQuery likes to shield us from the nastiness of the real dom objects and incompatibilities of lesser browser. On 5/29/07, DaveG [EMAIL PROTECTED] wrote: I didn't find a way to do this yet, but I did discover a way to crash my browser: Warning: locks up FF2 Input: div id=id1phere is/p some text/div jQ: $(#id1).text() I also discovered a way to get the text of the first element: Input: div id=id1phere is/p some text/div jQ: $(#id1).text() Output: here is ~ ~ Dave On Tue, 29 May 2007 15:48:30 -0400, DaveG [EMAIL PROTECTED] wrote: How do I find the first text-node of a given DOM object? Input: divphere is/p some text/div Output: some text Input: h1a href=#id1/aHeader 1/h1 Output: Header 1 ~ ~ Dave -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: getting DOM values
$('#foo')[0].clientWidth On 5/29/07, pd [EMAIL PROTECTED] wrote: Hi BjQ (before jQuery) I can do this: document.getElementById('foo').clientWidth to get a DOM value that Firebug tells me is set to something other than 'undefined'. I can't figure out how to the do same in AjQ (after jQuery). I've tried the following: $('#foo').attr('clientWidth') but keep getting undefined. Am I trying the wrong syntax? If so, what syntax will achieve the results I'm after? -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Menu not working in Firefox 2.0
the misplacement looks like a css error. On 5/28/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: Firefox 2 shows uncaught exception: Permission denied to call method XMLHttpRequest.open an attempt to do ajax from another server. Humor show Różne dowcipy zamieszczone z premedytacją aby ośmieszać ludzi :) On 5/28/07, warlock24 [EMAIL PROTECTED] wrote: Forgot include url sorry :D :D :D http://warlock24.googlepages.com/index.html# On 28 Maj, 22:09, warlock24 [EMAIL PROTECTED] wrote: hi, could someone can tell me why menu on my page not working properly in firefox 2.0 (two last items: Humor and Kontakt)? On ie and opera everything is ok :P -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Menu not working in Firefox 2.0
Firefox 2 shows uncaught exception: Permission denied to call method XMLHttpRequest.open an attempt to do ajax from another server. Humor show Różne dowcipy zamieszczone z premedytacją aby ośmieszać ludzi :) On 5/28/07, warlock24 [EMAIL PROTECTED] wrote: Forgot include url sorry :D :D :D http://warlock24.googlepages.com/index.html# On 28 Maj, 22:09, warlock24 [EMAIL PROTECTED] wrote: hi, could someone can tell me why menu on my page not working properly in firefox 2.0 (two last items: Humor and Kontakt)? On ie and opera everything is ok :P -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: Menu not working in Firefox 2.0
firebug (http://getfirebug.com) show that you're mucking with the dom around there, !-- Artykuły -- dta href=# onclick=loadPage('artykuly');Artykuły/a/dt dd style=display: none;ul lia href=# onclick=loadPage('article_hasla_w_gg');Hasła w GG/a/li a href=# onclick=loadPage('article_hasla_w_gg'); /a/ul/dd a href=# onclick=loadPage('article_hasla_w_gg'); !-- Humor -- dt/dt/aa href=# onclick=loadPage('humor');Humor/a dd style=display: none;ul lia href=# onclick=loadPage('o_niemcach');O niemcach/a/li a href=# onclick=loadPage('o_niemcach'); /a/ul/dd a href=# onclick=loadPage('o_niemcach'); !-- Kontakt -- dt/dt/aa href=mailto:[EMAIL PROTECTED]Kontakt/a On 5/28/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: the misplacement looks like a css error. On 5/28/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: Firefox 2 shows uncaught exception: Permission denied to call method XMLHttpRequest.open an attempt to do ajax from another server. Humor show Różne dowcipy zamieszczone z premedytacją aby ośmieszać ludzi :) On 5/28/07, warlock24 [EMAIL PROTECTED] wrote: Forgot include url sorry :D :D :D http://warlock24.googlepages.com/index.html# On 28 Maj, 22:09, warlock24 [EMAIL PROTECTED] wrote: hi, could someone can tell me why menu on my page not working properly in firefox 2.0 (two last items: Humor and Kontakt)? On ie and opera everything is ok :P -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ