[jQuery] Re: triggering clueTip with inline javascript
Good news everyone! I solved the mystery of the missing waitImage. I'm in so deep that I'm not sure if this will ever be relevant to anyone else, but I'll post it for the sake of completeness. Background: I had too many clueTips on my page to bind them the normal jQuery way (when the page loads). So I wrote a javascript function that would bind the clueTip and then trigger it. Then I just had my clueTip links call the javascript function. That way the clueTips would get bound on the fly. It worked except the waitImage wasn't showing up in Firefox. The problem is that the waitImage location is defined by these two variables: mouseX = event.pageX; mouseY = event.pageY; I discovered that with my new method, both mouseX and mouseY were undefined. I suspect that these variables weren't defined because the event (in this case a click) was triggered indirectly via javascript function, instead of directly via mouse. Since the waitImage was counting on these variables for positioning, it never appeared. So I modified things slightly. Now the waitImage location is defined by posX and posY. posX and posY are based on the location of the link, not the event, so they seem unaffected by the new system. posX and posY aren't exactly the same as mouseX and mouseY, but they seem to be close enough that I'm happy with where the waitImage has been showing up. az On Apr 15, 2:18 am, az [EMAIL PROTECTED] wrote: No worries, Karl. I know you're a busy guy. Your help when and if you get a chance is greatly appreciated. az On Apr 13, 4:52 am, Karl Swedberg [EMAIL PROTECTED] wrote: hi again az, sorry, I've been terribly busy, but I'll try to take a look later on today. --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Apr 13, 2008, at 4:53 AM, az wrote: I've made some progress. I think I've discovered why the clueTips weren't working in IE. I haven't been able to find much info about it, but according to this bug ticket, .click() doesn't work in IE: http://dev.jquery.com/ticket/2352 So, I've implemented the workaround described in the ticket and things seem to be working in IE! Here's the updated test page: http://www.prep-u.com/demo/cluetest.html That's good, but the waitImage in Firefox is still showing up in the wrong place. It's minor, but I'd love a solution that works 100%. Any ideas? thanks, az On Apr 12, 2:07 am, az [EMAIL PROTECTED] wrote: Hi Karl, As always, thanks for your help. Here is my test page: http://www.prep-u.com/demo/cluetest.html On the test page there are only 4 links. So obviously I could just bindclueTipthe normal way. But my live page will have thousands of links in some cases. Since that's a lot of binding, I'm trying to do no binding on page load. Instead each link calls this javascript function: functionclueTip( link ){ var linkid = '#' + link; // bind then click $(linkid).cluetip().click(); } which is supposed to bind theclueTipand then click the link to trigger theclueTip. Problems: 1. In Firefox it's working, but the waitImage seems to be appearing in the wrong place. 2. In IE7 it doesn't work at all. It's giving me an invalid argument error that seems to be caused by .click(). Any help is greatly appreciated! One final note: notice that you can click on theclueTiptitlebar and drag it around the screen. That's thanks to your help on a previous post! az On Apr 11, 9:28 am, Karl Swedberg [EMAIL PROTECTED] wrote: Hi az, Unfortunately, I've completely lost the context for what you're doing here. Do you have a page up somewhere that we can look at to see the whole thing? That would be very helpful. --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Apr 11, 2008, at 5:52 AM, az wrote: Anyone have any thoughts on this? thanks! az On Apr 9, 1:58 pm, az [EMAIL PROTECTED] wrote: Hello, As I discussed in a previous post (unresponsive script error on long page with many clueTips) I'm trying to trigger clueTips with a javascript function instead of binding the clueTips on page load. Each link calls theclueTipfunction and passes its unique link id. Here is the function: functionclueTip( id ){ var linkid = '#' + id; // bind then click $(linkid).cluetip().click(); } It mostly works on Firefox, except that the waitImage is acting strangely. Sometimes it doesn't show up at all. And sometimes it shows up but in the location of the previously clickedclueTip! But the actualclueTipalways shows up in the right place. On IE7 it doesn't work at all. It's giving me an invalid argument error that seems to be caused by .click(). Any ideas? Is my approach fundamentally flawed or am I missing something
[jQuery] Re: triggering clueTip with inline javascript
No worries, Karl. I know you're a busy guy. Your help when and if you get a chance is greatly appreciated. az On Apr 13, 4:52 am, Karl Swedberg [EMAIL PROTECTED] wrote: hi again az, sorry, I've been terribly busy, but I'll try to take a look later on today. --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Apr 13, 2008, at 4:53 AM, az wrote: I've made some progress. I think I've discovered why the clueTips weren't working in IE. I haven't been able to find much info about it, but according to this bug ticket, .click() doesn't work in IE: http://dev.jquery.com/ticket/2352 So, I've implemented the workaround described in the ticket and things seem to be working in IE! Here's the updated test page: http://www.prep-u.com/demo/cluetest.html That's good, but the waitImage in Firefox is still showing up in the wrong place. It's minor, but I'd love a solution that works 100%. Any ideas? thanks, az On Apr 12, 2:07 am, az [EMAIL PROTECTED] wrote: Hi Karl, As always, thanks for your help. Here is my test page: http://www.prep-u.com/demo/cluetest.html On the test page there are only 4 links. So obviously I could just bindclueTipthe normal way. But my live page will have thousands of links in some cases. Since that's a lot of binding, I'm trying to do no binding on page load. Instead each link calls this javascript function: functionclueTip( link ){ var linkid = '#' + link; // bind then click $(linkid).cluetip().click(); } which is supposed to bind theclueTipand then click the link to trigger theclueTip. Problems: 1. In Firefox it's working, but the waitImage seems to be appearing in the wrong place. 2. In IE7 it doesn't work at all. It's giving me an invalid argument error that seems to be caused by .click(). Any help is greatly appreciated! One final note: notice that you can click on theclueTiptitlebar and drag it around the screen. That's thanks to your help on a previous post! az On Apr 11, 9:28 am, Karl Swedberg [EMAIL PROTECTED] wrote: Hi az, Unfortunately, I've completely lost the context for what you're doing here. Do you have a page up somewhere that we can look at to see the whole thing? That would be very helpful. --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Apr 11, 2008, at 5:52 AM, az wrote: Anyone have any thoughts on this? thanks! az On Apr 9, 1:58 pm, az [EMAIL PROTECTED] wrote: Hello, As I discussed in a previous post (unresponsive script error on long page with many clueTips) I'm trying to trigger clueTips with a javascript function instead of binding the clueTips on page load. Each link calls theclueTipfunction and passes its unique link id. Here is the function: functionclueTip( id ){ var linkid = '#' + id; // bind then click $(linkid).cluetip().click(); } It mostly works on Firefox, except that the waitImage is acting strangely. Sometimes it doesn't show up at all. And sometimes it shows up but in the location of the previously clickedclueTip! But the actualclueTipalways shows up in the right place. On IE7 it doesn't work at all. It's giving me an invalid argument error that seems to be caused by .click(). Any ideas? Is my approach fundamentally flawed or am I missing something small? thanks! az
[jQuery] Re: triggering clueTip with inline javascript
I've made some progress. I think I've discovered why the clueTips weren't working in IE. I haven't been able to find much info about it, but according to this bug ticket, .click() doesn't work in IE: http://dev.jquery.com/ticket/2352 So, I've implemented the workaround described in the ticket and things seem to be working in IE! Here's the updated test page: http://www.prep-u.com/demo/cluetest.html That's good, but the waitImage in Firefox is still showing up in the wrong place. It's minor, but I'd love a solution that works 100%. Any ideas? thanks, az On Apr 12, 2:07 am, az [EMAIL PROTECTED] wrote: Hi Karl, As always, thanks for your help. Here is my test page: http://www.prep-u.com/demo/cluetest.html On the test page there are only 4 links. So obviously I could just bindclueTipthe normal way. But my live page will have thousands of links in some cases. Since that's a lot of binding, I'm trying to do no binding on page load. Instead each link calls this javascript function: functionclueTip( link ){ var linkid = '#' + link; // bind then click $(linkid).cluetip().click(); } which is supposed to bind theclueTipand then click the link to trigger theclueTip. Problems: 1. In Firefox it's working, but the waitImage seems to be appearing in the wrong place. 2. In IE7 it doesn't work at all. It's giving me an invalid argument error that seems to be caused by .click(). Any help is greatly appreciated! One final note: notice that you can click on theclueTiptitlebar and drag it around the screen. That's thanks to your help on a previous post! az On Apr 11, 9:28 am, Karl Swedberg [EMAIL PROTECTED] wrote: Hi az, Unfortunately, I've completely lost the context for what you're doing here. Do you have a page up somewhere that we can look at to see the whole thing? That would be very helpful. --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Apr 11, 2008, at 5:52 AM, az wrote: Anyone have any thoughts on this? thanks! az On Apr 9, 1:58 pm, az [EMAIL PROTECTED] wrote: Hello, As I discussed in a previous post (unresponsive script error on long page with many clueTips) I'm trying to trigger clueTips with a javascript function instead of binding the clueTips on page load. Each link calls theclueTipfunction and passes its unique link id. Here is the function: functionclueTip( id ){ var linkid = '#' + id; // bind then click $(linkid).cluetip().click(); } It mostly works on Firefox, except that the waitImage is acting strangely. Sometimes it doesn't show up at all. And sometimes it shows up but in the location of the previously clickedclueTip! But the actualclueTipalways shows up in the right place. On IE7 it doesn't work at all. It's giving me an invalid argument error that seems to be caused by .click(). Any ideas? Is my approach fundamentally flawed or am I missing something small? thanks! az
[jQuery] Re: triggering clueTip with inline javascript
hi again az, sorry, I've been terribly busy, but I'll try to take a look later on today. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Apr 13, 2008, at 4:53 AM, az wrote: I've made some progress. I think I've discovered why the clueTips weren't working in IE. I haven't been able to find much info about it, but according to this bug ticket, .click() doesn't work in IE: http://dev.jquery.com/ticket/2352 So, I've implemented the workaround described in the ticket and things seem to be working in IE! Here's the updated test page: http://www.prep-u.com/demo/cluetest.html That's good, but the waitImage in Firefox is still showing up in the wrong place. It's minor, but I'd love a solution that works 100%. Any ideas? thanks, az On Apr 12, 2:07 am, az [EMAIL PROTECTED] wrote: Hi Karl, As always, thanks for your help. Here is my test page: http://www.prep-u.com/demo/cluetest.html On the test page there are only 4 links. So obviously I could just bindclueTipthe normal way. But my live page will have thousands of links in some cases. Since that's a lot of binding, I'm trying to do no binding on page load. Instead each link calls this javascript function: functionclueTip( link ){ var linkid = '#' + link; // bind then click $(linkid).cluetip().click(); } which is supposed to bind theclueTipand then click the link to trigger theclueTip. Problems: 1. In Firefox it's working, but the waitImage seems to be appearing in the wrong place. 2. In IE7 it doesn't work at all. It's giving me an invalid argument error that seems to be caused by .click(). Any help is greatly appreciated! One final note: notice that you can click on theclueTiptitlebar and drag it around the screen. That's thanks to your help on a previous post! az On Apr 11, 9:28 am, Karl Swedberg [EMAIL PROTECTED] wrote: Hi az, Unfortunately, I've completely lost the context for what you're doing here. Do you have a page up somewhere that we can look at to see the whole thing? That would be very helpful. --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Apr 11, 2008, at 5:52 AM, az wrote: Anyone have any thoughts on this? thanks! az On Apr 9, 1:58 pm, az [EMAIL PROTECTED] wrote: Hello, As I discussed in a previous post (unresponsive script error on long page with many clueTips) I'm trying to trigger clueTips with a javascript function instead of binding the clueTips on page load. Each link calls theclueTipfunction and passes its unique link id. Here is the function: functionclueTip( id ){ var linkid = '#' + id; // bind then click $(linkid).cluetip().click(); } It mostly works on Firefox, except that the waitImage is acting strangely. Sometimes it doesn't show up at all. And sometimes it shows up but in the location of the previously clickedclueTip! But the actualclueTipalways shows up in the right place. On IE7 it doesn't work at all. It's giving me an invalid argument error that seems to be caused by .click(). Any ideas? Is my approach fundamentally flawed or am I missing something small? thanks! az
[jQuery] Re: triggering clueTip with inline javascript
Hi Karl, As always, thanks for your help. Here is my test page: http://www.prep-u.com/demo/cluetest.html On the test page there are only 4 links. So obviously I could just bind clueTip the normal way. But my live page will have thousands of links in some cases. Since that's a lot of binding, I'm trying to do no binding on page load. Instead each link calls this javascript function: function clueTip( link ){ var linkid = '#' + link; // bind then click $(linkid).cluetip().click(); } which is supposed to bind the clueTip and then click the link to trigger the clueTip. Problems: 1. In Firefox it's working, but the waitImage seems to be appearing in the wrong place. 2. In IE7 it doesn't work at all. It's giving me an invalid argument error that seems to be caused by .click(). Any help is greatly appreciated! One final note: notice that you can click on the clueTip titlebar and drag it around the screen. That's thanks to your help on a previous post! az On Apr 11, 9:28 am, Karl Swedberg [EMAIL PROTECTED] wrote: Hi az, Unfortunately, I've completely lost the context for what you're doing here. Do you have a page up somewhere that we can look at to see the whole thing? That would be very helpful. --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Apr 11, 2008, at 5:52 AM, az wrote: Anyone have any thoughts on this? thanks! az On Apr 9, 1:58 pm, az [EMAIL PROTECTED] wrote: Hello, As I discussed in a previous post (unresponsive script error on long page with many clueTips) I'm trying to trigger clueTips with a javascript function instead of binding the clueTips on page load. Each link calls theclueTipfunction and passes its unique link id. Here is the function: functionclueTip( id ){ var linkid = '#' + id; // bind then click $(linkid).cluetip().click(); } It mostly works on Firefox, except that the waitImage is acting strangely. Sometimes it doesn't show up at all. And sometimes it shows up but in the location of the previously clickedclueTip! But the actualclueTipalways shows up in the right place. On IE7 it doesn't work at all. It's giving me an invalid argument error that seems to be caused by .click(). Any ideas? Is my approach fundamentally flawed or am I missing something small? thanks! az
[jQuery] Re: triggering clueTip with inline javascript
Anyone have any thoughts on this? thanks! az On Apr 9, 1:58 pm, az [EMAIL PROTECTED] wrote: Hello, As I discussed in a previous post (unresponsive script error on long page with many clueTips) I'm trying to trigger clueTips with a javascript function instead of binding the clueTips on page load. Each link calls theclueTipfunction and passes its unique link id. Here is the function: functionclueTip( id ){ var linkid = '#' + id; // bind then click $(linkid).cluetip().click(); } It mostly works on Firefox, except that the waitImage is acting strangely. Sometimes it doesn't show up at all. And sometimes it shows up but in the location of the previously clickedclueTip! But the actualclueTipalways shows up in the right place. On IE7 it doesn't work at all. It's giving me an invalid argument error that seems to be caused by .click(). Any ideas? Is my approach fundamentally flawed or am I missing something small? thanks! az
[jQuery] Re: triggering clueTip with inline javascript
Hi az, Unfortunately, I've completely lost the context for what you're doing here. Do you have a page up somewhere that we can look at to see the whole thing? That would be very helpful. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Apr 11, 2008, at 5:52 AM, az wrote: Anyone have any thoughts on this? thanks! az On Apr 9, 1:58 pm, az [EMAIL PROTECTED] wrote: Hello, As I discussed in a previous post (unresponsive script error on long page with many clueTips) I'm trying to trigger clueTips with a javascript function instead of binding the clueTips on page load. Each link calls theclueTipfunction and passes its unique link id. Here is the function: functionclueTip( id ){ var linkid = '#' + id; // bind then click $(linkid).cluetip().click(); } It mostly works on Firefox, except that the waitImage is acting strangely. Sometimes it doesn't show up at all. And sometimes it shows up but in the location of the previously clickedclueTip! But the actualclueTipalways shows up in the right place. On IE7 it doesn't work at all. It's giving me an invalid argument error that seems to be caused by .click(). Any ideas? Is my approach fundamentally flawed or am I missing something small? thanks! az