RE: [jQuery] Callback in $.getJSON is called but variable assignment doesn't persist.

2010-01-04 Thread Josh Nathanson
Probably an async issue - any code after the $.getJSON call (but not in the
callback) will get executed before the async call returns.  Any code that is
dependent on this.Settings being set with the returned data must be within
the callback function.

Also "this" is probably not what you are expecting it to be.  Do an alert or
console.log with "this" in your callback function to make sure it's what
you're expecting.

-- Josh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Ido Yehieli
Sent: Monday, January 04, 2010 9:55 AM
To: jQuery (English)
Subject: [jQuery] Callback in $.getJSON is called but variable assignment
doesn't persist.

Hi,
on the following code:

$.getJSON("http://www.tametick.com/test2/json/settings.json",function
(data) {
this.Settings = data;
alert(data);
alert(this.Settings);
});

which can be found on http://www.tametick.com/test2 (line 63 in
http://www.tametick.com/test2/js/cardinal-quest.js), I am getting the
alerts correctly (returning the object read from the file) but after
the function ends this.Settings revurts back to null and I get the
error:

Error: Settings is undefined
Source File: http://www.tametick.com/test2/js/cardinal-quest.js
Line: 70

Any idea what is going wrong?

Thanks,
Ido.



RE: [jQuery] Selectors and Internet Explorer

2009-12-10 Thread Josh Nathanson
Maybe try closing the option tag?



-- Josh

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of rob
Sent: Thursday, December 10, 2009 12:54 PM
To: jQuery (English)
Subject: [jQuery] Selectors and Internet Explorer

I'm having some problem with selectors in Internet Explorer.  I have
this demo setup that is basically a modified "linked menus"
application.  When you select something from one menu, it updates the
contents in it's child menu.

For some reason Internet Explorer will not read the correct selector.

I have tested the following:  I've tried each of these selectors with
and without "this".
$(".parentMenu").click();
$("#parentMenu > .parentMenu").click();
$("#parentMenu > option").click();

This was the only one I got to trigger anything.
$("#parentMenu").click();

The elements in question here are:




My question is:

Why do all the other browsers recognize the content within the
 except internet explorer.  It seems like it won't call any of
the option elements, whether they're created by script or loaded fresh
from the server.

Any ideas??



RE: [jQuery] Can't get image's dimension under a hidden object

2009-11-19 Thread Josh Nathanson
One little trick I've used is to use absolute positioning to move the image
way off the page, like left = -5000, then display the image, get the
dimensions, then hide it again.  This way your layout won't be disturbed.

 

-- Josh

 

 

 

From: Michael Geary [mailto:m...@mg.to] 
Sent: Thursday, November 19, 2009 9:39 AM
To: jquery-en@googlegroups.com
Subject: Re: [jQuery] Can't get image's dimension under a hidden object

 

I don't think even case 1 will work in all browsers. Some browsers won't
bother loading the image if it has display:none. But they will all load it
if it has visibility:hidden.

Here's how I do it:

jQuery.imageDimensions = function( src, callback ) {
jQuery('')
.css({ visibility:'hidden' })
.appendTo('body')
.load( function() {
var width = this.width;
var height = this.height;
jQuery(this).remove();
callback( width, height );
})
.attr({ src:src });
};

and then use:

$.imageDimensions( 'xxx', function( width, height ) {
// here you have the image width and height
});

That's a little different from what you're doing - I'm not working with an
IMG tag already in the document - but if you pull the src attribute from the
img tag and pass it to this function it should work.

-Mike

On Thu, Nov 19, 2009 at 7:16 AM, David .Wu  wrote:

1.

$(window).load(function() {
   alert($('#img1').width());
});

2.

   

$(window).load(function() {
   alert($('#img2').width());
});

case 1 can get the dimension, but case 2 can't, how to get it?

 



[jQuery] Re: Single page application and jQuery

2009-09-22 Thread Josh Nathanson

Hi Phaedra,

Probably, most people don't pay much attention to memory leakage when they
are creating applications, or they don't test on IE.

A quick scan of the jQuery bug tracker shows a few bug reports that relate
to the leakage in IE.  It doesn't look like they've been resolved.

You might want to try and isolate the parts of your application that are
leaking memory, and use plain 'ol javascript in those parts.

-- Josh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Phaedra
Sent: Tuesday, September 22, 2009 12:05 PM
To: jQuery (English)
Subject: [jQuery] Re: Single page application and jQuery


So, no one looking at this topic? or no one know nothing about?



[jQuery] Re: jQuery select where attribute ID less than

2009-08-31 Thread Josh Nathanson

Any chance of doing what you need to do on the server, rather than the
client?

Are you stuck with the naming convention you're using, or can you name the
spans a little differently or give them different class names to allow for
better selection criteria?

Given your current situation you'd have to loop through each span as Aquaone
said, but I bet you might be able to think of a different way to approach
the problem.

-- Josh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Namir
Sent: Monday, August 31, 2009 2:33 PM
To: jQuery (English)
Subject: [jQuery] Re: jQuery select where attribute ID less than


Still how would I do it with an each? I'd still need to select all the
ones with an attribute of less than x, and it would be stupid to loop
it from 1 to whatever as x can reach thousands. Do you have any other
suggestions as to how I could do this?

On Aug 31, 9:58 pm, aquaone  wrote:
> id will be a string. AFAIK there's no built-in to parse it as a number and
> compare. you'd either have to .each() it or find another means of
> accomplishing what you are trying to do.
>
> aquaone
>
>
>
> On Mon, Aug 31, 2009 at 13:50, Namir  wrote:
>
> > How can I do a less than in a select e.g. something like $.("span.class
> > [id<"+ a_custom_variable +"]") when I tried that it just selected all
> > span of class with an ID attribute rather than where ID attribute is
> > less than



[jQuery] Re: Is this sytax legitimate?

2009-08-19 Thread Josh Nathanson

Rick - the load method is asynchronous, so you have to get the html from
#favoritesHold in a callback from the load method.  Otherwise, the
subsequent code after the load method is running before the html is returned
from the server.

-- Josh

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Rick Faircloth
Sent: Wednesday, August 19, 2009 3:02 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Is this sytax legitimate?


Hmmm...tried that and couldn't get it to work...something strange is going
on.

Tried this sequence, too:

var favoritesHTML = '../components/userFavoritesHTML.cfm?' + new
Date().getTime();

$('#noFavorites:visible').hide();


$('#favoritesHold').load(favoritesHTML);

var newHTML = $('#favoritesHold').html();

$('.menu1').append(newHTML);

I can see the HTML on the screen in the #favoritesHold in the second line of
code above,
but nothing gets appended to .menu1.

Any other suggestions?

Rick



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of ak732
Sent: Wednesday, August 19, 2009 4:22 PM
To: jQuery (English)
Subject: [jQuery] Re: Is this sytax legitimate?


Actually,  this would be better I think:

$(".menu1").append($("").load(favoritesHTML).html());

The idea being to consruct a temp placeholder for your loaded html
that goes away after.

On Aug 19, 4:18 pm, ak732  wrote:
> The syntax looks okay.
>
> Are you using Firebug to verify that #favorites (which appears to be a
> mysterious  somewhere) is actually being loaded as you expect?
> Does it actually contain the  tags you show above?
>
> Also, you might want to eliminate #favorites altogether by taking a
> page from jQuery's load implmentation like this:
>
> $("").load(favoritesHTML).html().appendTo(".menu1");



