[jQuery] Trying to access elements created by remotely loaded script

2009-09-03 Thread AsymF

I am currently trying to add extra functionality to the AddThis and
OnlyWire social bookmarking scripts. Basically I want to be able to
send calls back to our server using AJAX to track when using these
services results in a sale and how popular they are on a site.

For instance, in AddThis, there are DIVs that start with the class
"at_item". I would have thought "div[class*=at_item]" would have
detected these so I can add the click event, but this doesn't work.

Any ideas how I could go about this?


[jQuery] Re: jdMenu hides entire menu when top level link clicked

2008-09-04 Thread AsymF

Anyone have any ideas on this?

On Aug 6, 7:20 pm, AsymF <[EMAIL PROTECTED]> wrote:
> I am trying to implement jdMenu 1.4.1 with jQuery 1.2.6. However, when
> a top level link is clicked it hides the entire menu the moment it is
> clicked. This doesn't happen when the selection has sub menus.
>
> I am at a loss to explain this. For instance, clicking either "Show
> Lists" or "Next Item" in the example below will result in the whole
> menu bar vanishing.
>
> Here is my code:
> 
> « Show Lists
> Next Item »
> Print
> 
> Invoice
> Item
>  
> 
> 
>     $('ul#sop').jdMenu();
> 
>
> Any ideas why this would be happening?
>
> Any help is appreciated!


[jQuery] Re: Security Error: Content may not load data from

2008-06-19 Thread AsymF

BTW, I know this security error is supposed to hold true for different
domains but these are on the same domain and to top it off I used a
relative link instead of even putting in the domain name so I would
have thought jQuery would use the current protocol (https OR http)
depending on which page was calling it.

On Jun 19, 10:54 am, AsymF <[EMAIL PROTECTED]> wrote:
> When I execute the following code:
> --
> $.getJSON('/apps/sendnote.php?a=1&id=5', function (id, status_text) { /
> *func code here*/ });
> --
>
> I get the error:
> --
> uncaught exception: Security Error: Content athttps://www.mysite.com/
> may not load data fromhttp://www.mysite.com/apps/sendnote.php?a=1&id=5
> --
>
> This happens in Firefox 2.
>
> How can I get jQuery to send the AJAX request through the proper
> protocol? It is a mixed bag as to whether the page it is called from
> will be http or https.


[jQuery] Security Error: Content may not load data from

2008-06-19 Thread AsymF

When I execute the following code:
--
$.getJSON('/apps/sendnote.php?a=1&id=5', function (id, status_text) { /
*func code here*/ });
--

I get the error:
--
uncaught exception: Security Error: Content at https://www.mysite.com/
may not load data from http://www.mysite.com/apps/sendnote.php?a=1&id=5
--

This happens in Firefox 2.

How can I get jQuery to send the AJAX request through the proper
protocol? It is a mixed bag as to whether the page it is called from
will be http or https.


[jQuery] Re: Problem positioning an absolute element

2008-04-23 Thread AsymF

Do you mean here?

http://www.pmob.co.uk/temp/3colfixedtest_sourcenone.htm

That is not my page, just the page I took the layout code from.

