[jQuery] css background-color not exists in IE with more then 2 classes..

2009-05-21 Thread Mech7

Does anybody know why in IE:

jQuery.css(e, background-color);jQuery.css(e, background-color);

Not works on a elementl like:

div class=directions rounded-big
/div

But will work with..

div id=directions class=rounded-big
/div


[jQuery] Re: loading message

2009-05-21 Thread Karthikraj

Hi,

You can use ajaxStart() and ajaxStop() to do this.

$(document).ajaxStart(function() {
//call your method to display loading message /(ex:)  $
('#loadingmessage').show();
});

$(document).ajaxStop (function() {
//call your method to hide loading message/(ex:)  $
('#loadingmessage').hide();
});

Karthik


[jQuery] Re: How to convert csv file to json

2009-05-21 Thread Nitin Sawant

Hello Mike,
Thanks for your reply.

The code works fine on localhost but when i upload it to
server, nothing happens, I think there is prob of Cross-domain
restrictions.

Do you know how to do this in php?
I mean convert csv file to javascript array/json?

regards,
Nitin Sawant

On May 21, 5:24 am, Michael Geary m...@mg.to wrote:
 Hi Nitin,

 Are you trying to do this conversion in JavaScript, or on your server?

 Parsing a CSV file as simple as this one is trivial, in JavaScript or in any
 reasonable server language. (BTW, you wouldn't convert it to JSON, but to a
 two-dimensional array.) Ah... I just checked your bytes.com post - the
 csvArray() funcition you have there is along the right lines.

 But if you're trying to do this in JavaScript in the browser, there is a
 much bigger problem: How are you going to retrieve the data at all?
 Cross-domain restrictions will prevent you from fetching it. Do you actually
 get any thing back from your $.get()?

 If you have to do this in JavaScript, does Google Finance offer a JSONP
 output format option? That will work cross-domain.

 Also, your ConvertToArray function in your bytes.com post can't possibly
 work. This function is called in the $.get() callback, long after the page
 has finished loading. But it calls document.write(), which you can only call
 *while* the page is loading.

 -Mike



  From: Nitin Sawant

  Hello,
        Thanks for your reply.

        Actually i'm retrieving data from google finance site
  in csv format.
 http://finance.google.com/finance/historical?q=GOOGstartdate=
  May+1%2C+2009enddate=May+5%2C+2009start=225num=25output=csv
        I want to convert that data to json or any suitable
  format on webpage so that i can show stock quote chart on the
  page using that data.

  regards,
  Nitin Sawant

  On May 20, 7:45 pm, brian bally.z...@gmail.com wrote:
   There's quite a difference between the two. JSON uses a key: value
   format, while CSV is generally value only

   On Wed, May 20, 2009 at 6:28 AM, Nitin Sawant
  nitin.jays...@gmail.com wrote:

How to convert csv file to json using jquery / javascript??


[jQuery] Re: How to convert csv file to json

2009-05-21 Thread Nitin Sawant

Thanks a lot to all for helping me,

now i got why i was stuck. (Cross-domain restrictions)

regards,
Nitin Sawant

On May 21, 5:24 am, Michael Geary m...@mg.to wrote:
 Hi Nitin,

 Are you trying to do this conversion in JavaScript, or on your server?

 Parsing a CSV file as simple as this one is trivial, in JavaScript or in any
 reasonable server language. (BTW, you wouldn't convert it to JSON, but to a
 two-dimensional array.) Ah... I just checked your bytes.com post - the
 csvArray() funcition you have there is along the right lines.

 But if you're trying to do this in JavaScript in the browser, there is a
 much bigger problem: How are you going to retrieve the data at all?
 Cross-domain restrictions will prevent you from fetching it. Do you actually
 get any thing back from your $.get()?

 If you have to do this in JavaScript, does Google Finance offer a JSONP
 output format option? That will work cross-domain.

 Also, your ConvertToArray function in your bytes.com post can't possibly
 work. This function is called in the $.get() callback, long after the page
 has finished loading. But it calls document.write(), which you can only call
 *while* the page is loading.

 -Mike



  From: Nitin Sawant

  Hello,
        Thanks for your reply.

        Actually i'm retrieving data from google finance site
  in csv format.
 http://finance.google.com/finance/historical?q=GOOGstartdate=
  May+1%2C+2009enddate=May+5%2C+2009start=225num=25output=csv
        I want to convert that data to json or any suitable
  format on webpage so that i can show stock quote chart on the
  page using that data.

  regards,
  Nitin Sawant

  On May 20, 7:45 pm, brian bally.z...@gmail.com wrote:
   There's quite a difference between the two. JSON uses a key: value
   format, while CSV is generally value only

   On Wed, May 20, 2009 at 6:28 AM, Nitin Sawant
  nitin.jays...@gmail.com wrote:

How to convert csv file to json using jquery / javascript??


[jQuery] flowplayer.org / scrollable plugin does not work

2009-05-21 Thread MiguelGnomoNet

I can not load that web page...

Anybody knows if it´s a general issue ? or is my fault?

i need the scrollable plugin.. any optional plugin?

thanks.




[jQuery] Re: How to check if jquery is working?

2009-05-21 Thread heldtogether

Ok, thanks for the help people. I had to move the jquery.js into a
subdirectory and link from there, and it now seems to be working.