[jQuery] Re: How can I modify this code to get the tooltip to disappear?

2009-08-18 Thread Josh Nathanson
Rick:  I think in your mouseout binding, you also need to unbind the
mousemove event handler from the document.  I think would look like this:

 

$('.clickable').mouseout(function() {

$().unbind( 'mousemove' );

$('div.toolTip').remove();

});

 

-- Josh

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Rick Faircloth
Sent: Tuesday, August 18, 2009 10:43 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] How can I modify this code to get the tooltip to
disappear?

 

I've got it appearing at the correct time and following the mouse pointer
correctly.

 

But my last bit of code isn't causing the tip to be removed.

 

Is it because the first section of code below is being triggered with every
mouse movement?

 

If so, how should I reconfigure this routine.?

 

Thanks for any feedback.

 

CODE:

 

 $(document).ready(function() {

 

  $('.clickable').mouseover(function() {

 

   $().mousemove(function(event) {

   

$('You must have a favorites
accountand be logged in to save favorites').appendTo('body');

   

$('div.toolTip').css({ 'top' : event.pageY - 5, 'left' :
event.pageX + 20 });

   

$('div.toolTip').show();

   

   });

  });

   

  $('.clickable').mouseout(function() {

   

   $('div.toolTip').remove();

   

  });

 });

 


--

"Ninety percent of the politicians give the other ten percent a bad
reputation."  - Henry Kissinger

 



[jQuery] Re: $.jgrid is undefined with jqgrid plugin

2009-08-04 Thread Josh Nathanson

I think that plugin is broken.  I tried it a couple of weeks back and got
the same error, tried to debug it for a while, and gave up.

-- Josh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Massimiliano Marini
Sent: Tuesday, August 04, 2009 11:11 AM
To: jQuery (English)
Subject: [jQuery] $.jgrid is undefined with jqgrid plugin


Error: $.jgrid is undefined
Source file: http://localhost/test/js/jquery.jqGrid.min.js

I don't understand why I get this error.

http://trirand.com/jqgrid/jqgrid.html

Cheers



[jQuery] Re: BlockUI 1.33 crashing Internet Explorer

2009-07-15 Thread Josh Nathanson

Try upgrading to jQuery 1.3.2 and BlockUI 2.0.  Your versions are somewhat
outdated.

-- Josh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of JQUser
Sent: Wednesday, July 15, 2009 10:08 AM
To: jQuery (English)
Subject: [jQuery] BlockUI 1.33 crashing Internet Explorer


I am using the BlockUI Plugin version 1.33 with Jquery Version 1.2.1.

When the application page is accessed in which the block and unblock
UI calls are executed, IE is crashing randomly.

Pls help what needs to be done to overcome this issue.



[jQuery] Re: function scope

2009-07-06 Thread Josh Nathanson

You can't.  You'll have to create a global variable outside document.ready:

var myFuncs = {};

$(document).ready(function() {
myFuncs.foo = function() {
// etc.
};
});

other .js file:
myFuncs.foo();

-- Josh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of tecmo
Sent: Monday, July 06, 2009 5:11 PM
To: jQuery (English)
Subject: [jQuery] function scope


In my $(document).ready(function() I have

function foo() {}

How can I access the foo function from a different jquery .js file?

thank you, very new
- eric



[jQuery] Re: ready() to bind post-ajax events

2009-07-04 Thread Josh Nathanson


Would there be a racing issue with html() though?  I believe that is not an 
asynchronous method, so it would have to complete before the next chained 
method.


-- Josh


- Original Message - 
From: "hedgomatic" 

To: "jQuery (English)" 
Sent: Saturday, July 04, 2009 9:34 AM
Subject: [jQuery] ready() to bind post-ajax events




I haven't seen much mention of this on the web, and only recently
discovered it works not sure if this is somehow bad practice or
just a lesser known trick, but lately I've been chaining .ready() at
the end of .html() when I want to bind events to new ajax data... I
presume it's much more efficient than live(), and avoids racing
issues. EG:


$.ajax({
   type: 'POST',
   url: 'myPage.html',
   success: function(c){
$(".response").html(c).ready(function() {
bindNewEvent(".response a");

 });
});

function bindNewEvent(o) {
$(o).click(funciton() {  ...etc...  });
};



There's infinite docs about using .ready() to process the document,
but not returning HTML. Passing the above along should anyone find it
useful or have insight onto why it's seemingly not mentioned elsewhere. 




[jQuery] Re: When DOM elements are created and inserted into the document

2009-06-30 Thread Josh Nathanson

The LiveQuery plugin allows you to do this.  Do a search for LiveQuery in
the jQuery plugins area.

-- Josh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Khai
Sent: Tuesday, June 30, 2009 5:34 PM
To: jQuery (English)
Subject: [jQuery] When DOM elements are created and inserted into the
document


Hello,

I want to be able to run a function every time an element is removed
on inserted into the document.  How can I do this?

Thanks!

Khai



[jQuery] Re: matching full names when querying

2009-05-28 Thread Josh Nathanson
It doesn't match on partials unless you use special selector symbols.

 

The reason your element is matched is because the class "myDiv" on your div
matches the $(".myDiv") part of your selector.  It is not because of the
partial match.  When you do a comma delimited list as a selector, an element
matching anything in the list will be retrieved.  So your selector ".myDiv,
#my" would match any elements with the id "my" OR the class "myDiv".

 

If you just want to search for the id you'd do this:

$("#myID")

 

-- Josh

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Peter Marino
Sent: Thursday, May 28, 2009 10:35 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] matching full names when querying

 

Hi jQuery people,

 

I just found out that jQuery can match on partials,.. is this correct?

and if so how do I make it match on the whole text.

 

i.e.

 



 

doing a $(".myDiv, #my") will actually match the above tag! is this correct?

if so how do I force it to match the whole "myID" instead of partials?

 

regards,

Peter

-- 
Power Tumbling - http://www.powertumbling.dk
OSG-Help - http://osghelp.com



[jQuery] Re: Tablesorter is not enabled on my page

2009-05-27 Thread Josh Nathanson

Try clicking twice on a header.  The first click won't appear to do anything
if the table is already sorted.

-- Josh

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of bayadmin
Sent: Wednesday, May 27, 2009 1:30 PM
To: jQuery (English)
Subject: [jQuery] Re: Tablesorter is not enabled on my page


HmmI tried those, too. I changed both the function and table to
another example given in the documentation:

1) the  scripts and function in the header.php:

 
 



$(document).ready(function() {
// call the tablesorter plugin
$("table").tablesorter();
});






2) The table itself.




first name
last name
age
total
discount
diff




peter
parker
28
9.99
20.3%
+3


john
hood
33
19.99
25.1%
-7




Still no difference. -Amy