On Apr 22, 2:24 pm, mrpollo <[EMAIL PROTECTED]> wrote:
> i see no div called box
> at leats firebug doesnt
>
> On Apr 22, 9:53 am, AsymF <[EMAIL PROTECTED]> wrote:
>
> > And what is with this post showing up 7 times?? I only hit the submit
> > button once on Google Groups. Hope no one thinks I am spamming. :(
>
> > On Apr 17, 8:01 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > I recently implemented the following CSS layout on a site in place of
> > > a previous table 
> > > layout:http://www.pmob.co.uk/temp/3colfixedtest_sourcenone.htm
>
> > > After doing so I cannot get DIVs to position correctly in some
> > > instances when using jQuery to do so. One in particular is too far
> > > down and over to the right.
>
> > > Unfortunately I don't have a page to show because the code is on a
> > > backend area that requires login. However, the code I was previously
> > > using that worked great to cause a box to display right below a link
> > > is this:
> > > __
> > > $('div#box').css('position', 'absolute');
> > > $('div#box').css('left', $('a#link').offset().left);
> > > $('div#box').css('top', ($('a#link').offset().top + $
> > > ('a#link').outerHeight() + 2));
> > > $('div#box').show('normal');
> > > __
>
> > > However, I found that I now need to add or subtract the padding and
> > > margins from enclosing DIVs due to the new CSS layout and I am
> > > perplexed as to why:
> > > __
> > > $('div#box').css('position', 'absolute');
>
> > > margin_left = $('div#outer').css('margin-left');
> > > margin_left = margin_left.substring(0, margin_left.indexOf('px'));
> > > pad_right = $('div#centrecontent').css('padding-right');
> > > pad_right = pad_right.substring(0, pad_right.indexOf('px'));
>
> > > $('div#box').css('left', ($('a#link').offset().left + pad_right -
> > > margin_left));
>
> > > pad_top = $('div#outer').css('padding-top');
> > > pad_top = pad_top.substring(0, pad_top.indexOf('px'));
>
> > > $('div#box').css('top', ($('a#link').offset().top + $
> > > ('a#link').outerHeight() + 2 - pad_top));
> > > $('div#box').show('normal');
> > > __
>
> > > Even more perplexing is that if I leave "pad_right" inside those
> > > calculations it causes the box to fly about 5160 pixels off to the
> > > right of the screen. Checking the value in the console shows that
> > > pad_right has a value of 6. If I remove pad_right and directly
> > > substitute in the number 6 then the box positions normally.
>
> > > Can anyone help explain to me what I am doing wrong here?


[jQuery] Re: Problem positioning an absolute element

2008-04-22 Thread AsymF

And what is with this post showing up 7 times?? I only hit the submit
button once on Google Groups. Hope no one thinks I am spamming. :(

On Apr 17, 8:01 pm, AsymF <[EMAIL PROTECTED]> wrote:
> I recently implemented the following CSS layout on a site in place of
> a previous table 
> layout:http://www.pmob.co.uk/temp/3colfixedtest_sourcenone.htm
>
> After doing so I cannot get DIVs to position correctly in some
> instances when using jQuery to do so. One in particular is too far
> down and over to the right.
>
> Unfortunately I don't have a page to show because the code is on a
> backend area that requires login. However, the code I was previously
> using that worked great to cause a box to display right below a link
> is this:
> __
> $('div#box').css('position', 'absolute');
> $('div#box').css('left', $('a#link').offset().left);
> $('div#box').css('top', ($('a#link').offset().top + $
> ('a#link').outerHeight() + 2));
> $('div#box').show('normal');
> __
>
> However, I found that I now need to add or subtract the padding and
> margins from enclosing DIVs due to the new CSS layout and I am
> perplexed as to why:
> __
> $('div#box').css('position', 'absolute');
>
> margin_left = $('div#outer').css('margin-left');
> margin_left = margin_left.substring(0, margin_left.indexOf('px'));
> pad_right = $('div#centrecontent').css('padding-right');
> pad_right = pad_right.substring(0, pad_right.indexOf('px'));
>
> $('div#box').css('left', ($('a#link').offset().left + pad_right -
> margin_left));
>
> pad_top = $('div#outer').css('padding-top');
> pad_top = pad_top.substring(0, pad_top.indexOf('px'));
>
> $('div#box').css('top', ($('a#link').offset().top + $
> ('a#link').outerHeight() + 2 - pad_top));
> $('div#box').show('normal');
> __
>
> Even more perplexing is that if I leave "pad_right" inside those
> calculations it causes the box to fly about 5160 pixels off to the
> right of the screen. Checking the value in the console shows that
> pad_right has a value of 6. If I remove pad_right and directly
> substitute in the number 6 then the box positions normally.
>
> Can anyone help explain to me what I am doing wrong here?


[jQuery] Problem positioning an absolute element

2008-04-18 Thread AsymF

I recently implemented the following CSS layout on a site in place of
a previous table layout:
http://www.pmob.co.uk/temp/3colfixedtest_sourcenone.htm

After doing so I cannot get DIVs to position correctly in some
instances when using jQuery to do so. One in particular is too far
down and over to the right.

Unfortunately I don't have a page to show because the code is on a
backend area that requires login. However, the code I was previously
using that worked great to cause a box to display right below a link
is this:
__
$('div#box').css('position', 'absolute');
$('div#box').css('left', $('a#link').offset().left);
$('div#box').css('top', ($('a#link').offset().top + $
('a#link').outerHeight() + 2));
$('div#box').show('normal');
__


However, I found that I now need to add or subtract the padding and
margins from enclosing DIVs due to the new CSS layout and I am
perplexed as to why:
__
$('div#box').css('position', 'absolute');

margin_left = $('div#outer').css('margin-left');
margin_left = margin_left.substring(0, margin_left.indexOf('px'));
pad_right = $('div#centrecontent').css('padding-right');
pad_right = pad_right.substring(0, pad_right.indexOf('px'));

$('div#box').css('left', ($('a#link').offset().left + pad_right -
margin_left));

pad_top = $('div#outer').css('padding-top');
pad_top = pad_top.substring(0, pad_top.indexOf('px'));

$('div#box').css('top', ($('a#link').offset().top + $
('a#link').outerHeight() + 2 - pad_top));
$('div#box').show('normal');
__

Even more perplexing is that if I leave "pad_right" inside those
calculations it causes the box to fly about 5160 pixels off to the
right of the screen. Checking the value in the console shows that
pad_right has a value of 6. If I remove pad_right and directly
substitute in the number 6 then the box positions normally.

Can anyone help explain to me what I am doing wrong here?


[jQuery] Re: Star Rating v2 and Half-Star (NEED FEEDBACK)

2008-04-04 Thread AsymF

It seems that in IE 7 the DIVs for the stars are in fact being created
from the radio buttons as expected but the text-indent CSS is set to
-999em.

On Apr 4, 8:34 am, AsymF <[EMAIL PROTECTED]> wrote:
> Yeah, I had thought about doing that. Even overlapping them. Was just
> wondering if I had somehow missed a simpler way of doing it. :)
>
> One other thing. I can't get this version to work at all in IE 7 when
> the stars are split. The stars don't show up. Even the radio buttons
> won't show up.
>
> On Apr 4, 4:24 am, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > Erm.. no.
> > What you can do is have 2 controls.
>
> > 1. Dummy control to display value (split).
> > 2. Actual control that takes an input (not split).
>
> > Show/hide at your disclosure and voila!
>
> > On Apr 3, 10:29 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > Sorry, nevermind about the metadata. I just noticed it is optional.
>
> > > New questionis it possible to display the current value with split
> > > stars but only allow whole star voting? In other words, show 3 and
> > > 3/4ths stars highlighted and the remainder portion grayed out but on
> > > mouseover show a full star for each one?
>
> > > On Apr 3, 4:10 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > > Any way to get around the need for the metadata plugin? I am trying to
> > > > keep included scripts light.
>
> > > > On Mar 20, 3:23 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > For reference: The issue was relative positioning in IE.
> > > > > I worked around it with a negative margin.
>
> > > > > On Mar 20, 6:29 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > > I had tried that but it didn't work reliably in IE. It was a CSS
> > > > > > issue. But hey, I think I've fixed it, in which case the only issue
> > > > > > with prototype B will be resolved.
>
> > > > > > Check it out:http://www.fyneworks.com/jquery/star-rating/
>
> > > > > > On Mar 19, 10:08 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Why can't the background-color value just be set to transparent?
>
> > > > > > > On Mar 16, 5:28 pm, timothytoe <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > B is the more interesting path for development--that's for 
> > > > > > > > sure. You
> > > > > > > > could always do both. Do B as far as you can take it, then 
> > > > > > > > maybe some
> > > > > > > > clever solution will occur to you to get the same functionality 
> > > > > > > > over
> > > > > > > > any background.
>
> > > > > > > > On Mar 16, 11:10 am, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > Hi Timothy, thanks for the feedback. THAT is exactly the 
> > > > > > > > > issue.
>
> > > > > > > > > Prototype A would work on ANY background, gradient or not, 
> > > > > > > > > without any
> > > > > > > > > further requirements - other than 2 separate images that is.
>
> > > > > > > > > Prototype B does not require any other images, but you must 
> > > > > > > > > define the
> > > > > > > > > background. So, if the background was a gradient, you'd have 
> > > > > > > > > to define
> > > > > > > > > the same background image for the rating control in order for 
> > > > > > > > > it to
> > > > > > > > > match the background it sits on (ie.: the page background).
>
> > > > > > > > > What sways me toward prototype B is that it allows for future
> > > > > > > > > development. Stars can be easily split into sections, 
> > > > > > > > > different images
> > > > > > > > > used, star domensions can be re-defined.
>
> > > > > > > > > Prototype A is easier to use (you don't need to think about 
> > > > > > > > > the
> > > > > > > > > background it will sit on), but it puts serious constraints 
> > > > > > > > > on

[jQuery] Re: Star Rating v2 and Half-Star (NEED FEEDBACK)

2008-04-04 Thread AsymF

Yeah, I had thought about doing that. Even overlapping them. Was just
wondering if I had somehow missed a simpler way of doing it. :)

