Re: [jQuery] Wildcards
Hi Aaron, actually this seems broken. I have tested it some weeks before, but forgot to add a bug report. 2007/1/3, Aaron Heimlich <[EMAIL PROTECTED]>: > This might help: > > $("[EMAIL PROTECTED]'del']").id("del*"+pb+"*"+iA+"*ck"); > > It selects any element whose "id" attribute begins with "del"[1] > > [1] > http://jquery.com/docs/Base/Expression/CSS/#Supportedbutdifferent > > > On 1/3/07, Bruce MacKay <[EMAIL PROTECTED]> wrote: > > > > > > Hello folks, > > > > Can wildcards be used in the following context... > > > > I change the ID of an "a" tag surrounding an icon (that when clicked > triggers a delete function) from its original setting of "del" to a string > containing info (pb, iA) about the item (to be deleted) by: > > > > $("#del").id("del*"+pb+"*"+iA+"*ck"); > > > > This only "works" for the first iteration. If I subsequently select > another item to be deleted, the ID of the "a" tag is no longer just "del" > and so obviously the ID of the a tag won't be changed because it cannot be > found. Is there a way that I can use some type of wildcard to find an > element (and in this case there will only ever be a single element) whose id > begins with "del"... eg. > > > > $("#del??).id("del*"+pb+"*"+iA+"*ck"); > > > > so that I can subsequently change its ID to reflect the item I am wanting > to delete? > > > > Thanks, > > > > Bruce > > ___ > > jQuery mailing list > > discuss@jquery.com > > http://jquery.com/discuss/ > > > > > > > > > > -- > Aaron Heimlich > Web Developer > [EMAIL PROTECTED] > http://aheimlich.freepgs.com > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > > -- -- Paul Bakaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] dynamic loading of jquery.js into my web page
Hi, >function addScript( url ) { > var script = document.createElement( 'script' ); > script.type = 'text/javascript'; > script.charset = 'utf-8'; > script.src = url; > document.getElementsByTagName('head')[0].appendChild( script ); >}; There are safari-versions which don't eval scripts like that. That is the reason, why jspax uses XMLHttpRequest and eval() if possible and inserts a script tag if XMLHttpRequest is not available (that deffinatelly is not that Safari version then). > addScript('jquery.js'); And then you guess the time when jquery is loaded. You can not expect that jQuery is available when addScript returns. With jsPax you use $using('jquery',function() { alert('jQuery is now available'); }); > I would recommend doing a search on the Nabble mailing list page for this, > as it has been covered many times before. Yes, and we had the problem with Safari in almost every thread about this issue. We also had the problem of knowing the moment, the script has been loaded almost in every one of those threads. Sorry Dan, but I thought you really should have come across those issues. Christof ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Please wait.. tutorial
yep. blockUI is indeed slow on linux. not as slow as i initally stated (my machine was probably busy with something) but there is about 3 seconds delay before anything happens. unfortunately that's not a specific fault of blockUI but a general problem with alpha transparency under linux. alpha is *slow* under linux, dog slow. while it's fast enough for fading/blending small elements, it falls down hard when it comes to overlaying the whole canvas with a transparent layer. and blockUI does just that (for fading out the background), thus it has the same problem that all implementations of lightbox and similar gadgets have. it takes literally 2-3 seconds before anything happens when you click on one of the test-buttons. since blockUI is generally a very useful thing i'd like to propose a fairly simple workaround: just don't do the blending when firefox/linux is detected - only display the popup. this should be an easy hack and you'd really do us linux users a favor. :) ~moe On Wed, Jan 03, 2007 at 12:09:54PM -0800, bander wrote: > > FF1.5/Linux consistently takes a little over three seconds on my computer to > display the overlay, but the input elements are blocked immediately. The > functionality is beautiful, but I think that lag is just too long. > > > moe-14 wrote: > > > > just a word of warning, blockUI causes 100% cpu-load on > > firefox2/linux (jumpy mouse cursor and all) and it takes > > about 10 seconds for the "please wait"-overlay to appear > > while the desktop is basically frozen. > > > > can anyone reproduce that? (i just clicked on some of > > the test-buttons, happens every time). > > > > ~moe > > > > > > -- > View this message in context: > http://www.nabble.com/Please-wait..--tutorial-tf2903421.html#a8147752 > 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] traverseDir and addDir jquery plugins
Read directories dynamically (and recursively) http://jpassoc.com/demo/traverseDir/ the base for my dog's web pages. http://jpassoc.com/junior/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] noob q - using $().html
I should have mentioned that I changed the HTML as well. I added an ID to the submit button (submit-member). Notice how the event is being triggered now: $('#submit-member').click(function() {...}); Since var username = $(this).prev().val() is appearing inside the click method, $(this) refers to the submit button, prev() refers to the previous sibling of that button, which should be the text input, and val() refers to the value of that text input. Now I'm wondering, though, what you're trying to accomplish with the code. As Doug noted, it doesn't look like you really need a form at all to do what you're trying to do. But it's kind of hard to advise on that without knowing the larger context. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 3, 2007, at 8:53 PM, Daniel McBrearty wrote: $(document).ready(function() { $('#submit-member').click(function() { var username = $(this).prev().val(); $("#member_info").html(username); return false; }); }); Ok, I'm looking at this. I moved the js into a seperate file. I am calling the function OK when the button is clicked. But something seems wrong with var username = $(this).prev().val(); which is ending up as undef. I don't actually understand this line - how is it getting the value out of the form? "this" seems to be the button itself. I also tried something like var username = $("#username").val(); to try to select the text box directly and get the value, but no joy either. thanks again ... gonna sleep now :-) -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] center() plugin
I can't seem to find the center() plugin that is listed at visualjquery.com, anyone know where it is? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Error: 'nodeName is null or not an object' (What am I doing wrong?)
Is there a way we can see this in action, I looked at the code and nothing jumps out at me. -- View this message in context: http://www.nabble.com/Error%3A-%27nodeName-is-null-or-not-an-object%27-%28What-am-I-doing-wrong-%29-tf2916968.html#a8153074 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] properly unbinding events will give u $5 if you can figure it out
my apology. This method does work; however, it has to be this way: selectors.bind("contextmenu", function() { document.oncontextmenu = function(){ return false; }; eip.initMenu (this, e.clientX, e.clientY); //I tried eip.initMenu (selectors, e.clientX, e.clientY); but didn't work so I tried this since it refers to itself. }) Anyways, i THINK i got it working now. I use a flags to trigger true/false in certain places and was able to make it not draw the menu but not really unbind it. Sorry for if I sounded like an ass but I wasn't. Shortcut is awesome! Learn something new everyday. =) Jörn Zaefferer wrote: > > xmrcivicboix schrieb: >> the script itself is here: >> https://crux.baker.edu/~thuynh01/eip/static_pages/eip.js >> > You can simplify begin quite a lot: > var selectors = $("[EMAIL PROTECTED]"); > selectors.bind("contextmenu", function() { > $(this).css("background-color", "transparent"); > document.oncontextmenu = function(){ return false; }; > eip.initMenu(selectors[i], e.clientX, e.clientY); > }).hover( > function() { $(this).css("background-color", "red"); }, > function() { $(this).css("background-color", "transparent"); } > ); > > Not winning 5$ here, but when you apply this and simplify other stuff, > it would be much easier to find the actual problem. > > -- > Jörn Zaefferer > > http://bassistance.de > > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > -- View this message in context: http://www.nabble.com/properly-unbinding-events-will-give-u-%245-if-you-can-figure-it-out-tf2916367.html#a8152963 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] noob q - using $().html
True, but if it's not meant to be submittable, you could always just remove the form tags as well. Klaus Hartl wrote: > Doug Tabacco schrieb: >> As several others have pointed out, the problem is that the form is >> submitting. If that's not what you eventually want to happen, why not >> just make the submit input into a button input (type="button")? > > I'm sure you will still be able to submit the form by hitting enter... > > > -- Klaus > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] noob q - using $().html
> > > > type="text/javascript"> > > $(document).ready(function() { > $('#submit-member').click(function() { > var username = $(this).prev().val(); > $("#member_info").html(username); > return false; > }); > > }); > > > Ok, I'm looking at this. I moved the js into a seperate file. I am calling the function OK when the button is clicked. But something seems wrong with var username = $(this).prev().val(); which is ending up as undef. I don't actually understand this line - how is it getting the value out of the form? "this" seems to be the button itself. I also tried something like var username = $("#username").val(); to try to select the text box directly and get the value, but no joy either. thanks again ... gonna sleep now :-) -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] noob q - using $().html
Doug Tabacco schrieb: > As several others have pointed out, the problem is that the form is > submitting. If that's not what you eventually want to happen, why not > just make the submit input into a button input (type="button")? I'm sure you will still be able to submit the form by hitting enter... -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] noob q - using $().html
As several others have pointed out, the problem is that the form is submitting. If that's not what you eventually want to happen, why not just make the submit input into a button input (type="button")? Daniel McBrearty wrote: > Hi > > Just getting into using js to do things. I'm just experimenting right now. > > Here is my example code: > > > > > > function findMember(form){ > $("#member_info").html(form.username.value); > } > > > > >value="Find by Username"> > > > now what happens when I fill in a value and click is that the value I > entered into the text box appears in the "member_info" ... but > disappears again almost straight away. > > any ideas? > > thanks. the lib looks nice and clean BTW. > > Daniel > ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] best practice OOP for use with jQuery
Hey, folks. I have a question about best practices for writing object-oriented code for use in jQuery. I've been working through understanding this issue and figured the geniuses on this forum would be the ones to ask for advice. I've created an example page with documented source (don't worry, it's a really small example): http://briz.glyphix.com/js-scope/ I'm mostly interested in how to cleanly and reliably deal with scope issues in callbacks. More specifically: - When jQuery uses .apply() or .call() in its callbacks, how can one be sure of variable scope? - Is there any chance the jQuery.foo object will clobber other instances of the same object? - Or that these objects will become detached from their elements? - This is overkill for such a simple example, but is it a good approach for moderately complex code? -- _ Brad Brizendine CTO, Glyphix http://www.glyphix.com/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] noob q - using $().html
> All your solutions don't take into account that IE6 will still submit > the form if you hit enter Good catch, Klaus. As usual! ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] noob q - using $().html
On Jan 3, 2007, at 8:05 PM, Klaus Hartl wrote: All your solutions don't take into account that IE6 will still submit the form if you hit enter - that was discussed a while back and here's the test page for this: http://stilbuero.de/demo/jquery/submit_test.html -- Klaus Good point, Klaus. I should have known... --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] noob q - using $().html
thanks a lot guys. That 's really a great response. I got it to basically work, now I'll read through your suggestions and clean it up. I'm still learning ... :-) thanks again. Daniel On 1/4/07, Karl Swedberg <[EMAIL PROTECTED]> wrote: > Okay, so Mike and Blair got back to you before I could, but I'm going to > answer anyway. > > They're right, of course, that you need to return false, because you want to > stop the default action. > > One of the great things about jQuery is that it lets you easily separate > behavior from content. So I would suggest pulling the onclick handler out of > the input. Here is what it would look like with the script in the , > but ideally you should put it in another file and include it the same way > you include jquery.js: > > > > type="text/javascript"> > > $(document).ready(function() { > $('#submit-member').click(function() { > var username = $(this).prev().val(); > $("#member_info").html(username); > return false; > }); > > }); > > > > > > > > > > > > > > You should also put DTD, etc. in there. I'm just taking shortcuts for the > sake of brevity. > > > --Karl > _ > Karl Swedberg > www.englishrules.com > www.learningjquery.com > > > > > On Jan 3, 2007, at 7:37 PM, Daniel McBrearty wrote: > > Hi > > Just getting into using js to do things. I'm just experimenting right now. > > Here is my example code: > > > > > > function findMember(form){ > $("#member_info").html(form.username.value); > } > > > > >value="Find by Username"> > > > now what happens when I fill in a value and click is that the value I > entered into the text box appears in the "member_info" ... but > disappears again almost straight away. > > any ideas? > > thanks. the lib looks nice and clean BTW. > > Daniel > > -- > Daniel McBrearty > email : danielmcbrearty at gmail.com > www.engoi.com : the multi - language vocab trainer > BTW : 0873928131 > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > > -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] noob q - using $().html
Karl Swedberg schrieb: > Okay, so Mike and Blair got back to you before I could, but I'm going to > answer anyway. > > They're right, of course, that you need to return false, because you > want to stop the default action. > > One of the great things about jQuery is that it lets you easily separate > behavior from content. So I would suggest pulling the onclick handler > out of the input. Here is what it would look like with the script in the > , but ideally you should put it in another file and include it the > same way you include jquery.js: > > > > > > $(document).ready(function() { > $('#submit-member').click(function() { > var username = $(this).prev().val(); > $("#member_info").html(username); > return false; > }); > > }); > > All your solutions don't take into account that IE6 will still submit the form if you hit enter - that was discussed a while back and here's the test page for this: http://stilbuero.de/demo/jquery/submit_test.html -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] properly unbinding events will give u $5 if you can figure it out
Theres no problem with doing it like that AFAIK, jquery will take each matched element and bind it properly. On 1/3/07, xmrcivicboix <[EMAIL PROTECTED]> wrote: selectors.bind("contextmenu", function() { }); would not work because you're binding ALL elements that begins with 'eip-' rather than EACH individual element. Jörn Zaefferer wrote: > > xmrcivicboix schrieb: >> the script itself is here: >> https://crux.baker.edu/~thuynh01/eip/static_pages/eip.js >> > You can simplify begin quite a lot: > var selectors = $("[EMAIL PROTECTED]"); > selectors.bind("contextmenu", function() { > $(this).css("background-color", "transparent"); > document.oncontextmenu = function(){ return false; }; > eip.initMenu(selectors[i], e.clientX, e.clientY); > }).hover( > function() { $(this).css("background-color", "red"); }, > function() { $(this).css("background-color", "transparent"); } > ); > > Not winning 5$ here, but when you apply this and simplify other stuff, > it would be much easier to find the actual problem. > > -- > Jörn Zaefferer > > http://bassistance.de > > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > -- View this message in context: http://www.nabble.com/properly-unbinding-events-will-give-u-%245-if-you-can-figure-it-out-tf2916367.html#a8151746 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] noob q - using $().html
Okay, so Mike and Blair got back to you before I could, but I'm going to answer anyway. They're right, of course, that you need to return false, because you want to stop the default action. One of the great things about jQuery is that it lets you easily separate behavior from content. So I would suggest pulling the onclick handler out of the input. Here is what it would look like with the script in the , but ideally you should put it in another file and include it the same way you include jquery.js: $(document).ready(function() { $('#submit-member').click(function() { var username = $(this).prev().val(); $("#member_info").html(username); return false; }); }); You should also put DTD, etc. in there. I'm just taking shortcuts for the sake of brevity. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 3, 2007, at 7:37 PM, Daniel McBrearty wrote: Hi Just getting into using js to do things. I'm just experimenting right now. Here is my example code: function findMember(form){ $("#member_info").html(form.username.value); } now what happens when I fill in a value and click is that the value I entered into the text box appears in the "member_info" ... but disappears again almost straight away. any ideas? thanks. the lib looks nice and clean BTW. Daniel -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] noob q - using $().html
Mike Alsup schrieb: >> now what happens when I fill in a value and click is that the value I >> entered into the text box appears in the "member_info" ... but >> disappears again almost straight away. > > Try: onclick="findMember(this.form); return false;"... > > Without the "return false" in there you're going to submit the form. I think you can still submit the form by hitting enter... at least in one or the other browser. -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] noob q - using $().html
Daniel McBrearty schrieb: > Hi > > Just getting into using js to do things. I'm just experimenting right now. > > Here is my example code: > > > > > > function findMember(form){ > $("#member_info").html(form.username.value); > } > > > > >value="Find by Username"> > > > now what happens when I fill in a value and click is that the value I > entered into the text box appears in the "member_info" ... but > disappears again almost straight away. > > any ideas? > > thanks. the lib looks nice and clean BTW. Yes, it's because the form gets submitted and the page gets immediatly reloaded. That takes a little while so you still can see the page before the refresh with the value put into the p. A nice and clean solution would look like this: * stop the form from submitting * use proper events to catch all submits, not only clicking the submit button (you could hit enter in the form) * don't pollute your HTML with inline event handler attributes. * Do you really need the name attribute for the form? It's deprecated, you should use id as identifier and can leave away the method, GET is default. Here's my proposal: $(function { $('#find_member').submit(function() { var username = $('[EMAIL PROTECTED]"username"]', this).val(); $('#member_info').html(username); return false; }); }); Cheers, Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] noob q - using $().html
it's a form.. it's submitting. you get a new page... it's gone! if you target the form into an iframe you might get your desired results. On 1/3/07, Daniel McBrearty <[EMAIL PROTECTED]> wrote: > Hi > > Just getting into using js to do things. I'm just experimenting right now. > > Here is my example code: > > > > > > function findMember(form){ > $("#member_info").html(form.username.value); > } > > > > >value="Find by Username"> > > > now what happens when I fill in a value and click is that the value I > entered into the text box appears in the "member_info" ... but > disappears again almost straight away. > > any ideas? > > thanks. the lib looks nice and clean BTW. > > Daniel > > -- > Daniel McBrearty > email : danielmcbrearty at gmail.com > www.engoi.com : the multi - language vocab trainer > BTW : 0873928131 > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] noob q - using $().html
I think the form may be submitting. The whole page is reloading when you click submit. Try onClick="findMember(this.form; return false;". Blair On 1/4/07, Daniel McBrearty <[EMAIL PROTECTED]> wrote: Hi Just getting into using js to do things. I'm just experimenting right now. Here is my example code: function findMember(form){ $("#member_info").html(form.username.value); } now what happens when I fill in a value and click is that the value I entered into the text box appears in the "member_info" ... but disappears again almost straight away. any ideas? thanks. the lib looks nice and clean BTW. Daniel -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] noob q - using $().html
> now what happens when I fill in a value and click is that the value I > entered into the text box appears in the "member_info" ... but > disappears again almost straight away. Try: onclick="findMember(this.form); return false;"... Without the "return false" in there you're going to submit the form. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] noob q - using $().html
Hi Just getting into using js to do things. I'm just experimenting right now. Here is my example code: function findMember(form){ $("#member_info").html(form.username.value); } now what happens when I fill in a value and click is that the value I entered into the text box appears in the "member_info" ... but disappears again almost straight away. any ideas? thanks. the lib looks nice and clean BTW. Daniel -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Bug in jquery? (IFrame, Ajax & Firefox)
Sorry. I got mixed up with another thread! :D Blair On 1/4/07, Hermann-Marcus Behrens <[EMAIL PROTECTED]> wrote: Hello again, I found the solution: Firebug is installed and made the problem. Firebug Beta 2 is supposed to solve this problem. Found it in Google-Groups: http://groups.google.de/group/firebug/browse_thread/thread/5657136676445980/c6096190d5759b71?lnk=st&q=nsIXMLHttpRequest.setRequestHeader&rnum=1#c6096190d5759b71 Greetings, Hermi -- Hermann-Marcus Behrens Mail: [EMAIL PROTECTED] Telefon: 0421 - 16 80 800 Fax: 0421 - 16 80 80 80 citybeat.de Zum Huchtinger Bahnhof 13 28259 Bremen ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Need help dealing with duplicate ID's in different forms
Jeremy Dill schrieb: > I am working on an application which uses a jquery to show and hide > preloaded layers sort of like netvibes.com. Another aspect of my > application involves dynamic creation of forms. When these forms are > created, they are given an ID based on an ID in the database. > > It all worked out great before I went with the layering idea. The > problem now is that I am often loading the same form elements on > different layers, and therefore the standard selector method of > $("#InputElementID") will not work since there are duplicate ID's hidden > in the background (in forms with different ID's). > > So, > > 1) Do you think it will be reasonable to use a different selector method > to access the Input elements based on a combination of form ID and > element ID, rather than strictly by element id? If so, what syntax > should I use? I have tried the context selector $('#InputID', > myFormObj) without much success. Is there a better method? > > Or, > > 2) Am I crazy to be creating a page containing duplicate elements even > though they are contained in different forms? Yes to number 2) ;-) An id serves as a *unique* identifier and as such it is supposed to be unique in a document. Scripting on top of an invalid HTML document won't make your life any easier. That said, I strongly recommend another solution (creating valid, e.g. unique ids, use classes) but maybe you can get away with that: $('#formId #inputId') or (slower) $('#formId [EMAIL PROTECTED]"inputId"]') Again, you should consider this as a *dirty hack* and search for a proper solution. -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Error: 'nodeName is null or not an object' (What am I doing wrong?)
Hi folks, I'm creating several divs which represent "rows" of a "table". It's not really a table though, it's table-like using divs and spans. It works great. Just the way I want. But... I'm trying to make it so that when you click on one of the "rows" it changes the background color. It already does this on mouseover and mouseout, and that works great. When clicking the row highlights and stays highlighted whether the user rolls over it or not. This works great for all but the very last row. When I click on the last row nothing happens. If I attempt to alert its "RowState" (On/Off i.e. selected/not selected), I get the "nodeName is null or not an object" error. Basically, the user creates this "table" on the fly, by choosing dates from a calendar (along with some other items on the screen) and clicking "add". This information is written to a structure on my server using ajax and the array indexes that were added to the structure get returned. These index numbers get attached to each "row" so that I can identify it later (like when the user wants to remove it). The following are the two functions involved (the one that makes the ajax call and makes the divs) and the other is the click handler. There is a div (not shown) with an ID of "OrderList". NOTE: The double pounds (##) are not a mistake. This is the way ColdFusion escapes the pound sign. So that's not any part of it. Can anybody tell me what the heck I'm doin' wrong here? :o/ Cheers, Chris PS. There is a side issue I'm having in that for the "rows" that will highlight properly, it's a bit slow. probably a second to a second-and-a-half before the background color changes. Is there a better way I should be doing this? I'm trying to use classes instead of changing the css directly (i.e. $("#ID").css("backgroundcolor", "red"); ). Thanks again! Chris -- snip -- function AddToPending(){ var OTAIndex = 0; var i, NumberOfRows, ThisRow, RowClass, ThisIndex; var SelectedDates = ""; var OrdersToAdd = new Array; // gather relevant data from the DOM var CostCenterInfo= $("##CostCenterName_ID").val(); CostCenterInfo= CostCenterInfo.split("~"); //var CostCenterID= CostCenterInfo[0]; var CostCenterName= CostCenterInfo[1]; var ShiftData= $("##Shift_ID").val(); ShiftData= ShiftData.split("~"); var ShiftCode= ShiftData[0]; var ShiftID= ShiftData[1]; var ShiftName= ShiftData[2]; var Classification= $("##Classification_ID").val(); var Quantity= $("##Quantity_ID").val(); var SpecialInstructions= $("##SpecialInstructions_ID").val(); // this one gets the dateValue of each selected cell and adds everything to the array of structs. $("[EMAIL PROTECTED]").each(function() { OrdersToAdd[OTAIndex] = new Object; OrdersToAdd[OTAIndex].ShiftDate = this.dateValue; OrdersToAdd[OTAIndex].CostCenterName = CostCenterName; OrdersToAdd[OTAIndex].ShiftName = ShiftName; OrdersToAdd[OTAIndex].ShiftID = ShiftID; OrdersToAdd[OTAIndex].ShiftCode = ShiftCode; OrdersToAdd[OTAIndex].Classification = Classification; OrdersToAdd[OTAIndex].Quantity = Quantity; OrdersToAdd[OTAIndex].SpecialInstructions = SpecialInstructions; OTAIndex++; }); if(!OTAIndex){alert("Please select at least one date from the calendars on the left.");return;} /* */ OrdersToAddJSON = $.toJSON(OrdersToAdd); $.ajax({ type: "POST", url: "JSON_WriteOrderData.cfm", datatype: "html", data: "ClientNumber=#ThisClientNumber#&OrderStruct=" + OrdersToAddJSON, success: function(IndexList) { NumberOfRows = CFJS.ListLen(IndexList); for(i = 0; i < NumberOfRows; i++){ ThisIndex= CFJS.ListGetAt(IndexList, i + 1); ThisTmpDate = $.odbcDateTimeParse(OrdersToAdd[i].ShiftDate); ThisMonth= ThisTmpDate.getMonth() + 1; ThisDay= ThisTmpDate.getDate(); ThisYear= ThisTmpDate.getFullYear(); ThisDate= ThisMonth + "/" + ThisDay + "/" + ThisYear; RowClass= "OddRow"; if(i % 2){ RowClass = "EvenRow"; } ThisRow = ""; ThisRow += "+ "\" RowType=\"" + RowClass + "\" RowState=\"Off\" ListRowIndex=\"" + ThisIndex + "\">\n"; ThisRow += "" + ThisDate + " \n"; ThisRow += "" + CostCenterName + " \n"; ThisRow += "" + ShiftName + " \n"; ThisRow += "" + Classification + " \n"; ThisRow += "" + Quantity + "\n"; ThisRow += ""; $("##OrderList").append(ThisRow); } $(".OrderEntryListRow").mouseover(function(){
Re: [jQuery] properly unbinding events will give u $5 if you can figure it out
selectors.bind("contextmenu", function() { }); would not work because you're binding ALL elements that begins with 'eip-' rather than EACH individual element. Jörn Zaefferer wrote: > > xmrcivicboix schrieb: >> the script itself is here: >> https://crux.baker.edu/~thuynh01/eip/static_pages/eip.js >> > You can simplify begin quite a lot: > var selectors = $("[EMAIL PROTECTED]"); > selectors.bind("contextmenu", function() { > $(this).css("background-color", "transparent"); > document.oncontextmenu = function(){ return false; }; > eip.initMenu(selectors[i], e.clientX, e.clientY); > }).hover( > function() { $(this).css("background-color", "red"); }, > function() { $(this).css("background-color", "transparent"); } > ); > > Not winning 5$ here, but when you apply this and simplify other stuff, > it would be much easier to find the actual problem. > > -- > Jörn Zaefferer > > http://bassistance.de > > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > -- View this message in context: http://www.nabble.com/properly-unbinding-events-will-give-u-%245-if-you-can-figure-it-out-tf2916367.html#a8151746 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Bug in jquery? (IFrame, Ajax & Firefox)
Hello again, I found the solution: Firebug is installed and made the problem. Firebug Beta 2 is supposed to solve this problem. Found it in Google-Groups: http://groups.google.de/group/firebug/browse_thread/thread/5657136676445980/c6096190d5759b71?lnk=st&q=nsIXMLHttpRequest.setRequestHeader&rnum=1#c6096190d5759b71 Greetings, Hermi -- Hermann-Marcus Behrens Mail: [EMAIL PROTECTED] Telefon: 0421 - 16 80 800 Fax: 0421 - 16 80 80 80 citybeat.de Zum Huchtinger Bahnhof 13 28259 Bremen ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Bug in jquery? (IFrame, Ajax & Firefox)
You can use XMLHttpRequest to submit files. Ever. The only way to do AJAX file subission is to create an invisible iframe and set that frame as the target of an ordinary form. When the form is submitted, the iframe uploads the file and downloads the resulting page and executes any script in it, which then calls some callback function on the orginonal page. There are probably better explanations out there :). Blair On 1/4/07, Hermann-Marcus Behrens <[EMAIL PROTECTED]> wrote: Hello, I developed a small Ajax-chat. Now I switched to an IFrame-solution to "outsource" the scripts to a different server. Now I get this nasty bug (only on newest Firefox 2.0.0.1, Opera and IE are fine): [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.setRequestHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://hetzner7.citybeat.de/include/jquery-1.0.4.js?a=d :: anonymous :: line 1905" data: no] The error seems to be on line 1905: xml.setRequestHeader("X-Requested-With", "XMLHttpRequest"); I'm using the latest official jquery v1.0.4. If I call the IFrame-page directly, everything works. This error only occurs, when the ajax is called from within an Iframe. --- My Script (nothing special): $.ajax({ type : 'GET', url : url, dataType : 'script', success : function(html) { alert("suceess"); } }); --- On December the 10th someone reported this bug in this mailing-list ( http://www.nabble.com/find-cause-of-uncaught-exception-tf2790738.html#a7786143 ) but the bug disappeared, when he switched to the latest 1.0.4. Unfortunately this did not work for me. Does some has a solution/workaround? Greetings from germany, Hermann-Marcus Behrens -- Hermann-Marcus Behrens Mail: [EMAIL PROTECTED] Telefon: 0421 - 16 80 800 Fax: 0421 - 16 80 80 80 citybeat.de Zum Huchtinger Bahnhof 13 28259 Bremen ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Need help dealing with duplicate ID's in different forms
Jeremy Dill schrieb: > So, > > 1) Do you think it will be reasonable to use a different selector > method to access the Input elements based on a combination of form ID > and element ID, rather than strictly by element id? If so, what syntax > should I use? I have tried the context selector $('#InputID', > myFormObj) without much success. Is there a better method? > > Or, > > 2) Am I crazy to be creating a page containing duplicate elements even > though they are contained in different forms? > How about referencing the elements by name? $("[EMAIL PROTECTED]", currentForm) -- Jörn Zaefferer http://bassistance.de ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Bug in jquery? (IFrame, Ajax & Firefox)
Hello, I developed a small Ajax-chat. Now I switched to an IFrame-solution to "outsource" the scripts to a different server. Now I get this nasty bug (only on newest Firefox 2.0.0.1, Opera and IE are fine): [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.setRequestHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://hetzner7.citybeat.de/include/jquery-1.0.4.js?a=d :: anonymous :: line 1905" data: no] The error seems to be on line 1905: xml.setRequestHeader("X-Requested-With", "XMLHttpRequest"); I'm using the latest official jquery v1.0.4. If I call the IFrame-page directly, everything works. This error only occurs, when the ajax is called from within an Iframe. --- My Script (nothing special): $.ajax({ type : 'GET', url : url, dataType : 'script', success : function(html) { alert("suceess"); } }); --- On December the 10th someone reported this bug in this mailing-list (http://www.nabble.com/find-cause-of-uncaught-exception-tf2790738.html#a7786143 ) but the bug disappeared, when he switched to the latest 1.0.4. Unfortunately this did not work for me. Does some has a solution/workaround? Greetings from germany, Hermann-Marcus Behrens -- Hermann-Marcus Behrens Mail: [EMAIL PROTECTED] Telefon: 0421 - 16 80 800 Fax: 0421 - 16 80 80 80 citybeat.de Zum Huchtinger Bahnhof 13 28259 Bremen ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Need help dealing with duplicate ID's in different forms
I am working on an application which uses a jquery to show and hide preloaded layers sort of like netvibes.com. Another aspect of my application involves dynamic creation of forms. When these forms are created, they are given an ID based on an ID in the database. It all worked out great before I went with the layering idea. The problem now is that I am often loading the same form elements on different layers, and therefore the standard selector method of $("#InputElementID") will not work since there are duplicate ID's hidden in the background (in forms with different ID's). So, 1) Do you think it will be reasonable to use a different selector method to access the Input elements based on a combination of form ID and element ID, rather than strictly by element id? If so, what syntax should I use? I have tried the context selector $('#InputID', myFormObj) without much success. Is there a better method? Or, 2) Am I crazy to be creating a page containing duplicate elements even though they are contained in different forms? Thanks, Jeremy ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] properly unbinding events will give u $5 if you can figure it out
xmrcivicboix schrieb: > the script itself is here: > https://crux.baker.edu/~thuynh01/eip/static_pages/eip.js > You can simplify begin quite a lot: var selectors = $("[EMAIL PROTECTED]"); selectors.bind("contextmenu", function() { $(this).css("background-color", "transparent"); document.oncontextmenu = function(){ return false; }; eip.initMenu(selectors[i], e.clientX, e.clientY); }).hover( function() { $(this).css("background-color", "red"); }, function() { $(this).css("background-color", "transparent"); } ); Not winning 5$ here, but when you apply this and simplify other stuff, it would be much easier to find the actual problem. -- Jörn Zaefferer http://bassistance.de ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Recent updates to the form plugin
> Thanks for clearInputs. Did you resolve the bug in resetForm? Yes, resetForm does a fn test before invocation (which is a pain in IE because IE reports that the reset method is an 'object'!) ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] properly unbinding events will give u $5 if you can figure it out
how about disabling the "edit" command in the menu when an editor is open for that item? On 1/3/07, xmrcivicboix <[EMAIL PROTECTED]> wrote: no... I have my custom contextmenu called initMenu(); if the user right clicks my custom menu shows up. When user clicks in the body the menu disappear and start from the beginning. If I go from begin() to edit() then it properly unbind all events. If I go begin() initMenu() then edit() then it wouldn't unbind. Jörn Zaefferer wrote: > > xmrcivicboix schrieb: >> [...] >> What I'm trying to do is when tiny_mce is opened, I don't want any other >> events to still be bounded. For instance, when tiny_mce is opened, I >> don't >> want user to be able to right click on the text and open up another >> instance >> of tiny_mce. [...] > If you want to prevent the user from using the contextmenu, you have to > avoid removing the event the prevents him from doing so. Or you have to > add it again after removing all events. > > -- > Jörn Zaefferer > > http://bassistance.de > > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > -- View this message in context: http://www.nabble.com/properly-unbinding-events-will-give-u-%245-if-you-can-figure-it-out-tf2916367.html#a8150223 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Aaron Heimlich Web Developer [EMAIL PROTECTED] http://aheimlich.freepgs.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] properly unbinding events will give u $5 if you can figure it out
no... I have my custom contextmenu called initMenu(); if the user right clicks my custom menu shows up. When user clicks in the body the menu disappear and start from the beginning. If I go from begin() to edit() then it properly unbind all events. If I go begin() initMenu() then edit() then it wouldn't unbind. Jörn Zaefferer wrote: > > xmrcivicboix schrieb: >> [...] >> What I'm trying to do is when tiny_mce is opened, I don't want any other >> events to still be bounded. For instance, when tiny_mce is opened, I >> don't >> want user to be able to right click on the text and open up another >> instance >> of tiny_mce. [...] > If you want to prevent the user from using the contextmenu, you have to > avoid removing the event the prevents him from doing so. Or you have to > add it again after removing all events. > > -- > Jörn Zaefferer > > http://bassistance.de > > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > -- View this message in context: http://www.nabble.com/properly-unbinding-events-will-give-u-%245-if-you-can-figure-it-out-tf2916367.html#a8150223 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] properly unbinding events will give u $5 if you can figure it out
xmrcivicboix schrieb: > [...] > What I'm trying to do is when tiny_mce is opened, I don't want any other > events to still be bounded. For instance, when tiny_mce is opened, I don't > want user to be able to right click on the text and open up another instance > of tiny_mce. [...] If you want to prevent the user from using the contextmenu, you have to avoid removing the event the prevents him from doing so. Or you have to add it again after removing all events. -- Jörn Zaefferer http://bassistance.de ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Wildcards
This might help: $("[EMAIL PROTECTED]'del']").id("del*"+pb+"*"+iA+"*ck"); It selects any element whose "id" attribute begins with "del"[1] [1] http://jquery.com/docs/Base/Expression/CSS/#Supportedbutdifferent On 1/3/07, Bruce MacKay <[EMAIL PROTECTED]> wrote: Hello folks, Can wildcards be used in the following context... I change the ID of an "a" tag surrounding an icon (that when clicked triggers a delete function) from its original setting of "del" to a string containing info (pb, iA) about the item (to be deleted) by: $("#del").id("del*"+pb+"*"+iA+"*ck"); This only "works" for the first iteration. If I subsequently select another item to be deleted, the ID of the "a" tag is no longer just "del" and so obviously the ID of the a tag won't be changed because it cannot be found. Is there a way that I can use some type of wildcard to find an element (and in this case there will only ever be a single element) whose id begins with "del"... eg. $("#del??).id("del*"+pb+"*"+iA+"*ck"); so that I can subsequently change its ID to reflect the item I am wanting to delete? Thanks, Bruce ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Aaron Heimlich Web Developer [EMAIL PROTECTED] http://aheimlich.freepgs.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Wildcards
Bruce MacKay schrieb: > [...] > This only "works" for the first iteration. If I subsequently select > another item to be deleted, the ID of the "a" tag is no longer just > "del" and so obviously the ID of the a tag won't be changed because it > cannot be found. Is there a way that I can use some type of wildcard > to find an element (and in this case there will only ever be a single > element) whose id begins with "del"... eg. > > $("#del??).id("del*"+pb+"*"+iA+"*ck"); > > so that I can subsequently change its ID to reflect the item I am > wanting to delete? Try to work with classes instead of IDs. You can add, remove and check for any amount of classes, avoiding the necessity for wildcards. Useful methods are addClass("someclass"), removeClass("someclass") and is(".someclass"). -- Jörn Zaefferer http://bassistance.de ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] properly unbinding events will give u $5 if you can figure it out
hi guys is me again. I ran into a problem and haven't found out a solution. Anyways, here is the problem. when the page load, a function begin() is called. When u right click on the text, the iniMenu() funciton is called. When the iniMenu() is trigger it unbinds all events: $("[EMAIL PROTECTED]").unbind(); it then binds a click event to "edit", "add bug", and "cancel". when the edit button is triggered, the edit() is called which then initialize tiny_mce editor, then again, do a $("[EMAIL PROTECTED]").unbind(); I also tried $("body").unbind(); but no result. What I'm trying to do is when tiny_mce is opened, I don't want any other events to still be bounded. For instance, when tiny_mce is opened, I don't want user to be able to right click on the text and open up another instance of tiny_mce. If you could help me find a solution, I will immediately paypal u $5. =) the script itself is here: https://crux.baker.edu/~thuynh01/eip/static_pages/eip.js the page is here: https://crux.baker.edu/~thuynh01/eip/test.html -- View this message in context: http://www.nabble.com/properly-unbinding-events-will-give-u-%245-if-you-can-figure-it-out-tf2916367.html#a8149943 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Wildcards
Hello folks, Can wildcards be used in the following context... I change the ID of an "a" tag surrounding an icon (that when clicked triggers a delete function) from its original setting of "del" to a string containing info (pb, iA) about the item (to be deleted) by: $("#del").id("del*"+pb+"*"+iA+"*ck"); This only "works" for the first iteration. If I subsequently select another item to be deleted, the ID of the "a" tag is no longer just "del" and so obviously the ID of the a tag won't be changed because it cannot be found. Is there a way that I can use some type of wildcard to find an element (and in this case there will only ever be a single element) whose id begins with "del"... eg. $("#del??).id("del*"+pb+"*"+iA+"*ck"); so that I can subsequently change its ID to reflect the item I am wanting to delete? Thanks, Bruce ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Weird bug (Firefox, Iframe, $.ajax)
Hello, I developed a small Ajax-Chat. Now I switched to an IFrame-Solution to "outsource" the chatscripts to a different server. Now I get this nasty bug (only on Firefox 2.0. Opera and IE are fine): [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.setRequestHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://hetzner7.citybeat.de/include/jquery-1.0.4.js?a=d :: anonymous :: line 1905" data: no] The error seems to be on line 1905: xml.setRequestHeader("X-Requested-With", "XMLHttpRequest"); I'm using the latest official jquery v1.0.4. If I call the IFrame-Source directly everything is nice. This error only occurs, when the ajax is called from within an Iframe. --- My Script: $.ajax({ type : 'GET', url : url, dataType : 'script', success : function(html) { alert("suceess"); } }); --- On December the 10th someone reported this bug in this mailing-list (http://www.nabble.com/find-cause-of-uncaught-exception-tf2790738.html#a7786143 ) but the bug disappeared, when he switched to the latest 1.0.4. Unfortunately this did not work for me. Does some has a solution/workaround? Greetings from germany, Hermann-Marcus Behrens -- Hermann-Marcus Behrens Mail: [EMAIL PROTECTED] Telefon: 0421 - 16 80 800 Fax: 0421 - 16 80 80 80 citybeat.de Zum Huchtinger Bahnhof 13 28259 Bremen ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Recent updates to the form plugin
Mike, Thanks for clearInputs. Did you resolve the bug in resetForm? -- Yehuda On 1/3/07, Mike Alsup <[EMAIL PROTECTED]> wrote: The latest version of the form plugin has some new features that you may not be aware of. New Functions: resetForm, clearForm and clearInputs // invokes the form's native 'reset' method $('#myForm').resetForm(); // clears all (appropriate) fields in the form $('#myForm').clearForm(); // clears matched fields $('.myStuff').clearInputs(); New Options for ajaxSubmit and ajaxForm: resetForm, clearForm // resets form after successful server response $('#myForm').ajaxForm({ resetForm: true }); // clears form after successful server response $('#myForm').ajaxForm({ clearForm: true }); As always, the latest form plugin can be found at: http://jquery.com/dev/svn/trunk/plugins/form/form.js?format=txt Full documentation can be found in the source file. Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Yehuda Katz Web Developer | Wycats Designs (ph) 718.877.1325 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Recent updates to the form plugin
The latest version of the form plugin has some new features that you may not be aware of. New Functions: resetForm, clearForm and clearInputs // invokes the form's native 'reset' method $('#myForm').resetForm(); // clears all (appropriate) fields in the form $('#myForm').clearForm(); // clears matched fields $('.myStuff').clearInputs(); New Options for ajaxSubmit and ajaxForm: resetForm, clearForm // resets form after successful server response $('#myForm').ajaxForm({ resetForm: true }); // clears form after successful server response $('#myForm').ajaxForm({ clearForm: true }); As always, the latest form plugin can be found at: http://jquery.com/dev/svn/trunk/plugins/form/form.js?format=txt Full documentation can be found in the source file. Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New large site using jquery
That's fantastic news, Mattias - great job! On 1/3/07, Mattias Hising <[EMAIL PROTECTED]> wrote: > Hi, > > Today we released a new version of PokerRoom.com, the worlds 3rd > largest poker site. The site has approximately 100,000 - 200,000 > visits a day and at peak we serve poker games to 25,000 - 30,000 > users. > > The new front-end platform is running on PHP 5 with the Smarty > Template Engine (http://smarty.php.net) for templating, presentation > plugins and front-end caching. The old version of PokerRoom used a lot > of legacy javascript code and maintenance was hell. In order to avoid > this we started looking for a javascript library that was: > > 1. Small in order to decrease download-time and minimize used bandwidth > 2. Easy to start using > 3. Well documented > 4. Had a big community > 5. Were extensible > 6. Where fun to use and easy to teach PHP-developers. > > We evaluated jquery, dojo, mochikit and prototype+scriptaculous. In > the end we did not find any library/framework that could match the > jquery library. The community (this list mainly) has been a treasure > for a lot of answers and we have had very nice support by Christian > "Tablesorter" Bach as well. > > We use jquery for > > - Client Validation (input verification and ajax-calls for business > verification) (http://www.pokerroom.com/signup.php) > - Inline Popups (for avoiding popups to 90% and not break processes) > plugin: thickbox > - Ajax-posting of forms (send message, create gift voucher) plugin: form.js > - Rewriting urls (add external logging and create a popup (the 10%)) > - Generate dynamic content (validation ) using Michael Gearys DOM-creator > - Sorting tables with Maestro Bachs Tablesorter plugin. > - A lot more > > We will start using jquery more heavily after this release. Thanks to > the community for discussing and creating this great piece of library. > > http://www.pokerroom.com > http://www.casinoroom.com > > Mattias Hising (http://www.hising.net) > Front-End Architect PokerRoom.com / bwin Games (http://www.bwin.com) > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] jquery-modalContent Plugin 0.11 released
I've released 0.11 of the jquery-modalContent plugin with the following changes: 2006-12-19 patch from Tim Saker <[EMAIL PROTECTED]> 1) Keyboard events are now only permitted on visible elements belonging to the modal layer (child elements). Attempting to place focus on any other page element will cause focus to be transferred back to the first (ordinal) visible child element of the modal layer. 2) The modal overlay shading now covers the entire height of the document except for a small band at the bottom, which is the height of a scrollbar (a separate thread to be opened on this problem with dimension.js). 3) I removed the code that disables and reenables the scrollbars. This is just a suggestion really, realizing it could be one of those little things that causes fellow developers to become unnecessary foes ;=). Personally, I found it an annoying behaviour to remove a visible scrollbar causing the page elements to shift right upon modal popup, then back after closure. If the intent was to prevent scrolling it doesn't anyway since you can still page down with the keyboard. Maybe it should be a boolean option passed in the function signature? 2007-01-03 gmr 1) Updated to set the top of the background div to 0 2) Add 50px to the background div (ugly hack until dimensions.js returns the proper height 3) Removed the .focus from the $('#modalContent .focus') selector since that required something with a class of focus. 4) Created a function for reaize and bound and unbound that so it doesnt clobber other resize functions on unbinding. 5) Created a function for binding the .close class and bound/unbound click using it. Close now will work on any clickable element including a map area. 6) Renamed animation commands to match jQuery's. It is available at http://jquery.glyphix.com - Thank you to everyone who has made suggestions and given feedback on the plugin to make it better. Regards, Gavin ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] File (image) upload
Define a callback function in the origonal page (yourFunction), then in the page returned by the ajax call put script that uses that function ( parent.yourFunction() ). Blair On 1/4/07, Ámon Tamás <[EMAIL PROTECTED]> wrote: Ámon Tamás wrote: > Hello, > > I like to upload an image from a form with ajax, but I don't know how it > is working. I know, I must to make an iframe, and I must to send the > file to this iframe and getting back the results, but I don't know how > it is working. I try to examine Drupal upload solution but it is to > difficult for me now. I only like a _very_ _litle_ example or tutorial > how it is working. Hmmm it is a very-very easy thing, I must to change the form target to the iframe. And other question. Are these an easy way to sending-responding from an eframe (like $.post())? -- Ámon Tamás http://linkfelho.amon.hu ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] New large site using jquery
Hi, Today we released a new version of PokerRoom.com, the worlds 3rd largest poker site. The site has approximately 100,000 - 200,000 visits a day and at peak we serve poker games to 25,000 - 30,000 users. The new front-end platform is running on PHP 5 with the Smarty Template Engine (http://smarty.php.net) for templating, presentation plugins and front-end caching. The old version of PokerRoom used a lot of legacy javascript code and maintenance was hell. In order to avoid this we started looking for a javascript library that was: 1. Small in order to decrease download-time and minimize used bandwidth 2. Easy to start using 3. Well documented 4. Had a big community 5. Were extensible 6. Where fun to use and easy to teach PHP-developers. We evaluated jquery, dojo, mochikit and prototype+scriptaculous. In the end we did not find any library/framework that could match the jquery library. The community (this list mainly) has been a treasure for a lot of answers and we have had very nice support by Christian "Tablesorter" Bach as well. We use jquery for - Client Validation (input verification and ajax-calls for business verification) (http://www.pokerroom.com/signup.php) - Inline Popups (for avoiding popups to 90% and not break processes) plugin: thickbox - Ajax-posting of forms (send message, create gift voucher) plugin: form.js - Rewriting urls (add external logging and create a popup (the 10%)) - Generate dynamic content (validation ) using Michael Gearys DOM-creator - Sorting tables with Maestro Bachs Tablesorter plugin. - A lot more We will start using jquery more heavily after this release. Thanks to the community for discussing and creating this great piece of library. http://www.pokerroom.com http://www.casinoroom.com Mattias Hising (http://www.hising.net) Front-End Architect PokerRoom.com / bwin Games (http://www.bwin.com) ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Please wait.. tutorial
FF1.5/Linux consistently takes a little over three seconds on my computer to display the overlay, but the input elements are blocked immediately. The functionality is beautiful, but I think that lag is just too long. moe-14 wrote: > > just a word of warning, blockUI causes 100% cpu-load on > firefox2/linux (jumpy mouse cursor and all) and it takes > about 10 seconds for the "please wait"-overlay to appear > while the desktop is basically frozen. > > can anyone reproduce that? (i just clicked on some of > the test-buttons, happens every time). > > ~moe > > -- View this message in context: http://www.nabble.com/Please-wait..--tutorial-tf2903421.html#a8147752 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] help speeding up code
bmsterling schrieb: > [...] > This function seems to be the heavy hitter: > [...] > I think you can apply some of the stuff posted by Karl here: http://www.learningjquery.com/2006/12/quick-tip-optimizing-dom-traversal That should speed up the DOM querying. -- Jörn Zaefferer http://bassistance.de ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] File (image) upload
Ámon Tamás wrote: > Hello, > > I like to upload an image from a form with ajax, but I don't know how it > is working. I know, I must to make an iframe, and I must to send the > file to this iframe and getting back the results, but I don't know how > it is working. I try to examine Drupal upload solution but it is to > difficult for me now. I only like a _very_ _litle_ example or tutorial > how it is working. Hmmm it is a very-very easy thing, I must to change the form target to the iframe. And other question. Are these an easy way to sending-responding from an eframe (like $.post())? -- Ámon Tamás http://linkfelho.amon.hu ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] help speeding up code
Stephen, thanks, I was not trying to be confrontational, I just misunderstood what you said/meant Karl, thanks for the clarification, i have FB 1.0b1 installed now. Looking at the profile and following the steps i provided before, I see where bottlenecking is; I think. These are the top times for each column, but what one should I be more concerned with, column wise? Calls: has => 13843 getAll => 13174 curCss => 1842 Own time: has => 1641.71ms getAll => 1078.838ms curCSS => 891.214ms Time: handle => 561.253ms jQuery => 3033.253ms find => 3033.253 Avg: (no name) => 1157.012ms drawPloygonMakeDraggable => 1157.012ms e=> 1157.012ms min: (no name) => 1157.012ms drawPloygonMakeDraggable => 1157.012ms e=> 1157.012ms max: (no name) => 1157.012ms drawPloygonMakeDraggable => 1157.012ms e=> 1157.012ms This function seems to be the heavy hitter: function drawPolygonMakeDraggable(){ $('.drawdiv').remove(); $('.drawdivs').remove(); $(e).unbind("mousemove"); $(e).unbind("click"); $(e).bind("mousemove", function(a){ putCord((a.clientX-eLeft) +', ' +(a.clientY-eTop)) }); var xArray = Array(); var yArray = Array(); $.each(cords, function(i){ xArray.push(this[0]); yArray.push(this[1]); }); canvas.drawPolygon(xArray, yArray); canvas.fillPolygon(xArray, yArray); canvas.paint(); $('.drawdiv').removeClass("drawdiv").addClass("drawdivs").fadeTo("fast", 0.5); $(".circle").mousedown(function(){ isHeld = this; $(this).Draggable({ zIndex: 1000, ghosting: false, opacity:0.7, containment: e, onDrag: changePos, onStop: drawPolygonMakeDraggable }); }); } Thanks, Benjamin Sterling KenzoMedia.com Kenzohosting.com -- View this message in context: http://www.nabble.com/help-speeding-up-code-tf2914837.html#a8147473 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] help speeding up code
bmsterling wrote: > Steven, thanks, I don't know where the bottle-necking is as I pointed in my > initial post, I was just seeing if anyone had away to speed it up. Benjamin, I think that was my point! You say "away to speed it up", what is "it", the whole thing? Sure get faster hardware, but that is probably not the answer you were looking for :). But if you want to speed up the code you need to find out what code is slow. Hence you need to profile the code and find out where it is slow. It is likely in the wz code, but you really need to know that for sure. You might have a silly bug that is causing something to loop a bunch of extra times or whatever. I'm pretty sure there was a recent post about a javascript performance profiling tool. This would let you know where you time is being spent, and hence where you need to focus your efforts. Ah, found it! In the new firebug 1.0beta there is a profiling tool. -Steve > Dave, I am kinda limited by what I can use. This app will be put on a chip > similar to the linksys admin panel in a router. I wanted to use flash or > java, but I have still not gotten the space requirements and stuff of that > nature. > > I read thru that site before and figured I missed something in my research > that someone else may have done something like this before. > > I have never heard of vml before, heard of svg and that was not an option. > But I will do some research on vml and see if that is an option. > > Thanks for the help, I appreciate it. > > > Benjamin Sterling > KenzoMedia.com > Kenzohosting.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] help speeding up code
Hi Benjamin, I think Stephen was referring to the Profile tab in Firebug 1.0beta, which should help you /discover/ where the bottle-necking is. If you can pinpoint what's taking the time, it might help you speed it up. Cheers, --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 3, 2007, at 1:45 PM, bmsterling wrote: Steven, thanks, I don't know where the bottle-necking is as I pointed in my initial post, I was just seeing if anyone had away to speed it up. Dave, I am kinda limited by what I can use. This app will be put on a chip similar to the linksys admin panel in a router. I wanted to use flash or java, but I have still not gotten the space requirements and stuff of that nature. I read thru that site before and figured I missed something in my research that someone else may have done something like this before. I have never heard of vml before, heard of svg and that was not an option. But I will do some research on vml and see if that is an option. Thanks for the help, I appreciate it. Benjamin Sterling KenzoMedia.com Kenzohosting.com -- View this message in context: http://www.nabble.com/help-speeding- up-code-tf2914837.html#a8146221 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] keydown fires twice in safari
Thanks jake, that did the trick. Ⓙⓐⓚⓔ wrote: > > I would return false... not not return > > On 1/3/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote: >> return true?? that says bubble it up! It may be that safari has an >> extra 'layer' along the way. >> >> On 1/3/07, blemming <[EMAIL PROTECTED]> wrote: >> > >> > Basically, I have a list that I want to be able to navigate through the >> li >> > tags with up and down arrows. When the list is selected a function >> binds >> > keydown with: >> > >> > $(document).keydown. etc. >> > >> > Then when the list is not selected the keydown function is unbound >> with: >> > >> > $(document).unkeydown. >> > >> > The script functions as would be expected in the all browsers except >> safari. >> > When any key is pushed in safari the keydown function fires twice. >> > >> > Does that make sense? >> > >> > Thanks, David >> > >> > >> > Brandon Aaron wrote: >> > > >> > > This might be caused by the event handler being attached to the >> window >> > > and document in safari but I'm unsure. Try being explicit in what you >> > > are attaching the event too. >> > > >> > > -- >> > > Brandon Aaron >> > > >> > > On 1/3/07, blemming <[EMAIL PROTECTED]> wrote: >> > >> >> > >> Has anyone been able to confirm this issue in Safari? >> > >> >> > >> >> > >> blemming wrote: >> > >> > >> > >> > I'm trying to put together some keyboard navigation for a plugin I >> am >> > >> > working on but the keydown function seems to fire twice when a key >> is >> > >> > selected in safari. Is this a bug? >> > >> > >> > >> > Here is an example=> >> > >> http://brilliantretail.com/cases/select3/test.html >> > >> > Simple Exampe >> > >> > >> > >> > The alert fires twice only in the safari browser.. >> > >> > >> > >> > Thanks, david >> > >> > >> > >> >> > >> -- >> > >> View this message in context: >> > >> >> http://www.nabble.com/keydown-fires-twice-in-safari-tf2906674.html#a8144352 >> > >> 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/keydown-fires-twice-in-safari-tf2906674.html#a8145667 >> > 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/keydown-fires-twice-in-safari-tf2906674.html#a8146342 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] keydown fires twice in safari
$().keydown( function(e) { if (window.event) { // IE var keyCode = window.event.keyCode; } else { // FF var keyCode = e.which; } switch(keyCode) { case 13: // enter alert('enter key'); break; case 38: // up arrow alert('up arrow'); break; case 40: // down arrow alert('down arrow'); break; } return false } On 1/3/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote: > I would return false... not not return > > On 1/3/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote: > > return true?? that says bubble it up! It may be that safari has an > > extra 'layer' along the way. > > > > On 1/3/07, blemming <[EMAIL PROTECTED]> wrote: > > > > > > Basically, I have a list that I want to be able to navigate through the li > > > tags with up and down arrows. When the list is selected a function binds > > > keydown with: > > > > > > $(document).keydown. etc. > > > > > > Then when the list is not selected the keydown function is unbound with: > > > > > > $(document).unkeydown. > > > > > > The script functions as would be expected in the all browsers except > > > safari. > > > When any key is pushed in safari the keydown function fires twice. > > > > > > Does that make sense? > > > > > > Thanks, David > > > > > > > > > Brandon Aaron wrote: > > > > > > > > This might be caused by the event handler being attached to the window > > > > and document in safari but I'm unsure. Try being explicit in what you > > > > are attaching the event too. > > > > > > > > -- > > > > Brandon Aaron > > > > > > > > On 1/3/07, blemming <[EMAIL PROTECTED]> wrote: > > > >> > > > >> Has anyone been able to confirm this issue in Safari? > > > >> > > > >> > > > >> blemming wrote: > > > >> > > > > >> > I'm trying to put together some keyboard navigation for a plugin I am > > > >> > working on but the keydown function seems to fire twice when a key is > > > >> > selected in safari. Is this a bug? > > > >> > > > > >> > Here is an example=> > > > >> http://brilliantretail.com/cases/select3/test.html > > > >> > Simple Exampe > > > >> > > > > >> > The alert fires twice only in the safari browser.. > > > >> > > > > >> > Thanks, david > > > >> > > > > >> > > > >> -- > > > >> View this message in context: > > > >> http://www.nabble.com/keydown-fires-twice-in-safari-tf2906674.html#a8144352 > > > >> 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/keydown-fires-twice-in-safari-tf2906674.html#a8145667 > > > 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] help speeding up code
Steven, thanks, I don't know where the bottle-necking is as I pointed in my initial post, I was just seeing if anyone had away to speed it up. Dave, I am kinda limited by what I can use. This app will be put on a chip similar to the linksys admin panel in a router. I wanted to use flash or java, but I have still not gotten the space requirements and stuff of that nature. I read thru that site before and figured I missed something in my research that someone else may have done something like this before. I have never heard of vml before, heard of svg and that was not an option. But I will do some research on vml and see if that is an option. Thanks for the help, I appreciate it. Benjamin Sterling KenzoMedia.com Kenzohosting.com -- View this message in context: http://www.nabble.com/help-speeding-up-code-tf2914837.html#a8146221 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] keydown fires twice in safari
I would return false... not not return On 1/3/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote: > return true?? that says bubble it up! It may be that safari has an > extra 'layer' along the way. > > On 1/3/07, blemming <[EMAIL PROTECTED]> wrote: > > > > Basically, I have a list that I want to be able to navigate through the li > > tags with up and down arrows. When the list is selected a function binds > > keydown with: > > > > $(document).keydown. etc. > > > > Then when the list is not selected the keydown function is unbound with: > > > > $(document).unkeydown. > > > > The script functions as would be expected in the all browsers except safari. > > When any key is pushed in safari the keydown function fires twice. > > > > Does that make sense? > > > > Thanks, David > > > > > > Brandon Aaron wrote: > > > > > > This might be caused by the event handler being attached to the window > > > and document in safari but I'm unsure. Try being explicit in what you > > > are attaching the event too. > > > > > > -- > > > Brandon Aaron > > > > > > On 1/3/07, blemming <[EMAIL PROTECTED]> wrote: > > >> > > >> Has anyone been able to confirm this issue in Safari? > > >> > > >> > > >> blemming wrote: > > >> > > > >> > I'm trying to put together some keyboard navigation for a plugin I am > > >> > working on but the keydown function seems to fire twice when a key is > > >> > selected in safari. Is this a bug? > > >> > > > >> > Here is an example=> > > >> http://brilliantretail.com/cases/select3/test.html > > >> > Simple Exampe > > >> > > > >> > The alert fires twice only in the safari browser.. > > >> > > > >> > Thanks, david > > >> > > > >> > > >> -- > > >> View this message in context: > > >> http://www.nabble.com/keydown-fires-twice-in-safari-tf2906674.html#a8144352 > > >> 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/keydown-fires-twice-in-safari-tf2906674.html#a8145667 > > 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] keydown fires twice in safari
return true?? that says bubble it up! It may be that safari has an extra 'layer' along the way. On 1/3/07, blemming <[EMAIL PROTECTED]> wrote: > > Basically, I have a list that I want to be able to navigate through the li > tags with up and down arrows. When the list is selected a function binds > keydown with: > > $(document).keydown. etc. > > Then when the list is not selected the keydown function is unbound with: > > $(document).unkeydown. > > The script functions as would be expected in the all browsers except safari. > When any key is pushed in safari the keydown function fires twice. > > Does that make sense? > > Thanks, David > > > Brandon Aaron wrote: > > > > This might be caused by the event handler being attached to the window > > and document in safari but I'm unsure. Try being explicit in what you > > are attaching the event too. > > > > -- > > Brandon Aaron > > > > On 1/3/07, blemming <[EMAIL PROTECTED]> wrote: > >> > >> Has anyone been able to confirm this issue in Safari? > >> > >> > >> blemming wrote: > >> > > >> > I'm trying to put together some keyboard navigation for a plugin I am > >> > working on but the keydown function seems to fire twice when a key is > >> > selected in safari. Is this a bug? > >> > > >> > Here is an example=> > >> http://brilliantretail.com/cases/select3/test.html > >> > Simple Exampe > >> > > >> > The alert fires twice only in the safari browser.. > >> > > >> > Thanks, david > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/keydown-fires-twice-in-safari-tf2906674.html#a8144352 > >> 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/keydown-fires-twice-in-safari-tf2906674.html#a8145667 > 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] help speeding up code
Seems to me that there were some posts a while back about code profiling maybe in firebug that would tell you how many calls you made to what functions and maybe how much time you spent in each function, maybe not this. But this would be the first step to optimizing your code. If you don't know where it is spending all its time then you don't know what to fix. You could also wrap function calls with a timer and log the times to the console. -Steve bmsterling wrote: > Hey all, > I am working on a project at http://ov.informationexperts.com/test.htm > http://ov.informationexperts.com/test.htm and the only issue I am having is > the speed of my code. > > steps to test: > 1. create three or more points by click in the grey box area. > 2. when finish, dbl click the first point your created to close the box. > (at this point there is a second or two delay) > 3. At this point you can resize/reshape the box by dbl click and then hold > down any of the points. (when you mouse up there will be about a 3 second > delay) > > Scripts being used: > jquery w/ debug, dom, dimensions, idrag plugins > jsgraphic (http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm) > > After you do the above test, with firebox and web developer extension, view > generated source and you will see all that went on. The jsgraphic script > produces a ton of divs to achieve the graphics. It is a great script and > would love to convert to jquery and that may speed things up, but would not > know where to start. > > Basically what I need help with is speeding up this app. > > Thanks, > Benjamin Sterling > KenzoMedia.com > KenzoHosting.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] help speeding up code
> Basically what I need help with is speeding up this app. > http://ov.informationexperts.com/test.htm I don't think drawing with divs will ever get you good performance. DOM operations are VERY slow. The app has to carry around all the overhead of the DOM tree and element properties for every div-group of pixels on the screen. You can probably do some triage and get a sub-2x performance increase, but given that there is a delay of several seconds that will probably not be enough. I think you would want more like a factor of 5x to 10x. Walter Zorn makes it clear that this is not a performance-oriented solution: http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm#performance Are there other approaches you could investigate, like using canvas for Firefox and VML for IE? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] File (image) upload
Hello, I like to upload an image from a form with ajax, but I don't know how it is working. I know, I must to make an iframe, and I must to send the file to this iframe and getting back the results, but I don't know how it is working. I try to examine Drupal upload solution but it is to difficult for me now. I only like a _very_ _litle_ example or tutorial how it is working. Thanks -- Ámon Tamás http://linkfelho.amon.hu ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] keydown fires twice in safari
Basically, I have a list that I want to be able to navigate through the li tags with up and down arrows. When the list is selected a function binds keydown with: $(document).keydown. etc. Then when the list is not selected the keydown function is unbound with: $(document).unkeydown. The script functions as would be expected in the all browsers except safari. When any key is pushed in safari the keydown function fires twice. Does that make sense? Thanks, David Brandon Aaron wrote: > > This might be caused by the event handler being attached to the window > and document in safari but I'm unsure. Try being explicit in what you > are attaching the event too. > > -- > Brandon Aaron > > On 1/3/07, blemming <[EMAIL PROTECTED]> wrote: >> >> Has anyone been able to confirm this issue in Safari? >> >> >> blemming wrote: >> > >> > I'm trying to put together some keyboard navigation for a plugin I am >> > working on but the keydown function seems to fire twice when a key is >> > selected in safari. Is this a bug? >> > >> > Here is an example=> >> http://brilliantretail.com/cases/select3/test.html >> > Simple Exampe >> > >> > The alert fires twice only in the safari browser.. >> > >> > Thanks, david >> > >> >> -- >> View this message in context: >> http://www.nabble.com/keydown-fires-twice-in-safari-tf2906674.html#a8144352 >> 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/keydown-fires-twice-in-safari-tf2906674.html#a8145667 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] help speeding up code
Hey all, I am working on a project at http://ov.informationexperts.com/test.htm http://ov.informationexperts.com/test.htm and the only issue I am having is the speed of my code. steps to test: 1. create three or more points by click in the grey box area. 2. when finish, dbl click the first point your created to close the box. (at this point there is a second or two delay) 3. At this point you can resize/reshape the box by dbl click and then hold down any of the points. (when you mouse up there will be about a 3 second delay) Scripts being used: jquery w/ debug, dom, dimensions, idrag plugins jsgraphic (http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm) After you do the above test, with firebox and web developer extension, view generated source and you will see all that went on. The jsgraphic script produces a ton of divs to achieve the graphics. It is a great script and would love to convert to jquery and that may speed things up, but would not know where to start. Basically what I need help with is speeding up this app. Thanks, Benjamin Sterling KenzoMedia.com KenzoHosting.com -- View this message in context: http://www.nabble.com/help-speeding-up-code-tf2914837.html#a8145012 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] My brain is broken
If you wrap your script with a jQ ready function like below, it works fine. Thanks for figuring this out! I was writing this code to double check my JS knowledge before implementing a similar construct in one of my applications and was scared that my coding skills might have been fundamentally flawed. The point in my app where I need this is after the DOM has loaded so I can continue my work now, but this still seems like a bad issue. John: Now that you are working for Mozilla, is this something you are supposed to / could look into, or is this a bug report that I should report independently? I suspect it's the later, but asking doesn't hurt ; ). -- Felix -- http://www.thinkingphp.org http://www.fg-webdesign.de Franck Marcia wrote: 2007/1/3, digital spaghetti <[EMAIL PROTECTED]>: I've just tried it in FF2.0.0.1 with Firebug 1.0b8 and I can confirm that it runs fine when the code is pasted into Firebug, but does not work in the browser - I get your origional results. It seems to be a different behaviour when the dom is ready or not than a difference between fb and scripts in page. If you wrap your script with a jQ ready function like below, it works fine. $(function(){ // your code }); But don't ask me why! :-) Franck. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] keydown fires twice in safari
This might be caused by the event handler being attached to the window and document in safari but I'm unsure. Try being explicit in what you are attaching the event too. -- Brandon Aaron On 1/3/07, blemming <[EMAIL PROTECTED]> wrote: > > Has anyone been able to confirm this issue in Safari? > > > blemming wrote: > > > > I'm trying to put together some keyboard navigation for a plugin I am > > working on but the keydown function seems to fire twice when a key is > > selected in safari. Is this a bug? > > > > Here is an example=> http://brilliantretail.com/cases/select3/test.html > > Simple Exampe > > > > The alert fires twice only in the safari browser.. > > > > Thanks, david > > > > -- > View this message in context: > http://www.nabble.com/keydown-fires-twice-in-safari-tf2906674.html#a8144352 > 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] My brain is broken
2007/1/3, digital spaghetti <[EMAIL PROTECTED]>: > I've just tried it in FF2.0.0.1 with Firebug 1.0b8 and I can confirm > that it runs fine when the code is pasted into Firebug, but does not > work in the browser - I get your origional results. > It seems to be a different behaviour when the dom is ready or not than a difference between fb and scripts in page. If you wrap your script with a jQ ready function like below, it works fine. $(function(){ // your code }); But don't ask me why! :-) Franck. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] keydown fires twice in safari
Has anyone been able to confirm this issue in Safari? blemming wrote: > > I'm trying to put together some keyboard navigation for a plugin I am > working on but the keydown function seems to fire twice when a key is > selected in safari. Is this a bug? > > Here is an example=> http://brilliantretail.com/cases/select3/test.html > Simple Exampe > > The alert fires twice only in the safari browser.. > > Thanks, david > -- View this message in context: http://www.nabble.com/keydown-fires-twice-in-safari-tf2906674.html#a8144352 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Group
And good news: I just updated Visual jQuery with the latest plugins in svn and jQuery 1.0.4. -- Yehuda On 1/3/07, Andreas Wahlin <[EMAIL PROTECTED]> wrote: you've probably heard about it but just in case, visual jquery is really helpful http://www.visualjquery.com ANdreas ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Yehuda Katz Web Developer | Wycats Designs (ph) 718.877.1325 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] My brain is broken
I've just tried it in FF2.0.0.1 with Firebug 1.0b8 and I can confirm that it runs fine when the code is pasted into Firebug, but does not work in the browser - I get your origional results. Tane On 1/3/07, Felix Geisendörfer <[EMAIL PROTECTED]> wrote: > > Wow, this one seems to be truly nasty. As stated by John and some others > here the code I posted does indeed work when copy and pasting it into the > firebug console. However, it does not work when it's part of a document in a >
Re: [jQuery] My brain is broken
Wow, this one seems to be truly nasty. As stated by John and some others here the code I posted does indeed work when copy and pasting it into the firebug console. However, it does not work when it's part of a document in a
Re: [jQuery] Group
Welcome, Bruce! And a Happy New Year to you, too. This discussion list is an excellent way to learn more about jQuery. Don't be afraid to send us an email if you have a question. In the meantime, you might find this entry on Documentation and Support Resources helpful: http://www.learningjquery.com/2006/11/documentation-and-support- resources-for-jquery Cheers, --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 3, 2007, at 1:55 AM, Bruce wrote: Happy New Year to all, I am learning/ rather, trying to learn all this. If I keep reading these posts eventually it will start to make sense.maybe? osmosis? lol, Anyways, as a lurker who is very interested and learning, all this is very helpful. Now back to my corner Bruce Prochnau BKDesign Solutions ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Dimensions plugin myths ... was: Please wait.. tutorial
I'm often interested in an elements "absolute" position on the page, so I can align different things up to one another, not depending on parents and other things. So yeah, a .position() function would be good for me. Andreas ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Group
you've probably heard about it but just in case, visual jquery is really helpful http://www.visualjquery.com ANdreas ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Dimensions plugin myths ... was: Please wait.. tutorial
On 1/3/07, Klaus Hartl <[EMAIL PROTECTED]> wrote: > Yehuda Katz schrieb: > > Mike, > > > > It almost certainly would require dimensions.js. That said, I wouldn't > > mind. I suspect that dimensions.js will become a pretty universally used > > plugin in the near future. It adds some nice cross-browser stuff that's > > really frequently used, and it's pretty small. > > And it's pretty slow and it's not compatible with existing scripts, e.g. > you cannot easily use it, if you have scripts that rely on functions > being overwritten by the dimensions plugin. > > The autoheight option in the tabs for example is broken if you use the > dimensions plugin as well. I'd rather not check my plugins against a > bunch of other plugins as well. Why I'm not using the dimensions plugin > for Plazes I have written elsewhere. Maybe for the next version, where I > will use it right from the beginning. > > > > At this point, I would say that any new jQuery user include > > dimensions.js and forms.js by default. They both extend jQuery in really > > useful and needed ways. > > I can only say it again: I'm a great opponent of overwriting existing > functionality. The form plugin doesn't do that anymore. The dimensions plugin does not overwrite anything anymore. It only *extends*. If you are currently using the .height() and .width() methods from the core and then include dimensions.js, it will *not* break anything. If it does, then please log it in the bug tracker so it can be resolved. In general the dimensions plugin is *not* slow. The offset method is slow but it is a slow and painful process to get the proper offset of an element. Using the offset method on mousemove will of course cause problems. We can solve problems like these by caching. The only reason the offset method is visually slow is because people aren't aware of the true difficulty in getting the offset. Using it once and caching the value will suffice in most use-cases and will not slow down any applications. With that said, Paul and I are working to try and improve the speed on the offset method ... perhaps having two methods, one called .position() and one called .offset(). The .offset() would stay as it currently is, very comprehensive and the .position() would only return the top and left. The .position() should be much faster when dealing with *lots* of nodes, like 1000 nested nodes. There should be a follow up post about this sometime in the near future. Again if there are any other areas where any one feels speed should be increased or any way it conflicts with the core ... please post it here or log in it the bug tracker. -- Brandon Aaron ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] [Newbie] dynamic text loads...
I appreciate you pointing out to me this syntactical error... I changed my code accordingly:-) and I will study up some more on this topic. Birgit You say you have an associative array so you should use one. Abusing an array (list) for that is considered bad practice. var texts = {}; // short for new Object(); ... -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] [Newbie] dynamic text loads...
On 03/01/07, Klaus Hartl <[EMAIL PROTECTED]> wrote: > Sam Collett schrieb: > > On 03/01/07, Klaus Hartl <[EMAIL PROTECTED]> wrote: > >> Birgit Pauli-Haack schrieb: > >>> I have some data in an js associative array: > >>> > >>> texts = new Array; > >>> texts.webmail = "Go directly to Web e-mail. The easy way to read and > >>> write e-mail when you are away from home."; > >>> texts.dsl ="Complete information on the DSL service."; > >>> texts.members = "Member information and downloads." > >> You say you have an associative array so you should use one. Abusing an > >> array (list) for that is considered bad practice. > >> > >> var texts = {}; // short for new Object(); > >> > >> ... > >> > >> > >> > >> -- Klaus > > > > I think there are probably quite a few that do that (use Array instead > > of Object). Also, there is no true associative array functionality in > > JavaScript as 'texts.length' will always return 0 if you use > > 'texts['foo'] = bar' > > > > What exacerbates this issue is that the first search on Google for > > 'associative array javascript' suggests this use. > > For anyone who's interested: > > http://www.andrewdupont.net/2006/05/18/javascript-associative-arrays-considered-harmful/ > http://erik.eae.net/archives/2005/06/06/22.13.54/ > > > -- Klaus I've written a class that may be useful: http://webdevel.blogspot.com/2007/01/associative-arrays-in-javascript.html ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] [Newbie] dynamic text loads...
Sam Collett schrieb: > On 03/01/07, Klaus Hartl <[EMAIL PROTECTED]> wrote: >> Birgit Pauli-Haack schrieb: >>> I have some data in an js associative array: >>> >>> texts = new Array; >>> texts.webmail = "Go directly to Web e-mail. The easy way to read and >>> write e-mail when you are away from home."; >>> texts.dsl ="Complete information on the DSL service."; >>> texts.members = "Member information and downloads." >> You say you have an associative array so you should use one. Abusing an >> array (list) for that is considered bad practice. >> >> var texts = {}; // short for new Object(); >> >> ... >> >> >> >> -- Klaus > > I think there are probably quite a few that do that (use Array instead > of Object). Also, there is no true associative array functionality in > JavaScript as 'texts.length' will always return 0 if you use > 'texts['foo'] = bar' > > What exacerbates this issue is that the first search on Google for > 'associative array javascript' suggests this use. For anyone who's interested: http://www.andrewdupont.net/2006/05/18/javascript-associative-arrays-considered-harmful/ http://erik.eae.net/archives/2005/06/06/22.13.54/ -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] [Newbie] dynamic text loads...
On 03/01/07, Klaus Hartl <[EMAIL PROTECTED]> wrote: > Birgit Pauli-Haack schrieb: > > > > I have some data in an js associative array: > > > > texts = new Array; > > texts.webmail = "Go directly to Web e-mail. The easy way to read and > > write e-mail when you are away from home."; > > texts.dsl ="Complete information on the DSL service."; > > texts.members = "Member information and downloads." > > You say you have an associative array so you should use one. Abusing an > array (list) for that is considered bad practice. > > var texts = {}; // short for new Object(); > > ... > > > > -- Klaus I think there are probably quite a few that do that (use Array instead of Object). Also, there is no true associative array functionality in JavaScript as 'texts.length' will always return 0 if you use 'texts['foo'] = bar' What exacerbates this issue is that the first search on Google for 'associative array javascript' suggests this use. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Problem with offsetParent in IE
Hi, I just played around with the interface-plugin and stumbled over a ugly error in IE and the iutil-functions. E.g. I created two sortable-lists, which are dnd. Everything works fine. Then I change the complete lists with ajax. After this I always get an unknown error in IE at a position in the iutil-file where the property offsetParent is called. I found the following description: http://weblogs.asp.net/rajbk/archive/2006/11/29/ie-6-7-unspecified-error-when-accessing-offsetparent-javascript.aspx http://weblogs.asp.net/rajbk/archive/2006/11/29/ie-6-7-unspecified-error-when-accessing-offsetparent-javascript.aspx I'm not firm with javaScript. So can somebody give me a hint what to do in such a case? Kind Regards Joerg Schoppet -- View this message in context: http://www.nabble.com/Problem-with-offsetParent-in-IE-tf2912694.html#a8138462 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Please wait.. tutorial
Yehuda Katz schrieb: > Mike, > > It almost certainly would require dimensions.js. That said, I wouldn't > mind. I suspect that dimensions.js will become a pretty universally used > plugin in the near future. It adds some nice cross-browser stuff that's > really frequently used, and it's pretty small. And it's pretty slow and it's not compatible with existing scripts, e.g. you cannot easily use it, if you have scripts that rely on functions being overwritten by the dimensions plugin. The autoheight option in the tabs for example is broken if you use the dimensions plugin as well. I'd rather not check my plugins against a bunch of other plugins as well. Why I'm not using the dimensions plugin for Plazes I have written elsewhere. Maybe for the next version, where I will use it right from the beginning. > At this point, I would say that any new jQuery user include > dimensions.js and forms.js by default. They both extend jQuery in really > useful and needed ways. I can only say it again: I'm a great opponent of overwriting existing functionality. The form plugin doesn't do that anymore. -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] multiple events attaching to cloned elements in IE
Will Olbrys schrieb: > here is an updated example with me being less stupid about how to use the > dollar sign function > > $('rowNode', xml.responseXML).each( function(i){ > var clone = $(cloneTemplate).clone(); > $('#target').append(clone); > > clone.click(function() { > $(this).css({border:'orange '+(i+3)+'px solid'}); > }); > > var clone = null; > }); > > i smart... > > will Not a solution for your problem, but I couldn't resist: $('rowNode', xml.responseXML).each( function(i){ $(cloneTemplate).clone().appendTo('#target').click(function() { $(this).css({border:'orange '+(i+3)+'px solid'}); }); }); -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] [Newbie] dynamic text loads...
Birgit Pauli-Haack schrieb: > > I have some data in an js associative array: > > texts = new Array; > texts.webmail = "Go directly to Web e-mail. The easy way to read and > write e-mail when you are away from home."; > texts.dsl ="Complete information on the DSL service."; > texts.members = "Member information and downloads." You say you have an associative array so you should use one. Abusing an array (list) for that is considered bad practice. var texts = {}; // short for new Object(); ... -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/