On May 27, 1:16 pm, GaVrA  wrote:
> Ehh... Faster then me for 3min... :P
>
> On May 27, 10:11 pm, Jonathan  wrote:
>
> > the ID 1 is invalid.
>
> > Seehttp://www.w3.org/TR/REC-html40/types.html#type-name
>
> > On May 27, 10:26 am, bayadmin  wrote:
>
> > > Hello, I am trying out the Tablesorter in Wordpress 2.7.1  to make a
> > > membership list sortable. For some reason the sortable features isn't
> > > being enabled (or at least visible). I need help find the culprit.
> > > Here are the steps I've taken so far:
>
> > > 1)
> > > In the header.php file I added the following code between the head
> > > tags:
>
> > > 
> > > 
> > > 
>
> > > 
> > > wp_head(); ?>
>
> > > 
>
> > > (the scripts directory is located at /wp/wp-content/themes/mytheme/
> > > library/scripts/)
>
> > > 2)
> > > and in the jquery.tablesorter.js script I added the following code
> > > just below the comments at the top:
> > >
(perhttp://www.nabble.com/Tablesorter-Into-Wordpress-page-td21007774.htm)
>
> > > $(document).ready(function()
> > >     {
> > >         $("1").tablesorter( {sortList: [[0,0], [1,0]]} );
> > >     }
> > > );
>
> > > (I tried putting this function in the header itself, as
whathttp://tablesorter.com/docs/#Getting-Startedseemtobe saying, but
> > > this had only the effect of displaying this code on the page itself.)
>
> > > 3)
> > > On the page with the table, I used the same sample table
fromhttp://tablesorter.com/docs/#Getting-Started, using "1" for the ID.
>
> > > 
> > > 
> > > 
> > >     Last Name
> > >     First Name
> > >     Email
> > >     Due
> > >     Web Site
> > > 
> > > 
> > > 
> > > 
> > >     Smith
> > >     John
> > >     jsm...@gmail.com
> > >     $50.00
> > >     http://www.jsmith.com
> > > 
> > > 
> > >     Bach
> > >     Frank
> > >     fb...@yahoo.com
> > >     $50.00
> > >     http://www.frank.com
> > > 
> > > 
> > > 
>
> > > But, while the table shows up on the page, the sortable features are
> > > not visible.
>
> > > NOTE: In Wordpress  I have the WP-Table Reloaded plugin activated, but
> > > to trouble shoot this issue, I am not using the shortcode and using a
> > > HTML table directly in the page, for now.
>
> > > Please advise what I need to do to fix this?
>
> > > Thanks!
> > > Amy



[jQuery] Re: Read "Pro JavaScript Techniques"?

2009-05-22 Thread Josh Nathanson

I would very highly recommend it.  It's written by the creator of jQuery
John Resig.

Is this Michael Finney from Seven on Your Side?

-- Josh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of finneycanhelp
Sent: Friday, May 22, 2009 8:13 AM
To: jQuery (English)
Subject: [jQuery] Read "Pro JavaScript Techniques"?


Have you read the book "Pro JavaScript Techniques" Published December
2006? Still good /  applicable?

(book image and links at http://jspro.org/ )

Do you know of an active and better email list (or discussion group)
for such general JavaScript questions?

Thanks.

Michael Finney



[jQuery] Re: SOT: execute JS before a specific image loads

2009-05-20 Thread Josh Nathanson
Andy,

Dunno if you can do thatcurious though, could you just do an ajax call
that gives you the "extra stuff"?  It won't fire if they don't have
javascript present, so it would do pretty much the same thing.

-- Josh



_
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Andy Matthews
Sent: Wednesday, May 20, 2009 8:52 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] SOT: execute JS before a specific image loads



Can I intercept the loading of an image BEFORE it loads?

We're looking at using an img tag for inserting stats on our server. Here's
what I'm considering...

1) Collect certain information server side, write an img to the document
like so (note the URL vars):



2) Using JS, intercept the load of this image BEFORE it takes place, and add
things to the URL vars.

This way, if JS is not present, you get the default stuff, but if JS is
present, you get extra stuff.

Anyone?

Andy Matthews
Senior Web Developer
 << OLE Object: Picture (Metafile) >> 
www.dealerskins.com

P Please consider the environment before printing this e-mail.

Total customer satisfaction is my number 1 priority! If you are not
completely satisfied with
the service I have provided, please let me know right away so I can correct
the problem,
or notify my manager Aaron West at aw...@dealerskins.com.

<>

[jQuery] Re: Event is not triggered when the removed from one table to another table

2009-05-18 Thread Josh Nathanson

Events are not automatically bound to new elements added to the dom.
However if you are using jquery 1.3+ you can do this to achieve dynamic
binding:

$("tr").live("dblclick",function(event) {
// etc.

-- Josh

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of naresh
Sent: Monday, May 18, 2009 11:05 AM
To: jQuery (English)
Subject: [jQuery] Event is not triggered when the  removed from one
table to another table


Hi I have a query(JQuery) here. can you plz help me in fixing the
issue with this code.

That is when I click on  of first table that should get removed
from first table and added to second table. It is happening fine and
good. But when I double click on the  that is added to second
table no event is triggered. Why?

$("tr").dblclick(function(event){
var row = $(this).html();
$(this).remove();
$("#bottomTable").append(""+row+"");
});

do I need to call any method?



[jQuery] Re: jquery.getJSON params not filtering

2009-05-14 Thread Josh Nathanson

Well...I don't see anything in your code that would filter the JSON once it
comes back from the server.

You are just dumping the response into the select menu.  Once the params are
sent to the server, and the JSON is generated there, there is nothing else
that would happen to create further filtering.

The params in the getJSON function do not provide filtering for the returned
JSON, only keys/values to be passed to the server.

It seems like you might be better served doing the filtering on the server,
that way you do not have to pass back the entire list of funds, only the
ones in the category you send to the server.

-- Josh





-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of bradrice
Sent: Thursday, May 14, 2009 10:45 AM
To: jQuery (English)
Subject: [jQuery] Re: jquery.getJSON params not filtering


I have this in there:

$.ajaxSetup({"error":function(XMLHttpRequest,textStatus, errorThrown)
{
  alert(textStatus);
  alert(errorThrown);
  alert(XMLHttpRequest.responseText);
  }});

I've got it coming back right. I can see the json on the server and it
is serving correctly.

Like I said I am getting a proper response back and it is populating
the menu, just not filtering on the params I am telling it to filter
on.

On May 14, 1:08 pm, "Josh Nathanson"  wrote:
> I would say then that it's probably your server code.  Maybe run some
> debugging and make sure the parameters are coming in as you expect, and
look
> at the data server side before it goes back to the client.
>
> -- JOsh
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>
> Behalf Of bradrice
> Sent: Thursday, May 14, 2009 10:02 AM
> To: jQuery (English)
> Subject: [jQuery] Re: jquery.getJSON params not filtering
>
> OK, I changed it but it still returns everything. It isn't filtering.
> Thanks for the suggestion.
>
> On May 14, 12:54 pm, "Josh Nathanson"  wrote:
> > I think your params should look like this:
>
> > { "category":fundType }
>
> > In your code, you are passing a string rather than a javascript object
> > literal.
>
> > -- Josh
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>
> > Behalf Of bradrice
> > Sent: Thursday, May 14, 2009 9:38 AM
> > To: jQuery (English)
> > Subject: [jQuery] jquery.getJSON params not filtering
>
> > I just can't seem to get getJSON to filter based upon the map I send
> > in.
>
> > Here is my code:
>
> > $.getJSON('funds_static_json.dot',"{category:fundType}",function(json)
> > {
> >                         dropdownSet.loadSelect(json);
> >                 }
>
> > My post in firebug looks completely right:
>
> >http://www.uakron.edu/development2/funds/funds_static_json.dot?catego...
> > 60
>
> > The json is formatted properly and passes the lint test.
>
> > However, I get the entire json back and not the filtered by my
> > parameter. I have over a thousand funds, but it should only pull back
> > about 9 bassed upon that category.
>
> > Here is my working
> url:http://www.uakron.edu/development2/funds/fund-detail_2.dot
>
> > Any help would be appreciated. I'm slamming into a wall.



[jQuery] Re: jquery.getJSON params not filtering

2009-05-14 Thread Josh Nathanson

I would say then that it's probably your server code.  Maybe run some
debugging and make sure the parameters are coming in as you expect, and look
at the data server side before it goes back to the client.

-- JOsh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of bradrice
Sent: Thursday, May 14, 2009 10:02 AM
To: jQuery (English)
Subject: [jQuery] Re: jquery.getJSON params not filtering


OK, I changed it but it still returns everything. It isn't filtering.
Thanks for the suggestion.

On May 14, 12:54 pm, "Josh Nathanson"  wrote:
> I think your params should look like this:
>
> { "category":fundType }
>
> In your code, you are passing a string rather than a javascript object
> literal.
>
> -- Josh
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>
> Behalf Of bradrice
> Sent: Thursday, May 14, 2009 9:38 AM
> To: jQuery (English)
> Subject: [jQuery] jquery.getJSON params not filtering
>
> I just can't seem to get getJSON to filter based upon the map I send
> in.
>
> Here is my code:
>
> $.getJSON('funds_static_json.dot',"{category:fundType}",function(json)
> {
>                         dropdownSet.loadSelect(json);
>                 }
>
> My post in firebug looks completely right:
>
> http://www.uakron.edu/development2/funds/funds_static_json.dot?catego...
> 60
>
> The json is formatted properly and passes the lint test.
>
> However, I get the entire json back and not the filtered by my
> parameter. I have over a thousand funds, but it should only pull back
> about 9 bassed upon that category.
>
> Here is my working
url:http://www.uakron.edu/development2/funds/fund-detail_2.dot
>
> Any help would be appreciated. I'm slamming into a wall.



[jQuery] Re: jquery.getJSON params not filtering

2009-05-14 Thread Josh Nathanson

I think your params should look like this:

{ "category":fundType }

In your code, you are passing a string rather than a javascript object
literal.

-- Josh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of bradrice
Sent: Thursday, May 14, 2009 9:38 AM
To: jQuery (English)
Subject: [jQuery] jquery.getJSON params not filtering


I just can't seem to get getJSON to filter based upon the map I send
in.

Here is my code:

$.getJSON('funds_static_json.dot',"{category:fundType}",function(json)
{
dropdownSet.loadSelect(json);
}

My post in firebug looks completely right:

http://www.uakron.edu/development2/funds/funds_static_json.dot?category=5263
60

The json is formatted properly and passes the lint test.

However, I get the entire json back and not the filtered by my
parameter. I have over a thousand funds, but it should only pull back
about 9 bassed upon that category.

Here is my working url:
http://www.uakron.edu/development2/funds/fund-detail_2.dot

Any help would be appreciated. I'm slamming into a wall.



[jQuery] Re: Scoping issue with load and call back function.

2009-05-07 Thread Josh Nathanson

Well it's a little tricky because of the asynchronicity.  The way I might
handle it is to set some kind of "isLoaded" global object that gets
poplulated each time an async call returns.  You more or less already have
that.  Then, create a "polling" function using setInterval or setTimeout
that checks every 500ms or so to see if that "isLoaded" object is completely
populated.  Once you determine that it is, then generate the combined table.

-- Josh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Stever
Sent: Thursday, May 07, 2009 4:28 AM
To: jQuery (English)
Subject: [jQuery] Re: Scoping issue with load and call back function.


Josh,

First the firstload=0 and not resetting the variable was left off. But
ultimately is unrelated to the asynchronous problem you pointed out.

Asynchronous loading makes a big difference here.  As a pretty recent
user of jquery, I obviously designed this code wrong.

So here is what I what to do.   I have multiple web pages on a server
that have summary result tables for different products.
I want to read each of these summary tables and combine the results
into one single table.

My thought was to use Jquery Load to load each table and read the
information and store into the global arrays, TableCell, TableRow and
TableColumn.

Apparently this approach is flawed.

Can you or someone on this group recommend/outline a way to accomplish
this relatively simple task?

Thanks!!

Steve










On May 6, 7:13 pm, "Josh Nathanson"  wrote:
> OK it looks like you have a few things to sort out here.
>
> One thing is that you have to remember that load is asynchronous.  So when
> that is fired the rest of your code will continue along its merry way.  In
> other words the loop will keep looping independent of the callback
function
> firing.  My hunch is that this will give you unexpected values for the
> variable [i] in the load callback function.  Because of this you will
> probably have to do some refactoring to get the results you're looking
for.
> Not sure though if you intend to run that load on every iteration of the
> loop or just the first one.
>
> Also you may have left this out, but I see you have a firstload = 1
> declaration, but then you don't set it to 0.  This could also be messing
up
> your results as it will run every time unless you set it to 0 somewhere.
>
> Definitely leave the variable declarations outside document ready as in
your
> second email.
>
> -- Josh
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>
> Behalf Of Stever
> Sent: Wednesday, May 06, 2009 4:31 PM
> To: jQuery (English)
> Subject: [jQuery] Re:Scopingissue with load and call back function.
>
> Josh thanks for the quick response.
>
> I tried putting the variables
>
> var TableCells    =[,];
> var TableRowName  =[,];
> var TableColName  =[,];
>  outside the document ready function.  Originally. (not redefined with
> var inside document ready shown here).
>
> http://www.hou.asp.ti.com/</a>
> sparcit_data_reports//js/jquery.js">
> 

[jQuery] Re: Scoping issue with load and call back function.

2009-05-06 Thread Josh Nathanson

OK it looks like you have a few things to sort out here.

One thing is that you have to remember that load is asynchronous.  So when
that is fired the rest of your code will continue along its merry way.  In
other words the loop will keep looping independent of the callback function
firing.  My hunch is that this will give you unexpected values for the
variable [i] in the load callback function.  Because of this you will
probably have to do some refactoring to get the results you're looking for.
Not sure though if you intend to run that load on every iteration of the
loop or just the first one.

Also you may have left this out, but I see you have a firstload = 1
declaration, but then you don't set it to 0.  This could also be messing up
your results as it will run every time unless you set it to 0 somewhere.

Definitely leave the variable declarations outside document ready as in your
second email.

-- Josh

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Stever
Sent: Wednesday, May 06, 2009 4:31 PM
To: jQuery (English)
Subject: [jQuery] Re: Scoping issue with load and call back function.


Josh thanks for the quick response.

I tried putting the variables

var TableCells=[,];
var TableRowName  =[,];
var TableColName  =[,];
 outside the document ready function.  Originally. (not redefined with
var inside document ready shown here).


http://www.hou.asp.ti.com/
sparcit_data_reports//js/jquery.js">

[jQuery] Re: Scoping issue with load and call back function.

2009-05-06 Thread Josh Nathanson

When you say you get undefined outside the load function, do you mean
outside $(document).ready, or inside $(document).ready?

They should not be accessible outside document.ready, because of the closure
caused by passing the anonymous function to document.ready, and because you
use var to declare them inside that function.

If you want them to be accessible globally, you'll have to declare them
outside document.ready. 

-- Josh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Stever
Sent: Wednesday, May 06, 2009 3:54 PM
To: jQuery (English)
Subject: [jQuery] Scoping issue with load and call back function.


I am a relative newbie to Jquery and I am getting some scoping issues
I can't figure out.

I was hoping for some advice.

Basically I am trying to load multiple documents that have HTML tables
and then parse the tables and redisplay in a new format. Merging
elements from the different documents.


So basically I build the url path for a set of "devices"  and load
them. I thought in the load function I could collect elements into
global variables and manipulate in the final document. But is not
working.

The variables TableCells, TableRowName and TableColName are what I
have issues with.


$(document).ready(function(){
  $.ajaxSetup({cache: false}) ;

  var TableCells=[,];
  var TableRowName  =[,];
  var TableColName  =[,];

 for( var i =0; i < devList.length; i++)
  {
// set the path
var path = prefix + yield_dir + devList[i] +'/' + smslot_yield;
//clear the display area
$('#display').html("");

   var colName =[];
   var rowName =[];
   var cellValue = [];

//load the page but collect the table info
if (firstLoad == 1)
{

  $('#display').load(path,
   function(){


 manipulate tables and put data in
Global Array
  TableCells[i]   = cellValue;
  TableRowName[i] = rowName;
  TableColName[i] = colName;


});
}
  }
});



So the variables are defined in the document ready scope. (I even
tried outside that as well)
 var TableCells=[,];
 var TableRowName  =[,];
 var TableColName  =[,];

I set these variables in the load function scope and they are
accessible there and work fine.

However when I try to access outside the load function the variables
are undefined.

Can you tell what I am missing?

Thanks,

Steve



[jQuery] Re: delaying an action

2009-04-20 Thread Josh Nathanson

Do a search for the plugin "HoverIntent", I think is what you're looking
for.

-- Josh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of geocalleo
Sent: Monday, April 20, 2009 3:33 PM
To: jQuery (English)
Subject: [jQuery] delaying an action


Hi all, I was wondering if there is a way in jQuery for me to disable
a hover event for a few seconds and then execute it only if the mouse
pointer is still hovering over the particular element I have set the
hover event to.

So the user would hover over a link and if after 2 seconds was still
hovering over it, the hover event would then execute. Otherwise,
nothing would happen.

I've been trying to find out about it for sometime now but I am
exhausted with searching.

Thanks.



[jQuery] Re: passing more than 1 param via click()?

2009-04-16 Thread Josh Nathanson

You could do something like:

 // use a delimiter that makes sense for your values

Then split the rel:

var arr = this.rel.split('_'), val1 = arr[0], val2 = arr[1];

removeDept( val1, val2 );

-- Josh

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of kgosser
Sent: Thursday, April 16, 2009 2:47 PM
To: jQuery (English)
Subject: [jQuery] passing more than 1 param via click()?


Hey all,

Not really sure how to ask this, so I'm sorry if my title is mis-
leading. It is also why I wasn't able to find much searching, so I'm
sorry if it's answered already.

Basically, the code I inherited was this:

','');
  return false;"
>Remove Department

And that is in an iteration, so the two values passed to the
"removeDept" function are always dynamic.

I'm trying to handle this in the document.ready(). Normally, I throw
the would-be dynamic param passed as a rel tag on an anchor, and
that's how I retrieve things when I clean up code like this.

However, I'm scratching my head for the *best* way to handle this with
the two params now... How do you guys recommend I handle something
like that?

$(document).ready(function() {
$(".edit-link").click(function(){
   removeDept($(this).attr("rel"),$(this).attr("rel"));
   return false;
});
});



Obviously I can't have two rel attributes :)


Thanks in advance.



[jQuery] Re: jQuery.height() or css issue?

2009-02-25 Thread Josh Nathanson

I bet it's the css reset.  There's some funky business with the line-height
on the body tag.  Did you try it without that css reset and see if it gets
better results?

-- Josh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of chief
Sent: Wednesday, February 25, 2009 8:12 AM
To: jQuery (English)
Subject: [jQuery] jQuery.height() or css issue?


So I have been trying to figure out this issue for a few days now.
Forgive me if it's something super simple that I am missing.

I have a super-simple XHTML 1.0 transitional page (that validates),
using Eric Meyer's CSS reset, and loading the latest jQuery from
Google's site. Then I have two simple divs inside a container div
(nothing floated) and above the container I have a div with a
paragraph in it that gets appended with the height of each of the two
divs upon document load. The thing is I am getting wildly different
numbers in different browsers.

Here is a screenshot of what I am talking about:
http://chief.fishbucket.com/jquery/heightissue.jpg

And you can check out the actual page/code here:
http://chief.fishbucket.com/jquery/

So is this a jQuery bug, or a CSS/browser issue?

Thanks for any help on this - it's been driving me insane.

-chief



[jQuery] Re: $('#foo p') or $('p', $('#foo'))

2009-02-25 Thread Josh Nathanson

>> First, I *assume* these two statements are identical in performance:
>> $("p", $("#foo")) == $("p", "#foo")

No -- the first one calls jQuery three times, the second one twice.  Big
difference.

Now, I'm not sure about if it's faster to use find() than the context
selector.  I would think under the hood it's doing the same thing, and the
context argument is just a handy shortcut.

-- Josh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Kevin Dalman
Sent: Wednesday, February 25, 2009 10:41 AM
To: jQuery (English)
Subject: [jQuery] Re: $('#foo p') or $('p', $('#foo'))


John wrote: "You should always use $("#foo").find("p") in favor of $
("p", $("#foo")) "

I'm trying to extrapolate some general concepts from this 'rule'...


If so, then does it matter what the scope selector is? What if the
scope is *not an ID*, and therefore not as fast to find, like::

$("div.myClass").find("p") in favor of $("p", "div.myClass") ???

If this is still true, then my understanding is that $("a").find("b")
syntax is ALWAYS faster than $("a, b")???

IF it is true that find() is always faster - or at least equal - to
specifying a scope selector/element, then it would seem that jQuery
should simply use the find() flow internally when a scope selector is
specfied. In other words, when a scope selector/element is specified,
find this element first and then 'call' the same method used for find
() - ie:

*** internally ***
$("p", $("#foo"))  ==>  $("#foo").find("p")

I can't think of any excepts to this - the result should always be
identical? If so, and performance is equal or superior, then *why not*
do this internally so the two statements above essentially become 100%
identical? It would just be two ways of expressing the same thing,
which is how it appears to users.

Am I off-base here? If so, which assumuption above breaks down?

Even if there is a good reason to treat the syntax differently
internally, I'm still interested to know if I should avoid using scope
selectors in favor of find() ***under all conditions*** - or only
under specific conditions?


/Kevin


On Feb 24, 5:58 pm, John Resig  wrote:
> I want to point out a couple things:
> 1) You should always use $("#foo").find("p") in favor of $("p", $
> ("#foo")) - the second one ends up executing $(...) 3 times total -
> only to arrive at the same result as doing $("#foo").find("p").
> 2) I generally dislike saying that there's one good way to do a
> selector (especially with one that has such bad syntax, as above) -
> especially since it may not always be that way.
>
> In fact, I've already filed a bug and I'll be looking in to this
> issue, possibly resolving it tonight or tomorrow - at which point the
> advice will be false again.http://dev.jquery.com/ticket/4236
>
> My recommendation is to always write the simplest, easiest to
> understand, expression: jQuery will try to do the rest to optimize it.
>
> --John
>
> On Feb 24, 10:23 am, Stephan Veigl  wrote:
>
>
>
> > Hi Karl,
>
> > $('#foo').find('p') and $('p', $('#foo')) are approximately of the same
speed.
>
> > I've put the test code on JSBin, so everybody can play around with it
> > and try other combinations :-)http://jsbin.com/ifemo
>
> > by(e)
> > Stephan
>
> > 2009/2/24 Karl Swedberg :
>
> > > Hi Stephan,
> > > Thanks for doing this testing! Would you mind profiling
$('#foo').find('p')
> > > as well? I suspect it will be roughly equivalent to $('p', $('#foo'))
> > > Cheers,
>
> > > --Karl
> > > 
> > > Karl Swedberg
> > >www.englishrules.com
> > >www.learningjquery.com
>
> > > On Feb 24, 2009, at 8:28 AM, Stephan Veigl wrote:
>
> > > Hi,
>
> > > I've done some profiling on this, and $("p", $("#foo")) is faster than
> > > $("#foo p") in both jQuery 1.2.6 and 1.3.2.
>
> > > the test HTML consists of 100 s in a "foo"  and 900 s in a
> > > "bar" .
>
> > > However the factor differs dramatically:
> > > In 1.2.6 the speedup from $("p", $("#foo")) to $("#foo p") was between
> > > 1.5x (FF) and 2x (IE),
> > > while for 1.3.2 the speedup is 20x (FF) and 15x (IE).
>
> > > $("p", $("#foo")) is faster in 1.3.2, by a factor of 1.5 (both FF and
IE),
> > > while $("#foo p") is _slower_ in 1.3.2 by 8.5x (FF) and 4.6x (IE).
>
> > > Even with an empty "bar" div $("p", $("#foo")) is faster by a factor
up to
> > > 3x.
>
> > > Conclusion:
> > > If you have an ID selector, first get the element by it's ID and use
> > > it as scope for further selects.
>
> > > by(e)
> > > Stephan
> > > 2009/2/23 ricardobeat :
>
> > > up to jQuery 1.2.6 that's how the selector engine worked (from the top
>
> > > down/left to right). The approach used in Sizzle (bottom up/right to
>
> > > left) has both benefits and downsides - it can be much faster on large
>
> > > DOMs and some situations, but slower on short queries. I'm sure
>
> > > someone can explain that in better detail.
>
> > > Anyway, in modern browsers most of the work is being delegated to the
>
> > > native que

[jQuery] Re: default value of an object's property

2009-02-18 Thread Josh Nathanson

I think this might work, give it a try:

Obj.sortby = Obj.sortby || 'time';

-- Josh

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf 
Of Alexandre Plennevaux
Sent: Wednesday, February 18, 2009 9:07 AM
To: Jquery-en
Subject: [jQuery] default value of an object's property


hi there,

a quick question: i'm using an object to pass a series of variables.
Sometimes, i test for a specific property, which might not exist.
I can't seem to find the right way, i tried

 Obj.sortby = (typeof Obj.sortby == 'undefined' || Obj.sortby==''
||Obj.sortby == null) ? 'time' : Obj.sortby;


but everytime that property "sortby" hasn't been set, firebug returns
it as "null"

can you clear that up for me?

Thanks a lot!

Alexandre



[jQuery] Re: jQuery w ajaxCFC

2009-02-13 Thread Josh Nathanson

Really you don't need AjaxCFC at all.  It does have a cfc to serialize and
deserialize json but I think you can pick that up at riaforge.  Or you can
build your own json string in CF and return that from your function.  Or you
can use returnFormat=JSON in your cffunction to do the serialization for
you.

-- Josh

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Neil Bailey
Sent: Friday, February 13, 2009 5:16 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: jQuery w ajaxCFC


Josh,

Just found the page at Rey Bango's blog - I really appreciate it.

Do you know if this works w/ the current version of jQuery, and the current
version of AjaxCFC?

Thanks again.

nb

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Josh Nathanson
Sent: Friday, February 13, 2009 8:02 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: jQuery w ajaxCFC


Do a search for "jquery coldfusion ajax" on Google, you'll find some good
stuff.

-- Josh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Neil Bailey
Sent: Friday, February 13, 2009 3:05 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] jQuery w ajaxCFC