One other thing. I can't get this version to work at all in IE 7 when
the stars are split. The stars don't show up. Even the radio buttons
won't show up.

On Apr 4, 4:24 am, "Diego A." <[EMAIL PROTECTED]> wrote:
> Erm.. no.
> What you can do is have 2 controls.
>
> 1. Dummy control to display value (split).
> 2. Actual control that takes an input (not split).
>
> Show/hide at your disclosure and voila!
>
> On Apr 3, 10:29 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > Sorry, nevermind about the metadata. I just noticed it is optional.
>
> > New questionis it possible to display the current value with split
> > stars but only allow whole star voting? In other words, show 3 and
> > 3/4ths stars highlighted and the remainder portion grayed out but on
> > mouseover show a full star for each one?
>
> > On Apr 3, 4:10 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > Any way to get around the need for the metadata plugin? I am trying to
> > > keep included scripts light.
>
> > > On Mar 20, 3:23 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > For reference: The issue was relative positioning in IE.
> > > > I worked around it with a negative margin.
>
> > > > On Mar 20, 6:29 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > I had tried that but it didn't work reliably in IE. It was a CSS
> > > > > issue. But hey, I think I've fixed it, in which case the only issue
> > > > > with prototype B will be resolved.
>
> > > > > Check it out:http://www.fyneworks.com/jquery/star-rating/
>
> > > > > On Mar 19, 10:08 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > > > > Why can't the background-color value just be set to transparent?
>
> > > > > > On Mar 16, 5:28 pm, timothytoe <[EMAIL PROTECTED]> wrote:
>
> > > > > > > B is the more interesting path for development--that's for sure. 
> > > > > > > You
> > > > > > > could always do both. Do B as far as you can take it, then maybe 
> > > > > > > some
> > > > > > > clever solution will occur to you to get the same functionality 
> > > > > > > over
> > > > > > > any background.
>
> > > > > > > On Mar 16, 11:10 am, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > Hi Timothy, thanks for the feedback. THAT is exactly the issue.
>
> > > > > > > > Prototype A would work on ANY background, gradient or not, 
> > > > > > > > without any
> > > > > > > > further requirements - other than 2 separate images that is.
>
> > > > > > > > Prototype B does not require any other images, but you must 
> > > > > > > > define the
> > > > > > > > background. So, if the background was a gradient, you'd have to 
> > > > > > > > define
> > > > > > > > the same background image for the rating control in order for 
> > > > > > > > it to
> > > > > > > > match the background it sits on (ie.: the page background).
>
> > > > > > > > What sways me toward prototype B is that it allows for future
> > > > > > > > development. Stars can be easily split into sections, different 
> > > > > > > > images
> > > > > > > > used, star domensions can be re-defined.
>
> > > > > > > > Prototype A is easier to use (you don't need to think about the
> > > > > > > > background it will sit on), but it puts serious constraints on 
> > > > > > > > future
> > > > > > > > development and customization.
>
> > > > > > > > On Mar 15, 6:42 pm, timothytoe <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > Would prototype A work on a gradient background? If so, that 
> > > > > > > > > would be
> > > > > > > > > useful. If not, B makes more sense to me.
>
> > > > > > > > > On Mar 15, 10:11 am, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > > To

