Re: [jQuery] the pitfalls of jquery
Wow. The best description of jQuery. Ever. :two thumbs up: Benjamin Sterling wrote: Javascript isn't bad it's jquery that is bad. I've seen whole cities go under because of it. First it's just a few kids experimenting, trying to have a good time. No harm right? Well, they get other kids involved, and those kids get other kids, before you know it, the parks are filled with kids doing it. Then you see the older ones seeing the kids having all this fun and wham, they try to put a stop to it. Now you get people trying to do it on the down-low and in alley ways, hiding in the shadows. And you say, I can stop any time I want and you do... for a little bit... then you wife walks in on you, the arguments start. Next thing you know, your living in an abandoned house willing to do anything for it. Breaking into other peoples house just to use their computer so you can feed your need. And you think this is only happening to me. Then you open your eyes and you see a whole community doing it -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Select in frames
Dear devs, I have a short question. Is there a jquery shortcut for the following js code: document.getElementById('myframe').contentWindow.document.getElementById('myframe').submit(); I am trying to programmatically submit a form in an iframe. thanks in advance, George. -- http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Test
Daemach schrieb: Disregard this, please. $('*').not(this).read(); -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] I need ge simple demo for $.ajax and events function
If you just want to do a simple page load, you could just do: $('#btn2').mouseup(function(){ $(#xml).load(time1.asp); }; input type=button id=btn2 value=Just a test / Or your version: $('#btn2').mouseup(function(){ $(#xml).ajax({ url: time1.asp, async: false }).responseText; }; input type=button id=btn2 value=Just a test / Ducular chen wrote: just like the title,my test: function ajax1() { var html = $.ajax({ url: time1.asp, async: false }).responseText; $(#xml).html(html); } always throw a error! input type=button id=btn2 onclick=ajax1() value=Just a test / and anybody could give me same good website for jquery study??Thx! -- View this message in context: http://www.nabble.com/I-need-ge-simple-demo-for-%24.ajax-and-events-function-tf3412878.html#a9510216 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] bug caught when retrieving data
if encountered a weird bug it spilled out this error message... [Exception... Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open] nsresult: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) location: JS frame :: javascript: eval(__firebugTemp__); :: anonymous :: line 1 data: no] this is where the error seems to occur, I can't seem to get a better detail on what. showEtapes = function(){ $(div#cptEtapes).show(); $.post(request.aspx,{show:cpt1},function(html){ //[Exception... Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open] nsresult: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) location: JS frame :: javascript: eval(__firebugTemp__); :: anonymous :: line 1 data: no] $(div#cptEtapes).append(html); }); } does anibody knows what this error could be? greets, Michel ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] bug caught when retrieving data
- Original Message - From: Michel Brouckaert if encountered a weird bug it spilled out this error message... [Exception... Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open] nsresult: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) location: JS frame :: javascript: eval(__firebugTemp__); :: anonymous :: line 1 data: no] this is where the error seems to occur, I can't seem to get a better detail on what. showEtapes = function(){ $(div#cptEtapes).show(); $.post(request.aspx,{show:cpt1},function(html){ //[Exception... Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open] nsresult: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) location: JS frame :: javascript: eval(__firebugTemp__); :: anonymous :: line 1 data: no] $(div#cptEtapes).append(html); }); } does anibody knows what this error could be? greets, Michel -- I am only new here so I may be wrong but it seems that the client is trying to resolve request.aspx to an IP via NS/DNS lookup. In other words treating request.aspx as a domain name. Try /request.aspx OR http://mydomain.com/request.aspx ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] bug caught when retrieving data
thx for the help but still doesn't work..same error as before.. [Exception... Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open] nsresult: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) location: JS frame :: javascript: eval(__firebugTemp__); :: anonymous :: line 1 data: no] I tried adding the url to the javascript just now, to see if it changes anything but it seems to get stuck on the same line as before... 2007/3/16, Rob M [EMAIL PROTECTED]: - Original Message - From: Michel Brouckaert if encountered a weird bug it spilled out this error message... [Exception... Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open] nsresult: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) location: JS frame :: javascript: eval(__firebugTemp__); :: anonymous :: line 1 data: no] this is where the error seems to occur, I can't seem to get a better detail on what. showEtapes = function(){ $(div#cptEtapes).show(); $.post(request.aspx,{show:cpt1},function(html){ //[Exception... Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open] nsresult: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) location: JS frame :: javascript: eval(__firebugTemp__); :: anonymous :: line 1 data: no] $(div#cptEtapes).append(html); }); } does anibody knows what this error could be? greets, Michel -- I am only new here so I may be wrong but it seems that the client is trying to resolve request.aspx to an IP via NS/DNS lookup. In other words treating request.aspx as a domain name. Try /request.aspx OR http://mydomain.com/request.aspx ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] blending effect?
Torbjorn Tornkvist wrote: Joel Birch wrote: On 15/03/2007, at 7:54 PM, Hrvoje Blažeković wrote: Simple to use, I have used it on some small sites (st-georg.hr - the home page, www.podravka.com/visebojac/ - the header images) Hrvoje On 15 ožu, 2007, at 9:47, Torbjorn Tornkvist wrote: Hrvoje Blažeković wrote: Hi, for a simple slide show try this: http://www.gizone.co.uk/web-design/jquery-plugins/simple-jquery- slideshow/ Another good plugin for this is innerFade: http://medienfreunde.com/lab/innerfade/ And another *might* just be released soon (this weekend maybe) by myself. Nice! Looking forward to it. What I want to achive is to have a list of thumbnails at the side of a larger area were one image/photo is shown at a time. A click on a thumbnail should cause the new image to replace the old one in a smooth blending effect. I will try and see if I can cook up something based on the existing examples. Cheers, Tobbe JFTR: Here is some code that solved my problem. It also handles a caption, shown below the large image. --- var last = null; var current = null; // Display a large photo. function display_large(src, cap) { var large = 'img src=' + src + ' width=450 /'; if (current != null) { last = current; $(last).css({zIndex : 0}).fadeOut(slow); $(#caption).fadeOut(slow); } current = $(large); var opts = {display : none, zIndex : 1, position : absolute}; $(current).appendTo(#large).css(opts).fadeIn(slow, function() { if (last != null) { $(last).remove(); } $(#caption).html(cap).fadeIn(slow); }); } // Display the first thumbnail as a large photo. $(function() { var src = $(.thumb img:first).attr(src); var cap = $(.thumb a:first).attr(title); display_large(src, cap); }) // Setup a click event handler for the thumbnails $(function() { $(.thumb a).click(function() { var src = $(img:first, this).attr(src); var cap = $(this).attr(title); display_large(src, cap); }); }) --- Cheers, Tobbe ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] loading content into a div (IE7 problems)
greetings, I have a div div id=MyContent/div if i use $(#MyContent).load('content.html') then it works very fine in all good browsers, but for IE7 i get a)if div is empty - IE gives popup window Permission denied b)if there is content in the div, IE seems to keep trying to load the new content forever. What could be the problem? Thanks a lot in advance. :-) ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Ok... one last effort to make this work... help!
On 15/03/07, Rick Faircloth [EMAIL PROTECTED] wrote: Well, Daemach...seems I've got things working well with my jQuery client side data-handling and CF server side validation. My next step is to submit the form data and process it via CF and return the result. I've got the jQ code and CF for that for the most part. Here's my jQ Mortgage Calculation code: function CalculateMortgage(){ var Params = {}; $(input:text).each(function(){ Params[$(this).attr(name)] = $(this).val(); }); $.post(Mortgage_Calculation.cfm, Params, function(data){ $(#Result).empty().append(data); } ); } This should still work fine, but I need to know how I can notify CF that it's time to process all the data, not validate it. What can I use for that? Typically, I would put together some CF code that said If form.principal is defined, then validate the code. If there are no errors, then process the code and calculate the result. However in this case, the form.principal is being sent everytime there's on onblur event, so that won't work. I can't rely on a submit button value for triggering the calculation, since if someone hits the enter key instead of click the submit button, the submit button value won't be present. I may be over-complicating this...got any clues? Thanks, Rick You could intercept it when enter is pressed: $(input:text).bind(keypress,function(e) { var key = e.keyCode || e.charCode; if(key == 13) { CalculateMortgage(); } } ) ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Select in frames
On Mar 16, 2007, at 3:23 AM, George Moschovitis wrote: Dear devs, I have a short question. Is there a jquery shortcut for the following js code: document.getElementById ('myframe').contentWindow.document.getElementById('myframe').submit(); I am trying to programmatically submit a form in an iframe. thanks in advance, George. Hi George, That is a very timely question! Witness the following thread just posted to the dev list: On Mar 15, 2007, at 12:25 PM, John Resig wrote: That resulting patch is great. It only seems to add about 1 line of code (which is just perfect). I'll try and do some testing on it tonight, and get it merged in. Great work! --John On 3/15/07, Volker Mische [EMAIL PROTECTED] wrote: Hi, adding nodes to iframes in Internet Explorer doesn't work at the moment, as the container for the dom tree gets generated with document.doc.createElement(div). Internet Explorer has security restrictions that new nodes need to be generated in the same context as the iframe. This would mean something like: document.iframe.contentWindow.document.createElement(div). To fix this issue clean() gets a second argument, which passes document object of the current context. I attached a JavaScript file which can be included after jquery-1.1.2.js so you can test it. A patch is attached at http://dev.jquery.com/ ticket/978. Cu, Volker. So, it looks like this feature is imminent. Unless, of course, I've misunderstood your question, which is entirely possible. Cheers, --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] [!jQ] - But need help: Object doesn't support this property or method
This was driving me crazy all day yesterday, and I'm sick and tired of it today. IE problem only, naturally. I'm loading an external source (which I have control over) into an object tag. I need to set the height of the object to the content of the source. Plays nicely in everything but IE (tried 6/7), where it throws the Object doesn't support this property or method error and freezes up. The problem lies in this script, which is in the external source (tried some different things, but can't get anything to work): script type=text/javascript defer=defer !-- if (window.addEventListener) { // W3C window.addEventListener(load, setHeight, false); } else if (window.attachEvent) {// Exploder window.attachEvent(onload, setHeight); } else { // Old skool window.onload = function() {setHeight();} } function setHeight(){ var sH = (document.body.scrollHeight); //var p = parent.document.getElementById(obj); //p.style.height = sH+20; parent.setObjHeight(sH+20); // HERE } -- /script setObjHeight() is in an external js loaded into the parent (along with jQuery): function setObjHeight(h){ $('#obj').height(h); } I'm desperately trying to avoid an iframe solution, but I'm about to give up. Adam -- View this message in context: http://www.nabble.com/-%21jQBut-need-help%3A-%22Object-doesn%27t-support-this-property-or-method%22-tf3413795.html#a9512238 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] blending effect?
Thanks for the code, i have some ideas where i migth use it :) Hrvoje On 16 ožu, 2007, at 9:58, Torbjorn Tornkvist wrote: Torbjorn Tornkvist wrote: Joel Birch wrote: On 15/03/2007, at 7:54 PM, Hrvoje Blažeković wrote: Simple to use, I have used it on some small sites (st-georg.hr - the home page, www.podravka.com/visebojac/ - the header images) Hrvoje On 15 ožu, 2007, at 9:47, Torbjorn Tornkvist wrote: Hrvoje Blažeković wrote: Hi, for a simple slide show try this: http://www.gizone.co.uk/web-design/jquery-plugins/simple-jquery- slideshow/ Another good plugin for this is innerFade: http://medienfreunde.com/lab/innerfade/ And another *might* just be released soon (this weekend maybe) by myself. Nice! Looking forward to it. What I want to achive is to have a list of thumbnails at the side of a larger area were one image/photo is shown at a time. A click on a thumbnail should cause the new image to replace the old one in a smooth blending effect. I will try and see if I can cook up something based on the existing examples. Cheers, Tobbe JFTR: Here is some code that solved my problem. It also handles a caption, shown below the large image. --- var last = null; var current = null; // Display a large photo. function display_large(src, cap) { var large = 'img src=' + src + ' width=450 /'; if (current != null) { last = current; $(last).css({zIndex : 0}).fadeOut(slow); $(#caption).fadeOut(slow); } current = $(large); var opts = {display : none, zIndex : 1, position : absolute}; $(current).appendTo(#large).css(opts).fadeIn(slow, function() { if (last != null) { $(last).remove(); } $(#caption).html(cap).fadeIn(slow); }); } // Display the first thumbnail as a large photo. $(function() { var src = $(.thumb img:first).attr(src); var cap = $(.thumb a:first).attr(title); display_large(src, cap); }) // Setup a click event handler for the thumbnails $(function() { $(.thumb a).click(function() { var src = $(img:first, this).attr(src); var cap = $(this).attr(title); display_large(src, cap); }); }) --- Cheers, Tobbe ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ Hrvoje Blažeković tel.: 048/220 418 fax.: 048/220 417 e-mail: [EMAIL PROTECTED] ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] [!jQ] - But need help: Object doesn't support this property or method
Actually, I just tried testing with a 'true' external source, and I'm getting a permission denied error in FF (my external source before was residing on the same domain): [Exception... 'Permission denied to get property Window.setObjHeight' when calling method: [nsIDOMEventListener::handleEvent] nsresult: 0x8057001e (NS_ERROR_XPC_JS_THREW_STRING) location: unknown data: no] Isn't there anyway for me to do this if I have control over the parent and the external source? Adam -- View this message in context: http://www.nabble.com/-%21jQBut-need-help%3A-%22Object-doesn%27t-support-this-property-or-method%22-tf3413795.html#a9512460 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Sortable - is 'containment' implemented? simple test case fails
I done a bit of digging around in the interface code, fix by the following: Line 253 of idrag.js, change from: {x:0,y:0}, to: jQuery.iUtil.getPosition(elm.parentNode), Mike Holloway wrote: Hi, I have exactly the same problem, have several dl lists and trying to order the dd's within, but contain each set to their respective dl's I have this JS: function serialize(s){ serial = $.SortSerialize(s); alert(serial.hash); }; $('dl').Sortable({ accept : 'pg', activeclass : 'a', hoverclass : 'h', helperclass : 'h', opacity:0.5, fit : false, containment: 'parent', axis: 'vertically', onchange: 'serialize' }); When I grab the dd, it shoots off to the top of the document and gets stuck. It's like it's not finding the correct x and y co-ords of the parent dl Also.. am I calling the onchange correctly? Doesn't seem to fire for me. tony rasmus wrote: Heya jquery folks, Has anyone implemented a .Sortable with the containment: 'parent' property? Even in a basic test case (below), I receive unexpected behavior when using this property: Most prominent is dragging the first item in a list yet unable to drop/sort it. If this helps, here is a fellow user who also experienced unexpected behavior with 'containment': http://jquery.com/pipermail/discuss_jquery.com/2006-November/016519.html Here is the simple test case: htmlhead !-- include jquery and interface js files -- script type=text/javascript $(document).ready(function () { $('ul#sortlist').Sortable( { accept : 'trigger', containment: 'parent' }); }); /script /head body ul id=sortlist class=sortable li id=item1 class=triggerAlas my love/li li id=item2 class=triggerye do me wrong/li li id=item3 class=triggerto cast me off/li li id=item4 class=triggerdiscourteously./li /ul /body/html -- View this message in context: http://www.nabble.com/Sortable---is-%27containment%27-implemented--simple-test-case-fails-tf2787726.html#a9512631 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Select in frames
On 16/03/07, George Moschovitis [EMAIL PROTECTED] wrote: Dear devs, I have a short question. Is there a jquery shortcut for the following js code: document.getElementById('myframe').contentWindow.document.getElementById('myframe').submit(); I am trying to programmatically submit a form in an iframe. thanks in advance, George. -- http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org Perhaps this may help: http://webdevel.blogspot.com/2007/03/iframes-and-jquery-working-with.html Although I think jQuery should be able to do this transparently. Also I found I had to wait until the iframe had loaded before I could work with it. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How to convert class to style='attrs ...'
Oops...too tired when I wrote that. Make it if ((new RegExp('[^ ,]'+selector+'[$ ,]').test(this.selectorText))) but I haven't tested that either Danny Wachsstock wrote: Brilliant minds think alike :) The RegExp allows for stylesheets that use a comma, like .classname , .otherclass {...} which my simple == wouldn't catch. On the other hand, yours would catch .classname childelement {...} which wouldn't be right. The quick and dirty answer is to make sure your stylesheets don't do that. The right answer would be to change the condition to if ('/[^ ,]'.selector.'[$ ,]/'.test(this.selectorText)) but I haven't tested that. Adding the checks for the appropriate media types is left as an exercise for the reader. thumblewend wrote: On 16/03/2007, at 10:01 AM, Danny Wachsstock wrote: function styleString(selector){ var style = ; $.each (document.styleSheets, function(){ $.each (this.cssRules || this.rules, function() { if (this.selectorText == selector) style += this.style.cssText + ';'; }); }); return style; } Haha, that's funny. I was just about to post my rewrite and the code is very similar to yours except yours is better due to the use of || instead of my ternary, plus I used a regexp as per the original which from your code looks like it's not needed. Mine's untested too. Here it is for giggles: $.getClassContent = function(classname) { var cssText = ''; $.each(document.styleSheets,function() { var cssRules = (typeof this.cssRules == 'array') ? this.cssRules : this.rules; $.each(cssRules,function() { if ('/\.'+classname+'/'.test(this.selectorText)){ cssText = this.style.cssText; } }); }); return cssText; }; Joel. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/How-to-convert-%22class%22-to-%22style%3D%27attrs-...%27%22-tf3409582.html#a9513147 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Possible BUG: One/Toggle inconsistant cross-browser
Hi all, I have made a test page to demonstrate this, but briefly: I am attaching a one('click',function(){}) to a button element and within that function I set the button to toggle between two other functions. IE toggles between the functions in the wrong order. Is this a bug? http://users.tpg.com.au/j_birch/toggleTest.html Thanks. Joel Birch. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Ok... one last effort to make this work... help!
Hi, Sam, and thanks for the reply and code... I tried using your code, but still nothing happens when I try to calculate the payment. It may be my implementation of the js or it still may be a problem in my ColdFusion code. Do I just stick your code in with my CalculateMortgage function as is, or does it need anything else added... or a different position in the code? Here's where it lies now: Thanks! Rick script type=text/javascript // Define CalculateMortgage in the global scope so that it is always accessible function CalculateMortgage(){ var Params = {}; $(input:text).each(function(){ Params[$(this).attr(name)] = $(this).val(); }); $.post(callpage_Validate_Mortgage_Inputs.cfm, Params, function(data){ $(#Result).empty().append(data); } ); } $(input:text).bind(keypress,function(e) { var key = e.keyCode || e.charCode; if(key == 13) {CalculateMortgage(); } } ) $(document).ready(function(){ $(#Principal).blur(function(){ $.post(callpage_Validate_Mortgage_Inputs.cfm, {principal:$(#Principal).val()}, function (data) {$(#Result_Principal).empty().append(data) } ) }); $(#Interest).blur(function(){ $.post(callpage_Validate_Mortgage_Inputs.cfm, {interest:$(#Interest).val()}, function (data) {$(#Result_Interest).empty().append(data) }) }); $(#Years).blur(function(){ $.post(callpage_Validate_Mortgage_Inputs.cfm,{years:$(#Years).val()}, function (data) {$(#Result_Years).empty().append(data) }) }); }); /script ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Ok... one last effort to make this work... help!
On 16/03/07, Rick Faircloth [EMAIL PROTECTED] wrote: Hi, Sam, and thanks for the reply and code... I tried using your code, but still nothing happens when I try to calculate the payment. It may be my implementation of the js or it still may be a problem in my ColdFusion code. Do I just stick your code in with my CalculateMortgage function as is, or does it need anything else added... or a different position in the code? Here's where it lies now: Thanks! Rick Probably best done within document.ready as otherwise you could get an endless loop. This doesn't fix any issues you may have with CalculateMortgage, it just calls CalculateMortgage whenever you press enter when in a text field. If you have Firefox and use Firebug, you could try adding console.log(Param) just before $.post and console.log(data) just before $(#Result) to see if there are any errors. script type=text/javascript // Define CalculateMortgage in the global scope so that it is always accessible function CalculateMortgage(){ var Params = {}; $(input:text).each(function(){ Params[$(this).attr(name)] = $(this).val(); }); $.post(callpage_Validate_Mortgage_Inputs.cfm, Params, function(data){ $(#Result).empty().append(data); } ); } $(input:text).bind(keypress,function(e) { var key = e.keyCode || e.charCode; if(key == 13) {CalculateMortgage(); } } ) $(document).ready(function(){ $(#Principal).blur(function(){ $.post(callpage_Validate_Mortgage_Inputs.cfm, {principal:$(#Principal).val()}, function (data) {$(#Result_Principal).empty().append(data) } ) }); $(#Interest).blur(function(){ $.post(callpage_Validate_Mortgage_Inputs.cfm, {interest:$(#Interest).val()}, function (data) {$(#Result_Interest).empty().append(data) }) }); $(#Years).blur(function(){ $.post(callpage_Validate_Mortgage_Inputs.cfm,{years:$(#Years).val()}, function (data) {$(#Result_Years).empty().append(data) }) }); }); /script ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Ok... one last effort to make this work... help!
Thanks, Sam... Rick -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sam Collett Sent: Friday, March 16, 2007 8:47 AM To: jQuery Discussion. Subject: Re: [jQuery] Ok... one last effort to make this work... help! Probably best done within document.ready as otherwise you could get an endless loop. This doesn't fix any issues you may have with CalculateMortgage, it just calls CalculateMortgage whenever you press enter when in a text field. If you have Firefox and use Firebug, you could try adding console.log(Param) just before $.post and console.log(data) just before $(#Result) to see if there are any errors. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] cursor not showing in modal boxes
Hey guys and gals, I am using jqModal and the cursor is not showing in the forms that I have loading in there. Any ideas? -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Event-AJAX wait before animation completes
Your second attempt looks the closest. I would try it like this: $('.ajax-div-slide').click(function() { var url = this.href; $('#ajax-loader').animate({height: 375}, 'slow', function(){ $('#ajax-div').load(url); }); return false; }); But I've got to ask... why do you want to delay an operation that already has inherent latency, just so that you can show an animation? Don't you want to show the ajax-loader *while* the ajax request is active? On 3/16/07, Yansky [EMAIL PROTECTED] wrote: How can I get an ajax request (that is triggered by a click event) wait for an animation to complete (which is also triggered by the same click event) before it runs the ajax request? e.g. this is what I'd like to do: $('.ajax-div-slide').click(function (){ $('#ajax-div').ajaxSend(function(){ $('#ajax-loader').animate({height: 375}, 2000); }); //only start the ajax once the animation has finished $('#ajax-div').load(this.href); return false; }); As well as the above example, I've also tried: $('.ajax-div-slide').click(function(){ var passClick = $(this) $('#ajax-loader').animate({height: 375}, 'slow', function(passClick){ $('#ajax-div').load(passClick.href); }); return false; }); ...and... $('.ajax-div-slide').click(function (){ $this($('#ajax-loader').animate({height: 375}, 2000, function(){ $('#ajax-div').load(this.href); }); ); return false; }); ...without any success. Anyone have any ideas as to how I can achieve this? Cheers. -- View this message in context: http://www.nabble.com/Event-%3EAJAX-wait-before-animation-completes-tf3412929.html#a9509661 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] loading content into a div (IE7 problems)
Can you give us a url to look at? What could be the problem? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] php - web service (ajax/jscript)
Bruce: I'm not sure I fully understand what you are trying to accomplish, but AJAX is not a replacement for SOAP/WSDL Web Services as it is strictly limited to communication within its own domain, which flies in the face of Web Services philosophy. Could you provide a more concise example of what you would like to do? - jake On 3/15/07, bruce [EMAIL PROTECTED] wrote: Hi I'm trying to find information with regards to how to create/implement a test web services app. I'm trying to find pointers to anyone who's actually created this kind of functionality, or pointers to web sites where I can find the information I'm looking for. For my test, App1 has the web service, and provides the jscript/ajax code to the 3rd Party, for use on the Test App. I'm trying to find php code for the apps on the web servers as well as test php code for the api on the Master Server. I'm also trying to get/find a test situation that provides test client code (jscript/ajax) to be implemented on the test server/app. Assume: Master Server3rd Party Server (separate domain) App1 Test App API File (aa.js) (from Master Server) JScript (aa.js) ---^ The aa.js file allows the 3rd party client site to be able to interface with the Master Server API via the API/services defined in the API File. I'm envisioning the following actions for the user 3rd Party Site Master Server -User Enters Name api checks/verifies name -gets response Master Server returns response -user answers question based on response, sends response to master server via api api checks user input -gets response Master Server returns response -jscript then gives reply/response to the 3rd Party site, allowing the site/app to continue processing In this case, the jscript/ajax app is really only communicating with the Master Server, which if I understand it correctly would be in the same domain as the ajax/jscript code. In other words, if the master server supplies the jscript file(s) for the jscript that's to be run on the 3rd party server, then any communication that's initiated from the jscript is going back to the master server. There shouldn't be a cross domain issue? Yes/No??? So, anyone who's actually implemented a real live web service, that's willing to talk to me would be helpful, or if you can point me to sample docs/code... Thanks -bruce ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Possible BUG: One/Toggle inconsistant cross-browser
Could you create a ticket for this - and attach the page that you mentioned? Thanks for the good test case. http://dev.jquery.com/ --John On 3/16/07, Joel Birch [EMAIL PROTECTED] wrote: Hi all, I have made a test page to demonstrate this, but briefly: I am attaching a one('click',function(){}) to a button element and within that function I set the button to toggle between two other functions. IE toggles between the functions in the wrong order. Is this a bug? http://users.tpg.com.au/j_birch/toggleTest.html Thanks. Joel Birch. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] RSS feed not updating
Thanks John, the nabble xml one worked (I use Nabble to read the boards, didn't know they had an atom feed). So the jQuery feed is dead to us, at least for now? :) -David John Resig wrote: You could try the Nabble one: http://www.nabble.com/JQuery-f15494.xml I'm trying to cut down on the number of automated scripts that need to run on the jQuery site. Hopefully it'll stay up for longer ;-) --John On 3/15/07, David Olinsky [EMAIL PROTECTED] wrote: Anybody else noticed that the RSS feed hasn't updated in at least a few days now? http://jquery.com/discuss/feed/ http://jquery.com/discuss/feed/ Somebody feed the meter! -- View this message in context: http://www.nabble.com/RSS-feed-not-updating-tf3412453.html#a9508208 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/RSS-feed-not-updating-tf3412453.html#a9515930 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Removing readonly attribute from textarea
All, What's the 'correct' way to change a textarea to and from readonly. The following works for me, but I wanted to particularly check the removal: $(#myTextArea).attr(readonly, readonly); // Make read-only $(#myTextArea).attr(readonly, ); // Make read-write Thanks, rob -- Rob Desbois Eml: [EMAIL PROTECTED] ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] RSS feed not updating
Yeah, the poor mailing list doesn't need anything else railing against it. I've updated the Discussion page to represent this change: http://docs.jquery.com/Discussion#RSS_Feed --John On 3/16/07, David Olinsky [EMAIL PROTECTED] wrote: Thanks John, the nabble xml one worked (I use Nabble to read the boards, didn't know they had an atom feed). So the jQuery feed is dead to us, at least for now? :) -David John Resig wrote: You could try the Nabble one: http://www.nabble.com/JQuery-f15494.xml I'm trying to cut down on the number of automated scripts that need to run on the jQuery site. Hopefully it'll stay up for longer ;-) --John On 3/15/07, David Olinsky [EMAIL PROTECTED] wrote: Anybody else noticed that the RSS feed hasn't updated in at least a few days now? http://jquery.com/discuss/feed/ http://jquery.com/discuss/feed/ Somebody feed the meter! -- View this message in context: http://www.nabble.com/RSS-feed-not-updating-tf3412453.html#a9508208 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/RSS-feed-not-updating-tf3412453.html#a9515930 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] php - web service (ajax/jscript)
Hi Jake. Thanks for the reply. I'll try to clarify. (Keep in mind, I'm not an experienced web developer!) As I understand Ajax, it's used to allow asynch interaction between client, and hosted site that the client js file is fetched from. In other words, if the client html/php has something to the effect: html script src = 'http://www.homeserver.com/test.js' /html Even though the client html/php might be on the 'foo' site (www.foo.com/test.html), the test.js functionality is being served from the 'homeserver.com' domain, and can therefore interface/communicate with the 'homeserver'. This is what I want to accomplish, as it allows me to create test servers/apps, and they can each communicate via the test api/web service (on homeserver.com) with the homeserver web service. so i'm trying to get my hands around how to create/implement a test app to demonstrate this. A rough overview is: Assume: Master Server3rd Party Server (separate domain) App1 Test App API File (aa.js) (from Master Server) JScript (aa.js) ---^ The aa.js file allows the 3rd party client site to be able to interface with the Master Server API via the API/services defined in the API File. I'm envisioning the following actions for the user 3rd Party Site Master Server -User Enters Name api checks/verifies name -gets response Master Server returns response -user answers question based on response, sends response to master server via api api checks user input -gets response Master Server returns response -jscript then gives reply/response to the 3rd Party site, allowing the site/app to continue processing In this case, the jscript/ajax app is really only communicating with the Master Server, which if I understand it correctly would be in the same domain as the ajax/jscript code. In other words, if the master server supplies the jscript file(s) for the jscript that's to be run on the 3rd party server, then any communication that's initiated from the jscript is going back to the master server. There shouldn't be a cross domain issue? Yes/No??? So I'm trying to find docs/help/information (someone to talk to) so I can create a test app that accomplishes this kind of functionality. Thanks -Bruce -Original Message- From: Jake McGraw [mailto:[EMAIL PROTECTED] Sent: Friday, March 16, 2007 7:07 AM To: [EMAIL PROTECTED]; jQuery Discussion. Subject: Re: [jQuery] php - web service (ajax/jscript) Bruce: I'm not sure I fully understand what you are trying to accomplish, but AJAX is not a replacement for SOAP/WSDL Web Services as it is strictly limited to communication within its own domain, which flies in the face of Web Services philosophy. Could you provide a more concise example of what you would like to do? - jake On 3/15/07, bruce [EMAIL PROTECTED] wrote: Hi I'm trying to find information with regards to how to create/implement a test web services app. I'm trying to find pointers to anyone who's actually created this kind of functionality, or pointers to web sites where I can find the information I'm looking for. For my test, App1 has the web service, and provides the jscript/ajax code to the 3rd Party, for use on the Test App. I'm trying to find php code for the apps on the web servers as well as test php code for the api on the Master Server. I'm also trying to get/find a test situation that provides test client code (jscript/ajax) to be implemented on the test server/app. Assume: Master Server3rd Party Server (separate domain) App1 Test App API File (aa.js) (from Master Server) JScript (aa.js) ---^ The aa.js file allows the 3rd party client site to be able to interface with the Master Server API via the API/services defined in the API File. I'm envisioning the following actions for the user 3rd Party Site Master Server -User Enters Name api checks/verifies name -gets response Master Server returns response -user answers question based on response, sends response to master server via api api checks user input -gets response Master Server returns response -jscript then gives reply/response to the 3rd Party site, allowing the site/app to continue processing In this case, the jscript/ajax app is really only communicating with the Master Server, which if I understand it correctly would be in the same domain as the ajax/jscript code. In other words, if the master server supplies the jscript file(s) for the jscript
Re: [jQuery] jQuery Powered Sites - Keep the Links Coming
Another (just redesigned): * http://expressionengine.com/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Removing readonly attribute from textarea
Rob Desbois schrieb: All, What's the 'correct' way to change a textarea to and from readonly. The following works for me, but I wanted to particularly check the removal: $(#myTextArea).attr(readonly, readonly); // Make read-only $(#myTextArea).attr(readonly, ); // Make read-write Have you tried $(#myTextArea).attr(readonly, true/false);? Thanks, rob -- Rob Desbois Eml: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Jörn Zaefferer http://bassistance.de ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] php - web service (ajax/jscript)
Actually, thats a damn good point, I use Google Maps on some of my websites, and yet I gave that answer to you, perhaps they're using Iframes? Anyone have an answer for this, now you got me interested! - jake On 3/16/07, bruce [EMAIL PROTECTED] wrote: jake... if what you state is true. how does google/yahoo/flickr/etc... manage to allow 3rd party websites to access their hosted apis, which are resident on the hosted server of google/yahoo/etc -bruce -Original Message- *From:* Jake McGraw [mailto:[EMAIL PROTECTED] *Sent:* Friday, March 16, 2007 9:17 AM *To:* [EMAIL PROTECTED] *Subject:* Re: [jQuery] php - web service (ajax/jscript) Bruce, I believe, regardless of the website serving the Javascript file, AJAX will only interface with the server that actually served the entire document. What I suggest you do is provide clients with a PHP Script / HTML Template (Smarty is very good for this) with some AJAX Javascript. The PHP Script can contact your web service (you can use the PEAR SOAP/WSDL extensions or go for the full blown Tomcat/Apache config), serve whatever information you like back to the PHP Script and then back to the browser: Request Web Browser/AJAX -- (XML or JSON) -- Client Server/PHP/SOAP -- (XML) -- Your Server/(PHP or Tomcat) Return Your Server/(PHP or Tomcat) -- (XML) -- SOAP/PHP/Client Server -- (XML or JSON) -- AJAX/Web Browser So basically, your clients would need a web server that handles PHP and can make SOAP Requests, you would author the PHP/HTML template and release that as an api. This is probably the best way to go about things because it allows non-web browsers user access to your Web Service and it keeps with the whole concept of what web services should truly be. - jake On 3/16/07, bruce [EMAIL PROTECTED] wrote: Hi Jake. Thanks for the reply. I'll try to clarify. (Keep in mind, I'm not an experienced web developer!) As I understand Ajax, it's used to allow asynch interaction between client, and hosted site that the client js file is fetched from. In other words, if the client html/php has something to the effect: html script src = 'http://www.homeserver.com/test.js' http://www.homeserver.com/test.js%27 /html Even though the client html/php might be on the 'foo' site (www.foo.com/test.html), the test.js functionality is being served from the 'homeserver.com' domain, and can therefore interface/communicate with the 'homeserver'. This is what I want to accomplish, as it allows me to create test servers/apps, and they can each communicate via the test api/web service (on homeserver.com) with the homeserver web service. so i'm trying to get my hands around how to create/implement a test app to demonstrate this. A rough overview is: Assume: Master Server3rd Party Server (separate domain) App1 Test App API File (aa.js) (from Master Server) JScript (aa.js) ---^ The aa.js file allows the 3rd party client site to be able to interface with the Master Server API via the API/services defined in the API File. I'm envisioning the following actions for the user 3rd Party Site Master Server -User Enters Name api checks/verifies name -gets response Master Server returns response -user answers question based on response, sends response to master server via api api checks user input -gets response Master Server returns response -jscript then gives reply/response to the 3rd Party site, allowing the site/app to continue processing In this case, the jscript/ajax app is really only communicating with the Master Server, which if I understand it correctly would be in the same domain as the ajax/jscript code. In other words, if the master server supplies the jscript file(s) for the jscript that's to be run on the 3rd party server, then any communication that's initiated from the jscript is going back to the master server. There shouldn't be a cross domain issue? Yes/No??? So I'm trying to find docs/help/information (someone to talk to) so I can create a test app that accomplishes this kind of functionality. Thanks -Bruce -Original Message- From: Jake McGraw [mailto:[EMAIL PROTECTED] Sent: Friday, March 16, 2007 7:07 AM To: [EMAIL PROTECTED]; jQuery Discussion. Subject: Re: [jQuery] php - web service (ajax/jscript) Bruce: I'm not sure I fully understand what you are trying to accomplish, but AJAX is not a replacement for SOAP/WSDL Web Services as it is strictly limited to communication within its own domain, which flies in the face of Web Services philosophy. Could you provide a more concise example of what you would like to do? - jake On 3/15/07, bruce [EMAIL PROTECTED]
Re: [jQuery] php - web service (ajax/jscript)
jake... now i'm laughing here's how i understand it with a very limited amont of time to research this. the basic ajax/jscript allows for asynch communications between the server that serves the jscript file. cross-domain issues arise when you'd want the ajax/jscript to not only communicate with the 'hosted'/parent server, but also to another server's api as well, (with this server being in another domain). this is why in the html/php, you'll have the following kind of code: script src='http://www.google.com/api/maps/foo?' /script rest of the html page.. this effectively means that the '..maps/foo' is being served up from the google server, but it's running on your client app. this is also why you can have mashup functions, where your app is using the apis of multiple systems/servers... you're using separate apis, which are being served from separate servers. so. now that i've clarified it a little, how about you telling me how good you are with jscript! i have a jscript issue that i'm trying to solve!! thanks -bruce -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Jake McGraw Sent: Friday, March 16, 2007 9:48 AM To: jQuery Discussion. Subject: Re: [jQuery] php - web service (ajax/jscript) Actually, thats a damn good point, I use Google Maps on some of my websites, and yet I gave that answer to you, perhaps they're using Iframes? Anyone have an answer for this, now you got me interested! - jake On 3/16/07, bruce [EMAIL PROTECTED] wrote: jake... if what you state is true. how does google/yahoo/flickr/etc... manage to allow 3rd party websites to access their hosted apis, which are resident on the hosted server of google/yahoo/etc -bruce -Original Message- From: Jake McGraw [mailto:[EMAIL PROTECTED] Sent: Friday, March 16, 2007 9:17 AM To: [EMAIL PROTECTED] Subject: Re: [jQuery] php - web service (ajax/jscript) Bruce, I believe, regardless of the website serving the Javascript file, AJAX will only interface with the server that actually served the entire document. What I suggest you do is provide clients with a PHP Script / HTML Template (Smarty is very good for this) with some AJAX Javascript. The PHP Script can contact your web service (you can use the PEAR SOAP/WSDL extensions or go for the full blown Tomcat/Apache config), serve whatever information you like back to the PHP Script and then back to the browser: Request Web Browser/AJAX -- (XML or JSON) -- Client Server/PHP/SOAP -- (XML) -- Your Server/(PHP or Tomcat) Return Your Server/(PHP or Tomcat) -- (XML) -- SOAP/PHP/Client Server -- (XML or JSON) -- AJAX/Web Browser So basically, your clients would need a web server that handles PHP and can make SOAP Requests, you would author the PHP/HTML template and release that as an api. This is probably the best way to go about things because it allows non-web browsers user access to your Web Service and it keeps with the whole concept of what web services should truly be. - jake On 3/16/07, bruce [EMAIL PROTECTED] wrote: Hi Jake. Thanks for the reply. I'll try to clarify. (Keep in mind, I'm not an experienced web developer!) As I understand Ajax, it's used to allow asynch interaction between client, and hosted site that the client js file is fetched from. In other words, if the client html/php has something to the effect: html script src = 'http://www.homeserver.com/test.js' /html Even though the client html/php might be on the 'foo' site (www.foo.com/test.html), the test.js functionality is being served from the 'homeserver.com' domain, and can therefore interface/communicate with the 'homeserver'. This is what I want to accomplish, as it allows me to create test servers/apps, and they can each communicate via the test api/web service (on homeserver.com) with the homeserver web service. so i'm trying to get my hands around how to create/implement a test app to demonstrate this. A rough overview is: Assume: Master Server3rd Party Server (separate domain) App1 Test App API File (aa.js) (from Master Server) JScript (aa.js) ---^ The aa.js file allows the 3rd party client site to be able to interface with the Master Server API via the API/services defined in the API File. I'm envisioning the following actions for the user 3rd Party Site Master Server -User Enters Name api checks/verifies name -gets response Master Server returns response -user answers question based on response, sends response to master server via api api checks user input -gets response Master Server returns response -jscript then gives reply/response to the 3rd Party site, allowing the site/app to
Re: [jQuery] jQuery Powered Sites - Keep the Links Coming
Oh Expression Engine... now tell me it uses jQuery in the CMS and I might have to go digging more... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Charles Stuart Sent: Friday, March 16, 2007 9:55 AM To: jQuery Discussion. Subject: Re: [jQuery] jQuery Powered Sites - Keep the Links Coming Another (just redesigned): * http://expressionengine.com/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Removing readonly attribute from textarea
$(#myTextArea).removeAttr('readonly'); On 3/16/07, Jörn Zaefferer [EMAIL PROTECTED] wrote: Have you tried $(#myTextArea).attr(readonly, true/false);? Oh that's new for me, why is there a true/false value? Just to say use true or false, or is it kinda javascript conditional for jquery? Regards -- Joan Piedra || Frontend webdeveloper http://joanpiedra.com/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] php - web service (ajax/jscript)
I was about to write out this detailed explanation of how you all are making this much harder on yourselves then necessary but Bruce beat me too it :) Any script included at runtime = safe Anything attempted to be loaded AFTER runtime = unsafe -ALEX -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of bruce Sent: Friday, March 16, 2007 10:02 AM To: 'jQuery Discussion.'; [EMAIL PROTECTED] Subject: Re: [jQuery] php - web service (ajax/jscript) jake... now i'm laughing here's how i understand it with a very limited amont of time to research this. the basic ajax/jscript allows for asynch communications between the server that serves the jscript file. cross-domain issues arise when you'd want the ajax/jscript to not only communicate with the 'hosted'/parent server, but also to another server's api as well, (with this server being in another domain). this is why in the html/php, you'll have the following kind of code: script src='http://www.google.com/api/maps/foo?' /script rest of the html page.. this effectively means that the '..maps/foo' is being served up from the google server, but it's running on your client app. this is also why you can have mashup functions, where your app is using the apis of multiple systems/servers... you're using separate apis, which are being served from separate servers. so. now that i've clarified it a little, how about you telling me how good you are with jscript! i have a jscript issue that i'm trying to solve!! thanks -bruce -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Jake McGraw Sent: Friday, March 16, 2007 9:48 AM To: jQuery Discussion. Subject: Re: [jQuery] php - web service (ajax/jscript) Actually, thats a damn good point, I use Google Maps on some of my websites, and yet I gave that answer to you, perhaps they're using Iframes? Anyone have an answer for this, now you got me interested! - jake On 3/16/07, bruce [EMAIL PROTECTED] wrote: jake... if what you state is true. how does google/yahoo/flickr/etc... manage to allow 3rd party websites to access their hosted apis, which are resident on the hosted server of google/yahoo/etc -bruce -Original Message- From: Jake McGraw [mailto:[EMAIL PROTECTED] Sent: Friday, March 16, 2007 9:17 AM To: [EMAIL PROTECTED] Subject: Re: [jQuery] php - web service (ajax/jscript) Bruce, I believe, regardless of the website serving the Javascript file, AJAX will only interface with the server that actually served the entire document. What I suggest you do is provide clients with a PHP Script / HTML Template (Smarty is very good for this) with some AJAX Javascript. The PHP Script can contact your web service (you can use the PEAR SOAP/WSDL extensions or go for the full blown Tomcat/Apache config), serve whatever information you like back to the PHP Script and then back to the browser: Request Web Browser/AJAX -- (XML or JSON) -- Client Server/PHP/SOAP -- (XML) -- Your Server/(PHP or Tomcat) Return Your Server/(PHP or Tomcat) -- (XML) -- SOAP/PHP/Client Server -- (XML or JSON) -- AJAX/Web Browser So basically, your clients would need a web server that handles PHP and can make SOAP Requests, you would author the PHP/HTML template and release that as an api. This is probably the best way to go about things because it allows non-web browsers user access to your Web Service and it keeps with the whole concept of what web services should truly be. - jake On 3/16/07, bruce [EMAIL PROTECTED] wrote: Hi Jake. Thanks for the reply. I'll try to clarify. (Keep in mind, I'm not an experienced web developer!) As I understand Ajax, it's used to allow asynch interaction between client, and hosted site that the client js file is fetched from. In other words, if the client html/php has something to the effect: html script src = 'http://www.homeserver.com/test.js' /html Even though the client html/php might be on the 'foo' site (www.foo.com/test.html), the test.js functionality is being served from the 'homeserver.com' domain, and can therefore interface/communicate with the 'homeserver'. This is what I want to accomplish, as it allows me to create test servers/apps, and they can each communicate via the test api/web service (on homeserver.com) with the homeserver web service. so i'm trying to get my hands around how to create/implement a test app to demonstrate this. A rough overview is: Assume: Master Server3rd Party Server (separate domain) App1 Test App API File (aa.js) (from Master Server) JScript (aa.js) ---^ The aa.js file allows the 3rd party client site to be able to interface with the Master Server API via the API/services defined in the API File. I'm envisioning the following actions for the user 3rd Party Site Master
Re: [jQuery] php - web service (ajax/jscript)
Hoping to clarify: Having a page built up of parts that come from different domains adds value and power. Having a page built up of parts from different domains adds complexity, lack of control and security hazards. There are browser rules that determine what kind of things can be done between different domains in an attempt to balance these two factors. Things the browser won't let you do between domains: - use JS to get any info about other pages in the browser served from the different domains (including those in frames) - use JS to trigger any kind of activity in the window context of a page served by another server - XmlHttpRequest from a page in one server to a URL in another - share cookies (depending on user settings) Things the browser will let you do between domains - embed on a page an image from a different server - embed in a page a JS from another server - embed in a page a CSS from another server - anchor link to a page on a different server - share cookies (depending on user settings) As you might guess, existing third part mashups and APIs use some combination of things from the second list. Most people would consider them Ajax even though they rely on including Javascript files, image requests, etc., not on using the XmlHttpRequest. And for anyone who read the list and is now thinking... wait, what? I can include arbitrary executable code on my page with no restrictions (JS file) but I can't do an http request for a piece of content that I then process with any level of care I deem necessary (XmlHttpRequest)? Yes it is crazy and I'm pretty sure the reasons are historical. All of this leaves the fundamental problem more or less unsolved. What do you do about functionality that might add power but might erode security? Opera has done some work on an API for passing info from one domain to the other. It involves defining a way for JS code to shove objects and event handlers into a formally shared space. By exposing only the API you want to expose (and with the ability to limit who you expose it to) it greatly reduces the security risks. To some extent this model is already available using the double iframe hack, which relies on the fact that if a page creates an iframe whose source goes to another server, and that inner page creates an iframe whose source is back in the outermost server's domain, the innermost and outermost iframes can share data. Both pages can manipulate the URL of the innermost iframe and share information that way. --Nathan .:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.: ||:. Nathan Young Cisco.com-Interface Development A: ncy1717 E: [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alex Cook Sent: Friday, March 16, 2007 10:09 AM To: [EMAIL PROTECTED]; jQuery Discussion. Subject: Re: [jQuery] php - web service (ajax/jscript) I was about to write out this detailed explanation of how you all are making this much harder on yourselves then necessary but Bruce beat me too it :) Any script included at runtime = safe Anything attempted to be loaded AFTER runtime = unsafe -ALEX -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of bruce Sent: Friday, March 16, 2007 10:02 AM To: 'jQuery Discussion.'; [EMAIL PROTECTED] Subject: Re: [jQuery] php - web service (ajax/jscript) jake... now i'm laughing here's how i understand it with a very limited amont of time to research this. the basic ajax/jscript allows for asynch communications between the server that serves the jscript file. cross-domain issues arise when you'd want the ajax/jscript to not only communicate with the 'hosted'/parent server, but also to another server's api as well, (with this server being in another domain). this is why in the html/php, you'll have the following kind of code: script src='http://www.google.com/api/maps/foo?' /script rest of the html page.. this effectively means that the '..maps/foo' is being served up from the google server, but it's running on your client app. this is also why you can have mashup functions, where your app is using the apis of multiple systems/servers... you're using separate apis, which are being served from separate servers. so. now that i've clarified it a little, how about you telling me how good you are with jscript! i have a jscript issue that i'm trying to solve!! thanks -bruce -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Jake McGraw Sent: Friday, March 16, 2007 9:48 AM To: jQuery Discussion. Subject: Re: [jQuery] php - web service (ajax/jscript) Actually, thats a damn good point, I use Google Maps on some of my websites, and yet I gave that answer to you, perhaps they're using Iframes? Anyone have an answer for this, now you got me interested! - jake
[jQuery] jquery inside a loop... need suggestions to improve code
Hello (CF) jQuerians, I currently have a working code but I would really like to improve and make it more efficient. Your suggestions will be great. Right now, I have a jquery script inside a loop (cfloop). The jquery is a just simple tooltip-like functionality, that shows and hides a thumbnail image on a text description hover. The image is loaded from a cfquery id variable assigned into a div id. What I'd like is to remove the jquery script outside of the cfloop, so it does not redundantly iterate when the page runs. The simplified code is as follows: cfloop query=myQuery a id=aid#myQuery.id# href=somepage.cfm?to=#myquery.id##myQuery.text#/a div id=imgid#myQuery.id#img src=/thumbnails/#myQuery.image# //div script type=text/javascript $(##imgid#myQuery.id#).hide(); $(function(){ $(##aid#myQuery.id#).hover(function(){ $(##imgid#myQuery.id#).show(); },function(){ $(##imgid#myQuery.id#).hide(); }); }); /script /cfloop If the answer seems too obvious for you, then I must say that its been a long week for me. I just need a brain boost from someone.. :-) Thank you very much in advance, for your suggestions. Michael ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Move caret position Input type=file after browse
Use case: 1. input type=file 2. User clicks browse. 3. User chooses file. 4. Input value is changed to say path name. At this point, I want to move the carat to the end of the string, not the beginning. Any way in jQuery to do it? Glen ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] cursor not showing in modal boxes
Which browser? We had it happen in Firefox. It has something to do with a wierd FF bug. http://blog.tremend.ro/2007/01/22/mouse-cursor-disappears-in-firefox/feed/ http://blog.tremend.ro/2007/01/22/mouse-cursor-disappears-in-firefox/ Glen ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Can't figure out how to put this all together...
Looks like it works - is it making more sense now? On 3/16/07, Rick Faircloth [EMAIL PROTECTED] wrote: Oh, and I meant to give you the online demo… http://bodaford.whitestonemedia.com/html/calctest.cfm Rick *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *John Wilson *Sent:* Friday, March 16, 2007 12:48 AM *To:* discuss@jquery.com *Subject:* Re: [jQuery] Can't figure out how to put this all together... A while back, I mentioned to Rey that I thought Mike Alsup's taconite plugin was a nearly perfect bridge for CF programmers learning ajax. It's time to see if I was right ;) ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] How can I find out if a style class exists?
I'm working on something that I want a user to be able to override by including a specific class somewhere in the CSS definitions. If that class doesn't exist I want to add a default style. This seems like something that should have come up before but search isn't coming up with anything. Can someone point me in the right direction? Local styles/classes override global classes right? IOW given the following: style #myDiv {background: blue;} /style div id=myDiv style=background: red The div's background would be red, correct? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Move caret position Input type=file after browse
Almost anything you do with file inputs will croak on a different browser. Safari doesn't even show an input-able field! On 3/16/07, Glen Lipka [EMAIL PROTECTED] wrote: Use case: 1. input type=file 2. User clicks browse. 3. User chooses file. 4. Input value is changed to say path name. At this point, I want to move the carat to the end of the string, not the beginning. Any way in jQuery to do it? Glen ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jquery inside a loop... need suggestions to improve code
Try this: cfoutput query=myQuery a class=tooltip id=aid_#myQuery.id# href=somepage.cfm ?to=#myquery.id##myQuery.text#/a img id=imgid_#myQuery.id# src=/thumbnails/#myQuery.image# / /cfloop script type=text/javascript $(document).ready(function(){ $(img.tooltip).hide(); $(a.tooltip).each(function(){ $(this).hover(function(){ $([EMAIL PROTECTED] + this.id.split(_)[1]).show(); },function(){ $([EMAIL PROTECTED] + this.id.split(_)[1]).hide(); }); }) }); /script On 3/16/07, Michael E. Carluen [EMAIL PROTECTED] wrote: Hello (CF) jQuerians, I currently have a working code but I would really like to improve and make it more efficient. Your suggestions will be great. Right now, I have a jquery script inside a loop (cfloop). The jquery is a just simple tooltip-like functionality, that shows and hides a thumbnail image on a text description hover. The image is loaded from a cfquery id variable assigned into a div id. What I'd like is to remove the jquery script outside of the cfloop, so it does not redundantly iterate when the page runs. The simplified code is as follows: cfloop query=myQuery a id=aid#myQuery.id# href=somepage.cfm ?to=#myquery.id##myQuery.text#/a div id=imgid#myQuery.id#img src=/thumbnails/#myQuery.image# //div script type=text/javascript $(##imgid#myQuery.id#).hide(); $(function(){ $(##aid#myQuery.id#).hover(function(){ $(##imgid#myQuery.id#).show(); },function(){ $(##imgid#myQuery.id#).hide(); }); }); /script /cfloop If the answer seems too obvious for you, then I must say that its been a long week for me… I just need a brain boost from someone…. J Thank you very much in advance, for your suggestions. Michael ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] the pitfalls of jquery
On 3/15/07, Benjamin Sterling [EMAIL PROTECTED] wrote: I've worked on a project for about two months now that uses jquery for everything. Using such plugins as jqModal, blockUI, jqDebug, jqQuick, dimensions plugin, form plugin, and jqHighlightFade as well as some code I pulled out of other plugins (nextUntil (Jorn), bgIframe(?), pngFixer(actual code came from a post on the forum, I just made it into a chain-able plugin) and well as other plugins specific to this app. Feel free to take a look: http://ov-oba.informationexperts.com/ (there are a bunch of style issues I am working on now) Now coming into jQuery I new a good amount of javascript, not an expert but pretty good. But the point to this message is to show how jquery has made my life much harder. Today, I was given a project which would entail using a lot of javascript for ajax calls and some other basic stuff, and the problems is, I CAN'T USE JQUERY I feel your pain. I had to port some of my jQuery code to an eBay listing, which has very strict rules about what js functions are allowed (though won't say which exact ones). Ended up rewriting the whole lot in standard js. It's quite good for the soul ;-) That said, if your restriction is purely ideological, I'd say go with the renaming thing. Chris -- 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] How can I find out if a style class exists?
if it's a class you're looking for, I think you can use something like if( $('#myDiv').is('.className')) {...} Daemach wrote: I'm working on something that I want a user to be able to override by including a specific class somewhere in the CSS definitions. If that class doesn't exist I want to add a default style. This seems like something that should have come up before but search isn't coming up with anything. Can someone point me in the right direction? Local styles/classes override global classes right? IOW given the following: style #myDiv {background: blue;} /style div id=myDiv style=background: red The div's background would be red, correct? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/How-can-I-find-out-if-a-%3Cstyle%3E-class-exists--tf3416167.html#a9520939 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How can I find out if a style class exists?
Hi. IOW given the following: style #myDiv {background: blue;} /style div id=myDiv style=background: red The div's background would be red, correct? If you change background to background-color :) then yes, by the C in CSS. Also: style #myDiv {background-color: blue;} #myDiv {background-color: red;} /style Because of declared order. So would: style body #myDiv {background-color: red;} #myDiv {background-color: blue;} /style Because it's more specific. div style=background-color:red; will be red no matter what is in the style block. Styles placed in the element attribute have the highest precedence. N ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Layout plug-ins / Creating a Dashboard
I'm going to be working on a Dashboard for an application that could contain X number of widgets (a widget would a block element of various width/heights that would contain charts and various threshold alerts.) Since a user will be able to configure which widgets are on their Dashboard, I need something that will dynamically lay out the widgets so that they best fit the Dashboard window. Before reinventing the wheel, I was just wondering if any one has seen any good plug-ins that might help w/my layout dilemma. Thanks, Dan ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How can I find out if a style class exists?
Yes that makes sense, and it's why I need to find out if a class exists in the stylesheet before I apply the style. On 3/16/07, Nathan Young -X (natyoung - Artizen at Cisco) [EMAIL PROTECTED] wrote: Hi. IOW given the following: style #myDiv {background: blue;} /style div id=myDiv style=background: red The div's background would be red, correct? If you change background to background-color :) then yes, by the C in CSS. Also: style #myDiv {background-color: blue;} #myDiv {background-color: red;} /style Because of declared order. So would: style body #myDiv {background-color: red;} #myDiv {background-color: blue;} /style Because it's more specific. div style=background-color:red; will be red no matter what is in the style block. Styles placed in the element attribute have the highest precedence. N ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jquery inside a loop... need suggestions to improvecode
Thanks Daemach. Looking at the scripts, I'm trying to find your references to the class tooltip on the img tag within the loop. Should it have one? $(img.tooltip).hide(); _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daemach Sent: Friday, March 16, 2007 11:46 AM To: jQuery Discussion. Subject: Re: [jQuery] jquery inside a loop... need suggestions to improvecode Try this: cfoutput query=myQuery a class=tooltip id=aid_#myQuery.id# href=somepage.cfm?to=#myquery.id##myQuery.text#/a img id=imgid_#myQuery.id# src=/thumbnails/#myQuery.image# / /cfloop script type=text/javascript $(document).ready(function(){ $(img.tooltip).hide(); $(a.tooltip).each(function(){ $(this).hover(function(){ $([EMAIL PROTECTED] + this.id.split(_)[1]).show(); },function(){ $([EMAIL PROTECTED] + this.id.split (_)[1]).hide(); }); }) }); /script On 3/16/07, Michael E. Carluen mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello (CF) jQuerians, I currently have a working code but I would really like to improve and make it more efficient. Your suggestions will be great. Right now, I have a jquery script inside a loop (cfloop). The jquery is a just simple tooltip-like functionality, that shows and hides a thumbnail image on a text description hover. The image is loaded from a cfquery id variable assigned into a div id. What I'd like is to remove the jquery script outside of the cfloop, so it does not redundantly iterate when the page runs. The simplified code is as follows: cfloop query=myQuery a id=aid#myQuery.id# href=somepage.cfm?to=#myquery.id##myQuery.text#/a div id=imgid#myQuery.id#img src=/thumbnails/#myQuery.image# //div script type=text/javascript $(##imgid#myQuery.id#).hide(); $(function(){ $(##aid#myQuery.id#).hover(function(){ $(##imgid#myQuery.id#).show(); },function(){ $(##imgid#myQuery.id#).hide(); }); }); /script /cfloop If the answer seems too obvious for you, then I must say that its been a long week for me. I just need a brain boost from someone.. :-) Thank you very much in advance, for your suggestions. Michael ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How can I find out if a style class exists?
Hmm - in theory this could work if the style was applied immediately. I guess the question is, if I'm creating this element dynamically when does the css style get applied so I can check it? I'm doing the following at the moment, but I plan on moving the .css definition to another line once I figure this out. $('div id=ajaxCFCLoadingIndicator/div').css(css).appendTo(ind[2]).hide(); On 3/16/07, rolfsf [EMAIL PROTECTED] wrote: if it's a class you're looking for, I think you can use something like if( $('#myDiv').is('.className')) {...} Daemach wrote: I'm working on something that I want a user to be able to override by including a specific class somewhere in the CSS definitions. If that class doesn't exist I want to add a default style. This seems like something that should have come up before but search isn't coming up with anything. Can someone point me in the right direction? Local styles/classes override global classes right? IOW given the following: style #myDiv {background: blue;} /style div id=myDiv style=background: red The div's background would be red, correct? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/How-can-I-find-out-if-a-%3Cstyle%3E-class-exists--tf3416167.html#a9520939 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] Event-AJAX wait before animation completes
I know it seems silly to make the ajax wait for the animation, but for some reason, the animation seems a bit wonky in Internet Explorer if the ajax link has been clicked previously. It seems like Internet Explorer checks it's cache to see if it has a copy of the ajax request already, which means it shows it straight away without any delay. Here's the site I'm working on: http://34r34r.dreamhosters.com/ (It's just a personal wordpress theme). malsup wrote: Your second attempt looks the closest. I would try it like this: $('.ajax-div-slide').click(function() { var url = this.href; $('#ajax-loader').animate({height: 375}, 'slow', function(){ $('#ajax-div').load(url); }); return false; }); But I've got to ask... why do you want to delay an operation that already has inherent latency, just so that you can show an animation? Don't you want to show the ajax-loader *while* the ajax request is active? On 3/16/07, Yansky [EMAIL PROTECTED] wrote: How can I get an ajax request (that is triggered by a click event) wait for an animation to complete (which is also triggered by the same click event) before it runs the ajax request? e.g. this is what I'd like to do: $('.ajax-div-slide').click(function (){ $('#ajax-div').ajaxSend(function(){ $('#ajax-loader').animate({height: 375}, 2000); }); //only start the ajax once the animation has finished $('#ajax-div').load(this.href); return false; }); As well as the above example, I've also tried: $('.ajax-div-slide').click(function(){ var passClick = $(this) $('#ajax-loader').animate({height: 375}, 'slow', function(passClick){ $('#ajax-div').load(passClick.href); }); return false; }); ...and... $('.ajax-div-slide').click(function (){ $this($('#ajax-loader').animate({height: 375}, 2000, function(){ $('#ajax-div').load(this.href); }); ); return false; }); ...without any success. Anyone have any ideas as to how I can achieve this? Cheers. -- View this message in context: http://www.nabble.com/Event-%3EAJAX-wait-before-animation-completes-tf3412929.html#a9509661 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/Event-%3EAJAX-wait-before-animation-completes-tf3412929.html#a9521300 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Position changing during animation
Hi All, I'm relatively new to jQuery and so far it's been a life saver. However, I am having a small issue and I'm wondering if it's due to something silly I'm doing. For certain divs with margins, whenever I initiate an animation effect, the div seems to animate from a different relative position (because of the margin). This is only a problem during the animation itself. Everything is fine before and after the effect. I can get around the problem by assigning a different (compensating) class before the effect, then re-assigning the original class after the effect has finished. This however, seems like a hack... I'm wondering is this a common problem? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How can I find out if a style class exists?
I just tested this. When defining a style using something like div#myDiv it doesn't actually apply a class to the element. Therefore I need to find the rule in the stylesheet or embedded styles itself :/ On 3/16/07, rolfsf [EMAIL PROTECTED] wrote: if it's a class you're looking for, I think you can use something like if( $('#myDiv').is('.className')) {...} Daemach wrote: I'm working on something that I want a user to be able to override by including a specific class somewhere in the CSS definitions. If that class doesn't exist I want to add a default style. This seems like something that should have come up before but search isn't coming up with anything. Can someone point me in the right direction? Local styles/classes override global classes right? IOW given the following: style #myDiv {background: blue;} /style div id=myDiv style=background: red The div's background would be red, correct? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/How-can-I-find-out-if-a-%3Cstyle%3E-class-exists--tf3416167.html#a9520939 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] How can I find out if a style class exists?
well, to be clear, styles, classes and css are all different things (though obviously related) so I might be getting confused by wording about what you're trying to do. Not to mention, I'm a js newbie... :-) if you have a rule (either in the head or an external stylesheet) that says #ajaxCFCLoadingIndicator { background-color: red;} and then you dynamically create #ajaxCFCLoadingIndicator, then it has the style background-color: red ...unless, you've added a different background-color as an inline-style, either when you created the div or otherwise modified it via javascript div id=ajaxCFCLoadingIndicator style=background-color: blue; the inline or dynamically modified css will always take precedence (all else equal) r. Daemach wrote: Hmm - in theory this could work if the style was applied immediately. I guess the question is, if I'm creating this element dynamically when does the css style get applied so I can check it? I'm doing the following at the moment, but I plan on moving the .css definition to another line once I figure this out. $('div id=ajaxCFCLoadingIndicator/div').css(css).appendTo(ind[2]).hide(); On 3/16/07, rolfsf [EMAIL PROTECTED] wrote: if it's a class you're looking for, I think you can use something like if( $('#myDiv').is('.className')) {...} Daemach wrote: I'm working on something that I want a user to be able to override by including a specific class somewhere in the CSS definitions. If that class doesn't exist I want to add a default style. This seems like something that should have come up before but search isn't coming up with anything. Can someone point me in the right direction? Local styles/classes override global classes right? IOW given the following: style #myDiv {background: blue;} /style div id=myDiv style=background: red The div's background would be red, correct? -- View this message in context: http://www.nabble.com/How-can-I-find-out-if-a-%3Cstyle%3E-class-exists--tf3416167.html#a9521508 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Event-AJAX wait before animation completes
link has been clicked previously. It seems like Internet Explorer checks it's cache to see if it has a copy of the ajax request already, which means it shows it straight away without any delay. Isn't that a good thing? Why impose an artificial delay? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How can I find out if a style class exists?
no... classes are classes, rules are rules, selectors are selectors... I may be getting off course from what you really need, but style div {background-color: white;} div.myClass {background-color: red;} /style div id=myDiv/div will have background-color: white; div id=myDiv class=myClass/div will have background-color: red; div id=myDiv class=myClass style=background-color: blue;/div will have a class=myClass, but background-color: blue; Daemach wrote: I just tested this. When defining a style using something like div#myDiv it doesn't actually apply a class to the element. Therefore I need to find the rule in the stylesheet or embedded styles itself :/ On 3/16/07, rolfsf [EMAIL PROTECTED] wrote: if it's a class you're looking for, I think you can use something like if( $('#myDiv').is('.className')) {...} Daemach wrote: I'm working on something that I want a user to be able to override by including a specific class somewhere in the CSS definitions. If that class doesn't exist I want to add a default style. This seems like something that should have come up before but search isn't coming up with anything. Can someone point me in the right direction? Local styles/classes override global classes right? IOW given the following: style #myDiv {background: blue;} /style div id=myDiv style=background: red The div's background would be red, correct? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/How-can-I-find-out-if-a-%3Cstyle%3E-class-exists--tf3416167.html#a9520939 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/How-can-I-find-out-if-a-%3Cstyle%3E-class-exists--tf3416167.html#a9521541 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How can I find out if a style class exists?
You might also look at .attr() and see if that's more appropriate r. rolfsf wrote: no... classes are classes, rules are rules, selectors are selectors... I may be getting off course from what you really need, but style div {background-color: white;} div.myClass {background-color: red;} /style div id=myDiv/div will have background-color: white; div id=myDiv class=myClass/div will have background-color: red; div id=myDiv class=myClass style=background-color: blue;/div will have a class=myClass, but background-color: blue; Daemach wrote: I just tested this. When defining a style using something like div#myDiv it doesn't actually apply a class to the element. Therefore I need to find the rule in the stylesheet or embedded styles itself :/ On 3/16/07, rolfsf [EMAIL PROTECTED] wrote: if it's a class you're looking for, I think you can use something like if( $('#myDiv').is('.className')) {...} Daemach wrote: I'm working on something that I want a user to be able to override by including a specific class somewhere in the CSS definitions. If that class doesn't exist I want to add a default style. This seems like something that should have come up before but search isn't coming up with anything. Can someone point me in the right direction? Local styles/classes override global classes right? IOW given the following: style #myDiv {background: blue;} /style div id=myDiv style=background: red The div's background would be red, correct? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/How-can-I-find-out-if-a-%3Cstyle%3E-class-exists--tf3416167.html#a9520939 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/How-can-I-find-out-if-a-%3Cstyle%3E-class-exists--tf3416167.html#a9521706 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How can I find out if a style class exists?
I appreciate the help. I'm not actually trying to find whether a class exists on a particular element, but rather in the stylesheet itself. I'm creating the element dynamically. If the stylesheet does not contain a specific selector for that element's ID, I want to apply a style, otherwise I will let the stylesheet rule handle it. On 3/16/07, rolfsf [EMAIL PROTECTED] wrote: no... classes are classes, rules are rules, selectors are selectors... I may be getting off course from what you really need, but style div {background-color: white;} div.myClass {background-color: red;} /style div id=myDiv/div will have background-color: white; div id=myDiv class=myClass/div will have background-color: red; div id=myDiv class=myClass style=background-color: blue;/div will have a class=myClass, but background-color: blue; Daemach wrote: I just tested this. When defining a style using something like div#myDiv it doesn't actually apply a class to the element. Therefore I need to find the rule in the stylesheet or embedded styles itself :/ On 3/16/07, rolfsf [EMAIL PROTECTED] wrote: if it's a class you're looking for, I think you can use something like if( $('#myDiv').is('.className')) {...} Daemach wrote: I'm working on something that I want a user to be able to override by including a specific class somewhere in the CSS definitions. If that class doesn't exist I want to add a default style. This seems like something that should have come up before but search isn't coming up with anything. Can someone point me in the right direction? Local styles/classes override global classes right? IOW given the following: style #myDiv {background: blue;} /style div id=myDiv style=background: red The div's background would be red, correct? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/How-can-I-find-out-if-a-%3Cstyle%3E-class-exists--tf3416167.html#a9520939 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/How-can-I-find-out-if-a-%3Cstyle%3E-class-exists--tf3416167.html#a9521541 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] jquery inside a loop... need suggestions to improvecode
Yes, sorry - I was on the phone when I wrote that ;) The class is just a fast way to select a bunch of elements that you want to apply common behavior to. You can call it anything you want. On 3/16/07, Michael E. Carluen [EMAIL PROTECTED] wrote: Thanks Daemach. Looking at the scripts, I'm trying to find your references to the class tooltip on the img tag within the loop. Should it have one? $(img.tooltip).hide(); -- *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *Daemach *Sent:* Friday, March 16, 2007 11:46 AM *To:* jQuery Discussion. *Subject:* Re: [jQuery] jquery inside a loop... need suggestions to improvecode Try this: cfoutput query=myQuery a class=tooltip id=aid_#myQuery.id# href=somepage.cfm ?to=#myquery.id##myQuery.text#/a img id=imgid_#myQuery.id# src=/thumbnails/#myQuery.image# / /cfloop script type=text/javascript $(document).ready(function(){ $(img.tooltip).hide(); $(a.tooltip).each(function(){ $(this).hover(function(){ $([EMAIL PROTECTED] + this.id.split(_)[1]).show(); },function(){ $([EMAIL PROTECTED] + this.id.split (_)[1]).hide(); }); }) }); /script On 3/16/07, *Michael E. Carluen* [EMAIL PROTECTED] wrote: Hello (CF) jQuerians, I currently have a working code but I would really like to improve and make it more efficient. Your suggestions will be great. Right now, I have a jquery script inside a loop (cfloop). The jquery is a just simple tooltip-like functionality, that shows and hides a thumbnail image on a text description hover. The image is loaded from a cfquery id variable assigned into a div id. What I'd like is to remove the jquery script outside of the cfloop, so it does not redundantly iterate when the page runs. The simplified code is as follows: cfloop query=myQuery a id=aid#myQuery.id# href=somepage.cfm ?to=#myquery.id##myQuery.text#/a div id=imgid#myQuery.id#img src=/thumbnails/#myQuery.image# //div script type=text/javascript $(##imgid#myQuery.id#).hide(); $(function(){ $(##aid#myQuery.id#).hover(function(){ $(##imgid#myQuery.id#).show(); },function(){ $(##imgid#myQuery.id#).hide(); }); }); /script /cfloop If the answer seems too obvious for you, then I must say that its been a long week for me… I just need a brain boost from someone…. J Thank you very much in advance, for your suggestions. Michael ___ 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] How can I find out if a style class exists?
Agreed. The issue is that I don't want to override a stylesheet rule if it exists already for this element. On 3/16/07, rolfsf [EMAIL PROTECTED] wrote: well, to be clear, styles, classes and css are all different things (though obviously related) so I might be getting confused by wording about what you're trying to do. Not to mention, I'm a js newbie... :-) if you have a rule (either in the head or an external stylesheet) that says #ajaxCFCLoadingIndicator { background-color: red;} and then you dynamically create #ajaxCFCLoadingIndicator, then it has the style background-color: red ...unless, you've added a different background-color as an inline-style, either when you created the div or otherwise modified it via javascript div id=ajaxCFCLoadingIndicator style=background-color: blue; the inline or dynamically modified css will always take precedence (all else equal) r. Daemach wrote: Hmm - in theory this could work if the style was applied immediately. I guess the question is, if I'm creating this element dynamically when does the css style get applied so I can check it? I'm doing the following at the moment, but I plan on moving the .css definition to another line once I figure this out. $('div id=ajaxCFCLoadingIndicator/div').css(css).appendTo(ind[2]).hide(); On 3/16/07, rolfsf [EMAIL PROTECTED] wrote: if it's a class you're looking for, I think you can use something like if( $('#myDiv').is('.className')) {...} Daemach wrote: I'm working on something that I want a user to be able to override by including a specific class somewhere in the CSS definitions. If that class doesn't exist I want to add a default style. This seems like something that should have come up before but search isn't coming up with anything. Can someone point me in the right direction? Local styles/classes override global classes right? IOW given the following: style #myDiv {background: blue;} /style div id=myDiv style=background: red The div's background would be red, correct? -- View this message in context: http://www.nabble.com/How-can-I-find-out-if-a-%3Cstyle%3E-class-exists--tf3416167.html#a9521508 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] Layout plug-ins / Creating a Dashboard
Dan, I did something similar and I just put each app in a div inside a container div and set the sub div's style attribute to float left. i.e. = (I wouldn't use inline styles... I just put those for example) div id=container style=width:700px; div class=app style=float:left;App 1 Icon/div div class=app style=float:left;App 2 Icon/div div class=app style=float:left;App 3 Icon/div div class=app style=float:left;App 4 Icon/div div class=app style=float:left;App 5 Icon/div /div I hope that helps. David Dexter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan G. Switzer, II Sent: Friday, March 16, 2007 12:32 PM To: 'jQuery Discussion.' Subject: [jQuery] Layout plug-ins / Creating a Dashboard I'm going to be working on a Dashboard for an application that could contain X number of widgets (a widget would a block element of various width/heights that would contain charts and various threshold alerts.) Since a user will be able to configure which widgets are on their Dashboard, I need something that will dynamically lay out the widgets so that they best fit the Dashboard window. Before reinventing the wheel, I was just wondering if any one has seen any good plug-ins that might help w/my layout dilemma. Thanks, Dan ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Event-AJAX wait before animation completes
You're right, it is a good thing, but the artificial delay will only be about 1/2 a second max. So I figure that's not too bad of a compromise to make things look a bit better. If it were a site for someone else, then I'd definitely choose function over form. :) malsup wrote: link has been clicked previously. It seems like Internet Explorer checks it's cache to see if it has a copy of the ajax request already, which means it shows it straight away without any delay. Isn't that a good thing? Why impose an artificial delay? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Event-%3EAJAX-wait-before-animation-completes-tf3412929.html#a9522109 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] jquery and style updates on page
I have a page that uses jquery for swapping classes (to hide/show content) and fade in and fade out. I've encountered one problem that occurs when after I show and hide a table row, it's containing cell and the sub table contained beneath it. Showing the hidden content is fine at first. The content fades in and expands as it would if it didn't have a display: none style attribute. However, after I hide the contents and the display it once more it shrinks to only take up about 50% the available space. I've tested in Firefox, Safari and Opera and they all have the same experience. Does jQuery do anything to re-apply styles when classes are swapped or during the animations (like fadeIn/Out) or is this a browser issue? Since the browser renders the page I don't understand how this could happen unless I'm doing something that isn't complaint with css/xhtml standards or if jQuery does something after these events. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] How could i build 2 steps form with thickbox?
I want to build a 2 steps form with thickbox plugin, but i don't know how to do the architecture. The problem is that when i finished to fill the 2 steps, i need to close the thickbox, but i don´t know how... PS: I'm using iframe option to jump from step1 to step 2. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How can I find out if a style class exists?
don't know how to do that specifically, but maybe you can set up a default class and check for that... Daemach wrote: Agreed. The issue is that I don't want to override a stylesheet rule if it exists already for this element. On 3/16/07, rolfsf [EMAIL PROTECTED] wrote: well, to be clear, styles, classes and css are all different things (though obviously related) so I might be getting confused by wording about what you're trying to do. Not to mention, I'm a js newbie... :-) if you have a rule (either in the head or an external stylesheet) that says #ajaxCFCLoadingIndicator { background-color: red;} and then you dynamically create #ajaxCFCLoadingIndicator, then it has the style background-color: red ...unless, you've added a different background-color as an inline-style, either when you created the div or otherwise modified it via javascript div id=ajaxCFCLoadingIndicator style=background-color: blue; the inline or dynamically modified css will always take precedence (all else equal) r. Daemach wrote: Hmm - in theory this could work if the style was applied immediately. I guess the question is, if I'm creating this element dynamically when does the css style get applied so I can check it? I'm doing the following at the moment, but I plan on moving the .css definition to another line once I figure this out. $('div id=ajaxCFCLoadingIndicator/div').css(css).appendTo(ind[2]).hide(); On 3/16/07, rolfsf [EMAIL PROTECTED] wrote: if it's a class you're looking for, I think you can use something like if( $('#myDiv').is('.className')) {...} Daemach wrote: I'm working on something that I want a user to be able to override by including a specific class somewhere in the CSS definitions. If that class doesn't exist I want to add a default style. This seems like something that should have come up before but search isn't coming up with anything. Can someone point me in the right direction? Local styles/classes override global classes right? IOW given the following: style #myDiv {background: blue;} /style div id=myDiv style=background: red The div's background would be red, correct? -- View this message in context: http://www.nabble.com/How-can-I-find-out-if-a-%3Cstyle%3E-class-exists--tf3416167.html#a9521508 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/How-can-I-find-out-if-a-%3Cstyle%3E-class-exists--tf3416167.html#a9522250 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] the pitfalls of jquery
Jonathan Chaffer wrote: On Mar 14, 2007, at 20:49 , Benjamin Sterling wrote: Because this will be on a government server, they don't want anything other then basic javascript, I can explain the whole discussion with the client but this message would be to long and either way the result would be that I can use any frameworks. So I take a look at the specs and my brain just goes limp.. I CAN'T THINK OF HOW I WOULD DO THIS WITH OUT JQUERY.. it is a sad sad world all because of my dependency of the crack that is jQuery... I've been exactly there. Had a project with a very fast turnaround, but thought, Hey, this is easy; jQuery to the rescue! It wasn't until we presented the working result to the client well within the deadline that we were informed that third-party libraries were not allowed for security reasons. Yikes! I had your reaction exactly. I was at a loss for how to even start writing the code without $() at my fingertips. We finished the project using only homespun code, but late and over budget of course. That's how you solve the problem, of course. Inform them that you can finish the project using jQuery for $X, which is within their budget and ontime, or you can finish it for 5 x $X, and 6 months late, if they want you to rewrite jQuery from scratch first grin -Scott ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Layout plug-ins / Creating a Dashboard
David, That's what I'm going to do to start. However, I'm wanting to come up with a solution that will arrange the div in a smarter arrangement based upon the number of divs and the height/width of each. Floating everything left is ok as long as each DIV is a similar width/height, but I'll have some widgets that are considerable larger than others. -Dan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Dexter Sent: Friday, March 16, 2007 4:35 PM To: 'jQuery Discussion.' Subject: Re: [jQuery] Layout plug-ins / Creating a Dashboard Dan, I did something similar and I just put each app in a div inside a container div and set the sub div's style attribute to float left. i.e. = (I wouldn't use inline styles... I just put those for example) div id=container style=width:700px; div class=app style=float:left;App 1 Icon/div div class=app style=float:left;App 2 Icon/div div class=app style=float:left;App 3 Icon/div div class=app style=float:left;App 4 Icon/div div class=app style=float:left;App 5 Icon/div /div I hope that helps. David Dexter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan G. Switzer, II Sent: Friday, March 16, 2007 12:32 PM To: 'jQuery Discussion.' Subject: [jQuery] Layout plug-ins / Creating a Dashboard I'm going to be working on a Dashboard for an application that could contain X number of widgets (a widget would a block element of various width/heights that would contain charts and various threshold alerts.) Since a user will be able to configure which widgets are on their Dashboard, I need something that will dynamically lay out the widgets so that they best fit the Dashboard window. Before reinventing the wheel, I was just wondering if any one has seen any good plug-ins that might help w/my layout dilemma. Thanks, Dan ___ 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] fadeToggle
I'm just wondering why since there is a slideToggle(), there isn't any such effect as fadeToggle()? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Layout plug-ins / Creating a Dashboard
Do you have a design comp that shows what you are trying to achieve? -David Dexter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan G. Switzer, II Sent: Friday, March 16, 2007 2:39 PM To: 'jQuery Discussion.' Subject: Re: [jQuery] Layout plug-ins / Creating a Dashboard David, That's what I'm going to do to start. However, I'm wanting to come up with a solution that will arrange the div in a smarter arrangement based upon the number of divs and the height/width of each. Floating everything left is ok as long as each DIV is a similar width/height, but I'll have some widgets that are considerable larger than others. -Dan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Dexter Sent: Friday, March 16, 2007 4:35 PM To: 'jQuery Discussion.' Subject: Re: [jQuery] Layout plug-ins / Creating a Dashboard Dan, I did something similar and I just put each app in a div inside a container div and set the sub div's style attribute to float left. i.e. = (I wouldn't use inline styles... I just put those for example) div id=container style=width:700px; div class=app style=float:left;App 1 Icon/div div class=app style=float:left;App 2 Icon/div div class=app style=float:left;App 3 Icon/div div class=app style=float:left;App 4 Icon/div div class=app style=float:left;App 5 Icon/div /div I hope that helps. David Dexter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan G. Switzer, II Sent: Friday, March 16, 2007 12:32 PM To: 'jQuery Discussion.' Subject: [jQuery] Layout plug-ins / Creating a Dashboard I'm going to be working on a Dashboard for an application that could contain X number of widgets (a widget would a block element of various width/heights that would contain charts and various threshold alerts.) Since a user will be able to configure which widgets are on their Dashboard, I need something that will dynamically lay out the widgets so that they best fit the Dashboard window. Before reinventing the wheel, I was just wondering if any one has seen any good plug-ins that might help w/my layout dilemma. Thanks, Dan ___ 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] Layout plug-ins / Creating a Dashboard
Maybe the jquery portlets could be of use to you : http://host.sonspring.com/portlets/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan G. Switzer, II Sent: vendredi 16 mars 2007 22:39 To: 'jQuery Discussion.' Subject: Re: [jQuery] Layout plug-ins / Creating a Dashboard David, That's what I'm going to do to start. However, I'm wanting to come up with a solution that will arrange the div in a smarter arrangement based upon the number of divs and the height/width of each. Floating everything left is ok as long as each DIV is a similar width/height, but I'll have some widgets that are considerable larger than others. -Dan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Dexter Sent: Friday, March 16, 2007 4:35 PM To: 'jQuery Discussion.' Subject: Re: [jQuery] Layout plug-ins / Creating a Dashboard Dan, I did something similar and I just put each app in a div inside a container div and set the sub div's style attribute to float left. i.e. = (I wouldn't use inline styles... I just put those for example) div id=container style=width:700px; div class=app style=float:left;App 1 Icon/div div class=app style=float:left;App 2 Icon/div div class=app style=float:left;App 3 Icon/div div class=app style=float:left;App 4 Icon/div div class=app style=float:left;App 5 Icon/div /div I hope that helps. David Dexter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan G. Switzer, II Sent: Friday, March 16, 2007 12:32 PM To: 'jQuery Discussion.' Subject: [jQuery] Layout plug-ins / Creating a Dashboard I'm going to be working on a Dashboard for an application that could contain X number of widgets (a widget would a block element of various width/heights that would contain charts and various threshold alerts.) Since a user will be able to configure which widgets are on their Dashboard, I need something that will dynamically lay out the widgets so that they best fit the Dashboard window. Before reinventing the wheel, I was just wondering if any one has seen any good plug-ins that might help w/my layout dilemma. Thanks, Dan ___ 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/ -- Ce message Envoi est certifié sans virus connu. Analyse effectuée par AVG. Version: 7.5.448 / Base de données virus: 268.18.11/723 - Date: 15/03/2007 11:27 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Layout plug-ins / Creating a Dashboard
David, Do you have a design comp that shows what you are trying to achieve? Here's a quick dirty example (sorry, I didn't use jQuery--just cut-n-paste into an html file.) It defaults to display 5 widgets of various dimensions. If you click the Show Absolute Position it'll show those same widgets laid out in a manor that makes a little more sense. What I'm looking for is something that would take those Widgets and automatically calculate the best way to arrange them within the container. Hopefully this makes sense. -Dan style type=text/css .widget { margin: 10px; padding: 10px; background-color: #cc; border: 1px solid black; text-align: center; } .float { float: left; } .absolute { position: absolute; } #container { width: 100%; } #container2 { width: 100%; display: none; } /style script type=text/javascript function showContainer(sId){ if( sId == container ){ document.getElementById(container).style.display = block; document.getElementById(container2).style.display = none; } else { document.getElementById(container2).style.display = block; document.getElementById(container).style.display = none; } } /script p a href=javascript:showContainer('container');Show Float Left/a a href=javascript:showContainer('container2');Show Absolute Position/a /p div id=container div class=widget float style=width: 200px; height: 150px;Widget 1/div div class=widget float style=width: 400px; height: 350px;Widget 2/div div class=widget float style=width: 320px; height: 250px;Widget 3/div div class=widget float style=width: 200px; height: 150px;Widget 4/div div class=widget float style=width: 200px; height: 150px;Widget 5/div /div div id=container2 div class=widget absolute style=width: 200px; height: 150px;Widget 1/div div class=widget absolute style=top: 250px; width: 400px; height: 350px;Widget 2/div div class=widget absolute style=top: 250px; left: 450px; width: 320px; height: 250px;Widget 3/div div class=widget absolute style=left: 285px; width: 200px; height: 150px;Widget 4/div div class=widget absolute style=left: 570px; width: 200px; height: 150px;Widget 5/div /div ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jquery inside a loop... need suggestions to improvecode
Hey thanks Daemach. I got this to work for my purpose. Btw, there was also a+ ] that was missing from the script you sent. Thanks for getting me started though. _ From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] On Behalf Of Daemach Sent: Friday, March 16, 2007 11:46 AM To: jQuery Discussion. Subject: Re: [jQuery] jquery inside a loop... need suggestions to improvecode Try this: cfoutput query=myQuery a class=tooltip id=aid_#myQuery.id# href=somepage.cfm?to=#myquery.id##myQuery.text#/a img id=imgid_#myQuery.id# src=/thumbnails/#myQuery.image# / /cfloop script type=text/javascript $(document).ready(function(){ $(img.tooltip).hide(); $(a.tooltip).each(function(){ $(this).hover(function(){ $([EMAIL PROTECTED] + this.id.split(_)[1]).show(); },function(){ $([EMAIL PROTECTED] + this.id.split (_)[1]).hide(); }); }) }); /script On 3/16/07, Michael E. Carluen mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello (CF) jQuerians, I currently have a working code but I would really like to improve and make it more efficient. Your suggestions will be great. Right now, I have a jquery script inside a loop (cfloop). The jquery is a just simple tooltip-like functionality, that shows and hides a thumbnail image on a text description hover. The image is loaded from a cfquery id variable assigned into a div id. What I'd like is to remove the jquery script outside of the cfloop, so it does not redundantly iterate when the page runs. The simplified code is as follows: cfloop query=myQuery a id=aid#myQuery.id# href=somepage.cfm?to=#myquery.id##myQuery.text#/a div id=imgid#myQuery.id#img src=/thumbnails/#myQuery.image# //div script type=text/javascript $(##imgid#myQuery.id#).hide(); $(function(){ $(##aid#myQuery.id#).hover(function(){ $(##imgid#myQuery.id#).show(); },function(){ $(##imgid#myQuery.id#).hide(); }); }); /script /cfloop If the answer seems too obvious for you, then I must say that its been a long week for me. I just need a brain boost from someone.. :-) Thank you very much in advance, for your suggestions. Michael ___ 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] How can I find out if a style class exists?
Nathan Young -X (natyoung - Artizen at Cisco) schrieb: div style=background-color:red; will be red no matter what is in the style block. Styles placed in the element attribute have the highest precedence. Unless you do (theoretically): style type=/text/css #myDiv { background-color: blue !important; } /style Practically this isn't implemented by the one browser we all love. -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How can I find out if a style class exists?
Sounds like you're looking for something like has a class with this name been defined. As far as I know, such a concept doesn't exist. But I think your approach is flawed. Instead of trying to only define a style if it didn't exist, I think you want to define the defaults first, then allow other styles to override them. --Erik On 3/16/07, Daemach [EMAIL PROTECTED] wrote: Agreed. The issue is that I don't want to override a stylesheet rule if it exists already for this element. On 3/16/07, rolfsf [EMAIL PROTECTED] wrote: well, to be clear, styles, classes and css are all different things (though obviously related) so I might be getting confused by wording about what you're trying to do. Not to mention, I'm a js newbie... :-) if you have a rule (either in the head or an external stylesheet) that says #ajaxCFCLoadingIndicator { background-color: red;} and then you dynamically create #ajaxCFCLoadingIndicator, then it has the style background-color: red ...unless, you've added a different background-color as an inline-style, either when you created the div or otherwise modified it via javascript div id=ajaxCFCLoadingIndicator style=background-color: blue; the inline or dynamically modified css will always take precedence (all else equal) r. Daemach wrote: Hmm - in theory this could work if the style was applied immediately. I guess the question is, if I'm creating this element dynamically when does the css style get applied so I can check it? I'm doing the following at the moment, but I plan on moving the .css definition to another line once I figure this out. $('div id=ajaxCFCLoadingIndicator/div').css(css).appendTo(ind[2]).hide(); On 3/16/07, rolfsf [EMAIL PROTECTED] wrote: if it's a class you're looking for, I think you can use something like if( $('#myDiv').is('.className')) {...} Daemach wrote: I'm working on something that I want a user to be able to override by including a specific class somewhere in the CSS definitions. If that class doesn't exist I want to add a default style. This seems like something that should have come up before but search isn't coming up with anything. Can someone point me in the right direction? Local styles/classes override global classes right? IOW given the following: style #myDiv {background: blue;} /style div id=myDiv style=background: red The div's background would be red, correct? -- View this message in context: http://www.nabble.com/How-can-I-find-out-if-a-%3Cstyle%3E-class-exists--tf3416167.html#a9521508 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/
Re: [jQuery] Possible BUG: One/Toggle inconsistant cross-browser
On 17/03/2007, at 1:51 AM, John Resig wrote: Could you create a ticket for this - and attach the page that you mentioned? Thanks for the good test case. http://dev.jquery.com/ --John Done: http://dev.jquery.com/ticket/1054 I hope I created it right - was my first one. Cheers Joel. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How could i build 2 steps form with thickbox?
Check out the source for thickbox. There's a function to call that hides it, I think it's TB_hide() or something. You need to call it in the context of the parent page, not the context of the iframe. So from within the iframe, you could do parent.TB_hide() or top.TB_hide(). --Erik On 3/16/07, JQuery - SimDigital [EMAIL PROTECTED] wrote: I want to build a 2 steps form with thickbox plugin, but i don't know how to do the architecture. The problem is that when i finished to fill the 2 steps, i need to close the thickbox, but i don´t know how... PS: I'm using iframe option to jump from step1 to step 2. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] json deserialization
Hello everyone, I am trying to figure out how to deserialize json data that is sent back as a response from a .post() call. I looked at the deserialization plugin 0.35that fills out a form from json-like data. But what I'm trying to do is send back arbitrary data (data, error messages etc. depending on the response from the server function) that has nothing to do with a form - the call itself is not necessarily coming from a form. .getJSON() is doing a fine job at this, but is there a way to get that functionality for .post() calls or maybe I'm missing something obvious? -- -bo ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] json deserialization
You can roll your own: jQuery.extend({ postJSON: function( url, data, callback ) { return jQuery.post(url, data, callback, json); } }); Chris ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jquery inside a loop... need suggestions to improvecode
For some reason, I often forget the closing ] when doing attribute selectors. Gets me every time. Maybe that previously suggested debug build of jQuery can have a selector syntax checker. *ducks* (kidding) --Erik On 3/16/07, Michael E. Carluen [EMAIL PROTECTED] wrote: Hey thanks Daemach. I got this to work for my purpose. Btw, there was also a+ ] that was missing from the script you sent. Thanks for getting me started though. -- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Daemach *Sent:* Friday, March 16, 2007 11:46 AM *To:* jQuery Discussion. *Subject:* Re: [jQuery] jquery inside a loop... need suggestions to improvecode Try this: cfoutput query=myQuery a class=tooltip id=aid_#myQuery.id# href=somepage.cfm ?to=#myquery.id##myQuery.text#/a img id=imgid_#myQuery.id# src=/thumbnails/#myQuery.image# / /cfloop script type=text/javascript $(document).ready(function(){ $(img.tooltip).hide(); $(a.tooltip).each(function(){ $(this).hover(function(){ $([EMAIL PROTECTED] + this.id.split(_)[1]).show(); },function(){ $([EMAIL PROTECTED] + this.id.split (_)[1]).hide(); }); }) }); /script On 3/16/07, *Michael E. Carluen* [EMAIL PROTECTED] wrote: Hello (CF) jQuerians, I currently have a working code but I would really like to improve and make it more efficient. Your suggestions will be great. Right now, I have a jquery script inside a loop (cfloop). The jquery is a just simple tooltip-like functionality, that shows and hides a thumbnail image on a text description hover. The image is loaded from a cfquery id variable assigned into a div id. What I'd like is to remove the jquery script outside of the cfloop, so it does not redundantly iterate when the page runs. The simplified code is as follows: cfloop query=myQuery a id=aid#myQuery.id# href=somepage.cfm ?to=#myquery.id##myQuery.text#/a div id=imgid#myQuery.id#img src=/thumbnails/#myQuery.image# //div script type=text/javascript $(##imgid#myQuery.id#).hide(); $(function(){ $(##aid#myQuery.id#).hover(function(){ $(##imgid#myQuery.id#).show(); },function(){ $(##imgid#myQuery.id#).hide(); }); }); /script /cfloop If the answer seems too obvious for you, then I must say that its been a long week for me… I just need a brain boost from someone…. J Thank you very much in advance, for your suggestions. Michael ___ 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] the pitfalls of jquery
Did they also require backwards compatibility with Internet Explorer 3? At least you could still use CSS1. --Erik On 3/15/07, Klaus Hartl [EMAIL PROTECTED] wrote: Benjamin Sterling schrieb: I was actually going to do Mamut's idea or a version of it. Since they don't know what jquery is, I think I can get away with it. I would probably take things out that I wont be using, but I will cross that bridge when I get there. At least you're allowed to use JavaScript. On one of my governmental projects we weren't, because it is evil. You know why, accesibility and all that, never heard of Progressive Enhancement... -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] json deserialization
Hey Chris, I wasn't aware that I could pass in a type to the post() func. I tried that and I still got the the data back as a string instead of an object. It's in the correct form {'a':4, 'b':3} but for some reason it doesn't work. I tried the same with the getJSON() funct and it returns an object as it should. I'm using the following test: // returns an object $(#example).click(function() { $.getJSON('http://localhost/e/', function(json) { alert(json); }); }); // returns a string $(#example).click(function() { $.post('http://localhost/e/', function(json) { alert(json); }, json); }); I'm using the latest jquery. -- -bo On 3/17/07, Chris Domigan [EMAIL PROTECTED] wrote: You can roll your own: jQuery.extend({ postJSON: function( url, data, callback ) { return jQuery.post(url, data, callback, json); } }); Chris ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] the pitfalls of jquery
Of course Benjamin knows that this list is public and indexed by search engines (at least Google), so he wouldn't actually rename jQuery to bQuery and honestly think he could get away with it. ;) Good luck! Brian. On 3/16/07, Chris Ovenden [EMAIL PROTECTED] wrote: On 3/15/07, Benjamin Sterling [EMAIL PROTECTED] wrote: I've worked on a project for about two months now that uses jquery for everything. Using such plugins as jqModal, blockUI, jqDebug, jqQuick, dimensions plugin, form plugin, and jqHighlightFade as well as some code I pulled out of other plugins (nextUntil (Jorn), bgIframe(?), pngFixer(actual code came from a post on the forum, I just made it into a chain-able plugin) and well as other plugins specific to this app. Feel free to take a look: http://ov-oba.informationexperts.com/ (there are a bunch of style issues I am working on now) Now coming into jQuery I new a good amount of javascript, not an expert but pretty good. But the point to this message is to show how jquery has made my life much harder. Today, I was given a project which would entail using a lot of javascript for ajax calls and some other basic stuff, and the problems is, I CAN'T USE JQUERY I feel your pain. I had to port some of my jQuery code to an eBay listing, which has very strict rules about what js functions are allowed (though won't say which exact ones). Ended up rewriting the whole lot in standard js. It's quite good for the soul ;-) That said, if your restriction is purely ideological, I'd say go with the renaming thing. Chris -- 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] fadeToggle
I think you have a point. There is also ToggleClass. Why is the Toggle in the front of ToggleClass and at the end of SlideToggle. Couldnt toggle be unified, like $(p).toggle(fade)...Disclaimer: I have no idea what I am talking about. Glen On 3/16/07, skube [EMAIL PROTECTED] wrote: I'm just wondering why since there is a slideToggle(), there isn't any such effect as fadeToggle()? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] json deserialization
Well deserializing JSON is quite trivial - you just need to do an eval on the string to get the object. // returns a object $(#example).click(function() { $.post('http://localhost/e/', function(json) { eval json=+json; alert(json); }, json); }); -Ashutosh On 3/17/07, Bojan [EMAIL PROTECTED] wrote: Hey Chris, I wasn't aware that I could pass in a type to the post() func. I tried that and I still got the the data back as a string instead of an object. It's in the correct form {'a':4, 'b':3} but for some reason it doesn't work. I tried the same with the getJSON() funct and it returns an object as it should. I'm using the following test: // returns an object $(#example).click(function() { $.getJSON('http://localhost/e/', function(json) { alert(json); }); }); // returns a string $(#example).click(function() { $.post('http://localhost/e/', function(json) { alert(json); }, json); }); I'm using the latest jquery. -- -bo On 3/17/07, Chris Domigan [EMAIL PROTECTED] wrote: You can roll your own: jQuery.extend({ postJSON: function( url, data, callback ) { return jQuery.post(url, data, callback, json); } }); Chris ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Reach1to1 Technologies http://www.reach1to1.com http://on2.biz [EMAIL PROTECTED] ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/