We are currently running CF7 (management feels if it ain't broke), and
have been using ajaxCFC for about three years now.  We are looking to update
our AJAX methodology, and Chris Jordan had strongly suggested we check out
jQuery.

We are also pretty entrenched w/ EXT for the front end UI, and would need
any jQuery scripts to be able to co-exist w/ the EXT package.

As we have never even laid eyes on jQuery, but have heard some very good
things about it (Ray Camden has been yelling its virtues from the rooftops
for a solid week now), if anyone has any tips or knows of any how-to blogs,
I would greatly appreciate it.

Thanks,

nb







[jQuery] Re: Would some please tell me what's wrong with this syntax?

2009-02-13 Thread Josh Nathanson

You don't need that open parenthesis after 'click':

$('.cancel').livequery('click', function() {
...etc.

-- Josh


-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Rick Faircloth
Sent: Friday, February 13, 2009 4:38 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Would some please tell me what's wrong with this syntax?


I'm getting this error:

"missing ) after argument list"
 "return false;\n"

from this code:


$(document).ready(function() {

 $('.cancel').livequery('click', (function() {

  $(this).parent().parent().find('.select-div').hide();
  $(this).parent().hide();
  $(this).parent().parent().find('.last-name').fadeIn(500);
  $(this).parent().parent().find('.first-name').fadeIn(500);
  $(this).parent().parent().find('.change-div').fadeIn(500);

 })
 return false;
 );
});

I've tried every variation I can think of and can't get rid of the error...

Thanks,

Rick



[jQuery] Re: jQuery w ajaxCFC

2009-02-13 Thread Josh Nathanson

Do a search for "jquery coldfusion ajax" on Google, you'll find some good
stuff.

-- Josh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Neil Bailey
Sent: Friday, February 13, 2009 3:05 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] jQuery w ajaxCFC


We are currently running CF7 (management feels if it ain't broke), and
have been using ajaxCFC for about three years now.  We are looking to update
our AJAX methodology, and Chris Jordan had strongly suggested we check out
jQuery.

We are also pretty entrenched w/ EXT for the front end UI, and would need
any jQuery scripts to be able to co-exist w/ the EXT package.

As we have never even laid eyes on jQuery, but have heard some very good
things about it (Ray Camden has been yelling its virtues from the rooftops
for a solid week now), if anyone has any tips or knows of any how-to blogs,
I would greatly appreciate it.

Thanks,

nb




[jQuery] Re: Accessing a JSON property from an unknown variable?

2009-02-13 Thread Josh Nathanson

foo[fooProp] // returns "barVal"

Is that what you mean?

-- Josh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Nic
Sent: Friday, February 13, 2009 4:06 PM
To: jQuery (English)
Subject: [jQuery] Accessing a JSON property from an unknown variable?


For instance,

var foo = {
"bar": "barVal",
"baz": "bazVal"
}

var fooProp = "bar";

How can I access barVal through fooProp?

I know this isn't exactly jQuery group discussion but I figured since
it was part of a jQuery system I could get away with it. Thanks!



[jQuery] Re: How to make an element *not* have a function attached...

2009-02-13 Thread Josh Nathanson

This should work:

$('#myTextarea').unbind(); // unbinds all handlers

Then when you want to bind it again:

$('#myTextarea').expandable();

-- Josh


-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Rick Faircloth
Sent: Friday, February 13, 2009 11:43 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: How to make an element *not* have a function
attached...


To answer your question, hopefully, the element, in this case a textarea,
is set up like this:



 $(function() {
  $('#myTextarea').expandable();
});



...and that's it.  It would be active as "expandable" all the time.

So, there's no "event", like click, etc., that triggers the function.

However, I want to be able to click a link and disable the "expandable"
functionality, until another link is clicked to re-enable the functionality.

In other words, having the textarea "expandable" is not something I want
on all the time.


> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Frederik Ring
> Sent: Friday, February 13, 2009 2:04 PM
> To: jQuery (English)
> Subject: [jQuery] Re: How to make an element *not* have a function
attached...
> 
> 
> This should be done using $(this).unbind(event,function).
> I don't know from your example how your handle the event so I cannot
> give you a more specific answer.
> 
> On Feb 13, 7:57 pm, "Rick Faircloth"  wrote:
> > Strange question, perhaps...but...
> >
> > If I have an element that has an function from a plug-in
> > attached to it, such as:
> >
> > $(function() {
> >         $('#myTextarea').expandable();
> >
> > });
> >
> > How would I then be able to make #myTextarea "not .expandable"...
> >
> > $('#myTextarea').expandable('disable'); ...
> >
> > Is this something that can be controlled from the page code, or
> > does something have to be built into the plug-in to allow this?
> >
> > Thanks,
> >
> > Rick



[jQuery] Re: jqURL plugin throwing JS errors

2009-02-06 Thread Josh Nathanson
Hey Andy - looks like this might be a Firebug bug - read down to the bottom
of this link:

http://code.google.com/p/fbug/issues/detail?id=581

-- Josh



_
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Andy Matthews
Sent: Friday, February 06, 2009 11:01 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: jqURL plugin throwing JS errors


Unfortunately it's in an administration area. I could provide some code for
you though if that would help.


andy

_ 
From:   jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com]  On
Behalf Of Josh Nathanson
Sent:   Friday, February 06, 2009 12:10 PM
To: jquery-en@googlegroups.com
Subject:[jQuery] Re: jqURL plugin throwing JS errors

Andy - that's my plugin - do you have a link I could look at?

-- Josh



_
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Andy Matthews
Sent: Friday, February 06, 2009 9:50 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] jqURL plugin throwing JS errors


Is there anyone using the jqURL plugin who has noticed errors on page load?
All of a sudden I've noticed the following error:

Permission denied to get property XULElement.accessibleType, line 139
'width=' + args.w + ',height=' + arg...eft=' + args.l +
',scrollbars,resizable'

The implementation:
// open the media library in a new window
$.jqURL.loc(

dspPhotoAdministration.cfm?category=4&process=admin&couponSelect=true",{
w:750,
h:750,
target:'imageSelect'
});