[jQuery] Re: Star Rating v2 and Half-Star (NEED FEEDBACK)

2008-04-03 Thread AsymF

Sorry, nevermind about the metadata. I just noticed it is optional.

New questionis it possible to display the current value with split
stars but only allow whole star voting? In other words, show 3 and
3/4ths stars highlighted and the remainder portion grayed out but on
mouseover show a full star for each one?

On Apr 3, 4:10 pm, AsymF <[EMAIL PROTECTED]> wrote:
> Any way to get around the need for the metadata plugin? I am trying to
> keep included scripts light.
>
> On Mar 20, 3:23 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > For reference: The issue was relative positioning in IE.
> > I worked around it with a negative margin.
>
> > On Mar 20, 6:29 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > I had tried that but it didn't work reliably in IE. It was a CSS
> > > issue. But hey, I think I've fixed it, in which case the only issue
> > > with prototype B will be resolved.
>
> > > Check it out:http://www.fyneworks.com/jquery/star-rating/
>
> > > On Mar 19, 10:08 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > > Why can't the background-color value just be set to transparent?
>
> > > > On Mar 16, 5:28 pm, timothytoe <[EMAIL PROTECTED]> wrote:
>
> > > > > B is the more interesting path for development--that's for sure. You
> > > > > could always do both. Do B as far as you can take it, then maybe some
> > > > > clever solution will occur to you to get the same functionality over
> > > > > any background.
>
> > > > > On Mar 16, 11:10 am, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hi Timothy, thanks for the feedback. THAT is exactly the issue.
>
> > > > > > Prototype A would work on ANY background, gradient or not, without 
> > > > > > any
> > > > > > further requirements - other than 2 separate images that is.
>
> > > > > > Prototype B does not require any other images, but you must define 
> > > > > > the
> > > > > > background. So, if the background was a gradient, you'd have to 
> > > > > > define
> > > > > > the same background image for the rating control in order for it to
> > > > > > match the background it sits on (ie.: the page background).
>
> > > > > > What sways me toward prototype B is that it allows for future
> > > > > > development. Stars can be easily split into sections, different 
> > > > > > images
> > > > > > used, star domensions can be re-defined.
>
> > > > > > Prototype A is easier to use (you don't need to think about the
> > > > > > background it will sit on), but it puts serious constraints on 
> > > > > > future
> > > > > > development and customization.
>
> > > > > > On Mar 15, 6:42 pm, timothytoe <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Would prototype A work on a gradient background? If so, that 
> > > > > > > would be
> > > > > > > useful. If not, B makes more sense to me.
>
> > > > > > > On Mar 15, 10:11 am, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > To anyone else who might be interested, feel free to send your
> > > > > > > > feedback. I'm going to go ahead with prototype B for now so the 
> > > > > > > > plugin
> > > > > > > > will require a background colour.
>
> > > > > > > > On Mar 13, 8:45 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > Two things.
>
> > > > > > > > > 1. v2 now available 
> > > > > > > > > here:http://www.fyneworks.com/jquery/star-rating/
> > > > > > > > > - NEW: option to disable the cancel button,
> > > > > > > > > - NEW: option to make the plugin readOnly
> > > > > > > > > - NEW: ability to accept any value (anything at all)
>
> > > > > > > > > 2. half-star prototypes now available
> > > > > > > > > There are 2 ways of doing it, I need your feedback.
>
> > > > > > > > > Prototype A: Using 2 new half-star images (star-left and 
> > > > > > > > > star-right)http://www.fyneworks.com/jquery/star-rating/half-star-A/
> > > > > > > > > PROS: works on any background
> > > > > > > > > CONS: needs extra images
>
> > > > > > > > > Prototype B: Uses CSS to slide part of the star out of view 
> > > > > > > > > (no extra
> > > > > > > > > images)http://www.fyneworks.com/jquery/star-rating/half-star-B/
> > > > > > > > > PROS: can be easily divided into smaller pieces with CSS
> > > > > > > > > CONS: needs background colour
>
> > > > > > > > > So, which one should we use?


[jQuery] Re: Star Rating v2 and Half-Star (NEED FEEDBACK)

2008-04-03 Thread AsymF

Any way to get around the need for the metadata plugin? I am trying to
keep included scripts light.