On May 16, 2:43 pm, Jim D nofxbassist1...@gmail.com wrote:
 You can also check to see if $ is a function.  If the jQuery script
 loaded properly, that should return true

 On May 15, 2:16 pm, James james.gp@gmail.com wrote:

  Try using tools like the Web Development toolbar add-on for Firefox to
  debug. Under Information  View Javascript, you can view all of the
  Javascript that is loaded on the page, such as maybe other Javascript
  libraries that are overriding the $ variable.
  This will help you see what Javascript is on your page, and whether
  they are linked correctly or not.

  Additionally, also use the Firebug add-on to check whether your
  Javascript is spitting out any errors.

  Try also simplifying your code to something like:

  jQuery(document).ready(function(){
       alert('test');

  });

  On May 15, 6:00 am, Charlie charlie...@gmail.com wrote:

   is jquery.js included on page and is it loading (ie is path valid to 
   jquery.js)?
   heldtogether wrote:Hi, I want to try incorporate jquery in my site, but 
   I'm having some problems. The site is drawn together from various files 
   in PHP. I have added the jquery script which I would expect to work fine 
   regardless of the PHPness earlier because it is a client side script. 
   Unfortunately nothing happens. If I save the page directly to my desktop 
   then the script works fine, so I think there must be some problems with 
   the dynamic pages. Does anyone have any idea why this might be occuring? 
   The following is what gets put onto the page in the header if I view 
   source. script type=text/javascript src=jquery.js/script script 
   type=text/javascript $(document).ready(function(){ $(pHello 
   world!/p).appendTo(body); $(#onlineresources).hide(); 
   $(#onlineresourcesbutton).click(function(){ 
   $(#onlineresources).slideDown(slow); return false; }); }); /script 
   Thanks, Josh


[jQuery] Re: adding $(script) node actually runs the script - correct behavior?

2009-05-21 Thread Ricardo

Not unexpected at all, as you're appending an element. The usual
script element behaviour is to run the script inside it. And it has
no display either.

You should probably use text() as Dave suggested, it will not
interpret the angled brackets - same result as if you used HTML
entities.

cheers,
ricardo

On May 20, 2:38 pm, Paul Tarjan ptar...@gmail.com wrote:
 I don't want to execute it. I want to print it out to the html page so the
 user knows how to embed this stuff on their page.

 If you actually run the code in the OP, it DOES execute, which was very
 unexpected.

 On 5/20/09 2:58 AM, Ricardo ricardob...@gmail.com wrote:



  I don't see the point. That script tag you added is not going to be
  evaluated anytime, it will just sit there doing nothing. You'll have
  to move it to the head to execute it.

  On May 20, 2:17 am, Paul Tarjan ptar...@gmail.com wrote:
  I actually wanted to append the text to the document. Here is how I'm
  working around it, but I thought building up the tags using jquery
  functions was the preferred method.

              var embed =
              $(span/).append(
                  $(span/)
                  .text(data)
                  .attr(id, wnval)
              ).html();
              embed = embed
              + 'scriptvar ' + wnval + ' = function(data)
  { document.getElementById(' + wnval + ').innerHTML = data; }/' +
  'script'
              + 'script src=http://webnumbr.com/'+val + '.json
  (callback=' + wnval + ')/' + 'script'

  it works fine this way, but in my original method (see OP) I had
  expected jquery to just add the script to the span instead of
  adding it to the document and evaluating it.

  On May 18, 10:57 pm, Ricardo ricardob...@gmail.com wrote:

  Script elements are not really appended. To ensure execution you have
  to append them to the head of the document or eval them. jQuery does
  the latter, so the element ends up not being in the DOM at all. What
  are you trying to achieve? There's no point in creating a script tag
  when you can just declare a function instead.

  On May 18, 8:40 pm, PaulTarjanptar...@gmail.com wrote:

  If I have a node that isn't in the DOM, and then I add a script to it,
  then it is actually executed. Example

  Expected behavior : s variable contains the string scriptalert('hi')
  /script.

  Observed behavior : alert box pop up and s contains 

  script
  var s = $(span/).append($(script/).text(alert('hi'))).html()
  script

  You can see it running here 
  :http://paulisageek.com/tmp/jquery-script.html

  Am I doing something wrong? Can I not write javascript from within
  jquery?


[jQuery] Re: question about getJSON, objects and/or scope - confused

2009-05-21 Thread illovich

I just googled around, hacked at my function, etc.

For some reason I ended up trying this solution (i.e. setting
thisStory inside the getJSON callback instead of using the thisStory =
getJSON() way., and it works ALMOST:

script type=text/javascript  //![CDATA[

var thisStory = {};

$.getJSON(javascript/test.js, function(jsonFile){ thisStory =
jsonFile; });

//]]/script

So the page works entirely, except for the document.write… which
actually shouldn't work, because that's executing prior to $.getJSON
defining thisStory.  So, no biggie - I take a look at some normal
jquery stuff and switch to using:

p class=attribution

script type=text/javascript 
language=JavaScript

$('.attribution').append('i' + 
thisStory.title + '/i' + ' by
' + thisStory.author + 'brbr');

/script

/p

But this is still being written to the document as undefined by
undefined. When I check thisStory using Firebug, all of the values
are there, so this must still be executing prior to the value
assignment.

So I changed my script to:

script type=text/javascript  //![CDATA[

var thisStory = {};

$.getJSON(javascript/test.js, function(jsonFile) {


thisStory = jsonFile;


$('.attribution').append('i' + thisStory.title + '/i' +
' by ' + thisStory.author + 'brbr');


});

//]]/script

and now it works fine.  So then I think I just need to do all of the
value assignment in the $.getJSON block.

But other scripts (like $('.frame').click for example) are getting the
values of thisStory fine.  Can anyone explain (or point to an
explanation of why a $('.attribution').append in the body doesn't work
but a $('.frame').click does?

As always, thanks!


[jQuery] Validate textbox on selected value in a combobox

2009-05-21 Thread ciupaz

Hello,
how can I validate several textbox basing on selected combobox?
For example, having this combo:

select id=mySelect name=mySelect
  option value=-1Please select/option
  option value=1CA/option
   option value=2PR/option
   option value=3PROV/option
/select

I'd like to make required the first textbox if the user select the
first value, and so on.


input id=myFirstInput name=myFirstInput type=text /
input id=mySecondInput name=mySecondInput type=text /
input id=myThirdInput name=myThirdInput type=text /

I have to change my validate plugin:

myFirstInput: {
required: true // to complete
   }


but I've not found the correct way.

Has anyone ideas?

Thanks a lot.

Luigi


[jQuery] Re: How to print json data, key and value

2009-05-21 Thread Massimiliano Marini

Hi Shawn,

 Native JS is capable of this sort of thing.
[snip]
 HTH  And I hope this is what you were after.

Thanks so much for your explanation. Now it works. :)

-- 
Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/
It's easier to invent the future than to predict it.  -- Alan Kay


[jQuery] Re: Validate textbox on option selected value

2009-05-21 Thread ciupaz

It's working in that way Jorn.
Thanks a lot.

Luigi


[jQuery] Cannot modify properties of a WrappedNative

2009-05-21 Thread wardenik

uncaught exception: [Exception... Cannot modify properties of a
WrappedNative  nsresult: 0x80570034
(NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)  location: JS frame ::
chrome://global/content/bindings/autocomplete.xml ::
onxblpopuphiding :: line 834  data: no]

Line 0


I get this sometimes from I don't know where...
anybody had this problem before?


[jQuery] Re: Onwidow resize element width

2009-05-21 Thread dPO

ive been able to get the if variable to work as well only thing is it
doesn't respond to if the value is exactly the same and i want it to
use only the first number from the calculation only.

 Script so far.

(function($){

$.fn.testwidth = function(){

var element = this;

$(element).load(function(){

changeCss();

$(window).bind(resize, function(){
changeCss();
});

function changeCss(){

var box = $(.box);
var windowWidth = box.innerWidth();
var calculation = (windowWidth - 300) / 152;

/*i want to use first digit of calculation only*/
  if (calculation=='2'){
   var answer=200;
}
  else if(calculation=='3'){
   var answer=300;
}
  else if (calculation=='4'){
   var answer=400;
}
  else if (calculation=='5'){
   var answer=500;
}
   else {
   var answer=1000;
}

$(element).css({
width : answer
});

};
});

};

})(jQuery);

If someone can show me how to make it use only the first digit from
calculation in the if that would be great.

Thanks,
dP


[jQuery] Re: Validate textbox on option selected value

2009-05-21 Thread ciupaz

A little adding: if I'd like to make required if the selected index is
*both* 1 and 2 (for example), how can I make it?

Luigi


[jQuery] Re: Setting hidden field value in html

2009-05-21 Thread eclipseTalk

Yes, thx

On May 21, 1:51 am, Michael Geary m...@mg.to wrote:
 Hmm... I just tried a quick and dirty test and it seemed to work the way
 you'd want.

 I opened this page:

 http://docs.jquery.com/Main_Page

 And opened the Firebug console and entered these expressions in the console:

 $('#jq-primarySearch').val( 'h1test/h1' );

 That put the expected text in the search form at the top of the page.

 $('#jq-primarySearch').val();

 The latter one displayed the text as expected.

 Then I clicked the magnifying glass icon to submit the form, and on the
 search results page it said:

 You searched for h1foo/h1

 That seems to be what you were looking for it to do, yes?

 -Mike

  From: eclipseTalk

  Thanks for your reply.
  This is what I'm trying to achieve:
  - I have a form where a user can select items to order
  - While still in the form, I use JQuery to provide a preview
  of the order. The text  is displayed in a popup dialog. It is
  formatted in html.
  - I want to save this html preview into a hidden field that I
  retrieved later on once the form has been submitted.

  Maybe I need to pass my html text otherwise... Any advise is welcome.

  Thanks for your time and help

  On May 20, 11:49 pm, Michael Geary m...@mg.to wrote:
   .val(foo) sets the value attribute of the selected DOM element(s).
   Being an attribute, it can't contain HTML. It would be as
  if you had
   this code in your page:

   input type=hidden name=previewText value=h2Order
  Preview/h2
   /

   That wouldn't be valid HTML.

   I'm not sure what to suggest instead, because I'm not sure
  what your
   goal is. Could you back up a level and explain what you want to
   accomplish with the hidden field?

   -Mike

From: eclipseTalk

Hello,
I have an hidden field in a form defined as follow:
 input type=hidden name=previewText value=   /

To assign its value I used:

var contentText = h2Order Preview/h2;
$(input[name='previewText']).val(contentText);

It works fine but the html code is lost. Is there a way to retain
the html format?

Thank you


[jQuery] Setting element type?

2009-05-21 Thread ash.finlay...@googlemail.com

Hi can anyone tell me how to set the 'type' of an html form element
using jquery?

is there something like?
$(element).type(password);

Many Thanks
Ash


[jQuery] Re: css background-color not exists in IE with more then 2 classes..

2009-05-21 Thread victor kobs
hi possibility that not work with
 class
div class=directions rounded-big
/div

but work on id

div id=directions class=rounded-big
/div


...replace class with id


[jQuery] Re: Submit form when hitting enter

2009-05-21 Thread jlcox

This might work:

$(document).ready(function() {
$(document).keyup(function(event) {
if (event.keyCode == 13) {
$(#myForm).submit();
}
})
});


[jQuery] Expand/Collapse the Jqgrid

2009-05-21 Thread musammil

hello Everybody
I am using the Jqgrid in my project.My question is , If there is no
record in a grid it should to collpased otherwise it will be expand.
how is it possible . please advise me.

Thanks

Mohamed


[jQuery] [validate] IE7 error labels showing up underneath next form element

2009-05-21 Thread tonyc

I'm using the latest version of jquery.validate.pack.js along with
jquery1.3.2. My form is in a very narrow column, so I have the labels
above the form elements, and want the errors to display beneath the
element. I've managed to accomplish this for FF3 and Safari - both
will push the rest of the form down in order to display the error
message. IE7, however, just pops the error underneath the next form
element on the page instead of pushing the form down.

Here's a test page: https://www.d.viedu.org/explore/index4.php

Any ideas?


[jQuery] advanced toggle

2009-05-21 Thread weezer007

I'm not sure if toggle is the best way to approach this, but it is
what I am working with at the moment.

I am trying to create a dropdown tree that slide toggles open and
closed a div on click. An arrow image appears next to the click able
anchor that changes to point down when it is clicked. I created this
with the following code:

jQuery:

$(document).ready(function() {
//hides spans on load
$('div.subMenu').hide();
//toggles the menu open and closed
$('a.slideToggle').click(function() {
$(this).parent().next().slideToggle(400);
return false;
});
$(a.trigger).toggle(function() {
$(this).parent().addClass(active);
}, function() {
$(this).parent().removeClass(active);
});
});

Some of the css:

div.level1
{
background:transparent url(../imgs/jQuery_arrow_1_na.gif) no-
repeat scroll center left;
width:100%;
text-transform:lowercase;
font-size:14px;
font-weight:bold;
padding:8px 0 8px 15px;
}
div.level1.active
{
background:transparent url(../imgs/jQuery_arrow_1_a.gif) no-repeat
scroll center left;
}
div.level2
{
background:transparent url(../imgs/jQuery_arrow_2_na.gif) no-
repeat scroll center left;
}
div.level2.active
{
background:transparent url(../imgs/jQuery_arrow_2_a.gif) no-repeat
scroll center left;
}

HTML

div id=sustainMenu
div class='level1'
  a class='slideToggle level1 trigger'
href='#'Environmental/a
 /div
div class='subMenu'
div class='level2 subClass1Heading'
a class='slideToggle level2 subClass1Heading trigger'
href='#'Page One/a
/div
div class='subMenu'
div class='level4 subClass1Content'
a class='slideToggle level4 subClass1Content' 
href='#' Section
one/a
/div
div class='subMenu'
div id='content_993'
div style='margin-bottom:11px;'
Some Content
/div
/div
/div
/div
/div
/div


My problem now is that I want a expand all and collapse all button. I
have created these, but they don't toggle the images. If I change the
images on click of the expand or hide all buttons, when toggle is
called again the images appear backwards from how they should. I have
tried a couple of other solutions, but they all become buggy when I
want both the images to change and expand/hide all buttons.

Any help would be amazing,

Chris


[jQuery] select all a elements whose class attribute does not contain 'myclass'

2009-05-21 Thread jonathan

$('a[class*=myclass]') selects all a elements whose class attribute
contains 'myclass', how do I do the opposite?


[jQuery] Re: Set text property of server control

2009-05-21 Thread trulsu

$() returns an array with the resulting objects, since you only have
one you have to pick the first one:
var button = $(#%=b1.ClientID %)[0];

You can then change the text using the value property:
button.value = Yes;

The complete script will then be:
script type=text/javascript
$(document).ready(function() {
var button = $('#' + '%= btnSelectAll.ClientID %')[0];
button.value = Testing;
});
/script

T.


[jQuery] Re: Accessible News slider

2009-05-21 Thread tej

Hi,
I have used the accessible new slider (by Reindel) in my project.
But i have observed an anomalously which im unable to understand.

When the page is loaded, and when i click next  , the slides are
flying , i.e im not seeing the next set of products.
But, when u click a product and go back to home page (by clicking
backspace key) , the slider works perfectly
Please i need some help to understand this behaviour.

page: home2.htm
http://home.paws.lsu.edu/rkaval1:paws.lsu.edu/minis2/home2.htm

Note:
  I have used this slider in Home2.htm and i still have home.htm
(directed, when u click the menu bar)

thank
ravi




[jQuery] Pasing flash media, with multiple instances on one page.

2009-05-21 Thread Alex

Hello, so here's my issue. I'm just the jquery.media plugin. With
multiple players being used for each mp3 link.

Is there a way I can setup a jquery call that knows to pause (or stop)
all other players once a user click on a new player?


[jQuery] how to get string like http_build_query of php

2009-05-21 Thread dvaknheo

I Guess it is easy  because  $.post  join the array as querying string
but I read the jquery souce  and not undestand


[jQuery] jquery pause all flash player elements, allow only one to play.

2009-05-21 Thread Alex

I'm using the jquery.media plugin. On the page i have it has 20 or so
flash elements to play each different mp3 files. Is there any way to
setup a jquery call so when you click play on the flash element it
pauses any other flash player running?


[jQuery] Re: loading message

2009-05-21 Thread gk

One way to do this is to use global events of jquery ajax, as below

$(#ajaxLoading).bind(ajaxSend, function(){
   $(this).show();
 }).bind(ajaxComplete, function(){
   $(this).hide();
 });
pls note this will show a loading message for all jquery ajax
operations from your page, if you want to restrict only to a specific
operaton you can bind this to current ajax call.
---
div id='ajaxLoading'Loading../div
---
#ajaxLoading{
position: absolute;
top:2px;
left:95%;
padding:5px;
background-color: #CC;
color:white;
}

macsig wrote:
 Hi guys,
 I'm working on a Rails app connected to a legacy database.
 Since the reading process from the database takes several seconds (up
 to ten) I would like to display a loading message while the page is
 loading.

 Can I achieve that using jQuery? If so how?

 Thanks and have a nice day.


 Sig


[jQuery] Using a selector recursively

2009-05-21 Thread sean

I have the following code:
div id=test
  div class=ajaxApplyIgnore
   spana href=javascript:ajaxApplyAll(); class=Test1/a/
span
  /div
  div
spana href=/Logout class=Logout/a/span
   /div
/div


script
var obj = $('test'); // used specific div, as this is in a huge
document
obj.find('.ajaxApplyIgnore a').addClass('red');
/script

The js code above will not select the Test1 link, even though it is
found within the div layer with the ajaxApplyIgnore class. It seems
that the selector does not work recursively.

Does anybody know how to make the script work recursively this?

NOTE: I am using Safari 3.


[jQuery] can i use lightbox and thickbox on one webpage

2009-05-21 Thread urvish

 Hello sir,

i use asp.net 3.5 and i add thickbox and lightbox of jquery js on
my page. but light box is not working. so please tell me can it
possible to use both js on one webpage.


[jQuery] Re: Setting element type?

2009-05-21 Thread Rodrigo Matheus
also need to know

2009/5/21 ash.finlay...@googlemail.com ash.finlay...@googlemail.com


 Hi can anyone tell me how to set the 'type' of an html form element
 using jquery?

 is there something like?
 $(element).type(password);

 Many Thanks
 Ash




-- 
Atenciosamente,
Rodrigo Matheus


[jQuery] Newbie question about toggle.

2009-05-21 Thread Lacrima

Hello!

I think very simple question, but I am very new to jquery...
For example, I have the next code:

$('#info').hide();
$('a#show_hide_info').click(function(){
$('#info').toggle();
});

So when a user click on #show_hide_info, #info element become visible
or invisible.
But the #show_hide_info element is placed on the top of the page and
the #info element is on the bottom of the page. The bottom of the page
isn't visible to the user because the page is too long.
So when user clicks #show_hide_info he doesn't see any effect because
#info element is several screens down.
How should I scroll down the page to the #info element when user
clicks #show_hide_info???

Sorry if my English is not very good.
Thank you in advance.

With regards,
Max.


[jQuery] input type

2009-05-21 Thread Rodrigo Matheus
Hi,

You can return a text input for a password input?

Example:

$(this).attr('type','password');

Has another way that works?

-- 
Atenciosamente,
Rodrigo Matheus


[jQuery] Re: New Plugin: jQuery Finder (Mac-style 'Treeview' with Columns)

2009-05-21 Thread dfischer

I am having a difficult time using the select method in the onInit
callback.

I am creating an array of items and then calling select as follows:
onInit: function(finderObj) {
var itemsToSelect = [href/item1, href/item2];
$(this).finder(select, itemsToSelect);
}

When this code is run, I get the following error in the Firebug
console:
uncaught exception: jQuery Finder: Target element does not exist

I then added the same code that is on the finder demo for the Select
Item button, modified it a little to parse a comma separated list,
pasted href/item1, href/item2 into the dialog and the correct items
were selected.

Any idea of what I am doing wrong?

Thanks,
Doug

On Apr 1, 11:18 am, Nicolas R ruda...@googlemail.com wrote:
 Tor,

 To select an item when the finder is created you can use the public
 method $('some').finder('select', URLS_ARRAY or URL_STRING or
 DOM_ELEMENTS ). Call this method on the onInit callback.

 There is no function that returns some sort of path for the current
 page. I believe it would be easy to hack one yourself, something like:

 var path = [];
 $('div.ui-finder').find('li.ui-finder-list-item-active  a').each
 (function(){
      path.push( $(this).attr('href') );

 });

 path // = [ 'level1.html', 'level2.html', 'level3.html' ]

 So, you could store the array as a cookie (in string format of course)
 on window.onunload and then on load..

 $('some').finder({
 onInit: function(){  $(this).finder('select',path_as_array) }

 })

 I'm sure there are many ways to achieve this, but the two main things
 to keep in mind is that
 1. you can pass an array of urls to .finder('select', ... ) and it
 will select them in that order; and
 2. you can select the current path by using the path function I
 provided above

 Hope this makes sense

 On Apr 1, 1:06 pm, Tor torgeir.ve...@gmail.com wrote:

  Am wondering if it would be possible to store the expanded state with
  an anchor hash, to allow page reloads?

  --
  -Tor




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

2009-05-21 Thread John Crout
You won't be able to intercept the image before it is loaded but you can
block it from being rendered.  Remember that JavaScript relies on the DOM.
The DOM isn't fully-defined for the page, until all of it has loaded.  But
you can hide it by setting its visibilitiy to hidden, and keep the browser
from allocating real estate for it by setting display to block. (Default
is inline).

Looking at the code you included, I don't believe there is a statistic of
interest that you cannot collect when the page you've served, is requested.
(That is, the only info the browser will have that is new, it the location
of what it renders after receiving what the server sends.)  For example, the
location of everything won't be available to JavaScript until after what it
will render, has been rendered.

By the way, I'm not pretending I know your business.  What I meant by stat
of interest is that whatever you collect, after delivering the image, that
you cannot collect when the request for the page is made, is something that
can be assumed as consistent, from request to request, even from the same
user.

Correct me if I'm incorrect about this (please).

--John Crout


On Wed, May 20, 2009 at 9:51 AM, Andy Matthews amatth...@dealerskins.comwrote:


 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):

 img id=statsImg src=stats.cfm?somevar=someval width=1 height=1 /

 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

 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] Question about jQuery's filter ability

2009-05-21 Thread brady

I developed a fairly straightforward product filtering tool using Spry
and was curious if jQuery could do something similar and if so where I
might find an example.

The tool can be seen here:
http://www.bradygodwin.com/test/rnatoold.html

Thanks!


[jQuery] treeview asynchronous

2009-05-21 Thread ffw_cn

hello?

i want to use the asynchronous load tree,but the
jquery.treeview.async.js only supply

the root load tree by ajax(json),but i purpose that each node can load
children asynchronous,

what can i do? please help me~


[jQuery] Begginner Problems......

2009-05-21 Thread Rudolpho

Hello!
Sorry  but i just started  with Jquery and hereby ask for your
Support:

script type=text/javascript
$(document).ready(function() {
$('#desperation input[type=image]').attr('disabled', true).fadeTo
(fast, 0.10);
$('#1').attr('disabled', false).fadeTo(fast, 0.70);
});



$('#1').toggle(
  function () {
$('#1').click(function() {
$('#1').fadeTo(fast, 1.00).attr('checked', true);
$('#2').attr('disabled', false);
 });
  },
  function () {
$('#1').click(function() {
$('#1').fadeTo(fast, 0.70).attr('checked', false);
$('#2').attr('disabled', true);
});
  }
);

/script
div id=skill
form action=javascript:void(null); method=post
enctype=application/x-www-form-urlencoded id=skillplanner
name=skillplanner 
fieldset id=desperationlegendFreetrader Skills: Desperation/
legend
input type=image src=files/icons/underdog.png id=1/input
input type=image src=files/icons/dump_guns.png id=2/input
input type=image src=files/icons/desperation_fire.png id=3/
input
input type=image src=files/icons/rum_ration.png id=4/input
input type=image src=files/icons/hasty_fire.png id=5/input
/fieldset
/form
/div

the problem is  with the toggle function. on click it should check
clicked one  and  activate next one.
function doesnt work  and  i dont have a clue


[jQuery] Question about Click Function

2009-05-21 Thread Rudolpho

Hello!
Sorry i´m a  absolute beginner  with JQuery, therefore  this  Question
may be somewhat trivial:

My Goal is to make input type= image buttons in a  row. The first
one is activated. Once u click the first one it is checked AND  the
next one must be activated.
the work i´ve done so far is:

script type=text/javascript
$(document).ready(function() {
$('#desperation input[type=image]').attr('disabled', true).fadeTo
(fast, 0.10);
$('#1').attr('disabled', false).fadeTo(fast, 0.70);
});

$(this).click(function() {
$(#1).fadeTo(slow, 1.00).attr('checked', true);
$(#2).next().attr('disabled', false).fadeTo(fast, 0.70);
});


/script

div id=skill
form action=javascript:void(null); method=post
enctype=application/x-www-form-urlencoded id=skillplanner
name=skillplanner 
fieldset id=desperationlegendFreetrader Skills: Desperation/
legend
input type=image src=files/icons/underdog.png id=1
name=underdog/input
input type=image src=files/icons/dump_guns.png id=2
name=dump_guns/input
input type=image src=files/icons/desperation_fire.png id=3/
input
input type=image src=files/icons/rum_ration.png id=4/input
input type=image src=files/icons/hasty_fire.png id=5/input
/fieldset
/form
/div


The (document).ready part works it seems  but  the click function
doesnt.
Please I need HELP 


[jQuery] Re: Question about Click Function

2009-05-21 Thread ryan.j

somehting like...

$(.clicky).live(click, function(){
  $(this).next().fadeIn(slow)
});


On May 21, 9:27 am, Rudolpho webmas...@freieberater.biz wrote:
 Hello!
 Sorry i´m a  absolute beginner  with JQuery, therefore  this  Question
 may be somewhat trivial:

 My Goal is to make input type= image buttons in a  row. The first
 one is activated. Once u click the first one it is checked AND  the
 next one must be activated.
 the work i´ve done so far is:

 script type=text/javascript
 $(document).ready(function() {
 $('#desperation input[type=image]').attr('disabled', true).fadeTo
 (fast, 0.10);
 $('#1').attr('disabled', false).fadeTo(fast, 0.70);

 });

 $(this).click(function() {
                 $(#1).fadeTo(slow, 1.00).attr('checked', true);
                 $(#2).next().attr('disabled', false).fadeTo(fast, 0.70);

 });

 /script

 div id=skill
 form action=javascript:void(null); method=post
 enctype=application/x-www-form-urlencoded id=skillplanner
 name=skillplanner 
 fieldset id=desperationlegendFreetrader Skills: Desperation/
 legend
 input type=image src=files/icons/underdog.png id=1
 name=underdog/input
 input type=image src=files/icons/dump_guns.png id=2
 name=dump_guns/input
 input type=image src=files/icons/desperation_fire.png id=3/
 input
 input type=image src=files/icons/rum_ration.png id=4/input
 input type=image src=files/icons/hasty_fire.png id=5/input
 /fieldset
 /form
 /div

 The (document).ready part works it seems  but  the click function
 doesnt.
 Please I need HELP 


[jQuery] Cycle Plug-in - #nav a.activeSlide doesn't updated

2009-05-21 Thread MVimmer

Hello list,

I am using the Cycle plug in by Mike Alsup (thank you for a great plug-
in).

I am using automatic auto-transitions with a pager to switch between
images. Everything works fine, however the a.activeSlide class doesn't
updates and switch to the current slide.
You can view the file here:

http://www.opendraft.com/strivenyc/

Any idea why it happens and how I can fix it?

Thanks,
Mor


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

2009-05-21 Thread Andy Matthews
John...
 
The original intent was to render an img tag to the page which would load in
a subset of my desired data, specifically that which can easily be gotten
via interpretation of the user agent string and other items. That subset
would get added to the src of the image as URL key/value pairs. Then, when
jQuery was available, I'd replace the src of the image tag with additional
information, which can only be gotten via JS (resolution, bandwidth, flash
player, etc).
 
In my testing I was never able to get this working. However, after doing
some googling, I found the lazy load plugin. Doesn't that do pretty much
what I'm looking for? Namely prevent the loading of an image until it's
scrolled into the visible window space?
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of John Crout
Sent: Wednesday, May 20, 2009 6:08 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: SOT: execute JS before a specific image loads


You won't be able to intercept the image before it is loaded but you can
block it from being rendered.  Remember that JavaScript relies on the DOM.
The DOM isn't fully-defined for the page, until all of it has loaded.  But
you can hide it by setting its visibilitiy to hidden, and keep the browser
from allocating real estate for it by setting display to block. (Default
is inline).

Looking at the code you included, I don't believe there is a statistic of
interest that you cannot collect when the page you've served, is requested.
(That is, the only info the browser will have that is new, it the location
of what it renders after receiving what the server sends.)  For example, the
location of everything won't be available to JavaScript until after what it
will render, has been rendered.  

By the way, I'm not pretending I know your business.  What I meant by stat
of interest is that whatever you collect, after delivering the image, that
you cannot collect when the request for the page is made, is something that
can be assumed as consistent, from request to request, even from the same
user.

Correct me if I'm incorrect about this (please).

--John Crout



On Wed, May 20, 2009 at 9:51 AM, Andy Matthews amatth...@dealerskins.com
wrote:



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):

img id=statsImg src=stats.cfm?somevar=someval width=1 height=1 /

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

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: Newbie question about toggle.

2009-05-21 Thread ryan.j

sounds like you could jsut use an inline anchor, with the JS being
executed in the onclick event

On May 21, 8:11 am, Lacrima lacrima.ma...@gmail.com wrote:
 Hello!

 I think very simple question, but I am very new to jquery...
 For example, I have the next code:

         $('#info').hide();
         $('a#show_hide_info').click(function(){
             $('#info').toggle();
         });

 So when a user click on #show_hide_info, #info element become visible
 or invisible.
 But the #show_hide_info element is placed on the top of the page and
 the #info element is on the bottom of the page. The bottom of the page
 isn't visible to the user because the page is too long.
 So when user clicks #show_hide_info he doesn't see any effect because
 #info element is several screens down.
 How should I scroll down the page to the #info element when user
 clicks #show_hide_info???

 Sorry if my English is not very good.
 Thank you in advance.

 With regards,
 Max.


[jQuery] Re: Cycle Plug-in - #nav a.activeSlide doesn't updated

2009-05-21 Thread MVimmer

Disregard this!!! it does work.



On May 21, 10:08 am, MVimmer mor.vim...@gmail.com wrote:
 Hello list,

 I am using the Cycle plug in by Mike Alsup (thank you for a great plug-
 in).

 I am using automatic auto-transitions with a pager to switch between
 images. Everything works fine, however the a.activeSlide class doesn't
 updates and switch to the current slide.
 You can view the file here:

 http://www.opendraft.com/strivenyc/

 Any idea why it happens and how I can fix it?

 Thanks,
 Mor


[jQuery] Re: can i use lightbox and thickbox on one webpage

2009-05-21 Thread David Meiser
Short answer, yes.  You need to use jQuery in compatibility mode.

Long answer: why not just rewrite the lightbox class to thickbox and use
thickbox for both?  Since thickbox is a clone of lightbox, they are similar
enough to swap out on the fly.

Good luck,
Dave

On Thu, May 21, 2009 at 9:41 AM, urvish shethurv...@gmail.com wrote:


  Hello sir,

i use asp.net 3.5 and i add thickbox and lightbox of jquery js on
 my page. but light box is not working. so please tell me can it
 possible to use both js on one webpage.



[jQuery] Re: cycle plugin with keyboard

2009-05-21 Thread Mike Alsup

The plugin does not provide support for keyboard nav.  You'd have to
implement it yourself.

On May 20, 9:48 pm, runrunforest craigco...@gmail.com wrote:
 In cycle plugin, ss there way to switch images by keyboard arrows
 instead of clicking next, prev


[jQuery] Re: jQuery Cycle plugin (help show/hide slide shows on same page)?

2009-05-21 Thread Mike Alsup

 Just to clarify; I have two slide shows using the cycle plugin. They
 are both set to display using the same css. Only one should display at
 a time, I want the page to load with one shown and the other hidden,
 then after a link is clicked the slide shows should toggle to display
 the previously hidden and hide the previously shown. All this is
 strait forward jQuery nothing difficult so I'm not bothering to
 clutter this thread with the obvious code. The problem is that the
 previously hidden cycle slide show will not display as it should. I
 just get a blank space where it should be. The Cycle plug in page says
 to direct questions to this group so, I'm asking for help.

 Do I have to restart the plugin somehow? Or... ?

 Thanks in advance for any help or suggestions.


Can you post a link to your test page?


[jQuery] New Plug-in: Marquee, an ESPN-style ticker...

2009-05-21 Thread Dan G. Switzer, II


My current employer (Giva, Inc) has released another jQuery plug-in 
today called the Marquee jQuery Plug-in. The jQuery Marquee plug-in 
converts a list element (ul / or ol /) into an ESPN-style scrolling 
marquee. Messages are scrolled in from top or bottom (based on the 
yScroll option) and longer messages will then ticker to the left in 
order to show the full message.


While there are a number of ticker/marquee style plug-ins, nothing did 
exactly what I needed. I really wanted something that would scroll 
up/down new messages, but would then ticker messages that didn't fit on 
the screen.


In our SaaS application, our customers wanted a place at the top of the 
screen where they could put important notices to their clients, and they 
seem to be very happy with the effects we use in this plug-in.


The Marquee jQuery Plug-in has an example you can look at or you can see 
several different marquees in different configurations at:

http://www.givainc.com/labs/marquee_example.htm

Marquee Plug-in:
http://www.givainc.com/labs/marquee_jquery_plugin.htm

Marquee jQuery Project Page:
http://plugins.jquery.com/project/giva-marquee

The plug-in is only 3K minimized.

-Dan


[jQuery] Upload via jsonp and $.ajax

2009-05-21 Thread steffen.ruehlm...@googlemail.com

I read through a lot of forums and finally found a hint so solve my
problem.. I try to upload some data ( an image ) to an external site
( works with an API Key and returns XML if Upload completed
correctly )..
The code of my script can be found here http://pastebin.com/m1489e027..

Can anybody help me with this issue - at the moment i'm getting the
following error message -- M.data.match is not a function -- and don't
know how to handle ;(..

The external server excepts the following data: image ( as multipart/
form-data ), an API Key and the script_id..

Thx in advance,
Steffen


[jQuery] Re: Setting element type?

2009-05-21 Thread Richard D. Worth
The type is an attribute. You can get it via the .attr() method:

var theType = $(#myInput).attr(type);

Setting the type is not supported across browsers. Rather, you'll have to
create a new input with the type you want. Ex:

$('input type=password').appendTo(form);

- Richard

On Thu, May 21, 2009 at 9:44 AM, Rodrigo Matheus sis.rodr...@gmail.comwrote:

 also need to know

 2009/5/21 ash.finlay...@googlemail.com ash.finlay...@googlemail.com


 Hi can anyone tell me how to set the 'type' of an html form element
 using jquery?

 is there something like?
 $(element).type(password);

 Many Thanks
 Ash




 --
 Atenciosamente,
 Rodrigo Matheus



[jQuery] Re: Newbie question about toggle.

2009-05-21 Thread Lacrima

Hi Ryan,
Thanks for reply!

I tried to use anchor, but it doesn't work:

$('#info').hide();
$('a#show_hide_info').click(function(){
$('#info').toggle();
});

a id=show_hide_info href=#fooShow/hide info/a
!-- a lot of html tags here --
div id = infoa name = 'foo' href=#some/a/div

When I click #show_hide_info, this doesn't move me to my anchor.
So what I am doing wrong?

With regards,
Max.


On May 21, 5:11 pm, ryan.j ryan.joyce...@googlemail.com wrote:
 sounds like you could jsut use an inline anchor, with the JS being
 executed in the onclick event

 On May 21, 8:11 am, Lacrima lacrima.ma...@gmail.com wrote:

  Hello!

  I think very simple question, but I am very new to jquery...
  For example, I have the next code:

          $('#info').hide();
          $('a#show_hide_info').click(function(){
              $('#info').toggle();
          });

  So when a user click on #show_hide_info, #info element become visible
  or invisible.
  But the #show_hide_info element is placed on the top of the page and
  the #info element is on the bottom of the page. The bottom of the page
  isn't visible to the user because the page is too long.
  So when user clicks #show_hide_info he doesn't see any effect because
  #info element is several screens down.
  How should I scroll down the page to the #info element when user
  clicks #show_hide_info???

  Sorry if my English is not very good.
  Thank you in advance.

  With regards,
  Max.


[jQuery] Re: How to convert csv file to json

2009-05-21 Thread Kelly

Brian said that JSON uses a key:value format, but it is really just a
shorthand for Javascript literals. Which means you can easily
represent ordered lists like CSV data as well:

[ [ 'c', 's', 'v' ], [ 'c', 's', 'v' ], ... ]

To get around the cross-domain restrictions and to solve your
conversion issue, maybe you should write a script on the server that
pulls the data, caches it, and writes out JSON.

Assuming you were using PHP on the server, and assuming the PHP
settings allow fopen wrappers for URLs, this would be pretty easy:

define('DATA_FILE','data.json'); // must be writable
if (file_exists(DATA_FILE) and filemtime(DATA_FILE)  (time() - 900))
readfile(DATA_FILE);
else {
$fh = fopen('http.../yoururl/data.csv','r');
$rows = array();
while($rows[] = fgetcsv($fh)) { }
$json = json_encode($rows);
file_put_contents(DATA_FILE,$json);
echo $json;
fclose($fh);
}

I didn't test this code but it should be pretty close.


On May 20, 7:45 am, brian bally.z...@gmail.com wrote:
 There's quite a difference between the two. JSON uses a key: value
 format, while CSV is generally value only

 On Wed, May 20, 2009 at 6:28 AM, Nitin Sawant nitin.jays...@gmail.com wrote:

  How to convert csv file to json using jquery / javascript??


[jQuery] Re: cycle plugin with keyboard

2009-05-21 Thread ryan.j

bind keypress to a check for the charcode/keycode and if your
condition is met, pass the js to load the next img?

$(document).keypress(function (e) {
if (e.which == 32 ) {
/* advance scroller! */
}
});

( lots of interesting stuff on this sort of thing at --
http://www.quirksmode.org/js/keys.html )

On May 21, 2:48 am, runrunforest craigco...@gmail.com wrote:
 In cycle plugin, ss there way to switch images by keyboard arrows
 instead of clicking next, prev


[jQuery] Re: adding $(script) node actually runs the script - correct behavior?

2009-05-21 Thread Liam Byrne


If you're outputting it to a HTML page, then all of the  characters 
should be lt; and all of the  characters should be gt;


That will prevent them from being actual SCRIPT tags.

L

Paul Tarjan wrote:

I don't want to execute it. I want to print it out to the html page so the
user knows how to embed this stuff on their page.

If you actually run the code in the OP, it DOES execute, which was very
unexpected.

On 5/20/09 2:58 AM, Ricardo ricardob...@gmail.com wrote:

  

I don't see the point. That script tag you added is not going to be
evaluated anytime, it will just sit there doing nothing. You'll have
to move it to the head to execute it.

On May 20, 2:17 am, Paul Tarjan ptar...@gmail.com wrote:


I actually wanted to append the text to the document. Here is how I'm
working around it, but I thought building up the tags using jquery
functions was the preferred method.

var embed =
$(span/).append(
$(span/)
.text(data)
.attr(id, wnval)
).html();
embed = embed
+ 'scriptvar ' + wnval + ' = function(data)
{ document.getElementById(' + wnval + ').innerHTML = data; }/' +
'script'
+ 'script src=http://webnumbr.com/'+ val + '.json
(callback=' + wnval + ')/' + 'script'

it works fine this way, but in my original method (see OP) I had
expected jquery to just add the script to the span instead of
adding it to the document and evaluating it.

On May 18, 10:57 pm, Ricardo ricardob...@gmail.com wrote:

  

Script elements are not really appended. To ensure execution you have
to append them to the head of the document or eval them. jQuery does
the latter, so the element ends up not being in the DOM at all. What
are you trying to achieve? There's no point in creating a script tag
when you can just declare a function instead.

On May 18, 8:40 pm, PaulTarjanptar...@gmail.com wrote:


If I have a node that isn't in the DOM, and then I add a script to it,
then it is actually executed. Example
  
Expected behavior : s variable contains the string scriptalert('hi')

/script.
  
Observed behavior : alert box pop up and s contains 
  
script

var s = $(span/).append($(script/).text(alert('hi'))).html()
script
  
You can see it running here :http://paulisageek.com/tmp/jquery-script.html
  
Am I doing something wrong? Can I not write javascript from within

jquery?
  


  




No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.339 / Virus Database: 270.12.36/2126 - Release Date: 05/21/09 06:22:00


  




[jQuery] [validator] how to turn off validation once it's turned on

2009-05-21 Thread Sasha

Hi - I'm looking for a way to validate a form with two buttons.  The
first button will add the form's contents (if they're valid) to the
row of a table below the form.  (Several rows can accumulate in the
table.)  The second button will proceed to the next page if either 1)
there's valid content in the form or 2) the table has at least one row
in it.

What I'm trying to figure out is if I can turn off the validator for
the 2nd button when I add a row to the table, while keeping it active
for the 1st one.

Ideally, I'd like to create a validator, remove it when I add a row to
the table, and reinstate it when the user interacts with the form.

Thanks!


[jQuery] Re: cycle plugin with keyboard

2009-05-21 Thread ryan.j

$(window).keypress(function (e) {
  if (e.which == 39 ) {
/* keypress right */
  } elseif (e.which == 37 ) {
/* keypress left */
  } else {
return false;
  }
});

if you can't figure out how to advance the cycle on your own, maybe
try to simulate $('#scrollLeft').click()

On May 21, 2:48 am, runrunforest craigco...@gmail.com wrote:
 In cycle plugin, ss there way to switch images by keyboard arrows
 instead of clicking next, prev


[jQuery] Re: Replace newline char with comma using jquery

2009-05-21 Thread Liam Byrne


The code works fine here (apart from the security issue).

I can't understand how or why you'd convert a two-dimensional array to a 
single one, though.


Are you SURE that the page that you're testing has the second comma in 
the following line ? Your original post didn't


myArr=myArr.replace(\n,,);//this line doesn't work

L

Nitin Sawant wrote:

Hello Liam,
  Thanks for your reply,

i'm retrieving csv file from google finance and parsing it, however
the script which i wrote doesn't replace newline char from csv file
with comma, I want to convert csv file to javascript array.



html
head
title- Another CSV parser -/title
script type=text/javascript src=flotr/jquery.js/script
script type=text/javascript
function loadData(){
$.get(http://finance.google.com/finance/historical;,
  {
q:'GOOG',
startdate:'Apr 1 2009',
enddate:'May 1 2009',
start:'225',
num:'25',
output:'csv'
  },
  function(data)
  {
 // Writing output into div
 $(#csvDiv).html(data);
 $(#csvDiv).hide();
 ConvertToArray(data);
  }
);
}

function ConvertToArray(data){
var myArr=$(#csvDiv).html();
myArr=myArr.replace(\n,,);//this line doesn't work
myArr=myArr.split(',');
document.writeln(array length is: +myArr.length+br/);

//show all elements of array
var i=0;
for (i; imyArr.length; i++) {
document.writeln(myArr[i]+'br /');
}
}
/script
/head
body
div id=csvDiv

/div
script type=text/javascript
loadData();
/script
!--

http://finance.google.com/finance/historical?q=GOOGstartdate=May+1%2C+2009enddate=May+5%2C+2009start=225num=25output=csv
--
/body
/html









On May 20, 3:56 pm, Liam Byrne l...@onsight.ie wrote:
  

That code that you posted is replacing a newline with nothing - the
comma is BETWEEN the parameters and is not one of them

Try csvString=csvString.replace('\n',',');



Nitin Sawant wrote:


Hello frendz,
 I'm trying to replace newline char frm Google finance csv
file with comma but its not happening pls help.
  
http://finance.google.com/finance/historical?q=GOOGstartdate=May+1%2...
  
I'm using following code
  
csvString=csvString.replace('\n','');
  
I think there is some platform newline char issue.
  
how to do this using jquery?
  
pls help


  
No virus found in this incoming message.

Checked by AVG -www.avg.com
Version: 8.5.339 / Virus Database: 270.12.35/2124 - Release Date: 05/20/09 
06:22:00



No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.339 / Virus Database: 270.12.35/2124 - Release Date: 05/20/09 06:22:00


  




[jQuery] Re: jQuery Cycle plugin (help show/hide slide shows on same page)?

2009-05-21 Thread MiD-AwE

Ok,

http://mid-awe.com/webs/presidential/index.html

I'm noticing also now that an additional #s2 slide show is missing
from the initial page load. I'll look at that to see if the issues are
related. Any help is greatly appreciated.

 Can you post a link to your test page?


[jQuery] Re: cycle plugin with keyboard

2009-05-21 Thread runrunforest

could you give some further tip, how can I simulate, where should I
put the code to (document.ready part ?).

On May 21, 10:28 pm, ryan.j ryan.joyce...@googlemail.com wrote:
 $(window).keypress(function (e) {
   if (e.which == 39 ) {
     /* keypress right */
   } elseif (e.which == 37 ) {
     /* keypress left */
   } else {
     return false;
   }

 });

 if you can't figure out how to advance the cycle on your own, maybe
 try to simulate $('#scrollLeft').click()

 On May 21, 2:48 am, runrunforest craigco...@gmail.com wrote:

  In cycle plugin, ss there way to switch images by keyboard arrows
  instead of clicking next, prev


[jQuery] Re: UI dialog resize (width height settings)

2009-05-21 Thread c.sokun

cool! I will try that is it possible to call it in just one line?

On May 18, 6:55 pm, Richard D. Worth rdwo...@gmail.com wrote:
 You can only call .dialog({ width: XX, height: YY }) once. That's an init.
 After that you can change the width and height by calling dialog's option
 method, specifying the option you want to change, and the new value:

 $(#myDiv).dialog(option, width, newXX);
 $(#myDiv).dailog(option, height, newYY);

 - Richard

 On Mon, May 18, 2009 at 4:34 AM, c.sokun chornso...@gmail.com wrote:

  I had problem when try to reuse div element with ui.dialog().
  If I set the width  height the first time it works; but if I call it
  from second function with different width  height it won't apply the
  new setting.

  Also if I manually resize the dialog when it appear after close and
  reopen it use the new size (resized manually) not the one I specified
  in the code.

  So my question is very simple is it possible to resize the dialog
  before it show up?


[jQuery] Re: cycle plugin with keyboard

2009-05-21 Thread ryan.j

yeah, stick this in document ready.

to simulate the click, get the id of element you'd normally click to
advance the scroller (inspect it with the mozilla plugin firebug) and
append .click()

On May 21, 4:45 pm, runrunforest craigco...@gmail.com wrote:
 could you give some further tip, how can I simulate, where should I
 put the code to (document.ready part ?).

 On May 21, 10:28 pm, ryan.j ryan.joyce...@googlemail.com wrote:

  $(window).keypress(function (e) {
    if (e.which == 39 ) {
      /* keypress right */
    } elseif (e.which == 37 ) {
      /* keypress left */
    } else {
      return false;
    }

  });

  if you can't figure out how to advance the cycle on your own, maybe
  try to simulate $('#scrollLeft').click()

  On May 21, 2:48 am, runrunforest craigco...@gmail.com wrote:

   In cycle plugin, ss there way to switch images by keyboard arrows
   instead of clicking next, prev


[jQuery] Re: [validator] how to turn off validation once it's turned on

2009-05-21 Thread Steve Jordan

Sasha wrote:
 What I'm trying to figure out is if I can turn off the validator for
 the 2nd button when I add a row to the table, while keeping it active
 for the 1st one.
To do this you remove the metadata from the form element which you don't
want to validate.

e.g. if you have a required element, it has the class required,
simply remove the class to
stop the validation on the element. And reinstate it when you want it again.

Steve


[jQuery] Re: Call for contributors: A simple, fast and flexible grid/spreadsheet component.

2009-05-21 Thread dcam

Very nice design.

I've been looking for a grid plugin for ages and not found anything
that comes close to this.
Do you plan to continue developing this? I'm sure there are a lot of
developers looking for this kind of grid

Thanks for your work Michael,
Douglas

On Mar 31, 1:02 am, Tin michael.leib...@gmail.com wrote:
 Ryan,

 Frozen columns is one of the TODOs in the slick.grid.js :)
 It is definitely something that I think needs to be added in.  For the
 past week, I have mostly concentrated on improving performance and the
 ability to adjust to the browser's performance and not jump into async
 rendering mode prematurely.  Now that that part is done, it's either
 working on frozen columns support, or adding another example having to
 do with AJAX-loading data from the server (which, personally, I think
 is pretty mundane and not really related to the grid itself).  I guess
 I'll start working on the former now...


[jQuery] Re: Mouse event problem

2009-05-21 Thread shotglass



less than zero wrote:
 
 ...
 
 the problem I'm coming up against is when the mouseover/mouseout events
 are triggered. I've set the events to be triggered from the gallery
 container, but it seems like the mouse events are called everytime the
 cursor goes over any of the images within the gallery instead.
 
 ...
 

That's how mouseover/mouseout events work, and before I started using
jQuery, it caused me a lot of frustration. Fortunately, jQuery has the
mouseenter/mouseleave events, which will behave exactly the way you want
them to.

HTH,

--James
-- 
View this message in context: 
http://www.nabble.com/Mouse-event-problem-tp23480749s27240p23643602.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Code Review: slideshow plugin using JSON

2009-05-21 Thread Stefan Hayden

I was looking for a jQuery slideshow that worked the way I wanted and
didn't find one. I figured you can never have too many slideshow
plugins so I've tried to make my first jQuery plugin and was hoping
people with a bit more jQuery experience could look it over and give
some suggestions before I go around telling people about it.

This slideshow requires the first slide to be in the HTML and then it
preloads the next image in the rotation just before showing it making
the initial page load time faster. It also has previous/next and
pagination interfaces and well as an option to show a animated
caption.

plugin homepage: http://stefanhayden.com/shermanstravel_slideshow/
plugin source: 
http://stefanhayden.com/shermanstravel_slideshow/jquery.ShermansTravel_Slideshow.js

any feedback would be welcome.


Stefan Hayden




[jQuery] Re: New Plug-in: Marquee, an ESPN-style ticker...

2009-05-21 Thread victor kobs
great plug-in interesting..






[jQuery] Re: jQuery XML

2009-05-21 Thread alex

OK, so now I have a new method of going about things and I'm so nearly
there, but can't get it working. I'm using this piece of Javascript
modified from a d'bug post

http://itiz.in/12u7

If I remove the medium from the mix, I get an alert box with all
three image URLs, no spaces. If I add medium (which is the size I
need) I get no response, and Safari's Web Inspector says TypeError:
Result of expression 'attribute[Image]' [undefined] is not an
object.. I just need to grab that medium image URL, but it's proving
very hard!


[jQuery] Re: Call for contributors: A simple, fast and flexible grid/spreadsheet component.

2009-05-21 Thread Tin

I do plan on continuing to develop it - the last month has been really
slow since I had little spare time to spend on it.


On May 21, 8:47 am, dcam dougie.came...@googlemail.com wrote:
 Very nice design.

 I've been looking for a grid plugin for ages and not found anything
 that comes close to this.
 Do you plan to continue developing this? I'm sure there are a lot of
 developers looking for this kind of grid

 Thanks for your work Michael,
 Douglas

 On Mar 31, 1:02 am, Tin michael.leib...@gmail.com wrote:



  Ryan,

  Frozen columns is one of the TODOs in the slick.grid.js :)
  It is definitely something that I think needs to be added in.  For the
  past week, I have mostly concentrated on improving performance and the
  ability to adjust to the browser's performance and not jump into async
  rendering mode prematurely.  Now that that part is done, it's either
  working on frozen columns support, or adding another example having to
  do with AJAX-loading data from the server (which, personally, I think
  is pretty mundane and not really related to the grid itself).  I guess
  I'll start working on the former now...


[jQuery] Re: Mouse event problem

2009-05-21 Thread jimmy shotglass

On May 11, 6:25 am, less than zero rich.la...@gmail.com wrote:
 ... the problem
 I'm coming up against is when the mouseover/mouseout events are triggered.
 I've set the events to be triggered from the gallery container, but it seems
 like the mouse events are called everytime the cursor goes over any of the
 images within the gallery instead


That's how mouseover/mouseout events work, and before I started using
jQuery, it caused me a lot of frustration. Fortunately, jQuery has the
mouseenter/mouseleave events, which will behave exactly the way you
want them to.

HTH,

--James


[jQuery] Re: IE iframe bug? Attributes not available on $(document).ready - any advice?

2009-05-21 Thread sebastien creme


have you tried .height() instead of .attr('height') ?
this method sjould handle crossbrowsing issues!
On May 20, 11:53 pm, nabrown78 nabrow...@gmail.com wrote:
  Just to note, maybe the problem is related to document.ready firing
 too early within iframe :

 http://groups.google.com/group/jquery-dev/browse_thread/thread/460f3f...

 ?


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

2009-05-21 Thread Michael Geary
Hmm... This is weird... I posted a reply at 3PM yesterday and it doesn't
look like it made it onto the group. (You didn't see it, did you?) So here
goes again, with some additional notes this time...
 
The problem is really much easier than all this. There's no reason to use a
lazy load plugin, and no reason to even use jQuery.
 
Simply use a noscript tag for the non-JavaScript case, and a script tag
with document.write() for the JavaScript case:
 
noscript
img id=statsImg src=stats.cfm?somevar=someval width=1
height=1 /
/noscript
script type=text/javascript
document.write(
'img id=statsImg src=stats.cfm?somevar=someval',
/* your extra stuff here, e.g.: */ 'anothervar=anotherval',
' width=1 height=1 /'
);
/script
 
Or, you can use jQuery for the dynamic image if you like. But don't try to
modify the IMG from the noscript section - it won't exist. Instead, add
your own IMG element with jQuery instead of document.write.
 
-Mike


  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Andy Matthews
Sent: Thursday, May 21, 2009 7:08 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: SOT: execute JS before a specific image loads


John...
 
The original intent was to render an img tag to the page which would load in
a subset of my desired data, specifically that which can easily be gotten
via interpretation of the user agent string and other items. That subset
would get added to the src of the image as URL key/value pairs. Then, when
jQuery was available, I'd replace the src of the image tag with additional
information, which can only be gotten via JS (resolution, bandwidth, flash
player, etc).
 
In my testing I was never able to get this working. However, after doing
some googling, I found the lazy load plugin. Doesn't that do pretty much
what I'm looking for? Namely prevent the loading of an image until it's
scrolled into the visible window space?
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of John Crout
Sent: Wednesday, May 20, 2009 6:08 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: SOT: execute JS before a specific image loads


You won't be able to intercept the image before it is loaded but you can
block it from being rendered.  Remember that JavaScript relies on the DOM.
The DOM isn't fully-defined for the page, until all of it has loaded.  But
you can hide it by setting its visibilitiy to hidden, and keep the browser
from allocating real estate for it by setting display to block. (Default
is inline).

Looking at the code you included, I don't believe there is a statistic of
interest that you cannot collect when the page you've served, is requested.
(That is, the only info the browser will have that is new, it the location
of what it renders after receiving what the server sends.)  For example, the
location of everything won't be available to JavaScript until after what it
will render, has been rendered.  

By the way, I'm not pretending I know your business.  What I meant by stat
of interest is that whatever you collect, after delivering the image, that
you cannot collect when the request for the page is made, is something that
can be assumed as consistent, from request to request, even from the same
user.

Correct me if I'm incorrect about this (please).

--John Crout



On Wed, May 20, 2009 at 9:51 AM, Andy Matthews amatth...@dealerskins.com
wrote:



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):

img id=statsImg src=stats.cfm?somevar=someval width=1 height=1 /

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

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: UI dialog resize (width height settings)

2009-05-21 Thread Richard D. Worth
Yup

$(#myDiv).dialog(option, { width: newXX, height: newYY });

- Richard

On Thu, May 21, 2009 at 11:46 AM, c.sokun chornso...@gmail.com wrote:


 cool! I will try that is it possible to call it in just one line?

 On May 18, 6:55 pm, Richard D. Worth rdwo...@gmail.com wrote:
  You can only call .dialog({ width: XX, height: YY }) once. That's an
 init.
  After that you can change the width and height by calling dialog's option
  method, specifying the option you want to change, and the new value:
 
  $(#myDiv).dialog(option, width, newXX);
  $(#myDiv).dailog(option, height, newYY);
 
  - Richard
 
  On Mon, May 18, 2009 at 4:34 AM, c.sokun chornso...@gmail.com wrote:
 
   I had problem when try to reuse div element with ui.dialog().
   If I set the width  height the first time it works; but if I call it
   from second function with different width  height it won't apply the
   new setting.
 
   Also if I manually resize the dialog when it appear after close and
   reopen it use the new size (resized manually) not the one I specified
   in the code.
 
   So my question is very simple is it possible to resize the dialog
   before it show up?



[jQuery] Re: select all a elements whose class attribute does not contain 'myclass'

2009-05-21 Thread aquaone
*= in attribute selectors is useful for when something contains a string. If
you explicitly want anchors with a named class, select by the class instead,
e.g. $(a.myclass). If you wanted anchors that did not have a specific
class, $(a:not(.myclass)). If you explicitly want all anchors where the
class attribute does not contain the string myclass (which sounds very odd)
you would use $(a:not([class*=myclass])).

I'd highly recommend spending some time reading the selectors page,
http://docs.jquery.com/Selectors.

aquaone


On Wed, May 20, 2009 at 17:06, jonathan topcod...@gmail.com wrote:


 $('a[class*=myclass]') selects all a elements whose class attribute
 contains 'myclass', how do I do the opposite?



[jQuery] Re: Using a selector recursively

2009-05-21 Thread aquaone
$(test) should be $(#test).

aquaone


On Wed, May 20, 2009 at 17:44, sean shaha...@gmail.com wrote:


 I have the following code:
 div id=test
  div class=ajaxApplyIgnore
   spana href=javascript:ajaxApplyAll(); class=Test1/a/
 span
  /div
  div
spana href=/Logout class=Logout/a/span
   /div
 /div


 script
 var obj = $('test'); // used specific div, as this is in a huge
 document
 obj.find('.ajaxApplyIgnore a').addClass('red');
 /script

 The js code above will not select the Test1 link, even though it is
 found within the div layer with the ajaxApplyIgnore class. It seems
 that the selector does not work recursively.

 Does anybody know how to make the script work recursively this?

 NOTE: I am using Safari 3.



[jQuery] Re: Question about jQuery's filter ability

2009-05-21 Thread aquaone
I know of two possibilities off the top of my head.
The first is a shameless plug for my own plugin still in development:
http://c3p0.reverse.net/~aquaone/tablefilter/http://c3p0.reverse.net/%7Eaquaone/tablefilter/.
Check it out and let me know if it would meet your requirements.
The second would be using the uiTableFilter
pluginhttp://gregweber.info/projects/uitablefilterwith some
wrapping.

aquaone



On Wed, May 20, 2009 at 13:29, brady brady.god...@gmail.com wrote:


 I developed a fairly straightforward product filtering tool using Spry
 and was curious if jQuery could do something similar and if so where I
 might find an example.

 The tool can be seen here:
 http://www.bradygodwin.com/test/rnatoold.html

 Thanks!



[jQuery] Re: Compatibility Issues

2009-05-21 Thread Karl Swedberg

Ken,

In the future, please try to avoid posting the same question to  
multiple google groups. Here is the answer I gave you on jquery-dev:


There were a number of changes between 1.1.4 and 1.2.x. Your best bet  
is to check the Release Notes, particularly these:

http://docs.jquery.com/Release:jQuery_1.2#Removed_Functionality

A few things to look for :
- XPath selectors.  Most of these were removed in 1.2. The XPath  
attribute selector was deprecated. Change them all to their CSS  
selector counterparts.

- .lt - removed. Use .slice() instead.
- .gt - removed. Use .slice() instead.
- A few of the ajax convenience methods. Check http://docs.jquery.com/Ajax 
 to see what's available now.



--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On May 20, 2009, at 9:53 AM, Ken wrote:



I have a client using 1.1.4.js and we are using 1.2.6.min.js. If the
client upgrades, will it break their 1.1.4.js code? Is there any way
to tell?

Thank you in advance,
Ken




[jQuery] Re: dom ready takes very long in IE 8

2009-05-21 Thread Karl Swedberg

In case it still isn't fast enough, you might want to give this a read:

http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-unstyled-content

--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On May 20, 2009, at 11:41 PM, Mech7 wrote:



Ah i found it's because the SWF Object 2.2 beta :-) changed to 2.1 and
works faster...

On May 21, 10:38 am, Mech7 chris.de@gmail.com wrote:

Ah I found out it's because SWFObject... does anybody know how a
solution to this?

On May 21, 10:28 am, Mech7 chris.de@gmail.com wrote:


I am hiding a login panel like:



$(document).ready(function() {
$(#login).css({marginTop: -105px});



});


But in IE 8 it takes very long to hide? I don't like to set it in  
CSS

because if javascript is turned off people can still login as it is
visible... is there anyway to make it faster ?




[jQuery] Re: Using a selector recursively

2009-05-21 Thread waseem sabjee
There was no need to use find()
$(function() {
});
would be required from jquery

(.myclass, obj) is select my class from within my object ( no need to use
.find() )

script
$(function() { // you need this
var obj = (#test); // object refference
$(.ajaxApplyIgnore , obj).addClass(red); // select the element in our
refference
}); // you need this
/script

On Thu, May 21, 2009 at 8:11 PM, aquaone aqua...@gmail.com wrote:

 $(test) should be $(#test).

 aquaone


 On Wed, May 20, 2009 at 17:44, sean shaha...@gmail.com wrote:


 I have the following code:
 div id=test
  div class=ajaxApplyIgnore
   spana href=javascript:ajaxApplyAll(); class=Test1/a/
 span
  /div
  div
spana href=/Logout class=Logout/a/span
   /div
 /div


 script
 var obj = $('test'); // used specific div, as this is in a huge
 document
 obj.find('.ajaxApplyIgnore a').addClass('red');
 /script

 The js code above will not select the Test1 link, even though it is
 found within the div layer with the ajaxApplyIgnore class. It seems
 that the selector does not work recursively.

 Does anybody know how to make the script work recursively this?

 NOTE: I am using Safari 3.





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

2009-05-21 Thread Andy Matthews
I did not see your response Michael...bummer. It might have changed our
approach. Regardless we've got the desired functionality in place already.
Thanks for your time.
 
 
andy


  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Michael Geary
Sent: Thursday, May 21, 2009 12:32 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: SOT: execute JS before a specific image loads


Hmm... This is weird... I posted a reply at 3PM yesterday and it doesn't
look like it made it onto the group. (You didn't see it, did you?) So here
goes again, with some additional notes this time...
 
The problem is really much easier than all this. There's no reason to use a
lazy load plugin, and no reason to even use jQuery.
 
Simply use a noscript tag for the non-JavaScript case, and a script tag
with document.write() for the JavaScript case:
 
noscript
img id=statsImg src=stats.cfm?somevar=someval width=1
height=1 /
/noscript
script type=text/javascript
document.write(
'img id=statsImg src=stats.cfm?somevar=someval',
/* your extra stuff here, e.g.: */ 'anothervar=anotherval',
' width=1 height=1 /'
);
/script
 
Or, you can use jQuery for the dynamic image if you like. But don't try to
modify the IMG from the noscript section - it won't exist. Instead, add
your own IMG element with jQuery instead of document.write.
 
-Mike


  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Andy Matthews
Sent: Thursday, May 21, 2009 7:08 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: SOT: execute JS before a specific image loads


John...
 
The original intent was to render an img tag to the page which would load in
a subset of my desired data, specifically that which can easily be gotten
via interpretation of the user agent string and other items. That subset
would get added to the src of the image as URL key/value pairs. Then, when
jQuery was available, I'd replace the src of the image tag with additional
information, which can only be gotten via JS (resolution, bandwidth, flash
player, etc).
 
In my testing I was never able to get this working. However, after doing
some googling, I found the lazy load plugin. Doesn't that do pretty much
what I'm looking for? Namely prevent the loading of an image until it's
scrolled into the visible window space?
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of John Crout
Sent: Wednesday, May 20, 2009 6:08 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: SOT: execute JS before a specific image loads


You won't be able to intercept the image before it is loaded but you can
block it from being rendered.  Remember that JavaScript relies on the DOM.
The DOM isn't fully-defined for the page, until all of it has loaded.  But
you can hide it by setting its visibilitiy to hidden, and keep the browser
from allocating real estate for it by setting display to block. (Default
is inline).

Looking at the code you included, I don't believe there is a statistic of
interest that you cannot collect when the page you've served, is requested.
(That is, the only info the browser will have that is new, it the location
of what it renders after receiving what the server sends.)  For example, the
location of everything won't be available to JavaScript until after what it
will render, has been rendered.  

By the way, I'm not pretending I know your business.  What I meant by stat
of interest is that whatever you collect, after delivering the image, that
you cannot collect when the request for the page is made, is something that
can be assumed as consistent, from request to request, even from the same
user.

Correct me if I'm incorrect about this (please).

--John Crout



On Wed, May 20, 2009 at 9:51 AM, Andy Matthews amatth...@dealerskins.com
wrote:



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):

img id=statsImg src=stats.cfm?somevar=someval width=1 height=1 /

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

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: Code Review: slideshow plugin using JSON

2009-05-21 Thread chris thatcher
nice work stefan, i checked out the example and will look under the covers
sometime tonight.  I'm actually at the library of congress (i work here) so
it was great to see those images from our prints and photographs division.

On Thu, May 21, 2009 at 12:01 PM, Stefan Hayden alt...@gmail.com wrote:


 I was looking for a jQuery slideshow that worked the way I wanted and
 didn't find one. I figured you can never have too many slideshow
 plugins so I've tried to make my first jQuery plugin and was hoping
 people with a bit more jQuery experience could look it over and give
 some suggestions before I go around telling people about it.

 This slideshow requires the first slide to be in the HTML and then it
 preloads the next image in the rotation just before showing it making
 the initial page load time faster. It also has previous/next and
 pagination interfaces and well as an option to show a animated
 caption.

 plugin homepage: http://stefanhayden.com/shermanstravel_slideshow/
 plugin source:
 http://stefanhayden.com/shermanstravel_slideshow/jquery.ShermansTravel_Slideshow.js

 any feedback would be welcome.


 Stefan Hayden





-- 
Christopher Thatcher


[jQuery] Re: Refresh SPAN without entire page

2009-05-21 Thread Liam Byrne


What do you mean refresh span ?

You can reset the content of a particular SPAN using 
$(spanReference).html(NEW CONTENT) or $(spanReference).text(NEW CONTENT)


But unless you've changed the content of the SPAN (using one of the 
above, in which case you already know it), what's there to refresh ?


L

bharani kumar wrote:

Hi All,

How to Refresh SPAN without page refresh ,

Can you tell name of the jquery function ,

--
?? ??
 ??

Regards
B.S.Bharanikumar

POST YOUR OPINION
http://bharanikumariyerphp.site88.net/bharanikumar/



No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.339 / Virus Database: 270.12.35/2124 - Release Date: 05/20/09 06:22:00


  




[jQuery] Re: Question about Click Function

2009-05-21 Thread Rudolpho

Ok - so far  i got it  to work. The reason why  the things  didnt
work  was  because the functions weren´t loaded on (document).ready.

One solved next problem comes...  i want it that way, once  next
button in row is activated the previous  shouldnt work any more until
the next one is deactivated.
tried it with unbind - that works  but  when i rebind the original
function it shows  some really  strange  behaviour like  working
only  on second click then flickering and  goes to desired state.

Can anyone give me please  a  hint  how  to proceed?
Is it possible to make  these  functions a little more  generic?

Thanks for help!


!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://
www.w3.org/TR/html4/loose.dtd

html
head

/head

body
script type=text/javascript src=jquery/jquery-1.3.2.js/script
script type=text/javascript
$(document).ready(function() {
$('#desperation input[type=image]').attr('disabled', true).fadeTo
(fast, 0.10);
$('#1').attr('disabled', false).fadeTo(fast, 0.40);

$(#1).toggle(
function () {
$(#2).attr(disabled, false).fadeTo(fast, 0.50);
$(#1).val(underdog).fadeTo(slow, 1.00);;
},
function () {
$(#2).attr(disabled, true).fadeTo(slow, 0.10);
$(#1).val().fadeTo(slow, 0.50);
}
);

$(#2).toggle(
  function () {
$(#3).attr(disabled, false).fadeTo(fast, 0.50);
$(#2).val(dump_guns).fadeTo(slow, 1.00);
  },
  function () {
$(#3).attr(disabled, true).fadeTo(slow, 0.10);
$(#2).val().fadeTo(slow, 0.50);
  }
);
$(#3).toggle(
  function () {
$(#4).attr(disabled, false).fadeTo(fast, 0.50);
$(#3).val(desperation_fire).fadeTo(slow, 1.00);
  },
  function () {
$(#4).attr(disabled, true).fadeTo(slow, 0.10);
$(#3).val().fadeTo(slow, 0.50);
  }
);
$(#4).toggle(
  function () {
$(#5).attr(disabled, false).fadeTo(fast, 0.50);
$(#4).val(rum_ration).fadeTo(slow, 1.00);
  },
  function () {
$(#5).attr(disabled, true).fadeTo(slow, 0.10);
$(#4).val().fadeTo(slow, 0.50);
  }
);
$(#5).toggle(
  function () {
$(#5).val(hasty_fire).fadeTo(slow, 1.00);
  },
  function () {
$(#5).val().fadeTo(slow, 0.50);
  }
);

});

/script

div id=skill
form action=javascript:void(null); method=post
enctype=application/x-www-form-urlencoded id=skillplanner
name=skillplanner 
fieldset id=desperationlegendFreetrader Skills: Desperation/
legend
input type=image src=files/icons/underdog.png id=1
name=underdog/input
input type=image src=files/icons/dump_guns.png id=2
name=dump_guns/input
input type=image src=files/icons/desperation_fire.png id=3
name=desperation_fire/input
input type=image src=files/icons/rum_ration.png id=4
name=rum_ration/input
input type=image src=files/icons/hasty_fire.png id=5
name=hasty_fire/input
/fieldset
/form
/div
/body
/html


[jQuery] Re: Code Review: slideshow plugin using JSON

2009-05-21 Thread Stefan Hayden

You have to love the public domain.

Thanks again and I look forward to your feedback.

Stefan

On May 21, 2:49 pm, chris thatcher thatcher.christop...@gmail.com
wrote:
 nice work stefan, i checked out the example and will look under the covers
 sometime tonight.  I'm actually at the library of congress (i work here) so
 it was great to see those images from our prints and photographs division.



 On Thu, May 21, 2009 at 12:01 PM, Stefan Hayden alt...@gmail.com wrote:

  I was looking for a jQuery slideshow that worked the way I wanted and
  didn't find one. I figured you can never have too many slideshow
  plugins so I've tried to make my first jQuery plugin and was hoping
  people with a bit more jQuery experience could look it over and give
  some suggestions before I go around telling people about it.

  This slideshow requires the first slide to be in the HTML and then it
  preloads the next image in the rotation just before showing it making
  the initial page load time faster. It also has previous/next and
  pagination interfaces and well as an option to show a animated
  caption.

  plugin homepage:http://stefanhayden.com/shermanstravel_slideshow/
  plugin source:
 http://stefanhayden.com/shermanstravel_slideshow/jquery.ShermansTrave...

  any feedback would be welcome.

  Stefan Hayden

 --
 Christopher Thatcher


[jQuery] jQuery, MooTools, and Prototype - A Comparison

2009-05-21 Thread kiusau

After a badly needed pause of some length, my need for sophisticated
JavaScript has reemerged.  During my departure I have discovered two
other similar JavaScript modules called MooTools and Prototype.  With
my reemergence I have also realized that all of these require a
certain amount of commitment that goes beyond what I initially
anticipated.  What I would like from you all is a convincing argument
to remain that is based on the following comparison:

1) What are the principal advantages of jQuery over Prototype and
MooTools?
2) What are the principal disadvantages of jQuery when compared with
Protoype and MooTools?

Roddy


[jQuery] Re: Question about Click Function

2009-05-21 Thread Rudolpho

ps:   strange behaviour can be seen live  here:

http://www.les-elites.org/index.php?article_id=126clang=0


[jQuery] jQuery.extend(deep) not working?

2009-05-21 Thread Adam Nelson

I'm trying out this need extension:

http://binarykitten.jkrswebsolutions.co.uk/2009/01/21/jquery-plugin-ajax-head-request/comment-page-1

which allows jQuery to do a HEAD request on an arbitrary URL in order
to grab header values for a given page.  Unfortunately, if that page
is the page the script is currently running from, it goes into an
infinite loop which results in:

[Exception... Component returned failure code: 0x80004001
(NS_ERROR_NOT_IMPLEMENTED) [nsIDOMLocation.host] nsresult:
0x80004001 (NS_ERROR_NOT_IMPLEMENTED) location: JS frame ::
http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js ::
anonymous :: line 12 data: no]
[Break on this error] (function(){var l=this,g,y=l.jQuery,p=l.each
(function(){o.dequeue(this,E)})}});

If I add deep to jQuery.extend(), I get deep is not defined.

Does anybody have any help for this?  Should the code be refactored to
not extend but to be a more simplistic?


[jQuery] Licensing

2009-05-21 Thread doddstr13

Are all jquery plugins available under GPL and MIT licenses?  My
company requries me to provide a URL which describes the licensing of
any open source code we use.  I have links to JQuery's licensing, but
I want to use ClueTip plugin and can't find any specific licensing
informaitno.


[jQuery] Re: animate padding start value - Firefox (getComputedStyle)

2009-05-21 Thread Liam Byrne


Maybe I'm wrong, but I think

myElement.animate( {padding: 12px} )

won't work anyway ? Shouldn't it be

myElement.animate( {padding: 12} )

That said, tests here show that only IE  Opera offer a smooth animation 
- the others (FF, Chrome  Safari) seem to jump


L

Jason Persampieri wrote:

(Firefox 3.0.10, OS X)

I am setting a padding value via a stylesheet and trying to animate it
-

- CSS
myElement { padding: 20px }

- Javascript
myElement.animate( {padding: 12px} )

When calculating the start padding value, jQuery calls
'getComputedStyle'.  Unfortunately,

computedStyle.padding = 
computedStyle.padding-top = 20px
computedStyle.padding-right = 20px
computedStyle.padding-bottom = 20px
computedStyle.padding-left = 20px

and the call to 'getPropertyValue' returns an empty string (which is
translated to 0px).

Would this be considered a jQuery or Firefox issue?



No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.339 / Virus Database: 270.12.36/2126 - Release Date: 05/21/09 06:22:00


  




[jQuery] Re: jQuery, MooTools, and Prototype - A Comparison

2009-05-21 Thread David Meiser
jQuery, prototype, and MooTools all provide very good to excellent FAQs and
documentation on their respective websites.

Barring that, why not just mock up some simple interface (say, something
with an accordion interface, making an AJAX call to a static HTML file to
replace some content) and try it on all three to see what you like.

If you can't bear that thought, just *choose* one.  None of my friends were
using jQuery when I started using it (now I've converted all of them), but I
read an article saying that it was going to be included in ASP.NET MVC and
VS 2010.  So, I gave it a shot, liked it, so I continue using it.  I have
friends that swear by YUI, and that's fine for them.  I have a friend that
would rather fall on his sword than stop using Scriptaculous.  But you don't
even have to go that far - jQuery has a compatibility mode, YUI uses it's
own namespace, etc, etc.  You don't have to choose *one* framework
(although, I'd recommend it).

On Thu, May 21, 2009 at 3:05 PM, kiusau kiu...@mac.com wrote:


 After a badly needed pause of some length, my need for sophisticated
 JavaScript has reemerged.  During my departure I have discovered two
 other similar JavaScript modules called MooTools and Prototype.  With
 my reemergence I have also realized that all of these require a
 certain amount of commitment that goes beyond what I initially
 anticipated.  What I would like from you all is a convincing argument
 to remain that is based on the following comparison:

 1) What are the principal advantages of jQuery over Prototype and
 MooTools?
 2) What are the principal disadvantages of jQuery when compared with
 Protoype and MooTools?

 Roddy


[jQuery] Re: loading message

2009-05-21 Thread Macsig

Hi guys, thanks for your replies.

I tried the binding but looks like it doesn't work but ajaxStart-
ajaxStop works just fine so I will go with it.


Have a nice day!


Sig


On May 20, 9:00 pm, gk gineshku...@gmail.com wrote:
 One way to do this is to use global events of jquery ajax, as below

 $(#ajaxLoading).bind(ajaxSend, function(){
                    $(this).show();
                  }).bind(ajaxComplete, function(){
                    $(this).hide();
                  });
 pls note this will show a loading message for all jquery ajax
 operations from your page, if you want to restrict only to a specific
 operaton you can bind this to current ajax call.
 ---
 div id='ajaxLoading'Loading../div
 ---
 #ajaxLoading{
         position: absolute;
         top:2px;
         left:95%;
         padding:5px;
         background-color: #CC;
         color:white;

 }
 macsig wrote:
  Hi guys,
  I'm working on a Rails app connected to a legacy database.
  Since the reading process from the database takes several seconds (up
  to ten) I would like to display a loading message while the page is
  loading.

  Can I achieve that using jQuery? If so how?

  Thanks and have a nice day.

  Sig


[jQuery] Re: Licensing

2009-05-21 Thread Richard D. Worth
On Thu, May 21, 2009 at 12:15 PM, doddstr13 doddst...@gmail.com wrote:


 Are all jquery plugins available under GPL and MIT licenses?


No. Each plugin author can choose their own license.


 My
 company requries me to provide a URL which describes the licensing of
 any open source code we use.  I have links to JQuery's licensing, but
 I want to use ClueTip plugin and can't find any specific licensing
 informaitno.


See

http://plugins.learningjquery.com/cluetip/jquery.cluetip.js
Lines 1-10:

/*
 * jQuery clueTip plugin
 * Version 1.0.1  (May 18, 2009)
 * @requires jQuery v1.2.6+
 *
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */

- Richard


[jQuery] Cut string from this position an onward...

2009-05-21 Thread SirShurf

I need to simupate AS/400 keybord work...

I need to be able to do when a key is pressed, to delete all text from
the position of the pointer (which means that if I am in the middle of
the word then cut the right part of it) and to move to the next input
field.

How can I do that?



[jQuery] [validate] multiple errorClass question

2009-05-21 Thread Ozten

To get the effect I want, I've had to patch the jquery  validate
library. Is there a simpler method instead?

Problem:
I want my error label element to have two classes, and for it's
distant parent to have a class, so I do some tweaking to the label
argument of the errorPlacement option.

When validation runs, it resets the classes on the label and adds the
1 error class. So I see a flash of what I want for a second.

Initial Solution:
jquery.validate.js line 600 (inside of showLabel)

- label.removeClass().addClass( this.settings.errorClass );
+ label.addClass( this.settings.errorClass );

Is there a better way? I'd rather not patch validate. Ideally a
callback after showLabel or something.

Great library BTW!


[jQuery] $.get() fetch a list of images

2009-05-21 Thread Fabdrol

Hi all!

I'm facing a problem, and it seems very unlogical that it doesn't
work.
I've written a function to switch some images on a clients website. It
takes images from an array, and displays them with some nice fades.

Now I'm trying to fetch these images using AJAX, initially from a text
file, later I'll fetch them from a php script which fetches them from
a database. The script outputs like this:

image1.png,image2.png,image3.jpg,image4.jpg,image5.png

in the script I use the following to split it into an array:

code

var splitted;
var path = 'uploads/slideshow/';

$.get('ajax.txt', function(data) {
splitted = data.split(',');
console.log(splitted); // outputs to firebug to check if GET
worked
});

var slide = $(elm).attr('slide');
var total = splitted.length;
var next = slide+1
var picture = splitted[next];

$(elm).fadeOut(1000, function() {
$(elm).attr('slide', next).css('background', 'url('+path+picture
+')');
$(elm).fadeIn(1000);
});

/code

but somehow, the $.get() part outputs nicely to the console, but after
that console gives an error that total splitted.length cannot be
determined because splitted is undefined! quite strange isn't it?

I tried to remove the console.log(), tried to define the img array
before $.get() and populate it inside the $.get().
Nothing works! What should I do, and more important, why does it
behave like this?

thanks,

Fabian


[jQuery] Change keyCode of triggered event...

2009-05-21 Thread SirShurf

Hi, all..

I need to change a keycode of triggered event...

What I need to do, is when a user pressing right + key on the numpud,
I need it to be TAB instead...

Since I cannt know when on the screen he will do it, I cannt use
itaration of elements... I cannt know what will be the next
element...

here is the code I tried, any help will be appriciated.:

Code:

  $(function() {
  $(form input).keydown(function (e) {
 if ((e.which  e.which == 13) || (e.keyCode  e.keyCode ==
13)) {
// alert('SUBMIT '+this.name) ;
 return false;
 } else if ((e.which  e.which == 107) || (e.keyCode 
e.keyCode == 107)) {
// alert('SUBMIT '+this.name) ;
 //$(form input).val('value').trigger( keypress, [9] );
 alert('Main:' + e.keyCode);
 e.keyCode=9;
 $(e.target).trigger(e);
// var objE = new jQuery.Event(keydown);
// objE.

// $(e.target).trigger({
//  type:keydown,
//  keyCode:9
//});

 return false;
 } else {
 alert('Error: '+e.keyCode);
 return true;
 }

 });


the 107 is the keyCode of the right + on the numpud, and 9 is TAB key.


[jQuery] Re: jQuery, MooTools, and Prototype - A Comparison

2009-05-21 Thread kiusau

On May 21, 12:23 pm, David Meiser dmei...@gmail.com wrote:
 If you can't bear that thought, just *choose* one.  None of my friends were
 using jQuery when I started using it (now I've converted all of them), but I
 read an article saying that it was going to be included in ASP.NET MVC and
 VS 2010.  So, I gave it a shot, liked it, so I continue using it.

I am not sure that it makes a difference, but I am a dedicated Mac
user.

One other important issue that I forgot to mention is that for the
moment I have no server-side capability, but will eventually move away
from my client-side only constraint.

Roddy


[jQuery] Re: jQuery, MooTools, and Prototype - A Comparison

2009-05-21 Thread Matt Kruse

All 3 frameworks have pros and cons. They have many technical
similarities and each come with their own set of problems. If you can
avoid using a framework, always do that. But if the pros of using a
framework outweigh the cons, I think the decision mostly comes down to
popularity.

Choose the framework that will have the most documentation, the
biggest user community, will be around the longest, will have the most
number of developers familiar with it, and can be seen as gaining in
popularity rather than declining.

If you look at Google Trends to compare the three:

http://www.google.com/trends?q=jquery+javascript%2Cmootools+javascript%2Cprototype+javascript

you'll see that MooTools and Prototype are steady or declining, while
jQuery has a dominant lead in popularity and is increasing rapidly.
Granted, this is only an analysis of searches, but it's a fair picture
of relative popularity of the different frameworks. There is always
some safety in choosing the market leader and if you are going in
blind with no desire to do an in-depth analysis of each option, then
choosing jQuery would probably be your safest best.

IMO,

Matt Kruse


On May 21, 2:05 pm, kiusau kiu...@mac.com wrote:
 After a badly needed pause of some length, my need for sophisticated
 JavaScript has reemerged.  During my departure I have discovered two
 other similar JavaScript modules called MooTools and Prototype.  With
 my reemergence I have also realized that all of these require a
 certain amount of commitment that goes beyond what I initially
 anticipated.  What I would like from you all is a convincing argument
 to remain that is based on the following comparison:

 1) What are the principal advantages of jQuery over Prototype and
 MooTools?
 2) What are the principal disadvantages of jQuery when compared with
 Protoype and MooTools?

 Roddy


[jQuery] Plugin Best practices?

2009-05-21 Thread Donkeybob

I use three or four jquery plugins for a site. What's the best
practice in loading all of these files and how much does it slow down
an app? Do you reference them from another file to keep the page code
clean? Just a couple of questions to find out about . . . .

Thanks,
Rich


[jQuery] Re: Using a selector recursively

2009-05-21 Thread aquaone
That works, yes, but it would create a new jQuery object, defeating much of
the purpose of him creating 'obj' in the first place (memory and processing
time of creating new jQuery object).

As an aside, many devs find it useful to prefix vars for jQuery objects with
$.
e.g. var $obj = $(#test);

aquaone


On Thu, May 21, 2009 at 11:26, waseem sabjee waseemsab...@gmail.com wrote:

 There was no need to use find()
 $(function() {
 });
 would be required from jquery

 (.myclass, obj) is select my class from within my object ( no need to use
 .find() )

 script
 $(function() { // you need this
 var obj = (#test); // object refference
 $(.ajaxApplyIgnore , obj).addClass(red); // select the element in our
 refference
 }); // you need this
 /script


 On Thu, May 21, 2009 at 8:11 PM, aquaone aqua...@gmail.com wrote:

 $(test) should be $(#test).

 aquaone


 On Wed, May 20, 2009 at 17:44, sean shaha...@gmail.com wrote:


 I have the following code:
 div id=test
  div class=ajaxApplyIgnore
   spana href=javascript:ajaxApplyAll(); class=Test1/a/
 span
  /div
  div
spana href=/Logout class=Logout/a/span
   /div
 /div


 script
 var obj = $('test'); // used specific div, as this is in a huge
 document
 obj.find('.ajaxApplyIgnore a').addClass('red');
 /script

 The js code above will not select the Test1 link, even though it is
 found within the div layer with the ajaxApplyIgnore class. It seems
 that the selector does not work recursively.

 Does anybody know how to make the script work recursively this?

 NOTE: I am using Safari 3.






[jQuery] Re: Plugin Best practices?

2009-05-21 Thread aquaone
http://developer.yahoo.com/performance/rules.html

^^ highly recommended reading.

aquaone


On Thu, May 21, 2009 at 13:10, Donkeybob rip...@gmail.com wrote:


 I use three or four jquery plugins for a site. What's the best
 practice in loading all of these files and how much does it slow down
 an app? Do you reference them from another file to keep the page code
 clean? Just a couple of questions to find out about . . . .

 Thanks,
 Rich


  1   2   >