It's tied to the click event on an IMG tag, and event still works...I'm just
getting tired of seeing the error.


Andy Matthews
Senior Web Developer
 << OLE Object: Picture (Metafile) >> 
www.dealerskins.com

P Please consider the environment before printing this e-mail.

Total customer satisfaction is my number 1 priority! If you are not
completely satisfied with
the service I have provided, please let me know right away so I can correct
the problem,
or notify my manager Aaron West at aw...@dealerskins.com.

<>

[jQuery] Re: jqURL plugin throwing JS errors

2009-02-06 Thread Josh Nathanson
Andy - that's my plugin - do you have a link I could look at?

-- Josh



_
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Andy Matthews
Sent: Friday, February 06, 2009 9:50 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] jqURL plugin throwing JS errors


Is there anyone using the jqURL plugin who has noticed errors on page load?
All of a sudden I've noticed the following error:

Permission denied to get property XULElement.accessibleType, line 139
'width=' + args.w + ',height=' + arg...eft=' + args.l +
',scrollbars,resizable'

The implementation:
// open the media library in a new window
$.jqURL.loc(

dspPhotoAdministration.cfm?category=4&process=admin&couponSelect=true",{
w:750,
h:750,
target:'imageSelect'
});

It's tied to the click event on an IMG tag, and event still works...I'm just
getting tired of seeing the error.