On Mar 20, 3:23 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
> For reference: The issue was relative positioning in IE.
> I worked around it with a negative margin.
>
> On Mar 20, 6:29 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > I had tried that but it didn't work reliably in IE. It was a CSS
> > issue. But hey, I think I've fixed it, in which case the only issue
> > with prototype B will be resolved.
>
> > Check it out:http://www.fyneworks.com/jquery/star-rating/
>
> > On Mar 19, 10:08 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > Why can't the background-color value just be set to transparent?
>
> > > On Mar 16, 5:28 pm, timothytoe <[EMAIL PROTECTED]> wrote:
>
> > > > B is the more interesting path for development--that's for sure. You
> > > > could always do both. Do B as far as you can take it, then maybe some
> > > > clever solution will occur to you to get the same functionality over
> > > > any background.
>
> > > > On Mar 16, 11:10 am, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi Timothy, thanks for the feedback. THAT is exactly the issue.
>
> > > > > Prototype A would work on ANY background, gradient or not, without any
> > > > > further requirements - other than 2 separate images that is.
>
> > > > > Prototype B does not require any other images, but you must define the
> > > > > background. So, if the background was a gradient, you'd have to define
> > > > > the same background image for the rating control in order for it to
> > > > > match the background it sits on (ie.: the page background).
>
> > > > > What sways me toward prototype B is that it allows for future
> > > > > development. Stars can be easily split into sections, different images
> > > > > used, star domensions can be re-defined.
>
> > > > > Prototype A is easier to use (you don't need to think about the
> > > > > background it will sit on), but it puts serious constraints on future
> > > > > development and customization.
>
> > > > > On Mar 15, 6:42 pm, timothytoe <[EMAIL PROTECTED]> wrote:
>
> > > > > > Would prototype A work on a gradient background? If so, that would 
> > > > > > be
> > > > > > useful. If not, B makes more sense to me.
>
> > > > > > On Mar 15, 10:11 am, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > > > To anyone else who might be interested, feel free to send your
> > > > > > > feedback. I'm going to go ahead with prototype B for now so the 
> > > > > > > plugin
> > > > > > > will require a background colour.
>
> > > > > > > On Mar 13, 8:45 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > Two things.
>
> > > > > > > > 1. v2 now available 
> > > > > > > > here:http://www.fyneworks.com/jquery/star-rating/
> > > > > > > > - NEW: option to disable the cancel button,
> > > > > > > > - NEW: option to make the plugin readOnly
> > > > > > > > - NEW: ability to accept any value (anything at all)
>
> > > > > > > > 2. half-star prototypes now available
> > > > > > > > There are 2 ways of doing it, I need your feedback.
>
> > > > > > > > Prototype A: Using 2 new half-star images (star-left and 
> > > > > > > > star-right)http://www.fyneworks.com/jquery/star-rating/half-star-A/
> > > > > > > > PROS: works on any background
> > > > > > > > CONS: needs extra images
>
> > > > > > > > Prototype B: Uses CSS to slide part of the star out of view (no 
> > > > > > > > extra
> > > > > > > > images)http://www.fyneworks.com/jquery/star-rating/half-star-B/
> > > > > > > > PROS: can be easily divided into smaller pieces with CSS
> > > > > > > > CONS: needs background colour
>
> > > > > > > > So, which one should we use?


[jQuery] Re: Star Rating v2 and Half-Star (NEED FEEDBACK)

2008-03-28 Thread AsymF

Schweet. :)

On Mar 20, 3:23 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
> For reference: The issue was relative positioning in IE.
> I worked around it with a negative margin.
>
> On Mar 20, 6:29 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > I had tried that but it didn't work reliably in IE. It was a CSS
> > issue. But hey, I think I've fixed it, in which case the only issue
> > with prototype B will be resolved.
>
> > Check it out:http://www.fyneworks.com/jquery/star-rating/
>
> > On Mar 19, 10:08 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > Why can't the background-color value just be set to transparent?
>
> > > On Mar 16, 5:28 pm, timothytoe <[EMAIL PROTECTED]> wrote:
>
> > > > B is the more interesting path for development--that's for sure. You
> > > > could always do both. Do B as far as you can take it, then maybe some
> > > > clever solution will occur to you to get the same functionality over
> > > > any background.
>
> > > > On Mar 16, 11:10 am, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi Timothy, thanks for the feedback. THAT is exactly the issue.
>
> > > > > Prototype A would work on ANY background, gradient or not, without any
> > > > > further requirements - other than 2 separate images that is.
>
> > > > > Prototype B does not require any other images, but you must define the
> > > > > background. So, if the background was a gradient, you'd have to define
> > > > > the same background image for the rating control in order for it to
> > > > > match the background it sits on (ie.: the page background).
>
> > > > > What sways me toward prototype B is that it allows for future
> > > > > development. Stars can be easily split into sections, different images
> > > > > used, star domensions can be re-defined.
>
> > > > > Prototype A is easier to use (you don't need to think about the
> > > > > background it will sit on), but it puts serious constraints on future
> > > > > development and customization.
>
> > > > > On Mar 15, 6:42 pm, timothytoe <[EMAIL PROTECTED]> wrote:
>
> > > > > > Would prototype A work on a gradient background? If so, that would 
> > > > > > be
> > > > > > useful. If not, B makes more sense to me.
>
> > > > > > On Mar 15, 10:11 am, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > > > To anyone else who might be interested, feel free to send your
> > > > > > > feedback. I'm going to go ahead with prototype B for now so the 
> > > > > > > plugin
> > > > > > > will require a background colour.
>
> > > > > > > On Mar 13, 8:45 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > Two things.
>
> > > > > > > > 1. v2 now available 
> > > > > > > > here:http://www.fyneworks.com/jquery/star-rating/
> > > > > > > > - NEW: option to disable the cancel button,
> > > > > > > > - NEW: option to make the plugin readOnly
> > > > > > > > - NEW: ability to accept any value (anything at all)
>
> > > > > > > > 2. half-star prototypes now available
> > > > > > > > There are 2 ways of doing it, I need your feedback.
>
> > > > > > > > Prototype A: Using 2 new half-star images (star-left and 
> > > > > > > > star-right)http://www.fyneworks.com/jquery/star-rating/half-star-A/
> > > > > > > > PROS: works on any background
> > > > > > > > CONS: needs extra images
>
> > > > > > > > Prototype B: Uses CSS to slide part of the star out of view (no 
> > > > > > > > extra
> > > > > > > > images)http://www.fyneworks.com/jquery/star-rating/half-star-B/
> > > > > > > > PROS: can be easily divided into smaller pieces with CSS
> > > > > > > > CONS: needs background colour
>
> > > > > > > > So, which one should we use?


