[jQuery] Re: val ( ) prefers labels over values?
w3schools is irrelevant to me. Despite the name it has nothing to do with the W3C and more often than not I found incorrect/incomplete information there. --Klaus On 8 Mai, 02:52, Marv mcslay...@gmail.com wrote: You may be morally correct but the label attribute of the option tag is not widely supported: http://www.w3schools.com/TAGS/att_option_label.asp On May 7, 3:47 pm, Klaus Hartl klaus.ha...@googlemail.com wrote: Don't speculate, look up:http://www.w3.org/TR/html401/interact/forms.html#h-17.6 It's valid. This attribute allows authors to specify a shorter label for an option than the content of the OPTION element. When specified, user agents should use the value of this attribute rather than the content of the OPTION element as the option label. --Klaus On 7 Mai, 20:16, James james.gp@gmail.com wrote: I don't think label inside an option is a valid attribute. I'd remove that. Is there a reason you're using that? Maybe you should consider using the title attribute instead. On May 6, 1:42 pm, Michael B. Williams mbw...@gmail.com wrote: Consider the following select box: select id=test option value=/option option label=XS value=1XS/option option label=S value=2S/option option label=M value=3M/option option label=L value=4L/option option label=XL value=5XL/option option label=0 value=60/option option label=1 value=71/option option label=2 value=82/option option label=3 value=93/option option label=4 value=104/option option label=5 value=115/option option label=6 value=126/option option label=7 value=137/option option label=8 value=148/option option label=9 value=159/option option label=10 value=1610/option option label=11 value=1711/option option label=12 value=1812/option /select If I do a $(#test).val(2) on this I would hope it would select S, but instead it selects 2. Why is this setting the value of the select box based on the label rather than based on the value attribute? I am using Safari 4, by the way. Thanks
[jQuery] @import css with link now working in IE
Hi All, I have been tearing my hair out to try and get the following to work in IE - works great in FF, Safari and Mozilla. Basically I am trying to @import the stylesheet below to override only some styles and not the entire stylesheet when the user clicks the link. Please see below: script type=text/javascript src=/Portals/19/jquery-1.3.1.min.js/script script type=text/javascript $(document).ready(function() { $(#css-timesVerdana).click(function() { $(style[type=text/css]).text('@import url(/Design001/timesVerdana.css);'); }); /script h3CHANGE THE FONT!/h3 ul li #timesVerdana /Images/Font_TimesLucinda.gif /li /ul -- View this message in context: http://www.nabble.com/%40import-css-with-link-now-working-in-IE-tp23440896s27240p23440896.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Ajax using JSON, parse return string before success
Eli Perelman ha scritto: Here is an example response: /// { detail : [{id : 1,useraccount : Alisa,datestamp : 2008-11-28 00:00:00,companyname : Allianz Life Insurance Company,officephone : 8779744653,officephoneext : ,officefax : 7635826004,address1 : 5701 Golden Hills Dr.,address2 : ,city : Minneapolis,state : MN,zipcode : 554161297,contactperson : ,contactemail : ,contactcellph : ,webaddress : ,notes : ,path : r:\images\horizontal \allianz.gif,verticalpath : r:\images\vertical \allianz_vert.gif,accountid : 1}]} /// What method are you using to create the json response? I use php, and with json_encode (php5) or the pear package (php4) when you create a json response this is automatically escaped. Then, for example : http://www.google.com/ becomes : http:\/\/www.google.com\/ and when my object is automatically evaluated by jquery if I alert my url I can see it without backslashes.. I think the problem is only this one :-) Bye -- gianiaz.net - web solutions via piedo, 58 - 23020 tresivio (so) - italy +39 347 7196482
[jQuery] json syntax question (ticket vs unticked names)
i often see two different json styles to have names: { key : value } vs { key :value } looking at official sites only option 2 is correct syntax, never the less most of the tools do also handle option 1 and don't moan about the syntax. what you say, does it in practice not matter which option you choose? generally i favor option 1 because it is not polluted with the . i wonder why this syntax wasn't official from the start thanks - manuel aldana aldana((at))gmx.de software-engineering blog: http://www.aldana-online.de -- View this message in context: http://www.nabble.com/json-syntax-question-%28ticket-vs-unticked-names%29-tp23441608s27240p23441608.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: json syntax question (ticket vs unticked names)
This all depends on where you are generating and using the json string. Doing { key : value } and then using that code immediately on the same page, typically works fine. However, if you ever need to pass your json string to/from a server, you'll find that this shortcut fails quite often. For instance, using this shortcut to request information via $.ajax(), often gives an odd error. While the request has a 200 status (meaning the request succeeded without error), the error handler function (if specified) would trigger - even though it appears the json is correct. (disclaimer - I haven't done this since 1.2.x days, so don't know if it's still the case) To avoid these errors, use the standard and do { key : value } especially when passing json via an http request (i.e to/from a server). You'll have fewer problems in the long run. My thoughts. Shawn aldana wrote: i often see two different json styles to have names: { key : value } vs { key :value } looking at official sites only option 2 is correct syntax, never the less most of the tools do also handle option 1 and don't moan about the syntax. what you say, does it in practice not matter which option you choose? generally i favor option 1 because it is not polluted with the . i wonder why this syntax wasn't official from the start thanks - manuel aldana aldana((at))gmx.de software-engineering blog: http://www.aldana-online.de
[jQuery] Two ajax call on the same page - problem with response
Hi, before posting my code, I'll try to explain the problem: i have two ajax calls on a single form, and have problems with responses from server. This is the situation: ajax1 = calls the php script that sends the email - and the script returns OK in case of success; ajax2 = binded to a link (with live() event because that link is added dinamically) that calls the php script performing some operations and returns file cancellato in case of success. If the ajax2 is called before sending the mail through ajax1, everything works, but after the ajax1 submission, if ajax2 link is clicked, the response of the script is not updated to file cancellato as it should, but it remains OK as the previous ajax1 call. How can I deal with that sort of multiple responses? The page link is http://www.prismastand.it/prismanuovo/richiesta_preventivo.php The ajax1 is binded to the submit button and the ajax2 is binded to the cancel button that appears after the file pianta stand is completely uploaded. Bye bye Alex - Italy
[jQuery] Two ajax call on the same page - problem with response
Hi, before posting my code, I'll try to explain the problem: i have two ajax calls on a single form, and have problems with responses from server. This is the situation: ajax1 = calls the php script that sends the email - and the script returns OK in case of success; ajax2 = binded to a link (with live() event because that link is added dinamically) that calls the php script performing some operations and returns file cancellato in case of success. If the ajax2 is called before sending the mail through ajax1, everything works, but after the ajax1 submission, if ajax2 link is clicked, the response of the script is not updated to file cancellato as it should, but it remains OK as the previous ajax1 call. How can I deal with that sort of multiple responses? The page link is http://www.prismastand.it/prismanuovo/richiesta_preventivo.php The ajax1 is binded to the submit button and the ajax2 is binded to the cancel button that appears after the file pianta stand is completely uploaded. Bye bye Alex - Italy
[jQuery] Re: json syntax question (ticket vs unticked names)
seriously i am not sure but sometimes i just hate to see something like var data = {.something}; var config = { data : data }; so when this happens I do var config = { 'data' : data }; just to be clear
[jQuery] Re: IE8 BlockUI incompatible
Hi Anand, the thing is, I have to block the screen while loading the page to prevent any user interaction untill the page ist completely loaded. This is working in all browsers but not in IE8. My solution right now is to set IE8 to IE7 render mode with the meta tag: meta http-equiv=X-UA-Compatible content=IE=7 / Greets, Bart
[jQuery] Re: json syntax question (ticket vs unticked names)
OK, to be standard I will go for the ticked way. Never the less I think it is unfortunate that JSON forces the name to be ticked. The JSON document gets less readable and more annoying to write. Shawn Grover wrote: This all depends on where you are generating and using the json string. Doing { key : value } and then using that code immediately on the same page, typically works fine. However, if you ever need to pass your json string to/from a server, you'll find that this shortcut fails quite often. For instance, using this shortcut to request information via $.ajax(), often gives an odd error. While the request has a 200 status (meaning the request succeeded without error), the error handler function (if specified) would trigger - even though it appears the json is correct. (disclaimer - I haven't done this since 1.2.x days, so don't know if it's still the case) To avoid these errors, use the standard and do { key : value } especially when passing json via an http request (i.e to/from a server). You'll have fewer problems in the long run. My thoughts. Shawn aldana wrote: i often see two different json styles to have names: { key : value } vs { key :value } looking at official sites only option 2 is correct syntax, never the less most of the tools do also handle option 1 and don't moan about the syntax. what you say, does it in practice not matter which option you choose? generally i favor option 1 because it is not polluted with the . i wonder why this syntax wasn't official from the start thanks - manuel aldana aldana((at))gmx.de software-engineering blog: http://www.aldana-online.de - manuel aldana aldana((at))gmx.de software-engineering blog: http://www.aldana-online.de -- View this message in context: http://www.nabble.com/json-syntax-question-%28ticket-vs-unticked-names%29-tp23441608s27240p23442738.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: json syntax question (ticket vs unticked names)
Actually, quoting is optional *EXCEPT* if member name contains spaces or is a language-specific reserved word. Try to jslint this fragment: var JSONTest = { jack johnson: john jackson, alice: bob, var: error }; Unquoting alice makes no difference; doing the same for jack johnson or var throws an error, but that's because we're dealing with JavaScript: other languages could yeld errors on different reserved words. Then, in order to pre-emptively avoid such problems, my advice is to *always* use member quoting. -- unwiredbrain Linux user #437712
[jQuery] Re: json syntax question (ticket vs unticked names)
This isn't the same thing. Consider the following code: var json1 = { jack: jack jackson }; var json2 = '{ sara: sara jones }'; In this case, json1 becomes a javascript object in memory. json2 is a string that just so happens to look like a javascript object. In the first case, this is valid because JS handles things properly. This means you can use quotes or not for the property name - both work. (unless you have spaces or other special characters in the property name). In the second case, the string will not get converted to a javascript object reliably in all cases. Because it is not a standard json string. Perhaps I mis-understood the original question, but I thought we were talking about instances where we were defining strings, in which case quoting is healthier. I personally only use the quoted property names when I am building json strings - whether server side, or client side. But if I just need to define an object client side, I don't usually bother. So, I guess the distinction is what your target data type is - string or object. With string, always quote. With object, it's optional. My thoughts. Shawn unwiredbrain wrote: Actually, quoting is optional *EXCEPT* if member name contains spaces or is a language-specific reserved word. Try to jslint this fragment: var JSONTest = { jack johnson: john jackson, alice: bob, var: error }; Unquoting alice makes no difference; doing the same for jack johnson or var throws an error, but that's because we're dealing with JavaScript: other languages could yeld errors on different reserved words. Then, in order to pre-emptively avoid such problems, my advice is to *always* use member quoting.
[jQuery] site hit count jquery / javascript code
hi al Can u please tell me the site counter hit jquery code , Am not sure there is a code in jquery , But i know the php code for site counter hit , but looking in javascript / jquery /ajax , thanks -- உங்கள் நண்பன் பரணி குமார் Regards B.S.Bharanikumar POST YOUR OPINION http://bharanikumariyerphp.site88.net/bharanikumar/
[jQuery] Re: site hit count jquery / javascript code
i'm not sure i follow, the site counter would just increment a counter in a backend database, then retrieve that value for display. jquery can POST and GET stuff to/from the backend and that's about it as far as displaying a hit counter goes. On May 8, 11:33 am, bharani kumar bharanikumariyer...@gmail.com wrote: hi al Can u please tell me the site counter hit jquery code , Am not sure there is a code in jquery , But i know the php code for site counter hit , but looking in javascript / jquery /ajax , thanks -- உங்கள் நண்பன் பரணி குமார் Regards B.S.Bharanikumar POST YOUR OPINIONhttp://bharanikumariyerphp.site88.net/bharanikumar/
[jQuery] Re: IE8 BlockUI incompatible
Hi Bart, Try the following. In your page just have an empty body tag and a script tag in the head. In the script tag, invoke blockUI and then use ajax to load the entire content into the body (or any container of your choice, really). See the following example: index.html (simplified) html head script type=text/javascript $(function() { $.blockUI({message: Loading...}); $(body).load(contenttoload.html, function() { $.unblockUI(); }); }); /script /head body id=loadwithcontent !-- empty body -- /body /html contenttoload.html (simplified) = div id=mycontent /div I hope this helps. The idea is to reduce the content-length of index.html so that the blockUI function is invoked almost as soon as the minimal html loads. Then the real content of your page can just be loaded into the body via an AJAX call. And then at the end, just unblock the UI. Do let me know if this works for you. Cheers. Anand. On Fri, May 8, 2009 at 9:10 PM, Ronen42 ba...@gmx.net wrote: Hi Anand, the thing is, I have to block the screen while loading the page to prevent any user interaction untill the page ist completely loaded. This is working in all browsers but not in IE8. My solution right now is to set IE8 to IE7 render mode with the meta tag: meta http-equiv=X-UA-Compatible content=IE=7 / Greets, Bart -- Anand Kulkarni Auckland New Zealand Mob: +64-21-2566 369 http://www.digitalpath.co.nz
[jQuery] [tooltip] - plugin - Some tooltips are not showing
Hi, I have the tooltips showing on some links but on others they don't. For example I can't get them to work on tab links I have on my page. Any ideas? Cheers Euan
[jQuery] Problem with jQuery in Firefox
Hi, I'm in a development phase of a file sharing portal and I have a problem with jQuery on the following page: http://share.home.hive-net.net/pricing. In Firefox I get an error too many recursion when changing the plans. Can you please help me get rid of it? Thanks in advance, Martin
[jQuery] Re: Duplicate error msgs (and no re-validation) in FF/Opera. Works in IE6/7
I can't see your code, pastebin said is expired, but I have a similar problem. I resolved correcting the html structure. I had this code table form tr td bla bla /td /tr /form /table (forgive me, I was refactoring a 6 years old page ;-)) when I put the form outside the table, it starts to work perfectly. I think that the delegation plugin, that is responsible for the update evetns in FF, is sensible about the html DOM. Try to validate your page, and see what happens. Bye On Mar 30, 9:27 pm, MKDRF mi...@drfrankshealthproducts.com wrote: I'm using the Validation plugin -http://bassistance.de/jquery-plugins/jquery-plugin-validation/ In IE6/7, it works fine. In FF/Opera, there are two (possibly related) problems: 1) If I submit the blank form, the validation seems to work. All of the required fields have theerrormessage appended to them as they should. However, if I submit again, a 2nd,duplicateerrormessage shows as well. This can be repeated indefinitely. 2) If I change the data an in Invalid input field, theerrormessage does not go away. Screenshots: Form:http://i41.tinypic.com/29fw8ch.gif After 1 submit:http://i41.tinypic.com/30i9nhl.gif After 2 submits:http://i43.tinypic.com/24wwy7m.gif Code:http://pastebin.com/m6e59dcaf Thanks!
[jQuery] IE7 renders twice: before and after ready() process
I have this problem: I hook a javascript function to 'ready' using javascript. This function creates and inserts a lot of html code. The trouble is that in IE7 the page renders twice: once before the inserted html is rendered, and once after it is rendered. Thus the page appears to 'jump' on insert of the generated html. In FF, safari (windows) and chrome the render is delayed until after the html is inserted, and so the page appears smoothly. Is this a known issue? Is there a workaround? Thanks, - Henrik
[jQuery] BlockUI Plugin Question
Is there a way to make the area that isn't being blocked greyed out? Ideally, it would just be opaque, so that it is obvious that the only area that can have interaction is the element being blocked. Kinda like how FancyBox or ThickBox does it http://fancy.klade.lv/example http://jquery.com/demo/thickbox/
[jQuery] Re: Tablesorter with pager extension check boxes not present on form submit
On Apr 25, 1:25 am, Jack Killpatrick j...@ihwy.com wrote: Checkbox names are only posted if they're checked. You'll need to check for the presence of the name on the server side and if it's not there, then none were checked. That's not a tablesorter issue (doesn't sound like it). Jack, I think it is related to tablesorter, actually. Consider a table, inside a form, with 20 rows, each of which has a checkbox. Apply tablesorter with the pager plugin, using the default page size of 10. Two pages will result. Check the first box on the first page, and the second box on the second. Page back and forth, noting that the state of the checkboxes is maintained. Submit the form. Only those checked checkboxes on the page visible at the time of form submission will be submitted. Without the tablesorter with pager, the form, whose first and eleventh checkboxes are checked, submits as expected. I think I'm running into the same problem as Justin and HAXEN. I intend to try removing the pagination before submitting the form, but I do wish this was something that was handled in the tablesorter / pager plugin itself. thanks, Brian
[jQuery] Special Entities returned in json via plugin Ajax upload ??
Hi I'm using the ajax upload plugin (http://valums.com/ajax-upload/) to upload images to the server. I'm then storing the images in an image cache and returning to the client 2 pieces of info in a json object, 1 the imageId the url to display the image. The problem I'm having is that the plugin doesn't work properly with json responses, presumably because it's loading the response into an iframe. When I return a json object (using zend framework) it prompts to download the object. So a solution that was working for me was just to echo the response. The problem I'm having is that the ampersands in my url are getting replace with the html Special Entities equivalent - amp; which won't do. Does anyone know of a graceful way or reverting from special entities? I'm not a javascript guru :( Thanks Brian -- View this message in context: http://www.nabble.com/Special-Entities-returned-in-json-via-plugin-Ajax-uploadtp23443935s27240p23443935.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: val ( ) prefers labels over values?
On May 8, 3:30 am, Klaus Hartl klaus.ha...@googlemail.com wrote: w3schools is irrelevant to me. Despite the name it has nothing to do with the W3C and more often than not I found incorrect/incomplete information there. --Klaus In the given page there is a button labeled 'Try it yourself', where you can empirically verify that the label attribute for an option is only supported by IE7+ :) Anyway, I agree that the value should take precedence over the option's text when using val() as a setter. Worth filing a ticket. cheers -- ricardo
[jQuery] append() and the browser back button
Hi, I use append() to add html fragments to a page dynamically. This works fine until the user navigates to another page and then clicks on the browser back button. The dynamically added html fragments are no longer visible. I read somewhere that dynamically added elements are not remembered by the browser and therefore the back button will only render the original page (without the dynamically added elements). Does anyone know of a way to solve this problem? Thank you.
[jQuery] Re: IE7 renders twice: before and after ready() process
Post your code On May 7, 8:58 pm, Henrik Bechmann hbechm...@gmail.com wrote: I have this problem: I hook a javascript function to 'ready' using javascript. This function creates and inserts a lot of html code. The trouble is that in IE7 the page renders twice: once before the inserted html is rendered, and once after it is rendered. Thus the page appears to 'jump' on insert of the generated html. In FF, safari (windows) and chrome the render is delayed until after the html is inserted, and so the page appears smoothly. Is this a known issue? Is there a workaround? Thanks, - Henrik
[jQuery] Re: NEW jQuery Cheat Sheet for 1.3.2
Looks good mate! On May 7, 10:01 am, Matt Kruse m...@thekrusefamily.com wrote: I've updated my previous cheat sheet to be in line with jQuery 1.3.2. I think it's more useful than other cheat sheets that simply dump method names, but hey, that's personal preference ;) http://www.javascripttoolbox.com/jquery/cheatsheet/ Enjoy Matt Kruse
[jQuery] Re: NEW jQuery Cheat Sheet for 1.3.2
Nice work Matt! I always like when there's a quick 1 page lookup like this available On May 8, 10:24 am, Rogue Lord corrupted.rog...@gmail.com wrote: Looks good mate! On May 7, 10:01 am, Matt Kruse m...@thekrusefamily.com wrote: I've updated my previous cheat sheet to be in line with jQuery 1.3.2. I think it's more useful than other cheat sheets that simply dump method names, but hey, that's personal preference ;) http://www.javascripttoolbox.com/jquery/cheatsheet/ Enjoy Matt Kruse
[jQuery] Re: json syntax question (ticket vs unticked names)
Both are valid javascript, but only one is valid json. However many json parsers are leaniant in what they accept. var moo = { foo: bar } // this is javascript, not json. JSON.stringify(moo) should give '{ foo: bar }' // this is json. So if you are passing json to something, it needs to be quoted, if you are providing a javascript snippet you can do whatever
[jQuery] jQuery cluetip plugin
In my Rails 2.3.2 application, the plugin is working for me, but I am unable to customize anything. Here is my setup: 1. In my application.html.erb file, I have the following: %= javascript_include_tag jquery.js, jquery-ui.js, jquery.hoverIntent.js, jquery.cluetip.js, jrails.js % %= stylesheet_link_tag 'web_app_theme', themes/#...@current_theme}/ style, 'web_app_theme_ext', 'ui.theme.css', 'ui.core.css', 'ui.accordion.css','jquery.cluetip.css' % script type=text/javascript $(document).ready(function() { $(#accordion).accordion({ autoHeight: false, event: 'mouseover' }); $(.tip).cluetip(); }); /script This is in the head section. The accordion plugin works perfectly and customizations are working too, but not in the cluetip plugin. The javascript files are stored in public/javascripts per Rails convention. Similarly, the stylesheet files are stored in the public/ stylesheets directories. Even the changes that I am making to the default section of jquery.cluetip.css file are not being picked up. My Rails application is loading the CSS file fine since I can see it in the footnotes display. Is there a way to debug this problem? Thanks. Bharat
[jQuery] jQuery append returning document or head is null error
Dear Folks, I am getting a document or head is null error. I have explained the context below. It is a long email; please bear with me. I am uploading a file using an iframe as follows: form id=file_upload_form some stuff... input type=submit value=submit onclick=upload_file(); /form iframe id=upload_target name=upload_target src= style=width: 0;height:0;border:0px solid #fff;/iframe script type=text/javascript document.getElementById('file_upload_form').target = upload_target; upload_file = function() { jQuery('#file_upload_form').submit(); } /script The file is submitted and returns the HTML code below that is passed to the iframe: html head required javascript files /head body namespace.reload_tab(); /body /html The reload_tab function is executed and targets elements outside the iframe like so: jQuery(window.top.getElementById('some id').some_function(); The final step of this function appends some HTML using jQuery's append. This works, but an error is returned after the HTML is rendered in Firebug as follows: document or head is null The error is reported as being in the globalEval function in jQuery and complains about the line below: var head = document.getElementsByTagName(head)[0] || document.documentElement, script = document.createElement(script); I believe that jQuery is not finding a particular element in the DOM because it is not using 'window.top.getElementById()' which it may need to execute to access elements outside the iframe. However, the HTML is appended correctly so I do not understand why this is happening. Thanks in advance, Cheers, Nandu
[jQuery] jQuery - UI - Dialog (embedding a web page)
Hi all, Just starting with jQuery... Q1) What is the most elegant way to embed another web page into a dialog? Use an IFrame? Q2) Can't get a width of 600px ... Q3) With Ie 6.x, my embedded web page appears first on the top-left and then fades out into the UI-dialog breaking it !?! Q4) No modal working... Some code: ** head link type=text/css href=http://jqueryui.com/latest/themes/base/ ui.all.css rel=stylesheet / script type=text/javascript src=http://jqueryui.com/latest/ jquery-1.3.2.js/script script type=text/javascript src=http://jqueryui.com/latest/ui/ ui.core.js/script script type=text/javascript src=http://jqueryui.com/latest/ui/ ui.draggable.js/script script type=text/javascript src=http://jqueryui.com/latest/ui/ ui.resizable.js/script script type=text/javascript src=http://jqueryui.com/latest/ui/ ui.dialog.js/script script type=text/javascript $(document).ready(function(){ $(#dialog).dialog(); $('.selector').dialog({ width: 600 }); $('.selector').dialog({ modal: true }); }); /script /head body style=font-size:62.5%; div style=height: 600px; min-height: 100px; min-widht: 109px; width: 600px; id=dialog title=titre iframe src=http://www.ibm.com/; width=700 height=700 marginwidth=0 marginheight=0 frameborder=no scrolling=yes style=border-width:2px; border-color:#333; background:#FFF; border- style:solid; /iframe /div /body ** Any pointers appreciated! Dualflex
[jQuery] Re: extract base url
you can try this: window.location.href = 'http://www.google.co.za?key=' + val1; after: you can try this: window.location.href = 'http://www.google.co.za?key=' + val2;
[jQuery] Re: AJAX Problem
Awesome, Mauricio had the right solution. I had figured that e was working on the link, but now that I think about it, that makes no sense. So that works, now I have to figure out how to inject the incoming html, because apparently that's not working, just not sure yet if it's my javascript or my PHP (I'm working with CakePHP). Thanks for your help. On May 7, 4:43 pm, Mauricio \(Maujor\) Samy Silva css.mau...@gmail.com wrote: -Mensagem Original- De: Arak Tai'Roth nielsen.dus...@gmail.com ... Here is my code: $(document).ready(function(){ $('#events_box a.ajax_replace').click(function(e){ e.preventDefault(); $('.news_border').slideUp('slow'); $.ajax({ method: 'get', url: e.attr('href'), data: { 'do' : '1' }, ... - You are catching the URL for request in a wrong way. There isn't an object *e.attr('href')* Try this: $(document).ready(function(){ $('#events_box a.ajax_replace').click(function(e){ e.preventDefault(); var url = $(this).attr('href'); == add $('.news_border').slideUp('slow'); $.ajax({ method: 'get', url: url, == modified data: { 'do' : '1' }, ... Maurício
[jQuery] Format of the image
Hello dear friends, this is the first time I write to group, so here we go... I'm having a doubt about how to do a photo gallery. My client wants a gallery where the photos SHALL have this format: http://farm4.static.flickr.com/3357/3512424193_b9f5159e69.jpg?v=0 I thought about the use of image maps, but I think it's a little complicated... What do you suggest, or the photo gallery can't be like the link above? I think that is much more easy to a simple photo gallery, but the client is insisting with this idea. Thanks for all! Pedro Vidal
[jQuery] Re: AJAX Problem
Awesome, Mauricio had the right solution. I had figured that e was working on the link, but now that I think about it, that makes no sense. So that works, now I have to figure out how to inject the incoming html, because apparently that's not working, just not sure yet if it's my javascript or my PHP (I'm working with CakePHP). --- It appear that there is nothing wrong with the jQuery sintax. Does you made what Arak pointed? method: 'get' should be: type: 'get' Maurício
[jQuery] Re: BlockUI Plugin Question
I'm going to go back and confirm this, but it was not showing that effect on FF3.0.1 on Linux, but it is working on FF3.0.1 on windows and IE8 on windows. Jonathon Suggs jsu...@gmail.com (256) 874-2425 cell (615) 309-5953 ext 104 On Fri, May 8, 2009 at 12:38 AM, jsuggs jsu...@gmail.com wrote: Is there a way to make the area that isn't being blocked greyed out? Ideally, it would just be opaque, so that it is obvious that the only area that can have interaction is the element being blocked. Kinda like how FancyBox or ThickBox does it http://fancy.klade.lv/example http://jquery.com/demo/thickbox/
[jQuery] Re: jQuery - UI - Dialog (embedding a web page)
On Fri, May 8, 2009 at 10:40 AM, DualFlex frank.fourn...@gmail.com wrote: Hi all, Just starting with jQuery... Q1) What is the most elegant way to embed another web page into a dialog? Use an IFrame? Most elegent would be to call .dialog() on the iframe itself: $(iframe).dialog() or $(#theidoftheiframe).dialog(); Q2) Can't get a width of 600px ... see below Q3) With Ie 6.x, my embedded web page appears first on the top-left and then fades out into the UI-dialog breaking it !?! Put style=visibility:hidden on the iframe (or its container) initially. Q4) No modal working... see below Some code: ** head link type=text/css href=http://jqueryui.com/latest/themes/base/ ui.all.css rel=stylesheet / script type=text/javascript src=http://jqueryui.com/latest/ jquery-1.3.2.js http://jqueryui.com/latest/%0Ajquery-1.3.2.js/script script type=text/javascript src=http://jqueryui.com/latest/ui/ ui.core.js/script script type=text/javascript src=http://jqueryui.com/latest/ui/ ui.draggable.js/script script type=text/javascript src=http://jqueryui.com/latest/ui/ ui.resizable.js/script script type=text/javascript src=http://jqueryui.com/latest/ui/ ui.dialog.js/script script type=text/javascript $(document).ready(function(){ $(#dialog).dialog(); The first call to .dialog() is an init. The options are optional. So you can call $(#dialog).dialog() to initialized a dialog with the default options, or $(#dialog).dialog({ width: 600, modal: true }) to initialize a dialog overriding two of the default options $('.selector').dialog({ width: 600 }); $('.selector').dialog({ modal: true }); The '.selector' is a placeholder in the documentation. It's mean to be replaced by whatever selector you're using to get to the element. In this case '#dialog'. As I said above, the first .dialog() call on an element is an init. Any subsequent calls in which you pass an options hash will be ignored. In order to get or set options after init, you call the dialog option method: $(#dialog).dialog(); // init with default options $(#dialog).dialog(option, width, 600); // set dialog option width to 600 $(#dialog).dailog(option, modal, true); // set dialog option modal to true There are full code examples of getting and setting each option in the documentation: http://docs.jquery.com/UI/Dialog#option-width http://docs.jquery.com/UI/Dialog#option-modal Note: there's a dedicated mailing list for jQuery UI questions: http://groups.google.com/group/jquery-ui If you need any further help, see you there. - Richard
[jQuery] Re: jQuery cluetip plugin
I am now able to load images/colors out of the CSS file but cluetip iteself refuses to recognize any options that I set so for example if I say $(.tip).cluetip({arrows: true}); It does not honor the arrows options setting same thing for sticky: true, etc. Any ideas?
[jQuery] Re: AJAX Problem
Yea I changed method to type, but it still isn't working. Here is my code for the controller (if you don't know CakePHP, this likely won't mean anything to you): function view($slug) { if ($this-RequestHandler-isAjax()) { $dbdirector = $this-Director-find('first', array( 'conditions' = array( 'Director.slug' = 'slug' ), 'fields' = array( 'Director.id', 'Director.name', 'Director.description', 'Director.picture' ) )); $this-set('dbdirector', $dbdirector); Configure::write('debug', 0); $this-pageTitle = 'URSU - Director ' . $dbdirector['Director'] ['name']; } else { $this-redirect('/directors/'); $this-exit(); } } And my code for my corresponding view.ctp file: ?php echo $html-image('/img/directors/uploads/thumb.medium.' . $dbdirector ['Director']['picture'], array('alt' = $dbdirector['Director'] ['name'])); echo $dbdirector['Director']['description']; if ($admin) { echo 'div class = admin'; echo $html-link('Edit Director', '/directors/edit/' . $dbdirector ['Director']['id']); echo ' --- '; echo $html-link('Delete Director', '/directors/delete/' . $dbdirector['Director']['id'], null, 'Are you sure you want to delete this director?'); echo '/div'; } ? What happens is a person goes to the index page, clicks a link, this gets processed by the AJAX request, which sends it off to function view ($slug), which sets all the data and sends that data to view.ctp, which then creates all of the html which I was hoping would be injected into the div set in the ajax request. On May 8, 9:16 am, Mauricio \(Maujor\) Samy Silva css.mau...@gmail.com wrote: Awesome, Mauricio had the right solution. I had figured that e was working on the link, but now that I think about it, that makes no sense. So that works, now I have to figure out how to inject the incoming html, because apparently that's not working, just not sure yet if it's my javascript or my PHP (I'm working with CakePHP). --- It appear that there is nothing wrong with the jQuery sintax. Does you made what Arak pointed? method: 'get' should be: type: 'get' Maurício
[jQuery] Re: jQuery cluetip plugin
Do you have a page somewhere that I can take a look at? Which version of clueTip are you using? thanks, --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On May 8, 2009, at 12:29 PM, Bharat wrote: I am now able to load images/colors out of the CSS file but cluetip iteself refuses to recognize any options that I set so for example if I say $(.tip).cluetip({arrows: true}); It does not honor the arrows options setting same thing for sticky: true, etc. Any ideas?
[jQuery] treeview
hi all, I'm a developer...I'm customizing the treeview plugin to use it in a site where i need also a breadcrumb (designer request...) and to highlight the selected node. I am totally new in JQuery affair... I've used it before only in a deaf way, without any kind of customization. I'm used to write js code totally on my own according to my needs... So (referring to the standard 'menu3' example) I added to every span tag an onclick link to a customized function and a class to persist the selection style. OK it works on every browser. The selected item on every node is highlighted, and the selection of another item resets all the situation on his level and children, and so on = perfect! But last AND least, to use the breadcrumbs, I added an ID to every tag (at the time in a static way, but if the testing will be successful,dynamically with ASP in the future), in order to drive the tree with an external crumb function. In this way, with testing purposes, from a dummy anchor I fire the function that sounds like this (assuming that on the current situation I want to open an item on the 2nd sublevel, and that it's the first step in this development...the function can be dinamized better!): document.getElementById(rootLevelItem).click(); document.getElementById(1st sublevelItem).click(); document.getElementById(2nd sublevelItem).click(); OK works perfectly in IE... the menu opens at the desired node as I want! Other step: I need to make it working on Firefox, Safari, Flock, Chrome...and so on. So I tried the FF version of the js method .click() -- .onclick() document.getElementById(rootLevelItem).onclick(); document.getElementById(1st sublevelItem).onclick(); document.getElementById(2nd sublevelItem).onclick(); and...surprise! The tree does not react in any manner, but my own functions that manage the style of the spans are perfectly working, and I can test them opening the tree in a manual way. So it seems that the jQuery code reacts to the click() method for IE, but not to the onclick() method for the other browsers. (they show ALL the same problem). Now I only can ask you - jQuery experts! - WHY jQuery does not react to this js method. I'm afraid to handle jQuery code directly...I'm too 'novice' for it. And I've too many tasks open at the moment, so I can't waste too much time. And -sure!- I don't want to write a custom-hybrid treemenu and a breadcrumbs using Flex, thing that I and my co-developer had already done for another site, and that I consider full of problems, time- expensive and too complicate, like killing a fly with a bazooka. Many many thanks in advance. Diego GPC
[jQuery] JQModal + Accordion
Hello everyone, Ive been trying to work on jQModal + Accordion combination but so far have no luck at all. JQmodal is fine until i installed the accordion. Have you ever done this? If so, what scripts, version did you use? Thanks :)
[jQuery] [autocomplete]
Hello all, I am successfully using the jQuery autocomplete plugin provided by http://docs.jquery.com/Plugins/Autocomplete and it works great. I was just wondering if there was any way to group results when displayed in the dropdown selector. For instance, we have a requisition with many line items. When they search for the line items, I would like it to display as follows: Requisition 123456789 20,000lbs of Some Stuff 15,000lbs of Something Else Requisition 987654321 300,000lbs of Yet Another Thing Ideally, only the actual line items would be selectable. Does anyone have any experience getting this to work? Thanks very much for any insight!
[jQuery] Re: AJAX Problem
Okay, so correction, I got it, it was a dumb mistake, makes me thing I should go back to high school to learn how to spell. Anyways, while I'm here, is there anyway I can force the callback function beforeSend to run for a certain amount of seconds before to stops running? Essentially what I want is to force the loading animation I have going to run for at least 3 seconds or so before the content loads, so it doesn't give a seizure inducing flash while 3 things happen all at once because the content loads too fast. On May 8, 10:40 am, Arak Tai'Roth nielsen.dus...@gmail.com wrote: Yea I changed method to type, but it still isn't working. Here is my code for the controller (if you don't know CakePHP, this likely won't mean anything to you): function view($slug) { if ($this-RequestHandler-isAjax()) { $dbdirector = $this-Director-find('first', array( 'conditions' = array( 'Director.slug' = 'slug' ), 'fields' = array( 'Director.id', 'Director.name', 'Director.description', 'Director.picture' ) )); $this-set('dbdirector', $dbdirector); Configure::write('debug', 0); $this-pageTitle = 'URSU - Director ' . $dbdirector['Director'] ['name']; } else { $this-redirect('/directors/'); $this-exit(); } } And my code for my corresponding view.ctp file: ?php echo $html-image('/img/directors/uploads/thumb.medium.' . $dbdirector ['Director']['picture'], array('alt' = $dbdirector['Director'] ['name'])); echo $dbdirector['Director']['description']; if ($admin) { echo 'div class = admin'; echo $html-link('Edit Director', '/directors/edit/' . $dbdirector ['Director']['id']); echo ' --- '; echo $html-link('Delete Director', '/directors/delete/' . $dbdirector['Director']['id'], null, 'Are you sure you want to delete this director?'); echo '/div'; } ? What happens is a person goes to the index page, clicks a link, this gets processed by the AJAX request, which sends it off to function view ($slug), which sets all the data and sends that data to view.ctp, which then creates all of the html which I was hoping would be injected into the div set in the ajax request. On May 8, 9:16 am, Mauricio \(Maujor\) Samy Silva css.mau...@gmail.com wrote: Awesome, Mauricio had the right solution. I had figured that e was working on the link, but now that I think about it, that makes no sense. So that works, now I have to figure out how to inject the incoming html, because apparently that's not working, just not sure yet if it's my javascript or my PHP (I'm working with CakePHP). --- It appear that there is nothing wrong with the jQuery sintax. Does you made what Arak pointed? method: 'get' should be: type: 'get' Maurício
[jQuery] [tooltip] interactive tooltips
Anybody ever made interactive tooltips based on the tooltip plugin? I mean tooltips with links and other html elements inside. The problem is that the tooltip dissappears after a short time. Is there a setting for this? Otherwise I will code an extension. Thanks, Narnarnar
[jQuery] Re: jQuery - UI - Dialog (embedding a web page)
Many thanks Richard! It's working! I have a few new twists. Meet you in the other forum! --- Dualflex
[jQuery] Re: Problem with jQuery in Firefox
obj.find(input[name='plan_price']:radio).click(); //is creating the recursive loop On May 8, 12:59 am, MC Lueppers mdob...@gmail.com wrote: Hi, I'm in a development phase of a file sharing portal and I have a problem with jQuery on the following page:http://share.home.hive-net.net/pricing. In Firefox I get an error too many recursion when changing the plans. Can you please help me get rid of it? Thanks in advance, Martin
[jQuery] Problem with keyup event from Learning jQuery 1.3
Hi I am currently learning jQuery from the book Learning jQuery 1.3 and I have run across a block of code that is not working for me in FF or Safari. Here it is copied straight from the book (page 64) $(document).ready(function() { $(document).keyup(function(event) { switch (String.fromCharCode(event.keyCode)) { case 'D': $('#switcher-default').click(); break; case 'N': $('#switcher-narrow').click(); break; case 'L': $('#switcher-large').click(); break; } }); }); I tested the next step that accomplishes the same thing with different code but I would like to understand why this is not working. Any help would be appreciated. Cheers, Eric
[jQuery] .load(function() not working
I have a piece of code which has worked great in the past on this very site, but for some reason now, has stopped working. I put in the .ready function to try and fix it bc I understand that is a crucial peice of syntax for jquery. Still the code does not work. Everything in this code is not being executed, its like the code is being ignored. [CODE] script type=text/javascript !-- we run in the footer so no need to use onload -- $(document).ready(function(){ $('#zoe img').load(function() { $(#graphic).hide(); $(#illustration).hide(); $(#photography).hide(); $(table.contact).hide(); $(span.form).hide(); $(div.pics).hide(); $(img.gradualshine).hide(); $(#zoe).slideDown(3000, function(){ $(span#options).slideDown(1000); $(img#photo).slideDown(1000); $(img#illus).slideDown(1000); $(img#grphc).slideDown(1000); }); }); }); /script [/CODE] If you would like details on the rest of the code, it can be found at: http://royalvillicus.com/photo_site/photo.php Thanks a lot for all your help
[jQuery] Re: .load(function() not working
you must have a huge monitorhorizontal scrolling is a big no no. I too have had issues with .load()...it will not run scripts that are dynamically loaded into the DOM...i've seen a few things out there talking about combatting this issue most of which include searching the loaded content for script tags then telling them to execute...I'm still at a loss for what is the best way to pull in content. I'm starting to think it is via the $.ajax() method to return json and format it for the dom on the way in. On May 8, 12:11 pm, surreal5335 surrea...@hotmail.com wrote: I have a piece of code which has worked great in the past on this very site, but for some reason now, has stopped working. I put in the .ready function to try and fix it bc I understand that is a crucial peice of syntax for jquery. Still the code does not work. Everything in this code is not being executed, its like the code is being ignored. [CODE] script type=text/javascript !-- we run in the footer so no need to use onload -- $(document).ready(function(){ $('#zoe img').load(function() { $(#graphic).hide(); $(#illustration).hide(); $(#photography).hide(); $(table.contact).hide(); $(span.form).hide(); $(div.pics).hide(); $(img.gradualshine).hide(); $(#zoe).slideDown(3000, function(){ $(span#options).slideDown(1000); $(img#photo).slideDown(1000); $(img#illus).slideDown(1000); $(img#grphc).slideDown(1000); }); }); }); /script [/CODE] If you would like details on the rest of the code, it can be found at: http://royalvillicus.com/photo_site/photo.php Thanks a lot for all your help
[jQuery] Re: .load(function() not working
On May 8, 3:22 pm, timbrown timmay.br...@gmail.com wrote: you must have a huge monitorhorizontal scrolling is a big no no. I too have had issues with .load()...it will not run scripts that are The load() in this case has nothing to do with the ajax method, it's adding an onload event listener. On May 8, 12:11 pm, surreal5335 surrea...@hotmail.com wrote: I have a piece of code which has worked great in the past on this very site, but for some reason now, has stopped working. I put in the .ready function to try and fix it bc I understand that is a crucial peice of syntax for jquery. Still the code does not work. Everything in this code is not being executed, its like the code is being ignored. The load event doesn't fire in some browsers if the image is cached. Try this: http://snipt.org/Xlj
[jQuery] How to destroy a tooltip?
I'm using tooltips on a file list. When I delete a file (and it's DOM structure representation) that has a tooltip I'm getting an error at line 232. setting(current) is undefined if (event) { 231 // position the helper 15 pixel to bottom right, starting from mouse position 232 left = event.pageX + settings(current).left; 233 top = event.pageY + settings(current).top; 234 var right='auto'; 235 if (settings(current).positionLeft) { 236 right = $(window).width() - left; 237 left = 'auto'; 238 } 239 helper.parent.css({ 240 left: left, 241 right: right, 242 top: top 243 }); 244 } Is there any way to destroy the tooltip when I remove the DOM element that has the tooltip? Thanks, -ml
[jQuery] Re: Please Wait While Processing help
In case anyone stumbles onto this discussion looking for specifics, the following is what i ended up doing: *** $('#processing-EventListing') { $().ajaxStart(function() { $.blockUI( { message: $('img#ProcessingBar'), css: { border: 'none', padding: '15px', backgroundColor: '#000', '-webkit-border-radius': '10px', '-moz-border-radius': '10px', opacity: '.5' } }) }) .ajaxStop( $.unblockUI ) } *** I put this in an external function and called the function within my document.ready. There is also a div included here (shown below). *** div id=processing-EventListingimg id=ProcessingBar src=/ demo_images/processing_bar.gif style=display:none //div /div *** This is, of course, in addition to installing the blockUI plugin stated above by Mike. Together, this will be called during anything/everything that has a load time. Should you not want that. Don't put the function in the document.ready. Instead, simply call the function when you have use of it. Thanks for the guys for pointing me in the right direction. I hope anyone stumbling into this discussion finds what I've written useful
[jQuery] Re: AJAX Problem
De: Arak Tai'Roth nielsen.dus...@gmail.com Okay, so correction, I got it, it was a dumb mistake, makes me thing I should go back to high school to learn how to spell. Anyways, while I'm here, is there anyway I can force the callback function beforeSend to run for a certain amount of seconds before to stops running? Essentially what I want is to force the loading animation I have going to run for at least 3 seconds or so before the content loads, so it doesn't give a seizure inducing flash while 3 things happen all at once because the content loads too fast. --- Use the standard JavaScript method setTimeout Maurício
[jQuery] Re: .load(function() not working
Sorry about the awful horizontal scrolling, its not meant to be like that. My belief is that once I am able to get the .load function working again, that problem will also fix itself bc the jcarousellite plugin will opperate properly again. Or atleast it will fix one of the problems toward reslolving the big issue. All the images at the bottom of the screen are not suppose to be there (which is causing the horizontal scroll) by hiding them with the .load function, it will be fixed. Hate to say it but the suggestion you made didnt take, I tried it with and without the .ready function. As for the browser, I have been using firefox 3 the entire time. when it was working and afterwards as well. It was working great until I made some changes to the code (but only elements to hide, fade, slidedown, etc.) afterwards it hasnt worked since and tried everything to revert it back but cant figure it out what it wants from me. Could I try the onload function? and put that in the header? I really appreciate all the help
[jQuery] [Validation] Email
I noticed that if you do the email: true in the validation and then try and type an email such as: em...@example.com.com it will mark it as valid. Is this intended? Even says its valid on your test page at: http://docs.jquery.com/Plugins/Validation/Methods/email
[jQuery] Cookie 'current' state question for horizontal menu with drop downs
I searched and found this thread... http://groups.google.com/group/jquery-en/browse_thread/thread/f118475a14a5245a/e60e972d364f11d0?lnk=gst which is very helpful for list based menus with a need for a current state. But I have a similar request that I hope to solve with your help. I have a horizontal Nav with drop downs only on a few items in the main nav. I don't want the drop downs to stay persistant on screen with a 'current' state rather I would like to have the parent (main nav) to be 'down' if the child's pages are selected and also of course the parent to be 'down' if on that page. I am using a slightly visually modified version of this: http://be.twixt.us/jquery/suckerFish.php Can you guys help me please? BTW - This is my first post - so thanks in advance!
[jQuery] Problems with JQuery Cycle Plugin and IE6
Hi, I am having a problem with IE6 and the cycle plugin. In IE6 it shows a black background over my div background image (I set via css a background image to a master div). cleartype set to false, cleartypeNoBg to true. I am cycling transparent png images. In IE7+ and Firefox everything is ok. Any tip? Thanks Chris
[jQuery] Re: Is there an easy way to do this?
Thanks, This works the first time, but when the div refreshes (shows any errors and displays the form again) the page refreshes when you click the submit button again, it does not just refresh the div. any reason why? you can see a working version at http://thefast-track.com/test.php Thanks Brian On Thu, May 7, 2009 at 8:44 PM, Leonardo K leo...@gmail.com wrote: Something like this: function send(){ var params = $(#commentsForm).serialize(); $.post(subscribe.php, params, function(data){ $(#updateDiv).html(Data Loaded: + data); }); } On Thu, May 7, 2009 at 19:40, Brian Yanosik byano...@gmail.com wrote: I am moving all of my scripts from mootools/scriptlicious to jquery. I was easly able to submit a form and update a div (based on the output of the php file) as follows: script type=text/javascript function send(){ var params = Form.serialize($('commentsForm')); new Ajax.Updater('updateDiv', '/subscribe.php', {asynchronous:true, parameters:params}); } /script I can't seem to find ta way to do this easily with jquery. Can anyone point me in the right direction? Thanks Brian
[jQuery] Re: what happened to galleriffic?
Seems like the site is up again Jack. Rey Jack Killpatrick wrote: Hi, Does anyone know if the galleriffic plugic is available somewhere new? I started a project with it last week, pulled from here: http://www.twospy.com/galleriffic/ but when I went there yesterday it wasn't working and isn't today, either. Thanks, Jack
[jQuery] Re: Problem with keyup event from Learning jQuery 1.3
Hi Eric, It could be that you haven't included the rest of the code that actually binds the click handlers to those elements. It's probably not entirely clear that the code snippet isn't sufficient by itself to trigger the style switching. It needs the previous code along with it. Sorry about that. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On May 8, 2009, at 1:52 PM, EricC wrote: Hi I am currently learning jQuery from the book Learning jQuery 1.3 and I have run across a block of code that is not working for me in FF or Safari. Here it is copied straight from the book (page 64) $(document).ready(function() { $(document).keyup(function(event) { switch (String.fromCharCode(event.keyCode)) { case 'D': $('#switcher-default').click(); break; case 'N': $('#switcher-narrow').click(); break; case 'L': $('#switcher-large').click(); break; } }); }); I tested the next step that accomplishes the same thing with different code but I would like to understand why this is not working. Any help would be appreciated. Cheers, Eric
[jQuery] Re: Scoping issue with load and call back function.
Josh and all, I figured out a way around the issue using the ajaxStop function. The ajaxStop event is triggered when all outstanding requests (load in this case) are complete. When this happens all the tables I wish to load are loaded to the document. My original code was trying to grab information with the load callback function and store in a global variable. This will not work. Instead, I load the desired pages to a hidden element. Then when the pages are loaded (ajaxStop event triggered), I can then process the tables and pull out the desired information and build a new table. There may be a better way to do this, perhaps on the server side rather than on the client in the document. But at the moment this is what I need. Thanks for the help. $('#display_merge').ajaxStop(function() { }; On May 7, 12:31 pm, Josh Nathanson joshnathan...@gmail.com wrote: Well it's a little tricky because of the asynchronicity. The way I might handle it is to set some kind of isLoaded global object that gets poplulated each time an async call returns. You more or less already have that. Then, create a polling function using setInterval or setTimeout that checks every 500ms or so to see if that isLoaded object is completely populated. Once you determine that it is, then generate the combined table. -- Josh -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Stever Sent: Thursday, May 07, 2009 4:28 AM To: jQuery (English) Subject: [jQuery] Re:Scopingissue with load and call back function. Josh, First the firstload=0 and not resetting the variable was left off. But ultimately is unrelated to the asynchronous problem you pointed out. Asynchronous loading makes a big difference here. As a pretty recent user of jquery, I obviously designed this code wrong. So here is what I what to do. I have multiple web pages on a server that have summary result tables for different products. I want to read each of these summary tables and combine the results into one single table. My thought was to use Jquery Load to load each table and read the information and store into the global arrays, TableCell, TableRow and TableColumn. Apparently this approach is flawed. Can you or someone on this group recommend/outline a way to accomplish this relatively simple task? Thanks!! Steve On May 6, 7:13 pm, Josh Nathanson joshnathan...@gmail.com wrote: OK it looks like you have a few things to sort out here. One thing is that you have to remember that load is asynchronous. So when that is fired the rest of your code will continue along its merry way. In other words the loop will keep looping independent of the callback function firing. My hunch is that this will give you unexpected values for the variable [i] in the load callback function. Because of this you will probably have to do some refactoring to get the results you're looking for. Not sure though if you intend to run that load on every iteration of the loop or just the first one. Also you may have left this out, but I see you have a firstload = 1 declaration, but then you don't set it to 0. This could also be messing up your results as it will run every time unless you set it to 0 somewhere. Definitely leave the variable declarations outside document ready as in your second email. -- Josh -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Stever Sent: Wednesday, May 06, 2009 4:31 PM To: jQuery (English) Subject: [jQuery] Re:Scopingissue with load and call back function. Josh thanks for the quick response. I tried putting the variables var TableCells =[,]; var TableRowName =[,]; var TableColName =[,]; outside the document ready function. Originally. (not redefined with var inside document ready shown here). script type=text/javascript src=http://www.hou.asp.ti.com/ sparcit_data_reports//js/jquery.js/script script type=text/javascript var devList = [ PART_1 ]; var TableCells =[,]; var TableRowName =[,]; var TableColName =[,]; $(document).ready(function(){ $.ajaxSetup({cache: false}) ; var firstLoad = 1; for( var i =0; i devList.length; i++) { // set the path var path = url + devList[i] ; var colName =[]; var rowName =[]; var cellValue = []; //load the page but collect the table info if (firstLoad == 1) { $('#display').load(path, function(){ manipulate tables and put data in Global Array TableCells[i] = cellValue; TableRowName[i] = rowName; TableColName[i] = colName; }); var lenTable2 = TableColName[i].length; } } }); So where I
[jQuery] Superfish
Hello, I need help with superfish drop down menu on my 1.5.10 Joomla site For about three days I have been trying to install it through my admin section but never got to run. I was able to install suckerfish and I had it running, but with superfish, I have no idea what to do next after I have installed it. See the steps below and tell me if I am doing it wrong: 1- I download the file from http://joomlacode.org/gf/project/superfishmodule/frs and save it into my pc; 2- I just install it from my admin section at Joomla by going to extensions install... 3- I go to modulo manager, locate the superfish menu and assign an existing menu, I usually use my top menu one. 4- I publish the superfish menu and create new sub menus from selected menu. 5- I link to css and js from my index page...using the codes on this page: http://users.tpg.com.au/j_birch/plugins/superfish/ After that, I just save it, refresh my site and no result. Please tell me what am I doing wrong. Regards, Realty4Real
[jQuery] Superfish - only hide one level - how to?
i am looking for a way to have superfish only hide the secondary navigation but not other levels - for example i have a horizontal nav bar with my primary navigation on it - i would like for the secondary AND tertiary navigation to show when i mouseover a main nav element. is there any way to show the 3rd level nav inline? level one a | level one b | level one c level 2 a level 2 b level 3a level 3 b level 2 c level 2 d etc...
[jQuery] Tablesorter - multiple header cells and row grouping
each quot;rowquot;has a row beneath it with a quot;menuquot; part to edit / view the record etc. using css the menu is set to display:none. when a user clicks the record jquery does a .show() on the menu row/p pis it posible to sort the columns preserving the record row and menu row (maybe grouping them with a class or something) the sort to not read the menu row. and if you click on ID / Client / Cm on any of the quot;sectionsquot; (Display / Classifieds) it sorts that colum for the whole table... so say i click on cm under classifieds it also orders the colum acordingly for display/p pnbsp;/p table width=400 border=1 cellspacing=0 cellpadding=0 tr td colspan=3Display/td /tr tr thID/th thClient/th thCm/th /tr tr td1/td tdxx/td td16/td /tr tr td colspan=3view | edit/td /tr tr td2/td tdyy/td td3/td /tr tr td colspan=3view | edit/td /tr tr td colspan=3Classifieds/td /tr tr thID/th thClient/th thCm/th /tr tr td3/td tdzz/td td45/td /tr tr td colspan=3view | edit/td /tr tr td4/td tdaa/td td32/td /tr tr td colspan=3view | edit/td /tr tr td5/td tdbb/td td17/td /tr tr td colspan=3view | edit/td /tr tr td6/td tdcc/td td87/td /tr tr td colspan=3view | edit/td /tr /table p im sure i can build an ajax thing to reload the table and do the sorting server side but was kinda hoping against that
[jQuery] sorting a table
each rowhas a row beneath it with a menu part to edit / view the record etc. using css the menu is set to display:none. when a user clicks the record jquery does a .show() on the menu row is it posible to sort the columns preserving the record row and menu row (maybe grouping them with a class or something) the sort to not read the menu row. and if you click on ID / Client / Cm on any of the sections (Display / Classifieds) it sorts that colum for the whole table... so say i click on cm under classifieds it also orders the colum acordingly for display i checked out tablesorter but its not quite working... help? table structure demo http://www.press-store.co.za/store/adbookerv4/tablesorter.asp
[jQuery] Re: jQuery - UI - Dialog (embedding a web page)
well you could use .load() to load a page into a div inside the dialog... then open it. i dont like using iframes *waits for the flameing* On May 8, 7:23 pm, DualFlex frank.fourn...@gmail.com wrote: Many thanks Richard! It's working! I have a few new twists. Meet you in the other forum! --- Dualflex
[jQuery] Get attribute of the parent element into a variable
Hi, All. Kind of new to jQuery, but having fun with it. Would like to learn how to do the following... 1) Target the active a. 2) Find the parent li. 3) Grab the value of the attribute jcarouselindex and put it in a variable to be used elsewhere. Sample code below... ul id=carousel li class=carousel-item jcarouselindex=1 a href=/someurlimg src=someimage.jpg alt= / /li li class=carousel-item jcarouselindex=1 a class=active href=/someurlimg src=someimage.jpg alt= / /li /ul Thanks for your help!
[jQuery] Re: animating div when the mouse is over
I still have hard time making it works. ANY IDEAS ARE WELCOME. thanks and have a nice weekend Sig On May 4, 10:39 am, Macsig sigbac...@gmail.com wrote: Any ideas? Thanks On May 4, 12:50 am, Macsig sigbac...@gmail.com wrote: Hi, I think I have solved it but now an other question for you: can I display by default the right part of the image? THANKS Sig On May 4, 12:23 am, macsig sigbac...@gmail.com wrote: Hi guys, I have a couple of images with width = 280px and I would like to display, when the page is loaded, only a piece of them (the left 240px) and all the image once themousegoesoverthe image. This is the html (for 1 image) divclass=badge style=width: 240px; height:78px; overflow: hidden;img src=badge_1.gif //div And here my script $(document).ready(function(){ $('badge').hover(function() { $(this).animate({ width: 280px}); }, function() { $(this).animate({ width: 240px}); $(this).css({ overflow, hidden}); } ); }); I have added the last line because without it thedivbecomes 240px but right after that since the image is 280px it returns to 280px. But with that line I get : invalid object initializer: $(this).css({ overflow, hidden}); How can I get the effect I wish??? Thanks and have a nice day! Sig