Andy Matthews
Senior Web Developer
 << OLE Object: Picture (Metafile) >> 
www.dealerskins.com

P Please consider the environment before printing this e-mail.

Total customer satisfaction is my number 1 priority! If you are not
completely satisfied with
the service I have provided, please let me know right away so I can correct
the problem,
or notify my manager Aaron West at aw...@dealerskins.com.

<>

[jQuery] Re: OT: CF-Talk Down?

2009-01-28 Thread Josh Nathanson

Yup down for me too.

-- Josh

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Rick Faircloth
Sent: Wednesday, January 28, 2009 12:46 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] OT: CF-Talk Down?


Hi, guys...

Pardon the OT, but I'm trying to find out
if the CF-Talk list, which several of the jQuery list
users are on, is down.

I haven't gotten anything since yesterday afternoon
and I noticed that the last message on houseoffusion.com
was from 5pm yesterday.

News?

Rick



[jQuery] Re: Problem with Magnify jQuery plugin in IE7

2009-01-22 Thread Josh Nathanson

Oh, I see another problem.  You have "stagePlacement" values in your
stageCss option.  StageCss can only have valid CSS attributes, so this will
probably break IE.

StagePlacement is a separate option, so your options should look like this:

$("#d02").magnify({
lensWidth: 27,
lensHeight: 27,
showEvent: 'click',
hideEvent: 'mouseout',
stageCss: { border: '3px solid #CC', padding: '15px'}, 
stagePlacement: 'left'
});
Also - I wouldn't recommend using padding on the stageCss, this could lead
to some funky results.

-- Josh


-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of PIT
Sent: Thursday, January 22, 2009 10:38 AM
To: jQuery (English)
Subject: [jQuery] Problem with Magnify jQuery plugin in IE7


Hello,
I have problem to show the big version of the image in IE7, in other
browsers working good.
My website where i use Your plugin is:
http://www.dobrestudium.pl/kurs_paznokci.html.php
In attachement i sending screen of place at site wher i use Magnify.
I apply Magnify at one page to 14 images.