[jQuery] Returning false if $.ajax() experiences an error

2008-03-05 Thread AsymF

If a link has a click event I can stop that from firing by just
returning false so that the browser stays on the current page. How
would I do this when the click event is supposed to send a synchronous
AJAX call using $.ajax()?

I only want the click event to return false and stop the link from
being followed if the AJAX request experiences an error.


[jQuery] Re: Half star rating plugin won't work with jQuery 1.2.3

2008-03-05 Thread AsymF

Much appreciated! :)

On Mar 4, 2:54 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
> I have an idea to make this work (for display purposes only), and I
> will do my best to implement it in the next couple of days (weeks
> tops). I'm sorry I can't do it right now - hope that's OK.
>
> I'll post back here... (and in the official project page in the jQuery
> plugins website)
>
> On Mar 4, 5:32 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > I am really just looking for way to display the data, not to worry
> > about graceful degradation without JavaScript enabled. I had a serious
> > issue with people using proxies to submit thousands of votes for
> > irrelevant ratings so now all ratings have to fetch a key in advance
> > using an AJAX callback to the server (based in part on another
> > tutorial I found on the jQuery site). If JavaScript is gone I just
> > show a list of stars so that visitors can see the rating even if they
> > can't vote.
>
> > However, I would like to be able to display incremental stars such
> > that if I have a rating of 3.75, then 3 stars and 75% of a 4th star
> > will be shown with the rest grayed out.
>
> > On Mar 4, 9:27 am, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > I have been thinking about this for a few days now, but I haven't had
> > > the time to do it.
>
> > > The problem with what you're trying to achieve is that you're looking
> > > for something to *display* the data, whereas my implementation of the
> > > plugin focuses on semantic form integration.
>
> > > Perhaps the way forward is to add the ability to display decimal
> > > points and accept the input of whole numbers (and at a push, .5s).
>
> > > How are you going to use this?
>
> > > On Mar 1, 5:46 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > > I am now working on the jQuery Star Rating Plugin v1.1 by Diego 
> > > > A.,http://www.fyneworks.com, [EMAIL PROTECTED]
>
> > > > I have gotten it working and added the ability to remove the cancel
> > > > button by adding the following before the line "for(n in groups){":
> > > > if (settings.nocancel) {
> > > > $("div.cancel:has(a[title='" + settings.cancel + 
> > > > "'])").remove();
>
> > > > }
>
> > > > I also added "nocancel: false" to the settings at the beginning of the
> > > > script.
>
> > > > Now if I could figure out how to get it to show incremental stars for
> > > > ratings such as 3.2 or 4.6 it would be perfect for my purposes. Any
> > > > ideas on implementing this? Like I said, I can see it done in the
> > > > plugin ratings on the jQuery site but don't know which segment of code
> > > > does that feature.
>
> > > > On Feb 29, 5:52 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > > > I would just use the one on the jQuery site if it weren't for the fact
> > > > > that it relies on a form. The position on the page I want to show the
> > > > > star rating already has another form so to use that one would mean
> > > > > putting a form inside a form which causes problems.
>
> > > > > On Feb 29, 3:19 pm, chrismarx <[EMAIL PROTECTED]> wrote:
>
> > > > > > is that the same on as here:  
> > > > > > http://examples.learningjquery.com/rating/
> > > > > > ?
> > > > > > i remember making several changes, let me know if thats the same 
> > > > > > one-
>
> > > > > > On Feb 29, 1:16 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > > > > > I got this one to work:
> > > > > > > Star Rating Plugin v1.1 
> > > > > > > ->http://www.fyneworks.com/jquery/star-rating/
>
> > > > > > > But the half star plugin won't work with 
> > > > > > > 1.2.3:http://www.learningjquery.com/2007/05/half-star-rating-plugin
>
> > > > > > > Does anyone know a fix? The stars all appear grayed out and hover 
> > > > > > > also
> > > > > > > doesn't work.


[jQuery] Re: Half star rating plugin won't work with jQuery 1.2.3

2008-03-04 Thread AsymF

I am really just looking for way to display the data, not to worry
about graceful degradation without JavaScript enabled. I had a serious
issue with people using proxies to submit thousands of votes for
irrelevant ratings so now all ratings have to fetch a key in advance
using an AJAX callback to the server (based in part on another
tutorial I found on the jQuery site). If JavaScript is gone I just
show a list of stars so that visitors can see the rating even if they
can't vote.

However, I would like to be able to display incremental stars such
that if I have a rating of 3.75, then 3 stars and 75% of a 4th star
will be shown with the rest grayed out.

