[jQuery] Manipulating several independent elements at once
Hi, is there a way to manipulate different selectors in one step? $('#a').show(); $('#b').show(); $('#e').show(); I.e. I don't want to replicate the show() part three times, but sort of group the #a, #b, #e selectors. Of course, this is an example, I need a general method of achieving this. Thanks, Bernd ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Manipulating several independent elements at once
Bernd Matzner schreef: Hi, is there a way to manipulate different selectors in one step? $('#a').show(); $('#b').show(); $('#e').show(); I.e. I don't want to replicate the show() part three times, but sort of group the #a, #b, #e selectors. Of course, this is an example, I need a general method of achieving this. just use a comma separated string $('#a, #b, #e').show(); -- David Duymelinck [EMAIL PROTECTED] ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Manipulating several independent elements at once
I guess that would be: $(#a, #b, #c).show(); Bernd Matzner wrote: Hi, is there a way to manipulate different selectors in one step? $('#a').show(); $('#b').show(); $('#e').show(); I.e. I don't want to replicate the show() part three times, but sort of group the #a, #b, #e selectors. Of course, this is an example, I need a general method of achieving this. Thanks, Bernd ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Running a function when something changes...
Untested, but reading the code I assume this would work: $(#something).ajaxSuccess(fn); function fn(r, s) { $(this).unbind(ajaxSuccess); // do what you want, then rebind $(this).ajaxSuccess(fn); } It seems unbind doesn't work on ajaxSuccess or ajaxStop... Still didn't find how to do this. Any hint? Thanks. -Nicolas -- Nicolas Brush HOIZEY Clever Age : http://www.clever-age.com/ Gastero Prod : http://www.gasteroprod.com/ Photos : http://www.flickr.com/gp/[EMAIL PROTECTED]/M1c002 phpHeaven: http://www.phpheaven.net/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] sortable:how to with tables?
hi, i tried to test interface sortables with a table structure which doesn't realy work. is there a chance to get it running with a tablestructure or are there any other solutions. i don't realy want to use div span span ... /div because i have to fix width of each Column here my table test table border=1 tr class=sortableitemtdItem 1/tdtdItem 1a/td/tr tr class=sortableitemtdItem 2/tdtdItem 2a/td/tr tr class=sortableitemtdItem 3/tdtdItem 3a/td/tr tr class=sortableitemtdItem 4/tdtdItem 4a/td/tr tr class=sortableitemtdItem 5/tdtdItem 5a/td/tr tr class=sortableitemtdItem 6/tdtdItem 6a/td/tr tr class=sortableitemtdItem 7/tdtdItem 7a/td/tr /table script type=text/javascript $(document).ready( function () { $('table').Sortable( { accept :'sortableitem', helperclass : 'sorthelper', activeclass : 'sortableactive', hoverclass :'sortablehover', opacity:0.8, fx: 200, axis: 'vertically', revert: true } ) } ); -- Stefan Kilp SK-Software, Entwicklung Beratung email: [EMAIL PROTECTED] fon : +49 6151 93344-0 fax : +49 6151 93344-20 Herta-Mansbacher-Str. 98 64289 Darmstadt, Germany. - ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] ANNOUNCE: Thickbox Reloaded alpha
I agree, but what bothers me about the loading more is that the entire Thickbox (other than the overlay) disappears while this is happening. It would be less disturbing if the 'ui' stayed - the border, margin/background, links/txt, etc. - and just the image changed. I like your idea for the loader too. IE7 can handle transparent PNGs, though I haven't tested how well. Maybe IE6 gets a loadbar instead? Adam deadguy wrote: When using gallery images, the load when switching images is very intrusive. A less disruptive method would place the loading spinner on top of the current image until the next image is loaded (rather than making the current image disappear completely). The downside is IE's poor handling of transparent PNG. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/ANNOUNCE%3A-Thickbox-Reloaded-alpha-tf3293077.html#a9208801 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] nth-child selector
Thanks chaps, great answers. Is :gt(n) a jQuery or CSS3 pseudo selector? PS Yehuda - The reason is that I'm not striping a table! Good answer nontheless! On 3/1/07, Yehuda Katz [EMAIL PROTECTED] wrote: Why do you want to ignore the first two items? A better solution might be to use thead to store header info outside the table and then do $(table tbody tr:nth-child(odd)) -- Yehuda On 2/28/07, Karl Swedberg [EMAIL PROTECTED] wrote: Hi Dan, jQuery doesn't support the :nth-child(an + b), only :nth-child(n) To select every odd item except the first two items, try this instead: $('#search-results div:nth-child(odd):gt(0)') --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 28, 2007, at 7:38 AM, Dan Eastwell wrote: Hello, I'm trying to select every odd item in a list, but not the first two items. I've tried using the nth-child selector, which is fine at picking out the nth-child, but I can't get the 2n+2 child to be selected: stripes(#search-results div:odd); // is ok stripes(#search-results div:nth-child(2)); // works but stripes(#search-results div:nth-child(2n+2)); // doesn't. Am I missing something about the CSS3 selector syntax? Thanks, Dan. -- Daniel Eastwell Portfolio and articles: http://www.thoughtballoon.co.uk Blog: http://www.thoughtballoon.co.uk/blog ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Yehuda Katz Web Developer | Wycats Designs (ph) 718.877.1325 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Daniel Eastwell Portfolio and articles: http://www.thoughtballoon.co.uk Blog: http://www.thoughtballoon.co.uk/blog ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] nth-child selector
Klaus Hartl schrieb: Dan Eastwell schrieb: Thanks chaps, great answers. Is :gt(n) a jQuery or CSS3 pseudo selector? That's XPath! Forget that! It's jQuery, but an equivalent to XPath: [position() 2] becomes :gt(2) -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] nth-child selector
Dan Eastwell schrieb: Thanks chaps, great answers. Is :gt(n) a jQuery or CSS3 pseudo selector? That's XPath! -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Another site using jQuery
Seems mobile networks and retailers rather like our script of choice :) Here's another one for the list if it isn't already there: http://www.dialaphone.co.uk/phone/Samsung_X830_White/ Spotted the tablesorter plugin and thickbox (I think?) Regards, Michael Price ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery 1.1.2
I believe so. As I said an expando attribute is basically any non-standard attribute that gets added to an element (doesn't matter how). As Klaus notes, the memory leakage is only a problem in IE when the attribute references other DOM elements (directly, or indirectly via closures). Karl Rudd On 3/1/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: so any non standard attribute accessed simple as object.hello is an expando? no matter if you call getAttribute or not?? On 2/28/07, Karl Rudd [EMAIL PROTECTED] wrote: Err no, actually expandos refers to non-standard attributes that get added to DOM elements. They expand the attributes that are available on an element. For instance adding an expando attribute called hello: input type=submit value=blah hello=Hello world! Because they're non-standard they can cause memory leak problems under Internet Explorer if they refer to other DOM elements. More info here: http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/expando.asp Karl Rudd On 3/1/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: Fil, did you ever get a definition of DOM 0 expandos... they're the shortcuts that were provided with dom level 0, that are short cuts for certain html(only) attributes, and collections of dom nodes. like a.href is an 'expando' whereas a. a.getAttribute('href') is not. and document.forms is an expando whereas a.getElementsbyTagname('form') is not. I'm pretty sure thats what it means! bonne chance! On 2/28/07, Fil [EMAIL PROTECTED] wrote: * Changed: Events are now internally stored in elem.$events rather than elem.events (due to a nasty bug relating to DOM 0 expandos). I'm translating this blog into French, but I can't figure how to translate this sentence. DOM 0 expandos ? Anyway this is available at http://www.jquery.info/spip.php?article42 -- Fil ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] ANNOUNCE: Thickbox Reloaded alpha
Klaus Hartl wrote: [-Stash-] schrieb: A simple Cancel link would be superb - I think this is an essential addition! clicking on the overlay while loading will abort loading... that its not working is a bug on my side. is that sufficient? OK, I just tested with own hacked about version of ThickBox 2.1 and clicking on the overlay while the loading animation is showing does indeed kill the TB. However, clicking on the actual lading animation itself does NOT kill the TB. Would it be possible for TB3 to close when you click on the loading animation? That way the loading animation can be simply modified to say loading... click to cancel which is nice and explanatory. Klaus Hartl wrote: [-Stash-] schrieb: I like this idea a lot. Added to this, it would be nice if progressive images (JPEG and PNG) could start to display as soon as you have the image size. The display of the Box is bound to the load event of the image. I don't think that there is another way to do it except for maybe setting up an interval to check size, but that would mean a lot overhead, so this will not go in, I'm sorry. People already started to complain about file size... I didn't realise this, so I'm quite happy to not have this feature included as I want TB to remain nice and light as well :) Thanks for all the hard work Klaus :) Luke -- View this message in context: http://www.nabble.com/ANNOUNCE%3A-Thickbox-Reloaded-alpha-tf3293077.html#a9246757 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] ANNOUNCE: Thickbox Reloaded alpha
[-Stash-] schrieb: Klaus Hartl wrote: [-Stash-] schrieb: A simple Cancel link would be superb - I think this is an essential addition! clicking on the overlay while loading will abort loading... that its not working is a bug on my side. is that sufficient? OK, I just tested with own hacked about version of ThickBox 2.1 and clicking on the overlay while the loading animation is showing does indeed kill the TB. However, clicking on the actual lading animation itself does NOT kill the TB. Would it be possible for TB3 to close when you click on the loading animation? That way the loading animation can be simply modified to say loading... click to cancel which is nice and explanatory. Ah, I know why. Because the loading animation is a layer on top of the dim, thus the click event of the dim isn't fired of course. I will fix this! -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] ANNOUNCE: Thickbox Reloaded alpha
agent2026 schrieb: I agree, but what bothers me about the loading more is that the entire Thickbox (other than the overlay) disappears while this is happening. It would be less disturbing if the 'ui' stayed - the border, margin/background, links/txt, etc. - and just the image changed. I like your idea for the loader too. IE7 can handle transparent PNGs, though I haven't tested how well. Maybe IE6 gets a loadbar instead? Adam deadguy wrote: When using gallery images, the load when switching images is very intrusive. A less disruptive method would place the loading spinner on top of the current image until the next image is loaded (rather than making the current image disappear completely). The downside is IE's poor handling of transparent PNG. I agree that its not ideal that the box gets hidden when loading the next image. I'll see what I can do here. Fore sure, this will add more code. -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] problem with jquery and IE6.0
hi guys i have created a plugin for Jquery, this plugin interface Asterisk via AJAM, work perfectly with Firefox but no with IE. I dont understand where is the error or if this is a bug of the asterisk webserver the code is very simple i add a little example: var Response = $.ajax({ type: GET, url: asterisk/mxml, data: action=loginusername=xsecret=xx, async: false }).responseXML; With this code is possible to login with administratro manger of Astrerisk, the response is an XML string, the metod is GET, no POST or others only GET The asterisk webserver send the 501 error, that correspond a send of metod no existent i Dont have idea can you help me? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] how to make the function in forms + ajax?
guess no one knows ? :( amircx wrote: hey. im using the ajax form plugin of jroes, http://www.amir.cx/ajax/test3/stable.php till now i success to do the rules inside the tag, but where i can put inside that code a properties like rules: { firstname: { required: true }, age: { number: true }, password: { min: 5, max: 32 } }, messages { password: Please enter a password between 5 and 32 characters long. } }); and thing such : $(#myform).validate({ errorClass: invalid, errorContainer: $(#messageBox), errorWrapper: li }); cause i already defined there $(#amir).validate... anyone can explain me how to do it? http://www.amir.cx/ajax/test3/stable.php -- View this message in context: http://www.nabble.com/how-to-make-the-function-in-forms-%2B-ajax--tf3308618.html#a9247476 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery toXML
Jason Karns wrote: I saw your toXML plugin and the thread where you were discussing its creation. I've run into a situation where I need to serialize the page to XML. However, the majority of the page is form elements and I need the actual values of these elements serialized, and not the original HTML source. Do you have any suggestions on where I might find a solution for this? Have you tried the Forms plugin: http://www.malsup.com/jquery/form/ Although it doesn't serialize to XML. If you want your form values as XML, you'd have to decided on a meaningful schema for the XML, and probably have to build up a document fragment manually from form values and then use toXML to serialize it. If returning the data as XML is really that important then it's probably worth looking in to XForms instead. FormFaces is a pure javascript XForms implementation: http://www.formfaces.com/ - Mark. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Form validator 0.2 causes problems in IE6
the link is now working... not sure if it was before ;) try now amircx wrote: hey, when i run form validator from http://bassistance.de/jquery-plugins/jquery-plugin-validation/ , after putting the uncompressed version, its working fine in ie 7 but in ie 6 its returns me error: (here is the code: http://www.amir.cx/ajax/test3/stable.php ) [you can also get the source zipped there] object dosent support this property or method line 34 if i just download the files from the site without changes (except of using the uncompressed version) it its returns me error for example at page: custom-methods-demo.html error: line 18, char 2 : $.validator is null or not an object wierd, and im consider if i should use this plugin cause its working fine with ff and ie7 , but 90% of my users have ie6 will be a fix for it soon? or just can zip me a working code ? -- View this message in context: http://www.nabble.com/Form-validator-0.2-causes-problems-in-IE6-tf3307939.html#a9247549 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery 1.1.2
I'm confused. Are these expandos proprietory Microsoft attributes with a specific meaning, or can it also apply to a non-standard attribute that I may invent for a particular purpose (eg all collapsible elements on a page might have a custom attribute collapsible=true)? If it's the latter, I don't see how such attributes can reference anything at all, at least as far as the DOM model is concerned. They're just strings. Personally I avoid this kind of extra attribute; class is a pretty good catch-all for most needs of this kind. I know you can make them valid HTML by extending the DTD, but that seems like a lot of extra work for not much gain. Chris On 3/1/07, Karl Rudd [EMAIL PROTECTED] wrote: I believe so. As I said an expando attribute is basically any non-standard attribute that gets added to an element (doesn't matter how). As Klaus notes, the memory leakage is only a problem in IE when the attribute references other DOM elements (directly, or indirectly via closures). Karl Rudd On 3/1/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: so any non standard attribute accessed simple as object.hello is an expando? no matter if you call getAttribute or not?? On 2/28/07, Karl Rudd [EMAIL PROTECTED] wrote: Err no, actually expandos refers to non-standard attributes that get added to DOM elements. They expand the attributes that are available on an element. For instance adding an expando attribute called hello: input type=submit value=blah hello=Hello world! Because they're non-standard they can cause memory leak problems under Internet Explorer if they refer to other DOM elements. More info here: http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/expando.asp Karl Rudd On 3/1/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: Fil, did you ever get a definition of DOM 0 expandos... they're the shortcuts that were provided with dom level 0, that are short cuts for certain html(only) attributes, and collections of dom nodes. like a.href is an 'expando' whereas a. a.getAttribute('href') is not. and document.forms is an expando whereas a.getElementsbyTagname('form') is not. I'm pretty sure thats what it means! bonne chance! On 2/28/07, Fil [EMAIL PROTECTED] wrote: * Changed: Events are now internally stored in elem.$events rather than elem.events (due to a nasty bug relating to DOM 0 expandos). I'm translating this blog into French, but I can't figure how to translate this sentence. DOM 0 expandos ? Anyway this is available at http://www.jquery.info/spip.php?article42 -- Fil ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Chris Ovenden http://thepeer.blogspot.com Imagine all the people / Sharing all the world ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Announce: Unobtrusive JavaScript with jQuery andsymfony
David, What you ask is exactly what the plugin does. Take a look at the blog post explaining how you can use it to replace obtrusive javascript at: http://redotheweb.com/2007/02/28/unobtrusive-javascript-made-possible/ François -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de David Duymelinck Envoyé : jeudi 1 mars 2007 08:47 À : jQuery Discussion. Objet : Re: [jQuery] Announce: Unobtrusive JavaScript with jQuery andsymfony François Zaninotto schreef: Hi list, I just pop in to mention a new plugin for the symfony framework (http://www.symfony-project.com) that uses jQuery to implement unobtrusive scripting. It's still in its infancy, but it takes the best of the jQuery syntax concision and provides useful tools for interface developers who worry about accessibility. The plugin description is available at: http://www.symfony-project.com/trac/wiki/sfUJSPlugin I took a look at the demo's on the plugin page and the first thing i noticed was the use of the onclick event. My idea of unobtrusive scripting is to strip as much javascript as possible out of the html code. wouldn't it be possible to do something like this html head titletest/title ?php UJS_Placeholder(); ? /head body div id=foobarclick me/div ?php UJS_add_behaviour('#foobar', 'click', alert('foobar')) ? /body /html and render it like this html head titletest/title script type=javascript $(function(){ $('#foobar').click(function() { alert('foobar') }); }); /script body div id=foobarclick me/div /body /html i'm just thinking aloud. It could also be good to cache the javascript like this ?php UJS_Placeholder('/js/testpage.js'); ? Anyway nice work. I feels good to see jquery hooked into php, before we know it will be the prototype library of php :) -- David Duymelinck [EMAIL PROTECTED] ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] problem with edit in place on HTML coding.
On 1 Mar 2007, at 02:15, Mark wrote: yea.. i was just thinking about the same.. i think i`m gonna give that a try.. 2007/2/28, Karl Rudd [EMAIL PROTECTED]: Unfortunately you can't just assign a function that runs on the server to JavaScript (running on the client). The best you could do would be to POST the content back via AJAX. Check the parameters: * @param String options[postload] POST URL to fetch content before editing * @param String options[getload] GET URL to fetch content before editing which fetch contents of the input via GET or POST. So this script which returns the content can do html_entity_decode() for you. -- Mika Tuupola http://www.appelsiini.net/~tuupola/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Announce: Unobtrusive JavaScript with jQuery andsymfony
François Zaninotto schreef: David, What you ask is exactly what the plugin does. Take a look at the blog post explaining how you can use it to replace obtrusive javascript at: http://redotheweb.com/2007/02/28/unobtrusive-javascript-made-possible/ It's my mistake, I got it now you can write obtrusive but you have an helper to create unobtrusive javascript. Now i'm wondering is there a place for that helper in the plugin? It can be the cause for confusion and i'm example one :) -- David Duymelinck [EMAIL PROTECTED] ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] how to make the function in forms + ajax?
This looks like a question about the validator plugin. You may want to use that in the subject line. rules: { firstname: { required: true }, age: { number: true }, password: { min: 5, max: 32 } }, messages { password: Please enter a password between 5 and 32 characters long. } }); and thing such : $(#myform).validate({ errorClass: invalid, errorContainer: $(#messageBox), errorWrapper: li }); ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jqModal r7 release!
Brice Burgess schreef: Ladies and Gentleman of the jQuery, ...errr, more so the Gentleman... I am happy to bring you jqModal r7, codenamed listen. R7 is a major feature enhancer, and brings about some API changes and parameter reduction. I recommend upgrading porting your existing code to the new version... well worth the added flexibility // maintaining support. It's aready r9 but the plugin stays the same :) I finally got around to use the plugin but i had a problem with the (function($){})(jQuery); code, in firebug i got the error: is not a function. When i replaced the internal $ with jQuery the plugin works like it should. The way i use javascript is to combine the plugins and the actual code for the site in one javascript file. -- David Duymelinck [EMAIL PROTECTED] ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jquery accordion plugin settings help
The hidespeed is measured in milliseconds, using the same units as jQuerys built-in animations. So the smaller the value, the faster the animation. Try to simply increase the value, that should give you a smooth animation. that indeed worked, however still odd, the same value was smooth before but having all panels closed initially forces me to increase the value to get approx. the same smooth scrolling. again, thanks a lot for your help. it now works almost 90% of what i had in mind! :) ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] problem with edit in place on HTML coding.
thanx for the suggestion. gonna try that 2007/3/1, Mika Tuupola [EMAIL PROTECTED]: On 1 Mar 2007, at 02:15, Mark wrote: yea.. i was just thinking about the same.. i think i`m gonna give that a try.. 2007/2/28, Karl Rudd [EMAIL PROTECTED]: Unfortunately you can't just assign a function that runs on the server to JavaScript (running on the client). The best you could do would be to POST the content back via AJAX. Check the parameters: * @param String options[postload] POST URL to fetch content before editing * @param String options[getload] GET URL to fetch content before editing which fetch contents of the input via GET or POST. So this script which returns the content can do html_entity_decode() for you. -- Mika Tuupola http://www.appelsiini.net/~tuupola/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Need some guidance...
Thanks for the explanation and code, Daemach! As I study it, it begins to make more and more sense. (Not to say that I could write it, but at least I'm beginning to understanding how the parts relate...) I'll work with this code some and see what I can do. I'll check out the link to openwddx.org, too. btw... what are ser/deser functions? Rick -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daemach Sent: Thursday, March 01, 2007 12:54 AM To: discuss@jquery.com Subject: Re: [jQuery] Need some guidance... Ugh - that's right. It is actually more simple than it looks - it makes a lot more sense when you actually get to use it ;) Well then, this should work for you (http://jquery.bassistance.de/api-browser/#postStringMapFunction): I hacked Christopher Jordan's example because I like the loop over the form fields to build the object :) I would highly recommend using firebug with firefox either in the console or on the net tab to watch how all of this works. You can see the actual post and what is returned that way. This example returned a simple string. You can also download the wddx sdk at www.openwddx.org to get the javascript ser/deser functions. This will allow you to return complex objects such as queries, structures, arrays or combinations of those using cfwddx action=cf2wddx (available in cf 4.5) in the same manner. When the wddx packet hits your processing function you would deserialize the packet into a javascript object then loop over it or what ever else you need to do to deal with the results. === Calc page: script type=text/javascript src=/js/jquery.js/script script type=text/javascript function CalculateMortgage(){ var Params = {}; // select all inputs of type text $(input:text).each(function(){ Params[$(this).attr(name)] = $(this).val(); }); // post the form. The Param object mimics form fields $.post(/path/to/yourdatapage.cfm, Params, function(data){ // this is the processing function. // append what you get back to the element with ID = Result after clearing its contents $(#Result).empty().append(data); } ); } /script form name=f table tr td align=rightstrongPrincipal:/strong/td tdinput type=text name=Principal/td /tr tr td align=rightstrongInterest Rate:/strong/td tdinput type=text name=InterestRate/td /tr tr td align=rightstrongDuration:/strong/td tdinput type=text name=Duration/td /tr tr td align=rightstrongResult:/strong/td tdspan id=Result/span/td /tr tr td align=rightnbsp;/td tdinput type=button value= Calculate onClick=CalculateMortgage();return false;/td /tr /table /form Page from which you are getting the data: cfsetting showdebugoutput=nocfset calc = form.Principal * form.InterestRate * form.Duration cfcontent reset=yescfoutput#DollarFormat(calc)#/cfoutput Rick Faircloth wrote: Hi, Daemach... Thanks for the guidance, but unfortunately, I'm still using CF 4.5, so CFC's are obviously not an option. I plan to upgrade this summer to CF 8 and catch up with everyone. I was looking over your code, too... that complicated stuff! (For someone just starting out, anyway...) After looking over the code, I can begin to see how it's being done... just wish I could use AjaxCFC! Thanks for your time and help! Rick -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daemach Sent: Wednesday, February 28, 2007 6:00 PM To: discuss@jquery.com Subject: Re: [jQuery] Need some guidance... Hi Rick - This is one of those things I would use ajaxCFC for since it handles serialization automatically. The idea here is that you need to serialize the values of your form fields, send them to the server, deserialize, calculate and put the results into some kind of structure which gets serialized again and returned to the browser for processing which starts with deserializing. Dealing with the serialization/deserialization transparently is what makes ajaxCFC so great. First, download ajaxcfc here: http://www.robgonda.com/blog/projects/ajaxcfc/download.cfm in the zip file drill down to ajaxCFC/branches/jquery/core/. Put the .cfc's in some accessible folder on your web server, then copy everything inside the /js folder to your javascript repository - I create a subfolder to keep it separate:
Re: [jQuery] jQuery 1.1.2
@ [EMAIL PROTECTED] : Fil, did you ever get a definition of DOM 0 expandos... Now I got plenty, thanks :) -- Fil ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Need some guidance...
Gotcha. I thought that might be the case. Good on ya. ;o) Daemach wrote: Yeah it's education - it's good for new folks to see that you can pass complex structures back and forth seamlessly.A simple value would be fine in this case. I like the loop over the inputs to create the object in your example - more elegant than hardcoding for sure ;) Christopher Jordan wrote: Daemach, I suppose it's just for the sake of education or something, but putting the return value in a structure and passing it back seems like overkill to me. Since there can be only one result from the calculation, just pass it back as a string or numeric... no need for a structure in this case imo. Rick, is any of this helping? :o) Chris Daemach wrote: Hi Rick - This is one of those things I would use ajaxCFC for since it handles serialization automatically. The idea here is that you need to serialize the values of your form fields, send them to the server, deserialize, calculate and put the results into some kind of structure which gets serialized again and returned to the browser for processing which starts with deserializing. Dealing with the serialization/deserialization transparently is what makes ajaxCFC so great. First, download ajaxcfc here: http://www.robgonda.com/blog/projects/ajaxcfc/download.cfm in the zip file drill down to ajaxCFC/branches/jquery/core/. Put the .cfc's in some accessible folder on your web server, then copy everything inside the /js folder to your javascript repository - I create a subfolder to keep it separate: /js/ajaxCFC. That's it for the install. This sample code should get you started. I stuck the ajax call directly into the click event on the button, but you could put all of that in a separate function and then call the function from the click event handler if you want. === your html/cfm page with the calculator: script type=text/javascript src=/js/jquery.js/script script type=text/javascript src=/js/ajaxCFC/jquery.AjaxCFC.js/script script type=text/javascript // additional files $.AjaxCFC({require:'json'}); // more additional files // $.AjaxCFC({require:'json,wddx,dDumper,log4j,DWRSyntax,blockUI'}); // optional global settings // using these setters also automatically include dependencies //$.AjaxCFCHelper.setAjaxLoadImage(#snort,/images/ajax_circleball.gif); $.AjaxCFCHelper.setDebug(false); $.AjaxCFCHelper.setBlockUI(false); $.AjaxCFCHelper.setUseDefaultErrorHandler(false); $.AjaxCFCHelper.setSerialization('json'); // json, wddx $(document).ready( function() { // Add click event to button $('#ajaxit').click(function() { //create an object to pass to the cfc. can also be an array, simple value, whatever you want. Objects turn into cf structures. var obj = {firstVal:$('#firstVal').val(), secondVal:$('#secondVal').val(), thirdVal:$('#thirdVal').val(), randomstring:why not} //do ajax call $.AjaxCFC({ url: /pathto/your.cfc, method: calculate, data: obj, // can be an anonymous function, or the name of the function that will handle the return results. success: showResults }); }); }); function showResults(data){ // data will be whatever the cfc passed back in js format - structure in this case to make it easy. $('#result').val(data.results); } /script firstVal: input id=firstVal name=firstVal type=textbr secondVal: input id=secondVal name=secondVal type=textbr thirdVal: input id=thirdVal name=thirdVal type=text input id=ajaxit type=submit name=ajaxit value=AjaxIt hr result: input id=result name=result type=text Your cfc file should go in the same folder as ajax.cfc: cfcomponent extends=ajax !--- cfscript setDebugMode('request'); /cfscript--- cffunction name=calculate output=no access=private cfscript obj = arguments; data = structNew(); temp = obj.firstVal + obj.secondVal + obj.thirdVal; StructInsert(data, results, temp); /cfscript cfreturn data /cffunction /cfcomponent Rick Faircloth wrote: Hi, all. I've just started using jQuery recently and now I'm trying to understand how to use it with AJAX and I just don't know enough about how it works to get started on a fairly simple app. The sample app I've been tinkering with sends a URL variable for a User_ID using AJAX to a CF page, which runs a query and returns the info to the calling page and appends it to the body. I'd like to send results back to the form fields, as well as the calculated result. I just don't have a clue how to set this up. I have a mortgage
Re: [jQuery] Need some guidance...
Hmm... I hadn't thought of that. So you're saying that you would eliminate the looping over the argument structure and just set my = arguments;? Would that make a *copy* of the arguments structure in the 'my' variable, or would 'my' be a *reference* to the arguments structure? Chris Daemach wrote: BTW, since you don't need a deep copy of the arguments structure in the cfc you can just do cfset my = arguments to simplify. Christopher Jordan wrote: Rick, First will you be using Rob Gonda's AjaxCFC for jQuery? I'd recommend it, even though it's still in alpha3. I'm using it on a client's application and it works just fine. So for this mortgage calculator, you've got your form with the fields for input (technically speaking this doesn't even have to be an html form since you'll be using Ajax to send the data and receive the calculation): script type=text/javascript src=Include/js/jquery.js/script script type=text/javascript src=Include/js/jquery.AjaxCFC.js/script script type=text/javascript$.AjaxCFC({require:'json,wddx,dump,log4j,someotherjsfiles'});/script script function CalculateMortgage(){ // first use jQuery to get all the field values we'll need to make the calculation // this example assumes the very simple form I've got listed below. var Params = {}; // select all inputs of type text $(input:text).each(function(){ Params[$this.name] = $this.value; }); //once this is done above we'll have an object (like a CF structure) which is the equivalent of {VarName:Value, VarName2:Value} // these are named arguments, so you'll notice in the code below that unnamedargs is set to false. $.AjaxCFC({ url: CFC/MortgageCalculator.cfc, method: CalculateResult, data: Params, unnamedargs: false, serialization: string, success: function(data) { // great we got our calculation back. So now append it to the span tag holding the result. $(#Result).empty().append(data); } }); } /script form name=f input type=text name=Principal input type=text name=InterestRate input type=text name=Duration span id=Result/span input type=button value= Calculate onClick=CalculateMortgage(); /form Your CFC would look something like: cfcomponent extends=ajax.cfc cffunction name=CalculateResult returntype=numeric cfscript // Rick, you should note, that this is just the way *I* handle arguments coming into a cfc and there are possibly better ways. var my = StructNew(); // this loop takes everything that was passed into the arguments structure and puts it in the local 'my' structure. // I do this because 'my' has been var'd so everything in it is var'd as well. This means that throughout my function // I don't have to var anything else. for(my.KeyName in Arguments){ my.#my.KeyName# = Arguments[my.KeyName]; } // now do the calculation... I'm not going to pretend that I know how to do the interest calculation off the top of my head. // I'm assuming you can do this already. return my.Principal * my.InterestRate * my.Duration; // or whatever you get the idea I hope. /cfscript /cffunction /cfcomponent The calculated result will be returned to the ajaxcall in the 'success:' section. Does this make sense? Does it help? If not, let me know where you need clarification, and I'll see what I can do. :o) Cheers, Chris Rick Faircloth wrote: Hi, all... I've just started using jQuery recently and now I'm trying to understand how to use it with AJAX and I just don't know enough about how it works to get started on a fairly simple app. The sample app I've been tinkering with sends a URL variable for a User_ID using AJAX to a CF page, which runs a query and returns the info to the calling page and appends it to the body. I'd like to send results back to the form fields, as well as the calculated result. I just don't have a clue how to set this up. I have a mortgage calculator and I want the user to be able to enter the principal, interest rate, and duration in years, then run a calculation on it and return the result. I've set this up in a regular form that submits back to the page it's on and it works fine. It's coded in CF. I'd like to be able to calculate and return the results using AJAX. I've worked some very simple code using AJAX (actually it was given to me), but I have no idea how to code for the above scenario. Would anyone care to give this CF'er some guidance on creating this small jQuery/CF/AJAX app? Thanks for any help! Rick ___ jQuery mailing list discuss@jquery.com
[jQuery] Bug in interface highlight effect in IE7
I posted yesterday about an issue I was having with the highlight effect (from interface) firing twice... So after looking at my code again this AM - I went to the Interface site itself (http://interface.eyecon.ro/demos/ifx.html) and the highlight effect appears broken there as well. Works fine in Firefox: blinks to white and the fades into green. In IE: It blinks white, fades into green and then turns white again. I'm on WinXP IE7. Jim ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Need some guidance...
Rick, what Daemach means by 'ser/deser' is serialize/deserialize. Serialization is taking a JavaScript object and formatting it into a proper wdx packet (or JSON string, or whatever). De-serialization then is the reverse of that process, taking the serialized data and turning it back into native data. I probably didn't say that too well. Take for example, the param variable that we created yesterday. Setting aside the cool loop to create it, here's the manual ka-chunck-a-chunck way to create it: var param = {}; // this is the same as 'var param new Object();' It's fewer characters and I'm lazy :o) param.principle = 2; param.interestRate = 4.5; param.duration = 5; That code would create the JavaScript object called param with the members principle, interestRate, and duration. If this seems really familiar (like it's a ColdFusion structure), that's because it is! It behaves just about the same as a CFStructure. However, you couldn't pass it as is to a CF page (or a CFC) in its current form, because CF doesn't savvy a JavaScript Object. Enter serialization! :o) I'll use JSON here as an example, but the principle is the same for other forms of serialization. If we were to serialize the above JavaScript object the output would be a string that looks like this: {interestrate:4.5,duration:5,principle:2} This string is *valid* JavaScript code, and if you were to evaluate it (using the JavaScript eval() function) your outcome would be a native JavaScript object. However, we can now pass this string to our CF page, and use the jsondecode() UDF to turn that string into a native ColdFusion structure. If we then took a ColdFusion structure and ran the jsonencode() UDF on it, we would end up with the string {interestrate:4.5,duration:5,principle:2} which we could pass back to JavaScript, evaluate and have ourselves a native JavaScript object. Similarly a wddx serializer/de-serializer would turn that JavaScript object into a valid wddx packet (which it just sees as a string of data), and could pass it to ColdFusion which can handle a properly formatted wddx packet, and from it construct a native structure (or array, or whatever). Does that make sense? Have I made it as clear as mud? :o) Chris Rick Faircloth wrote: Thanks for the explanation and code, Daemach! As I study it, it begins to make more and more sense. (Not to say that I could write it, but at least I'm beginning to understanding how the parts relate...) I'll work with this code some and see what I can do. I'll check out the link to openwddx.org, too. btw... what are ser/deser functions? Rick -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daemach Sent: Thursday, March 01, 2007 12:54 AM To: discuss@jquery.com Subject: Re: [jQuery] Need some guidance... Ugh - that's right. It is actually more simple than it looks - it makes a lot more sense when you actually get to use it ;) Well then, this should work for you (http://jquery.bassistance.de/api-browser/#postStringMapFunction): I hacked Christopher Jordan's example because I like the loop over the form fields to build the object :) I would highly recommend using firebug with firefox either in the console or on the net tab to watch how all of this works. You can see the actual post and what is returned that way. This example returned a simple string. You can also download the wddx sdk at www.openwddx.org to get the javascript ser/deser functions. This will allow you to return complex objects such as queries, structures, arrays or combinations of those using cfwddx action=cf2wddx (available in cf 4.5) in the same manner. When the wddx packet hits your processing function you would deserialize the packet into a javascript object then loop over it or what ever else you need to do to deal with the results. === Calc page: script type=text/javascript src=/js/jquery.js/script script type=text/javascript function CalculateMortgage(){ var Params = {}; // select all inputs of type text $(input:text).each(function(){ Params[$(this).attr(name)] = $(this).val(); }); // post the form. The Param object mimics form fields $.post(/path/to/yourdatapage.cfm, Params, function(data){ // this is the processing function. // append what you get back to the element with ID = Result after clearing its contents $(#Result).empty().append(data); } ); } /script form name=f table tr td align=rightstrongPrincipal:/strong/td tdinput type=text name=Principal/td /tr tr td align=rightstrongInterest Rate:/strong/td tdinput type=text name=InterestRate/td /tr
[jQuery] Question about binding .click() (and other events) to parentless elements
I noticed somewhat odd behavior when using .click() on newly created elements. If the .click() is assigned prior to the element being attached to the DOM, the element behaves as if there is no event bound to it. var removeLink = $(a href='#'Remove/a).click(function() {alert('hello');}); $(.portlet .handle).append(removeLink); Tested this in both FF 1.5 and IE6 and the event appears to have never been bound to the element. However, this works fine: var removeLink = $(a href='#'Remove/a); $(.portlet .handle).append(removeLink); $(.portlet .handle a).click(function() {alert('hello');});; Is this expected behavior? It is not a big deal at all though it did cost me a bit of time earlier this morning try to figure why things weren't working. If this is expected behavior a short note/warning in event docs would be nice :) Regards, -scott ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] metadata by means of metaobjects
I was wondering if anyone is using my http://www.mondotondo.com/aercolino/noteslog/?page_id=105 Metaobjects plugin as a replacement for the metadata plugin. It's now at version 1.2 and I'm really proud of this simple tool. The best features of Metaobjects are: -- valid XHTML mark-up -- auto clean up by default -- attach data to properties of dom elements directly -- add any writable property or a brand new one -- each value is evaluated and then the result is assigned -- data can be any javascript expression: function declarations and calls too -- each metaobject can be further customized by a metaparam -- target is metaobject's parent by default, but can be changed to any jquery selector (sort of one metaobject to rule them all ;-) -- default behavior is customizable -- user decides what metaobjects are processed and when to do it -- View this message in context: http://www.nabble.com/metadata-by-means-of-metaobjects-tf3327825.html#a9252509 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Question about binding .click() (and other events) to parentless elements
This won't help your problem at all, but I would also like to add that I've found exceptions in IE6 when adding css attributes to an element that hasn't still been attached to the DOM, i.e: var elem = $(li).css(color, red); I don't know if these problems are still present in the new release 1.1.2. Abel. On 3/1/07, Weaver, Scott [EMAIL PROTECTED] wrote: I noticed somewhat odd behavior when using .click() on newly created elements. If the .click() is assigned prior to the element being attached to the DOM, the element behaves as if there is no event bound to it. var removeLink = $(a href='#'Remove/a).click(function() {alert('hello');}); $(.portlet .handle).append(removeLink); Tested this in both FF 1.5 and IE6 and the event appears to have never been bound to the element. However, this works fine: var removeLink = $(a href='#'Remove/a); $(.portlet .handle).append(removeLink); $(.portlet .handle a).click(function() {alert('hello');});; Is this expected behavior? It is not a big deal at all though it did cost me a bit of time earlier this morning try to figure why things weren't working. If this is expected behavior a short note/warning in event docs would be nice :) Regards, -scott ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] interface imagebox
Klaus, Brice had given you credit for that on his jqModal site, so I figured I keep the ball rolling :) -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Path problem with Imagebox
Hi I use Joomla and it is installed in the root of my website. hence I don't use a \Joomla directory. I can't get ImageBox the work right in this configuration. When the box opens it doesn't display the loading graphic and when the box is open is doesn't display the close button at all. I have install the same plug-in in my test system where Joomla is install in the /joomla directory and imagebox works fine. How do I fix this problem? Thank you Janet Weber ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Question about binding .click() (and other events) to parentless elements
Quite expected behavior :-) You should always use jQuery( htmlSnippet ) and attach it to the dom as soon as possible. This also works fine, and is a typical chain: var removeLink = $( # Remove ) .appendTo( .portlet .handle ) .click( function() { alert( 'hello' ); } ); --Andrea Weaver, Scott-2 wrote: I noticed somewhat odd behavior when using .click() on newly created elements. If the .click() is assigned prior to the element being attached to the DOM, the element behaves as if there is no event bound to it. var removeLink = $( # Remove ).click(function() {alert('hello');}); $(.portlet .handle).append(removeLink); Tested this in both FF 1.5 and IE6 and the event appears to have never been bound to the element. However, this works fine: var removeLink = $( # Remove ); $(.portlet .handle).append(removeLink); $(.portlet .handle a).click(function() {alert('hello');});; Is this expected behavior? It is not a big deal at all though it did cost me a bit of time earlier this morning try to figure why things weren't working. If this is expected behavior a short note/warning in event docs would be nice :) Regards, -scott ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Question-about-binding-.click%28%29-%28and-other-events%29-to-parentless-elements-tf3327728.html#a9253176 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Path problem with Imagebox
Hi Janet. I didn't use ImageBox ever, but the docs here: http://interface.eyecon.ro/docs/imagebox give two options that I think refer exactly to your issue: textImage - String - mandatory - when a galalry it is build then the iteration is displayed textImageFrom - String - mandatory - when a galalry it is build then the iteration is displayed --Andrea Janet Weber wrote: Hi I use Joomla and it is installed in the root of my website. hence I don't use a \Joomla directory. I can't get ImageBox the work right in this configuration. When the box opens it doesn't display the loading graphic and when the box is open is doesn't display the close button at all. I have install the same plug-in in my test system where Joomla is install in the /joomla directory and imagebox works fine. How do I fix this problem? Thank you Janet Weber ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Path-problem-with-Imagebox-tf3328033.html#a9253523 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Need some guidance...
It's a reference, but in this case you're just trying to avoid having to type arguments so it works - I do the same thing. The only time you really need to do a deep copy is if you are planning to manipulate the second structure and need to keep the first intact for some reason. Christopher Jordan wrote: Hmm... I hadn't thought of that. So you're saying that you would eliminate the looping over the argument structure and just set my = arguments;? Would that make a *copy* of the arguments structure in the 'my' variable, or would 'my' be a *reference* to the arguments structure? Chris Daemach wrote: BTW, since you don't need a deep copy of the arguments structure in the cfc you can just do cfset my = arguments to simplify. Christopher Jordan wrote: Rick, First will you be using Rob Gonda's AjaxCFC for jQuery? I'd recommend it, even though it's still in alpha3. I'm using it on a client's application and it works just fine. So for this mortgage calculator, you've got your form with the fields for input (technically speaking this doesn't even have to be an html form since you'll be using Ajax to send the data and receive the calculation): script type=text/javascript src=Include/js/jquery.js/script script type=text/javascript src=Include/js/jquery.AjaxCFC.js/script script type=text/javascript$.AjaxCFC({require:'json,wddx,dump,log4j,someotherjsfiles'});/script script function CalculateMortgage(){ // first use jQuery to get all the field values we'll need to make the calculation // this example assumes the very simple form I've got listed below. var Params = {}; // select all inputs of type text $(input:text).each(function(){ Params[$this.name] = $this.value; }); //once this is done above we'll have an object (like a CF structure) which is the equivalent of {VarName:Value, VarName2:Value} // these are named arguments, so you'll notice in the code below that unnamedargs is set to false. $.AjaxCFC({ url: CFC/MortgageCalculator.cfc, method: CalculateResult, data: Params, unnamedargs: false, serialization: string, success: function(data) { // great we got our calculation back. So now append it to the span tag holding the result. $(#Result).empty().append(data); } }); } /script form name=f input type=text name=Principal input type=text name=InterestRate input type=text name=Duration span id=Result/span input type=button value= Calculate onClick=CalculateMortgage(); /form Your CFC would look something like: cfcomponent extends=ajax.cfc cffunction name=CalculateResult returntype=numeric cfscript // Rick, you should note, that this is just the way *I* handle arguments coming into a cfc and there are possibly better ways. var my = StructNew(); // this loop takes everything that was passed into the arguments structure and puts it in the local 'my' structure. // I do this because 'my' has been var'd so everything in it is var'd as well. This means that throughout my function // I don't have to var anything else. for(my.KeyName in Arguments){ my.#my.KeyName# = Arguments[my.KeyName]; } // now do the calculation... I'm not going to pretend that I know how to do the interest calculation off the top of my head. // I'm assuming you can do this already. return my.Principal * my.InterestRate * my.Duration; // or whatever you get the idea I hope. /cfscript /cffunction /cfcomponent The calculated result will be returned to the ajaxcall in the 'success:' section. Does this make sense? Does it help? If not, let me know where you need clarification, and I'll see what I can do. :o) Cheers, Chris Rick Faircloth wrote: Hi, all... I've just started using jQuery recently and now I'm trying to understand how to use it with AJAX and I just don't know enough about how it works to get started on a fairly simple app. The sample app I've been tinkering with sends a URL variable for a User_ID using AJAX to a CF page, which runs a query and returns the info to the calling page and appends it to the body. I'd like to send results back to the form fields, as well as the calculated result. I just don't have a clue how to set this up. I have a mortgage calculator and I want the user to be able to enter the principal, interest rate, and duration in years, then run a calculation on it and return the result. I've set this up in a regular form that submits back to the page it's on and it works fine. It's coded in CF. I'd like to be able to calculate and return the results using AJAX. I've
[jQuery] jQuery - Timed Tabs
I'm incorporating the jquery tabs for a client on his site, and he's asking if the tabs could be timed to change. Like at 7pm tab2 shows, 2am tab3 shows, etc?? I know any tab can be set to show by default, so it seems timer is possible? if someone can point me in the right sirection much appreciated. Bruce Prochnau BKDesign Solutions ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Path problem with Imagebox
Sorry, disregard my previous message. Here is what you need: script type=text/javascript $(document).ready( function() { $.ImageBox.init( { loaderSRC: 'images/imagebox/loading.gif', closeHTML: '[img src=images/imagebox/close.jpg /]' } ); } ); /script This snippet appears inside the imagebox example. You sholud put it also inside your page, with the two paths properly configured. Maybe you need to use different relative paths. You could try by using an absolute path at first, to see that it works, and then try to deg a relative path from there. Also please note that I had to use a trick in the snippet above for posting it here: I replaced the angle brackets in closeHTML with square ones, just put them back in :-) or copy that snippet from http://interface.eyecon.ro/demos/imagebox.html --Andrea Janet Weber wrote: Hi I use Joomla and it is installed in the root of my website. hence I don't use a \Joomla directory. I can't get ImageBox the work right in this configuration. When the box opens it doesn't display the loading graphic and when the box is open is doesn't display the close button at all. I have install the same plug-in in my test system where Joomla is install in the /joomla directory and imagebox works fine. How do I fix this problem? Thank you Janet Weber ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Path-problem-with-Imagebox-tf3328033.html#a9253797 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Announce: Unobtrusive JavaScript with jQuery andsymfony
I'm not sure I get you... All the helpers described in the blog post are bundled with the plugin. Or do you mean something else? -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de David Duymelinck Envoyé : jeudi 1 mars 2007 13:06 À : jQuery Discussion. Objet : Re: [jQuery] Announce: Unobtrusive JavaScript with jQuery andsymfony François Zaninotto schreef: David, What you ask is exactly what the plugin does. Take a look at the blog post explaining how you can use it to replace obtrusive javascript at: http://redotheweb.com/2007/02/28/unobtrusive-javascript-made-possible/ It's my mistake, I got it now you can write obtrusive but you have an helper to create unobtrusive javascript. Now i'm wondering is there a place for that helper in the plugin? It can be the cause for confusion and i'm example one :) -- David Duymelinck [EMAIL PROTECTED] ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Path problem with Imagebox
Hi Andrea I tried that, but I get an error message when I modify the index.php of the plugin. It says there is a T_string error in the script type=text/javascript line. Janet -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Andrea Ercolino Sent: Thursday, March 01, 2007 12:10 PM To: discuss@jquery.com Subject: Re: [jQuery] Path problem with Imagebox Sorry, disregard my previous message. Here is what you need: script type=text/javascript $(document).ready( function() { $.ImageBox.init( { loaderSRC: 'images/imagebox/loading.gif', closeHTML: '[img src=images/imagebox/close.jpg /]' } ); } ); /script This snippet appears inside the imagebox example. You sholud put it also inside your page, with the two paths properly configured. Maybe you need to use different relative paths. You could try by using an absolute path at first, to see that it works, and then try to deg a relative path from there. Also please note that I had to use a trick in the snippet above for posting it here: I replaced the angle brackets in closeHTML with square ones, just put them back in :-) or copy that snippet from http://interface.eyecon.ro/demos/imagebox.html --Andrea Janet Weber wrote: Hi I use Joomla and it is installed in the root of my website. hence I don't use a \Joomla directory. I can't get ImageBox the work right in this configuration. When the box opens it doesn't display the loading graphic and when the box is open is doesn't display the close button at all. I have install the same plug-in in my test system where Joomla is install in the /joomla directory and imagebox works fine. How do I fix this problem? Thank you Janet Weber ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Path-problem-with-Imagebox-tf3328033.html#a9253797 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Path problem with Imagebox
I don't know... are you sure you replaced the square brackets? Janet Weber wrote: Hi Andrea I tried that, but I get an error message when I modify the index.php of the plugin. It says there is a T_string error in the script type=text/javascript line. Janet -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Andrea Ercolino Sent: Thursday, March 01, 2007 12:10 PM To: discuss@jquery.com Subject: Re: [jQuery] Path problem with Imagebox Sorry, disregard my previous message. Here is what you need: script type=text/javascript $(document).ready( function() { $.ImageBox.init( { loaderSRC: 'images/imagebox/loading.gif', closeHTML: '[img src=images/imagebox/close.jpg /]' } ); } ); /script This snippet appears inside the imagebox example. You sholud put it also inside your page, with the two paths properly configured. Maybe you need to use different relative paths. You could try by using an absolute path at first, to see that it works, and then try to deg a relative path from there. Also please note that I had to use a trick in the snippet above for posting it here: I replaced the angle brackets in closeHTML with square ones, just put them back in :-) or copy that snippet from http://interface.eyecon.ro/demos/imagebox.html --Andrea Janet Weber wrote: Hi I use Joomla and it is installed in the root of my website. hence I don't use a \Joomla directory. I can't get ImageBox the work right in this configuration. When the box opens it doesn't display the loading graphic and when the box is open is doesn't display the close button at all. I have install the same plug-in in my test system where Joomla is install in the /joomla directory and imagebox works fine. How do I fix this problem? Thank you Janet Weber ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Path-problem-with-Imagebox-tf3328033.html#a9253797 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Path-problem-with-Imagebox-tf3328033.html#a9254297 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Load method help
Hey all, I'm trying to bind a load method to a form element, so that it will assess the value of the element on page load (document ready), and do something accordingly. What I have is below, but it's not working...in fact I can't seem to get the load method to work in any context. Can someone on this list straighten me out please. I must be misinterpreting how the load method works. $(document).ready(function() { $(input:[EMAIL PROTECTED]@checked]).load(function() { if ($(this).val() == private) { $(#pubbox).hide(); } else { $(#pubbox).show(); } }); }); TIA, Josh ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Pjq Demo
Gimmee some docs, I wanna play... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Richard Thomas Sent: Wednesday, February 28, 2007 5:42 PM To: jQuery Discussion. Subject: [jQuery] Pjq Demo I started working on this a while ago and had another demo up but jquery 1.1.1 made it much easier and Pquery made me realize some people wanted something different This is a simple php handler, it doesn't try to generate javascript for you, honestly if your using jquery you better already be able to write your own javascript ;). The goal is to provide a extremely simple way to call php functions from within javascript and either get data back, inject php generated html or call jquery functions from php. http://www.cyberlot.net/demos/pjq/test.html disclaimer, my javascript skill isn't exactly up to par so I hope my code is a little rough around the edges, I welcome any input on how to make it better. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Load method help
Josh, Using .load() within the scope of $(document).ready() is redundant, since everything in that block is performed on page load anyway. Also (1) you can use the :checked selector, and (2) this.value will work just fine and saves the jquery call. Try this: $(document).ready(function() { $(input:radio:[EMAIL PROTECTED]).each(function() { if (this.value == private) { $(#pubbox).hide(); } else { $(#pubbox).show(); } }); }); Cheers, Chris ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery - Timed Tabs
Bruce schrieb: I'm incorporating the jquery tabs for a client on his site, and he's asking if the tabs could be timed to change. Like at 7pm tab2 shows, 2am tab3 shows, etc?? I know any tab can be set to show by default, so it seems timer is possible? if someone can point me in the right sirection much appreciated. Bruce Prochnau BKDesign Solutions Bruce, should that depend on the users time or simply on the servers time? In the latter case it's more of a backend problem, you'have to create the tabs initialization JavaScript code dynamically by PHP or Ruby or whatever... -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Load method help
Thanks Chris, perfect, that works great. Curious about the each method, why is that necessary, if there will always only be one checked radio button with the name caltype? Is that because there has to be some method to operate on the element? Pardon my noobness... - Original Message - From: Chris Domigan To: jQuery Discussion. Sent: Thursday, March 01, 2007 9:52 AM Subject: Re: [jQuery] Load method help Josh, Using .load() within the scope of $(document).ready() is redundant, since everything in that block is performed on page load anyway. Also (1) you can use the :checked selector, and (2) this.value will work just fine and saves the jquery call. Try this: $(document).ready(function() { $(input:radio:[EMAIL PROTECTED]).each(function() { if (this.value == private) { $(#pubbox).hide(); } else { $(#pubbox).show(); } }); }); Cheers, Chris -- ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Load method help
Chris Domigan schrieb: Josh, Using .load() within the scope of $(document).ready() is redundant, since everything in that block is performed on page load anyway. Also (1) you can use the :checked selector, and (2) this.value will work just fine and saves the jquery call. I'd like to add, that the load method is a little ambiguos. If you call it on a selection of elements, like: $('#output').load('/ajax.php'); it will load content from the given URL, and replace the contents of the matched elements with the response from that XmlHttpRequest request. A form element does not have a load event, thus you cannot bind that event to it. If you use load with the global window object on the other hand $(window).load(function() { // do something on load }); you will attach an event handler that gets executed when the page has been completely loaded, e.g. with all images etc. To avoid confusion I use $(window).bind('load', function() { / do something on load }); But usually you don't need that and use the DOMContentLoaded event to start acting on page elements. It gets fired earlier than the load event. This is done with the well known $(document).ready or its shortcut $(function() { // do something }); -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Load method help
$() effectively returns an pseudo-array of the elements that match the specified query. The .each() method applies a function to each element in that array. In your case the query matches only one element in the DOM, so there is only one element in the array, and .each() will be performed once. Chris ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery 1.1.2
Expandos are not proprietary to Microsoft. They are custom attributes. For instance: var oDiv = document.getElementById('myDiv'); oDiv.collapsible = true; // safe expando var oSpan = document.getElementById('mySpan'); oDiv.relatedSpan = oSpan; // potentially dangerous expando oDiv.relatedSpanId = oSpan.id; // safe expando Please correct me if I'm understanding this the wrong way. Strings are safe. Object references are not. I haven't had time to read the MSDN article from the previous reply, but I'm pretty sure this is what they're talking about. Brian. On 3/1/07, Chris Ovenden [EMAIL PROTECTED] wrote: I'm confused. Are these expandos proprietory Microsoft attributes with a specific meaning, or can it also apply to a non-standard attribute that I may invent for a particular purpose (eg all collapsible elements on a page might have a custom attribute collapsible=true)? If it's the latter, I don't see how such attributes can reference anything at all, at least as far as the DOM model is concerned. They're just strings. Personally I avoid this kind of extra attribute; class is a pretty good catch-all for most needs of this kind. I know you can make them valid HTML by extending the DTD, but that seems like a lot of extra work for not much gain. Chris On 3/1/07, Karl Rudd [EMAIL PROTECTED] wrote: I believe so. As I said an expando attribute is basically any non-standard attribute that gets added to an element (doesn't matter how). As Klaus notes, the memory leakage is only a problem in IE when the attribute references other DOM elements (directly, or indirectly via closures). Karl Rudd On 3/1/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: so any non standard attribute accessed simple as object.hello is an expando? no matter if you call getAttribute or not?? On 2/28/07, Karl Rudd [EMAIL PROTECTED] wrote: Err no, actually expandos refers to non-standard attributes that get added to DOM elements. They expand the attributes that are available on an element. For instance adding an expando attribute called hello: input type=submit value=blah hello=Hello world! Because they're non-standard they can cause memory leak problems under Internet Explorer if they refer to other DOM elements. More info here: http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/expando.asp Karl Rudd On 3/1/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: Fil, did you ever get a definition of DOM 0 expandos... they're the shortcuts that were provided with dom level 0, that are short cuts for certain html(only) attributes, and collections of dom nodes. like a.href is an 'expando' whereas a. a.getAttribute('href') is not. and document.forms is an expando whereas a.getElementsbyTagname('form') is not. I'm pretty sure thats what it means! bonne chance! On 2/28/07, Fil [EMAIL PROTECTED] wrote: * Changed: Events are now internally stored in elem.$events rather than elem.events (due to a nasty bug relating to DOM 0 expandos). I'm translating this blog into French, but I can't figure how to translate this sentence. DOM 0 expandos ? Anyway this is available at http://www.jquery.info/spip.php?article42 -- Fil ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Chris Ovenden http://thepeer.blogspot.com Imagine all the people / Sharing all the world ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery 1.1.2
Please correct me if I'm understanding this the wrong way. Strings are safe. Object references are not. That's correct. It's safe to store primitives in an expando because the aren't reference counted for garbage collection. But objects are trouble. An IE memory leak pattern is as simple as this: var o = document.getElementById('A'); document.getElementById('A').myprop = o; Jack Slocum has a good blog entry on avoiding memory leaks: http://www.jackslocum.com/blog/2006/10/02/3-easy-steps-to-avoid-javascript-memory-leaks/ Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jqModal r7 release!
David Duymelinck wrote: It's aready r9 but the plugin stays the same :) I've been working on some IE6 fixes.. just haven't notified the list yet :) I finally got around to use the plugin but i had a problem with the (function($){})(jQuery); code, in firebug i got the error: is not a function. When i replaced the internal $ with jQuery the plugin works like it should. The way i use javascript is to combine the plugins and the actual code for the site in one javascript file. Are you compressing (JS compressor, not gzip output) the combined javascript output? I've played with similar techniques, and found compressors and the capsulated function don't play well. ~ Brice ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Path problem with Imagebox
Hi Andrea The code causes a Parse error: syntax error, unexpected '' in /home/janet/public_html/mambots/content/mosthickbox.php on line 32 no matter where I out it in the file, Janet -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Andrea Ercolino Sent: Thursday, March 01, 2007 12:32 PM To: discuss@jquery.com Subject: Re: [jQuery] Path problem with Imagebox I don't know... are you sure you replaced the square brackets? Janet Weber wrote: Hi Andrea I tried that, but I get an error message when I modify the index.php of the plugin. It says there is a T_string error in the script type=text/javascript line. Janet -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Andrea Ercolino Sent: Thursday, March 01, 2007 12:10 PM To: discuss@jquery.com Subject: Re: [jQuery] Path problem with Imagebox Sorry, disregard my previous message. Here is what you need: script type=text/javascript $(document).ready( function() { $.ImageBox.init( { loaderSRC: 'images/imagebox/loading.gif', closeHTML: '[img src=images/imagebox/close.jpg /]' } ); } ); /script This snippet appears inside the imagebox example. You sholud put it also inside your page, with the two paths properly configured. Maybe you need to use different relative paths. You could try by using an absolute path at first, to see that it works, and then try to deg a relative path from there. Also please note that I had to use a trick in the snippet above for posting it here: I replaced the angle brackets in closeHTML with square ones, just put them back in :-) or copy that snippet from http://interface.eyecon.ro/demos/imagebox.html --Andrea Janet Weber wrote: Hi I use Joomla and it is installed in the root of my website. hence I don't use a \Joomla directory. I can't get ImageBox the work right in this configuration. When the box opens it doesn't display the loading graphic and when the box is open is doesn't display the close button at all. I have install the same plug-in in my test system where Joomla is install in the /joomla directory and imagebox works fine. How do I fix this problem? Thank you Janet Weber ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Path-problem-with-Imagebox-tf3328033.html#a9253797 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Path-problem-with-Imagebox-tf3328033.html#a9254297 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] FF flicker with toggle
I'm getting a flicker in FF2 mac... almost like Firefox is performing toggle twice on this page: http://www.monkeypuzzle.net/testfiles/jquery/slidepanel/index3_alt.html click on the vertical gray bar to toggle the left panel open and closed It's seems to be smooth in Safari IE... I thought the FFflickers were fixed in the latest release? I could swear it wasn't there this morning, so it might have been something I ate... thanks! -- View this message in context: http://www.nabble.com/FF-flicker-with-toggle-tf3330791.html#a9261509 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] IE Inconsistency - $.clone != clone
I've set up a simple test page demonstrating an Internet Explorer inconsistency with $.clone() -- I believe this is already known about, although have tried the latest in SVN it does not appear fixed. In short, under Internet Explorer, the scope of clones is the cloned element (donor), not the clone. Further, events attached to a clone are instantly fired, and events attached to the donor remain attached to the clone. See; http://dev.iceburg.net/jquery/cloneTest.html ~ Brice ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] :first selector perofmance question
John Resig wrote: Unfortunately, not in any way that is universally practical. The div:first query is obviously improvable, but when you get into queries like [EMAIL PROTECTED] it becomes a lot less clear. I'll think about improving TAG:first/last - as that seems like a common case, at least. I see what you're saying. It is too bad there is no native DOM selector that supports an SQL like clause with LIMIT, ORDER BY, and of course compundable attribute LIKE support :) .. what would we need jQuery for then though? ;( ~ Brice ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE Inconsistency - $.clone != clone
Brice - You should file a bug concerning this (or re-open the one that was closed before): http://dev.jquery.com/ticket/921 And re-post this to the dev list. I suspect that we may have only fixed on particular case concerning this event/cloning bug. --John On 3/1/07, Brice Burgess [EMAIL PROTECTED] wrote: I've set up a simple test page demonstrating an Internet Explorer inconsistency with $.clone() -- I believe this is already known about, although have tried the latest in SVN it does not appear fixed. In short, under Internet Explorer, the scope of clones is the cloned element (donor), not the clone. Further, events attached to a clone are instantly fired, and events attached to the donor remain attached to the clone. See; http://dev.iceburg.net/jquery/cloneTest.html ~ Brice ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] :first selector perofmance question
Brice Burgess wrote: what would we need jQuery for then though? ;( Apologies to anyone offended by this. Besides the most excellent selectors, the real power of jQ lays in its extendibility, traversal/manipulation routines, animation stack, and ease of ajax! In my opinion at least ;) ~ Brice ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Path problem with Imagebox
Janet, I am just jumping in here, but those errors you are getting are php errors. So, if you need to add the javascript code to the page, you need to make sure you put it outside of the php tags. ?php ? script /script -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Path problem with Imagebox
Hi Benjamin You where right about the php. All that I added to the file to fix the problem was to add ? and ?php between the style and mainframe tags: /style\n; ? ?php $mainframe-addCustomHeadTag($html); It works.Knock on wood Janet -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Benjamin Sterling Sent: Thursday, March 01, 2007 7:57 PM To: jQuery Discussion. Subject: Re: [jQuery] Path problem with Imagebox Janet, I am just jumping in here, but those errors you are getting are php errors. So, if you need to add the javascript code to the page, you need to make sure you put it outside of the php tags. ?php ? script /script -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Enhancements to Imagebox
Hi, I've done some enhancements to Imagebox that may be of general interest. Added: + a stop() function that undo what init() does. + a closeHook option that is called when Imagebox is closed. + a nextImage2 and prevImage2 element that are placed to the left of closeHTML I'm not sure what the process is when contributing code but the code can be found here (for a while): http://noneg.tornkvist.org:8080/js/imagebox.js It is based on what I checked out from svn some hours ago. For an example of the new functionality, see: http://noneg.tornkvist.org:8080/search.yaws?adonly=falseaction=keywordkey=barcelona Click on the link named: Bildspel at the top. Cheers, Tobbe ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] metadata by means of metaobjects
I'm curious to hear other people's thoughts on this approach. If it's a sound idea, why isn't it part of the official metadata plugin? --Erik On 3/1/07, Andrea Ercolino [EMAIL PROTECTED] wrote: I was wondering if anyone is using my http://www.mondotondo.com/aercolino/noteslog/?page_id=105 Metaobjects plugin as a replacement for the metadata plugin. It's now at version 1.2 and I'm really proud of this simple tool. The best features of Metaobjects are: -- valid XHTML mark-up -- auto clean up by default -- attach data to properties of dom elements directly -- add any writable property or a brand new one -- each value is evaluated and then the result is assigned -- data can be any javascript expression: function declarations and calls too -- each metaobject can be further customized by a metaparam -- target is metaobject's parent by default, but can be changed to any jquery selector (sort of one metaobject to rule them all ;-) -- default behavior is customizable -- user decides what metaobjects are processed and when to do it -- View this message in context: http://www.nabble.com/metadata-by-means-of-metaobjects-tf3327825.html#a9252509 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] metadata by means of metaobjects
I read thru the site and I must admit that I not exactly sure of the benefit. Are there real work examples? Can you explain the benefits? Thanks, -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery toXML
Another option for xml-compliant interlanguage data exchange is WDDX, which can be found at http://www.openwddx.org. Just download the SDK which contains prebuilt objects/code/functions in addition to substantial documentation for serializing and deserializing to and from most languages that are in use today. Personally I like JSON because it's more compact, but that's just me ;) Mark Gibson-8 wrote: Jason Karns wrote: I saw your toXML plugin and the thread where you were discussing its creation. I've run into a situation where I need to serialize the page to XML. However, the majority of the page is form elements and I need the actual values of these elements serialized, and not the original HTML source. Do you have any suggestions on where I might find a solution for this? Have you tried the Forms plugin: http://www.malsup.com/jquery/form/ Although it doesn't serialize to XML. If you want your form values as XML, you'd have to decided on a meaningful schema for the XML, and probably have to build up a document fragment manually from form values and then use toXML to serialize it. If returning the data as XML is really that important then it's probably worth looking in to XForms instead. FormFaces is a pure javascript XForms implementation: http://www.formfaces.com/ - Mark. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Re%3A-jQuery-toXML-tf3326257.html#a9263850 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] metadata by means of metaobjects
The problem is that it's a fundamentally different way of dealing with Metadata. Metaobjects is much more pro-active, whereas the Metadata plugin is passive in nature. That's not a bad thing, it's just different. For example, with the Metaobjects plugin you can setup rules to have data bound to certain selectors, whereas in the Metadata plugin you can only attach JSON-formatted data to individual elements. And just to reply to one point on the Metaobjects site: The 'element content' method is easily used with a SCRIPT element, because its content stays automatically hidden, but it can clash with your regular scripts. That is incorrect. You're supposed to use a script tag with a type of application/json - the official mimetype for JSON data. Browsers ignore script tags that completely, it is not executed in any way. It is true that the element is not cleaned up after itself, but that should be remedied - and it's an easy fix. The object/param style syntax could be included straight into the Metadata plugin, but I wouldn't want to undermine how the Metaobjects plugin works (while, at the same time, not providing the exact capabilities of the Metaobject plugin). With that being said - it's up to Andrea, while Metaobjects certainly won't replace the Metadata plugin, they could certainly be merged - it would simply require a little more work, but it may be worth it. It should also be noted that the Metaobjects plugin is, fundamentally, faster than the Metadata plugin as it can quickly search through a DOM structure for a specific pattern, rather than trying to load the information on the fly. (Granted this technique could be introduced into the Metadata plugin for the 'elem' style of Metadata, but I'd hate to duplicate efforts in this matter.) --John On 3/1/07, Erik Beeson [EMAIL PROTECTED] wrote: I'm curious to hear other people's thoughts on this approach. If it's a sound idea, why isn't it part of the official metadata plugin? --Erik On 3/1/07, Andrea Ercolino [EMAIL PROTECTED] wrote: I was wondering if anyone is using my http://www.mondotondo.com/aercolino/noteslog/?page_id=105 Metaobjects plugin as a replacement for the metadata plugin. It's now at version 1.2 and I'm really proud of this simple tool. The best features of Metaobjects are: -- valid XHTML mark-up -- auto clean up by default -- attach data to properties of dom elements directly -- add any writable property or a brand new one -- each value is evaluated and then the result is assigned -- data can be any javascript expression: function declarations and calls too -- each metaobject can be further customized by a metaparam -- target is metaobject's parent by default, but can be changed to any jquery selector (sort of one metaobject to rule them all ;-) -- default behavior is customizable -- user decides what metaobjects are processed and when to do it -- View this message in context: http://www.nabble.com/metadata-by-means-of-metaobjects-tf3327825.html#a9252509 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Accordion Menu setting
Hi everybody, Ive been testing the accordion menu (http://docs.jquery.com/Tutorials:Accordion_Menu_%28Screencast%29) I try several things on the code but didnt work. The accordion menu, by default, on click slide and show the items, but if I click again on the same item, the menu doesnt hide. I want to know if its possible to make the menu on click-shows and if I click the same item then the menu slides and close again. thanks for your help Sent via the WebMail system at tripven.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jqModal r7 release!
Brice Burgess schreef: Are you compressing (JS compressor, not gzip output) the combined javascript output? I've played with similar techniques, and found compressors and the capsulated function don't play well. No i didn't use any compression method but i do use it in an asp.net page maybe that is the problem? I haven't figured out yet how to avoid default asp.net javascript behavior. -- David Duymelinck [EMAIL PROTECTED] ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/