I done all good with documentacion and i don't know why not working,
your website example working in IE7, but my not :(

Please give me some information why it's not working.

Regards,
Peter



[jQuery] Re: Problem with Magnify jQuery plugin in IE7

2009-01-22 Thread Josh Nathanson

Hi Peter,

Josh here, the author of the plugin.  Not sure why it's not working for you,
but one thing I would recommend:

- use a class attribute on all your links that you want to bind to the
plugin - that way you can just call the plugin once and all your links will
be bound:

 etc.

Then one binding:
$("a.magnify_link").magnify( your options here );

- also try it with the default options first, then add in your custom
options one by one.

- also you are using png's, not sure if that's the problem but you might
want to test with jpg's or gif's instead.

Hope that helps!

-- Josh





-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of PIT
Sent: Thursday, January 22, 2009 10:38 AM
To: jQuery (English)
Subject: [jQuery] Problem with Magnify jQuery plugin in IE7


Hello,
I have problem to show the big version of the image in IE7, in other
browsers working good.
My website where i use Your plugin is:
http://www.dobrestudium.pl/kurs_paznokci.html.php
In attachement i sending screen of place at site wher i use Magnify.
I apply Magnify at one page to 14 images.

I done all good with documentacion and i don't know why not working,
your website example working in IE7, but my not :(

Please give me some information why it's not working.

Regards,
Peter



[jQuery] Re: How to make this work for multiple elements with same class

2009-01-13 Thread Josh Nathanson

A sneaky way to do it would be to remove the href attribute altogether, and
create a css class that makes the link appear to be hyperlinked:

a.fake-link {
text-decoration: underline;
cursor: pointer;
color: [your link color here]
}

Then add that class to your "non-href" links as desired.

-- Josh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Rick Faircloth
Sent: Tuesday, January 13, 2009 1:07 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: How to make this work for multiple elements with same
class


Thanks, Josh...

You were almost perfect.  I just needed to add one more .next to the second
line:

$(this).parent().next().next().fadeIn(500);

then it worked.

Another question however, is how to keep the page from going back to the top
every time the Update link is clicked.  I've got two ## as the href because
of
ColdFusion need to have two.  Is that the problem, or is there another
solution?

Update

That's the current code.  Suggestions?

Thanks,

Rick


> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Josh Nathanson
> Sent: Tuesday, January 13, 2009 3:36 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: How to make this work for multiple elements with
same class
> 
> 
> Rick - I think you want $(this).parent().hide() rather than prev, and
> $(this).parent().next() rather than next().  Prev and next look at the
> sibling level.
> 
> -- Josh
> 
> 
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of Rick Faircloth
> Sent: Tuesday, January 13, 2009 12:17 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: How to make this work for multiple elements with
same
> class
> 
> 
> Ok...made that change, but no difference in the execution.
> 
> Here's the relevant js and html/cf:
> 
> $(document).ready(function() {
> 
>  $('.update-link').click(function() {
> 
>   $(this).prev('.options').hide();
>   $(this).next('.update-div').fadeIn(500);
> 
>  });
> });
> 
> 
> 
>  [ Preview ]  
>  [ Update ]  
>  [ Delete ]
> 
> 
> 
> 
> 
> 
>  Edit Link:
>   value="#tour_url#">
>  
> 
> 
> 
> 
> 
> 
> 
> 
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of MorningZ
> > Sent: Tuesday, January 13, 2009 3:05 PM
> > To: jQuery (English)
> > Subject: [jQuery] Re: How to make this work for multiple elements with
> same class
> >
> >
> > to start: you have
> >
> > $('this')
> >
> > it should be without the ticks
> >
> > $(this)
> >
> > On Jan 13, 2:50 pm, "Rick Faircloth"  wrote:
> > > Here's the code that I'm trying to make function
> > > for multiple links on a page with the class of "update-link"
> > >
> > > How would I change this to make it work for the specific
> > > .update-link element that I click?
> > >
> > >                 $(document).ready(function() {
> > >
> > >                         $('.update-link').click(function() {
> > >
> > >                                 $('this').prev('.options').hide();
> > >
> $('this').next('.update-div').fadeIn(500);
> > >
> > >                         });
> > >                 });
> > >
> > > Thanks,
> > >
> > > Rick




[jQuery] Re: How to make this work for multiple elements with same class

2009-01-13 Thread Josh Nathanson

Rick - I think you want $(this).parent().hide() rather than prev, and
$(this).parent().next() rather than next().  Prev and next look at the
sibling level.

-- Josh


-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Rick Faircloth
Sent: Tuesday, January 13, 2009 12:17 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: How to make this work for multiple elements with same
class


Ok...made that change, but no difference in the execution.

Here's the relevant js and html/cf:

$(document).ready(function() {

 $('.update-link').click(function() {

  $(this).prev('.options').hide();
  $(this).next('.update-div').fadeIn(500);

 });
});



 [ Preview ]  
 [ Update ]  
 [ Delete ]






 Edit Link:
 
 








> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of MorningZ
> Sent: Tuesday, January 13, 2009 3:05 PM
> To: jQuery (English)
> Subject: [jQuery] Re: How to make this work for multiple elements with
same class
> 
> 
> to start: you have
> 
> $('this')
> 
> it should be without the ticks
> 
> $(this)
> 
> On Jan 13, 2:50 pm, "Rick Faircloth"  wrote:
> > Here's the code that I'm trying to make function
> > for multiple links on a page with the class of "update-link"
> >
> > How would I change this to make it work for the specific
> > .update-link element that I click?
> >
> >                 $(document).ready(function() {
> >
> >                         $('.update-link').click(function() {
> >
> >                                 $('this').prev('.options').hide();
> >                                
$('this').next('.update-div').fadeIn(500);
> >
> >                         });
> >                 });
> >
> > Thanks,
> >
> > Rick



[jQuery] Re: How to dynamically load/add inline javascript?

2009-01-09 Thread Josh Nathanson

I think that would work - I just tried this in Firebug on a page with
jQuery:

$('head').append("alert('hello');");

Sure enough, it popped up an alert dialog.

-- Josh

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of yellow1912
Sent: Friday, January 09, 2009 2:16 PM
To: jQuery (English)
Subject: [jQuery] Re: How to dynamically load/add inline javascript?


I see. Thanks Josh. What if I dynamically insert the code into the
head area, would that has the same effect?

Regards

Raine

On Jan 9, 4:05 pm, "Josh Nathanson"  wrote:
> I think you have to strip the  tags off before you run eval().  I
> just tried a little test using firebug:
>
> Eval("<script>alert('hello');");  FAIL
>
> Eval("alert('hello')"); SUCCEED
>
> -- Josh
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>
> Behalf Of yellow1912
> Sent: Friday, January 09, 2009 1:54 PM
> To: jQuery (English)
> Subject: [jQuery] Re: How to dynamically load/add inline javascript?
>
> I actually did, I put a very simple line
> alert("testing");
>
> No error, no effect, weird.
>
> Regards
>
> Raine
>
> On Jan 9, 3:35 pm, MorningZ  wrote:
> > "I wonder if eval will work correctly in this case? "
>
> > Did you simply just try it?
>
> > On Jan 9, 4:01 pm, yellow1912  wrote:
>
> > > Thanks Mike,
>
> > > These inline script always come with
>
> > > <!--
> > > // code here
> > > //-->
>
> > > When I use firebug to check the json data returned, it looks like
> > > this:
> > > (I just post part of the code here)
> > > 
> > > "jscript_inline":"

[jQuery] Re: How to dynamically load/add inline javascript?

2009-01-09 Thread Josh Nathanson

I think you have to strip the  tags off before you run eval().  I
just tried a little test using firebug:

Eval("