On Mar 4, 9:27 am, "Diego A." <[EMAIL PROTECTED]> wrote:
> I have been thinking about this for a few days now, but I haven't had
> the time to do it.
>
> The problem with what you're trying to achieve is that you're looking
> for something to *display* the data, whereas my implementation of the
> plugin focuses on semantic form integration.
>
> Perhaps the way forward is to add the ability to display decimal
> points and accept the input of whole numbers (and at a push, .5s).
>
> How are you going to use this?
>
> On Mar 1, 5:46 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > I am now working on the jQuery Star Rating Plugin v1.1 by Diego 
> > A.,http://www.fyneworks.com, [EMAIL PROTECTED]
>
> > I have gotten it working and added the ability to remove the cancel
> > button by adding the following before the line "for(n in groups){":
> > if (settings.nocancel) {
> > $("div.cancel:has(a[title='" + settings.cancel + "'])").remove();
>
> > }
>
> > I also added "nocancel: false" to the settings at the beginning of the
> > script.
>
> > Now if I could figure out how to get it to show incremental stars for
> > ratings such as 3.2 or 4.6 it would be perfect for my purposes. Any
> > ideas on implementing this? Like I said, I can see it done in the
> > plugin ratings on the jQuery site but don't know which segment of code
> > does that feature.
>
> > On Feb 29, 5:52 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > I would just use the one on the jQuery site if it weren't for the fact
> > > that it relies on a form. The position on the page I want to show the
> > > star rating already has another form so to use that one would mean
> > > putting a form inside a form which causes problems.
>
> > > On Feb 29, 3:19 pm, chrismarx <[EMAIL PROTECTED]> wrote:
>
> > > > is that the same on as here:  http://examples.learningjquery.com/rating/
> > > > ?
> > > > i remember making several changes, let me know if thats the same one-
>
> > > > On Feb 29, 1:16 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > > > I got this one to work:
> > > > > Star Rating Plugin v1.1 ->http://www.fyneworks.com/jquery/star-rating/
>
> > > > > But the half star plugin won't work with 
> > > > > 1.2.3:http://www.learningjquery.com/2007/05/half-star-rating-plugin
>
> > > > > Does anyone know a fix? The stars all appear grayed out and hover also
> > > > > doesn't work.


[jQuery] Animating color changes using RGB values

2008-02-25 Thread AsymF

I know jQuery is setup to do animations based on math performed on
numerical values, so if I supplied it with a CSS rgb() range for it to
animate from one color to the next (say red to blue) could it do the
color transition?


[jQuery] Trying to get text content after an element but before a line break

2008-02-25 Thread AsymF

Suppose I have the following in a document:
Line # 64646354

How would I extract the number 64646354 from that and only the number?
Trying to avoid the complexity of a regular expression is possible.


[jQuery] Re: Sending an AJAX call back on link click without losing it

2008-02-25 Thread AsymF

Nevermind. Apparently I had something wrong somewhere because this
isn't happening anymore.

On Feb 24, 4:39 pm, AsymF <[EMAIL PROTECTED]> wrote:
> I am trying to study user interface usage based on links clicked, so I
> attached a pingback to the click event of every link. It simply does a
> basic $.get(url) to the statistic tracking script on the server.
> However, I have noticed during my tests of this rather simple code
> that a LOT of my pingbacks aren't getting received unless I have set
> AJAX to make synchronous requests. This ties up the browser unless the
> server responds back though. I would like to just send the request and
> be done with it since I do not need to process the response in the
> browser.
>
> What could be interrupting the transmission here?


[jQuery] Sending an AJAX call back on link click without losing it

2008-02-24 Thread AsymF

I am trying to study user interface usage based on links clicked, so I
attached a pingback to the click event of every link. It simply does a
basic $.get(url) to the statistic tracking script on the server.
However, I have noticed during my tests of this rather simple code
that a LOT of my pingbacks aren't getting received unless I have set
AJAX to make synchronous requests. This ties up the browser unless the
server responds back though. I would like to just send the request and
be done with it since I do not need to process the response in the
browser.

What could be interrupting the transmission here?


[jQuery] Re: Selecting the ancestor of an element

2008-02-23 Thread AsymF

That should do it! Thanks! :)

On Feb 22, 4:44 pm, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> Then it looks like you want
>
> $(childObj).parent().prepend('Result
> Processed');
>
> That will get you the 1 immediate parent of that element.
>
> - Richard
>
> On Fri, Feb 22, 2008 at 11:49 AM, AsymF <[EMAIL PROTECTED]> wrote:
>
> > If I do the following I end up with every single DIV all the way up
> > the document chain being prepended with the content instead of its
> > immediate parent:
> > var msg_selector = $($(childObj).parent().get(0).tagName + ':has(#' +
> > childObj.id + ')')
> > $(msg_selector).prepend('Result Processed > div>');
>
> > What this is used for is that when a link is clicked it sends AJAX
> > data. If the data was processed remotely it is supposed to show a
> > simple success message at the top of the parent DIV it is located in.
>
> > Any idea what I am doing wrong?
>
> > On Feb 22, 6:32 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> > > I'm not sure I understand what you're trying to get at. If you have an
> > > element (childObj), it has only one parent, $(childObj).parent().
> > Perhaps
> > > you want to provide some more context if I'm not getting it?
>
> > > - Richard
>
> > > On Thu, Feb 21, 2008 at 3:48 PM, AsymF <[EMAIL PROTECTED]>
> > wrote:
>
> > > > How would I select the parent that ONLY has that child?
>
> > > > For instance, the following selects too many parents:
> > > > $($(childObj).parent().get(0).tagName + ':has(#' + childObj.id + ')')
>
> > > > On Feb 21, 2:25 pm, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> > > > > See
>
> > > > >http://docs.jquery.com/Traversing/parent#expr
>
> > > > >http://docs.jquery.com/Traversing/parents#expr
>
> > > > > - Richard
>
> > > > > On Thu, Feb 21, 2008 at 12:33 PM, AsymF <[EMAIL PROTECTED]
>
> > > > wrote:
>
> > > > > > How would I select the ancestor or parent of an element?


[jQuery] Re: Selecting the ancestor of an element

2008-02-22 Thread AsymF

If I do the following I end up with every single DIV all the way up
the document chain being prepended with the content instead of its
immediate parent:
var msg_selector = $($(childObj).parent().get(0).tagName + ':has(#' +
childObj.id + ')')
$(msg_selector).prepend('Result Processed');

What this is used for is that when a link is clicked it sends AJAX
data. If the data was processed remotely it is supposed to show a
simple success message at the top of the parent DIV it is located in.

Any idea what I am doing wrong?

On Feb 22, 6:32 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> I'm not sure I understand what you're trying to get at. If you have an
> element (childObj), it has only one parent, $(childObj).parent(). Perhaps
> you want to provide some more context if I'm not getting it?
>
> - Richard
>
> On Thu, Feb 21, 2008 at 3:48 PM, AsymF <[EMAIL PROTECTED]> wrote:
>
> > How would I select the parent that ONLY has that child?
>
> > For instance, the following selects too many parents:
> > $($(childObj).parent().get(0).tagName + ':has(#' + childObj.id + ')')
>
> > On Feb 21, 2:25 pm, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> > > See
>
> > >http://docs.jquery.com/Traversing/parent#expr
>
> > >http://docs.jquery.com/Traversing/parents#expr
>
> > > - Richard
>
> > > On Thu, Feb 21, 2008 at 12:33 PM, AsymF <[EMAIL PROTECTED]>
> > wrote:
>
> > > > How would I select the ancestor or parent of an element?


[jQuery] Re: How could I pass an object into an eval statement

2008-02-22 Thread AsymF

Yeah, I have been using them. Just had no idea setTimeout could take
them. :)

Thanks!

On Feb 22, 2:01 am, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> Welcome to the wonderful world of "closures" (which "double" as
> "functions" in JavaScript), you've been using them already (perhaps
> without know it) :).
>
> The setTimeout function will actually take a function rather than a
> string (which it then 'eval's):
>
> function someFunction( obj ) {
> var message = obj.find('#message');
> setTimeout(
> function() {
> message.fadeOut( 'slow', function() { 
> $(this).remove(); } );
> }
> , 5000
> );
>
> };
>
> Some further reading on the subject of closures (the first few links
> from a Google search for "javascript closures"):
>
>http://www.jibbering.com/faq/faq_notes/closures.html
>http://blog.morrisjohns.com/javascript_closures_for_dummies
>
> Karl Rudd
>
> On Fri, Feb 22, 2008 at 6:20 AM, AsymF <[EMAIL PROTECTED]> wrote:
>
> >  For instance, say a function is passed an object and that function is
> >  supposed to set an event to fire on a timeout, how would I do it? Even
> >  more complicated, how would I do it if I needed to perform the action
> >  on a sub-selection of the object passed?
>
> >  If I wanted to do this and I have just id's, then I could do the
> >  following:
> >  setTimeout("$(#'" + obj.id + " #message').fadeOut('slow', function ()
> >  {$(this).remove();});", 5000);
>
> >  But what if the object passed doesn't have an id?


[jQuery] Re: Selecting the ancestor of an element

2008-02-21 Thread AsymF

How would I select the parent that ONLY has that child?

For instance, the following selects too many parents:
$($(childObj).parent().get(0).tagName + ':has(#' + childObj.id + ')')

On Feb 21, 2:25 pm, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> See
>
> http://docs.jquery.com/Traversing/parent#expr
>
> http://docs.jquery.com/Traversing/parents#expr
>
> - Richard
>
> On Thu, Feb 21, 2008 at 12:33 PM, AsymF <[EMAIL PROTECTED]> wrote:
>
> > How would I select the ancestor or parent of an element?


[jQuery] How could I pass an object into an eval statement

2008-02-21 Thread AsymF

For instance, say a function is passed an object and that function is
supposed to set an event to fire on a timeout, how would I do it? Even
more complicated, how would I do it if I needed to perform the action
on a sub-selection of the object passed?

If I wanted to do this and I have just id's, then I could do the
following:
setTimeout("$(#'" + obj.id + " #message').fadeOut('slow', function ()
{$(this).remove();});", 5000);

But what if the object passed doesn't have an id?


[jQuery] Selecting the ancestor of an element

2008-02-21 Thread AsymF

How would I select the ancestor or parent of an element?


[jQuery] Using val() vs text()

2008-02-18 Thread AsymF

I want to update the contents of an element depending if it is a form
element who's value can be set or if it is just an element who
internal text can be set. How could I distinguish whether to use val()
or text() on the fly?