[jQuery] Re: animate callback scope for infinite loop?

2009-06-12 Thread Waseem

I have been working on a different way...just fooling around actually.
This just a semi-failed experiment. don't take too seriously. kinda
new to js . just fooling around.

PROBLEMS

if i reset i to 0 most browsers will not allow my script to run

var obj = $(#obj);
var frames = 50;
var top = 0;
var left = 0;
loopanimate();
function loopanimate() {
for(var i = 0; i  frames; i++) {
top++;
left++;
obj.animate({ 
marginLeft:left+px, marginTop:top+px }, 10);
if(i == (frames - 1)) {

} else {

}

}
}

On Jun 11, 6:33 pm, Bill bill.fisher.oakl...@gmail.com wrote:
 Just adding some comments to make this thread more complete...

 One could also include all the callback code in an anonymous function
 within the arguments to the animate() function.  Like this:

 $(elementID).animate(
     {opacity:(this.opa),
      marginTop:top+'px',
      marginLeft:left+'px'
     },
     1000,
     'linear',
     function(){ //callback
         if(startStop == 1){
             _this.floatAround(); //loop
         }
     }
 );

 That would create a closure.  But as you can see above, you would
 still need to save the reference to the original context (_this) to
 be able to call the floatAround() function.

 This technique (and the technique of saving the reference to the
 original context suggested by mkmanning) is outlined in the book
 JQuery in Action by Bibeault and Katz on page 337.  Great book!

 On Jun 8, 12:07 pm, Bill bill.fisher.oakl...@gmail.com wrote:

  I get it now.  It's simply the normal scope rules.  this.callback()
  inherits the variables of all the functions above itself in the scope
  chain, so var _this can be seen, but this._this cannot -- that would
  reference the invocation context of the callback, which is the HTML
  element object.

  thanks again!

  On Jun 8, 11:58 am, Bill bill.fisher.oakl...@gmail.com wrote:

   Hi everyone,

   Thanks for your replies!

   I was about to reply to mkmanning and say that his solution would not
   work, but I tried it and it does!  wow!  thanks!

   Is this because floatAround(), being declared within function Animation
   (), is a closure?  So the callback still has access to the local
   variables within Animation?

   thanks again,
   Bill

   On Jun 7, 11:13 pm, mkmanning michaell...@gmail.com wrote:

The above post fails due to this:

obj.animate({ opacity:myOpacity}, 500);
animation();

The animation() function will be called immediately each time. It
should be in obj.animate's callback function. That being said, the OP
was asking how to do this without resorting to setTimeout().

To do that, in your Animation function just set a var to 'this':

 var Animation = function(elementID){
                var _this = this;
                this.opa = 1;
                this.floatAround = function(){
                ...

then refer to it in your callback:

if(startStop == 1){
      _this.floatAround(); //won't work, because this no longer
points
to the Animation object, but this is what I want to do.
                        }

On Jun 7, 10:02 pm, waseem sabjee waseemsab...@gmail.com wrote:

 var obj = $(div):
 // i want my objects opacity to go to 1 to 0.6 then follow that 
 pattern

 var animeframe = 0;
 var myOpacity;

 function animation() {
 setTimeout(function() {
 if(animeframe == 0) {
 myOpacity = 0.6;
 animeframe = 1;} else if(animeframe  == 1) {

 myOpacity = 1;
 animeframe  = 0;}

 obj.animate({ opacity:myOpacity}, 500);
 animation();

 }, 1000);
 }

 The Above  animation function has some code wrapped in a setTimeout
 recalling the function after x seconds
 I then access my variable to define to which frame the animation 
 should be
 on and what the properties are to set for that frame.
 i then do the animation and recall the function
 This will loop endlessly between frame one and two as the end can 
 never me
 achieved.

 On Mon, Jun 8, 2009 at 3:11 AM, Bill bill.fisher.oakl...@gmail.com 
 wrote:

  I think you may have misunderstood what I am trying to do.  I need 
  to
  refer to the instance 

[jQuery] Re: document.body is null or is not an object

2009-06-12 Thread Lideln

Up :)


On Jun 10, 6:40 pm, Lideln lid...@gmail.com wrote:
 Up !

 I really need some help... Am I the only one experiencing such a
 problem ?
 I can't use IE6 for now... It's really paralyzing me because I work in
 a professional environment.

 Thank you all for your help !

 On Jun 8, 12:18 pm, Lideln lid...@gmail.com wrote:

  Hi,

  Thank you for that long answer !

  The problem is that on my computer and that of my colleague where it
  bugs, we are automatically redirected to the login page. So it'll be
  hard to compare the two versions of HTML.

  I also tried to deactivate debugging in IE6 (the two checkboxes in the
  options), but nothing new...

  We are two developers, dev_A (me) and dev_B (the one who tests only
  with IE7, and where everything works), we have the same SVN up to date
  code.
  There are 2 colleagues who will test the issue : test_C and test_D.

  If it comes from an IE6 configuration error, why does it work for
  test_C when he points to the dev_B machine, and not when it points to
  the dev_A (my) machine ?

  If it comes from an apache configuration error, why does it work for
  test_D when he points to the dev_A (my) machine ?

  It's really disappointing... I decided ealier (as you advise me now)
  to move on, because I can't find a way to correct it, and as it seems
  to work for everyone when pointing to the dev_B machine, and because
  it only bugs on my machine, only sometimes, and only with IE6.

  On Jun 8, 11:45 am, kranthi kranthi...@gmail.com wrote:

   there is one more thing which i forgot to mention earlier...

   if i encounter an IE specific error the first thing i do is disable
   all debugging addons in IE, restore all the advanced options to
   default.

   open the source code in IE of your colleague(on whose computer it is
   working fine).
   open the source code in IE of your computer.
   compare that line by line (use tortoise merge or kdiff)

   if they dont match... probably u'll be able to find the error.
   if they do match .. that is a configuration prob in your IE(if this is
   the case i recommend you to forget the error and move on)

   and finally ..
   as far as i know both web developer console and firebug console show
   the same (javascript) errors as that of inbuilt firefox console. they
   only differ when ter is a page refresh. firebug console does not
   remember javascript errors of previous pages opened in that browser.
   while web developer console shows all javascript errors occoured
   till then.


[jQuery] cycle and jcarousel issues....

2009-06-12 Thread Youzernaim


Hi,

I have done a fair bit of searching and can't quite find anything that suits
my issue :(  I have been trying to make a gallery using the cycle plugin's
pager function within a jcarousel.  I have managed to get it working,
without too much of a problem, except that the images are pretty large,
which meant there was a flicker of the slides before the cycle started
working.  I tried to overcome this problem by absolutely placing the slides
which seems to have worked, but there is now a mad flicker of the images all
in place.

My thoughts on this are to try and preload the images for the slides, or at
least dynamically load them, but this obviously seriously hinders the
jcarousel part of the gallery, as all the thumbs (or pager elements) need to
be loaded at the start, hence my problem.

I have also tried preloading the images into the cache on the home page, in
the hope that this would speed up load time of the cycle, but to no avail. 
I am really really stuck and would be very grateful if anybody has any
ideas?!?  for reference the gallery is here...

http://www.rsbproperty.co.uk/gallery/

and my code

/**
 * assign functionality to the external controls
 */
function mycarousel_initCallback(carousel) {
jQuery('#mycarousel-next').bind('click', function() {
carousel.next();
return false;
});

jQuery('#mycarousel-prev').bind('click', function() {
carousel.prev();
return false;
});
};

// Ride the carousel...
jQuery(document).ready(function() {

 // homepage cycles 
$('#main_image').cycle({ 
fx:'fade', 
timeout:0, 
slideExpr: '.bigimg', 
pager:  '#gallery_pager', 
pagerAnchorBuilder: function(idx, slide) { 
  
return 'li #  '+slide.title+'  /li';  
} 

});

jQuery(#mycarousel).jcarousel({
scroll: 7,
initCallback: mycarousel_initCallback,
// This tells jCarousel NOT to autobuild prev/next buttons
buttonNextHTML: null,
buttonPrevHTML: null
});
});

Thank you very much in advance for any ideas!!

Cheers

Marc

-- 
View this message in context: 
http://www.nabble.com/cycle-and-jcarousel-issues-tp23965381s27240p23965381.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: using find method on a documentFragment attached node

2009-06-12 Thread amit

Thanks for the reply. I had given this a try but sadly it doesn't work
as expected. I did some research on documentFragments and found
following on http://ejohn.org/blog/dom-documentfragments/#comment-319149
(need to click Show Comments to reach this place) -

# Obvious, but sometimes overlooked: the fragment is self contained.
This means, the fragment doesn't have access to objects outside of it
(i.e. part of the main document). Thus, even if you have CSS classes
(class attribute) set in an element, it is not possible to query based
on properties set and/or modified by that CSS class. Basically the
classes set in the class attribute, if defined outside the fragment,
become just simple labels.

so this means searching elements inside the fragment is not supported.

Is there any work around available for this?

Thanks,
amit

On Jun 12, 5:36 am, Charlie charlie...@gmail.com wrote:
 var d=$('div.pointer').length;
 alert(d);
 amit wrote:Hi, I am writing an application that converts an ajax xml response 
 into html using client side xslt transformation. The transformation is 
 achieved using following snippet, which works fine - transform:function(xml){ 
 if (window.XSLTProcessor){ var xsltProcessor = new XSLTProcessor(); 
 xsltProcessor.importStylesheet(Xmer.xsldoc); var outputXHTML = 
 xsltProcessor.transformToFragment(Xmer.makeXml (xml), document); 
 document.getElementById('tree').appendChild(outputXHTML.cloneNode (true)); } 
 else if(window.ActiveXObject){ //Internet Explorer var d=Xmer.makeXml(xml); 
 var outputXHTML = (d).transformNode(Xmer.xsldoc); 
 document.getElementById('tree').innerHTML=outputXHTML; } } But problem is 
 encountered in FF when i try to process the inserted tags using jquery's find 
 method. I am trying to fetch all the divs with a specific class name that 
 were inserted by the above code using following - var 
 d=$document.find('div.pointer'); alert (d.length); but the above alert always 
 returns 0 length. The same code works fine in IE. I am using jquery 1.3.2. 
 I apologize if something along these lines has been discussed earlier and 
 would appreciate if someone guides me in this. Thanks, amit


[jQuery] remove one element in an array

2009-06-12 Thread fabrice.regnier

Hi all,

When i click once on a button, i create one picture on the fly. And so
on. It works ok.

Then, using livequery, when i click on one of the all created
pictures, i would like to see it removed. But it appears that only the
first pic is removed (since all have the same name).

What is my mistake ?

regards,

f.

JQUERY

$(#IdButton).click( function() {
  var pic=pimg id=\IdPicture\ name=\IdPicture[]\ src=\../
images/icone_ko_small.png\//p
  $(this).before(pic);
});

$(#IdPicture).livequery('click', function(event) {
$(this).remove();
});

HTML

input type=submit id=IdButton class=button


[jQuery] Re: remove one element in an array

2009-06-12 Thread Pierre Bellan
Hi,
An id must be unique on a page. In your code, every created image as the
same id maybe the problem is here but i'm not sure.

I think the first step is to replace id with a class and see if it works.

You can use the live event gestion if you use jquery  1.3 (
http://docs.jquery.com/Events/live )
Pierre

2009/6/12 fabrice.regnier fabrice.regn...@gmail.com


 Hi all,

 When i click once on a button, i create one picture on the fly. And so
 on. It works ok.

 Then, using livequery, when i click on one of the all created
 pictures, i would like to see it removed. But it appears that only the
 first pic is removed (since all have the same name).

 What is my mistake ?

 regards,

 f.

 JQUERY

 $(#IdButton).click( function() {
  var pic=pimg id=\IdPicture\ name=\IdPicture[]\ src=\../
 images/icone_ko_small.png\//p
  $(this).before(pic);
 });

 $(#IdPicture).livequery('click', function(event) {
$(this).remove();
 });

 HTML

 input type=submit id=IdButton class=button



[jQuery] Pagination

2009-06-12 Thread Lee Wilson

Hi all,

Does anyone know of any plugins for getting pagination setup with  
jQuery, I thought this would be perfect: 
http://plugins.jquery.com/project/pagination 
  but it only seems to display one item per page.

I have also tried an example from this book: 
http://www.packtpub.com/learning-jquery-1.3 
  but that seems to be aimed at tabular data, I am sure it can be  
modified for div's but as a newbie, it is quite difficult to do.

Appreciate any help

Thanks
lee


[jQuery] [HELP] DivMenu

2009-06-12 Thread Glazz

hi, i've a  function that when i click on a link a div shows up, and
it works nice, but when i click on the div itself the div closes up,
and other bug is, that if i have 2 or more divs if i click on one
link and click on other link the div's stays visible, how can i solve
this?

here is the code:

jQuery.fn.DivMenu = function(opcoes){
/**
 *
 **/
var variaveis = {
'display' : 'none',
'position': 'absolute',
'background'  : '#fff',
'border'  : '1px solid #cecece',
'font-family' : 'Verdana, Arial, Helvetica, sans-serif',
'font-size'   : '11px; padding: 5px; z-index: 99'
};
var opcoes = $.extend({}, variaveis, opcoes);
/**   end   **/

/**
 *
 **/
return this.each(function(){
/**
 *
 **/
var element = this;
var offset = $(element).offset();
var left = offset.left;
var top = offset.top;
var currentId = $(this).attr('id');
var divDados = currentId + '-dados';
/**   end   **/

/**
 *
 **/
$(element).click(function(){ $('#' + divDados).hide(); 
$(this).next
().show(); return false; });
$(document.body).click(function(){ $('#' + divDados).hide(); });
/**   end   **/

/**
 *
 **/
$('#' + divDados).css({
'left': left + 'px',
'top' : top + 15 + 'px',
'display' : opcoes['display'],
'position': opcoes['position'],
'background'  : opcoes['background'],
'border'  : opcoes['border'],
'font-family' : opcoes['font-family'],
'font-size'   : opcoes['font_size']
});
/**   end   **/
});
/**   end   **/
};


this is my first function so be nice to me ;)


[jQuery] [Validate] trigger validation by input:button

2009-06-12 Thread Matt

Hi,

I have been working on a big form and using jquery plug-in (wizard
form) to divide tit into small subforms. Now, I am trying to integrate
the Validation plugin to deal with the validation and come up with an
issue.

I run validation on subforms which contains two buttons(back, next).
Those 2 buttons are input:button type but not input:submit. I realise
the Validation plug-in would trigger the validation on submit event.
Is there any way I can modify the code so that it could handle my
requirement?

Having a look on the multipart demo which is the exact scenario I am
dealing with. However, the page below is not working. I tried on both
IE and FF.

http://jquery.bassistance.de/validate/demo/multipart/

Please advise.

Cheers,
Matt


[jQuery] create a floating Superfish menu

2009-06-12 Thread Yuri Timofeev

Hi

I am newbie in jQuery.
I use Superfish menu basic style in my small FOSS project.

Question: How can I make a horizontal Superfish menu, floating, like
is
http://net.tutsplus.com/tutorials/html-css-techniques/creating-a-floating-html-menu-using-jquery-and-css/
?


[jQuery] Re: jQuery, ajax, json, php

2009-06-12 Thread Anish

What you get while trying $json['name'] ??

Why don't you try getJSON instead of calling usual ajax call ??

Regards,

Anish**

On Jun 11, 4:40 pm, David .Wu chan1...@gmail.com wrote:
 If I send a json format to php, how to get the value from php? for
 example

 front page
 script
 var jsonStr = '{name: David, age, 23}';
 $.ajax({
         url: 'json.php',
         type: 'POST',
         cache: false,
         data: {json: jsonStr},
         success: function(data) {
                 alert(data);
         }});

 /script

 php page
 ?php
 $json = $_POST['json'];

 // it's get {name:David,age: 23}, but how to gete name?
 ?


[jQuery] how to make a function with JQuery

2009-06-12 Thread marcelsnews

Hello every one,

I'm a new user of JQuery and i'm trying to use it on a web site that
i'm building. Keep in mind that i'm also new on the web.

So i wanted to know:
-  How to define a function with JQuery.
-  Does it works similary like woring with Javascript and DOM ?
- Shall my function, if allowed, be defined in the $(document).ready
() ... ?

thank


[jQuery] [HELP] DivMenu

2009-06-12 Thread Glazz

hi, i've a  function that when i click on a link a div shows up, and
it works nice, but when i click on the div itself the div closes up,
and other bug is, that if i have 2 or more divs if i click on one
link and click on other link the div's stays visible, how can i solve
this?

here is the code:

jQuery.fn.DivMenu = function(opcoes){
/**
 *
 **/
var variaveis = {
'display' : 'none',
'position': 'absolute',
'background'  : '#fff',
'border'  : '1px solid #cecece',
'font-family' : 'Verdana, Arial, Helvetica, sans-serif',
'font-size'   : '11px; padding: 5px; z-index: 99'
};
var opcoes = $.extend({}, variaveis, opcoes);
/**   end   **/

/**
 *
 **/
return this.each(function(){
/**
 *
 **/
var element = this;
var offset = $(element).offset();
var left = offset.left;
var top = offset.top;
var currentId = $(this).attr('id');
var divDados = currentId + '-dados';
/**   end   **/

/**
 *
 **/
$(element).click(function(){ $('#' + divDados).hide(); 
$(this).next
().show(); return false; });
$(document.


[jQuery] Re: jQuery, ajax, json, php

2009-06-12 Thread David .Wu

Actually I want need server side doing work, and I don't know how php
get json, nothing to do with client side.

On 6月12日, 下午4時55分, Anish cani...@gmail.com wrote:
 What you get while trying $json['name'] ??

 Why don't you try getJSON instead of calling usual ajax call ??

 Regards,

 Anish**

 On Jun 11, 4:40 pm, David .Wu chan1...@gmail.com wrote:

  If I send a json format to php, how to get the value from php? for
  example

  front page
  script
  var jsonStr = '{name: David, age, 23}';
  $.ajax({
  url: 'json.php',
  type: 'POST',
  cache: false,
  data: {json: jsonStr},
  success: function(data) {
  alert(data);
  }});

  /script

  php page
  ?php
  $json = $_POST['json'];

  // it's get {name:David,age: 23}, but how to gete name?
  ?


[jQuery] textarea chars counter

2009-06-12 Thread dreame4

Hi,

I need to count characters in textarea so I wrote sth like this:

$input.keyup(function() {
var new_length = $(this).val().length;
$word_counter.text(new_length);
if(new_length = min  new_length = max) {
$word_counter.addClass('git');
} else {
$word_counter.removeClass('git');
}
});

But id doesn't work when I click the right mouse button on it and
choose Paste. Counter is not updated.

Can anyone help?

Thanks,
Adam


[jQuery] Re: remove one element in an array

2009-06-12 Thread fabrice.regnier

hi ;)

 An id must be unique on a page. In your code, every created image as the
 same id maybe the problem is here but i'm not sure.
Yes, i guess, this is the problem.

 I think the first step is to replace id with a class and see if it works.
Can you give some exemple ?

The probleme is: i want to remove, let's say, the 4th image, by
clicking on it. I don't see where class can help me. I surely must use
some kind of array but in which way ?

regards,

f.


 You can use the live event gestion if you use jquery  1.3 
 (http://docs.jquery.com/Events/live)
 Pierre

 2009/6/12 fabrice.regnier fabrice.regn...@gmail.com



  Hi all,

  When i click once on a button, i create one picture on the fly. And so
  on. It works ok.

  Then, using livequery, when i click on one of the all created
  pictures, i would like to see it removed. But it appears that only the
  first pic is removed (since all have the same name).

  What is my mistake ?

  regards,

  f.

  JQUERY

  $(#IdButton).click( function() {
   var pic=pimg id=\IdPicture\ name=\IdPicture[]\ src=\../
  images/icone_ko_small.png\//p
   $(this).before(pic);
  });

  $(#IdPicture).livequery('click', function(event) {
     $(this).remove();
  });

  HTML

  input type=submit id=IdButton class=button


[jQuery] Re: create a floating Superfish menu

2009-06-12 Thread Charlie





give ul.sf-menu an absolute position with css and apply the floating
script to ul.sf-menu instead of the div container in example
everything else in menu css and script remains the same

I believe dimensions.js is deprecated in current jquery.js and is now
built into core


Yuri Timofeev wrote:

  Hi

I am newbie in jQuery.
I use Superfish menu basic style in my small FOSS project.

Question: How can I make a horizontal Superfish menu, floating, like
is
http://net.tutsplus.com/tutorials/html-css-techniques/creating-a-floating-html-menu-using-jquery-and-css/
?

  






[jQuery] Re: Plugins/Validation/validate is there a way to add css class to wrapper option?

2009-06-12 Thread Jörn Zaefferer

wrapper: li class='error' would work in one place (where the wrapper
is created), but not in another, where the same option is used as a
selector.

Could you file an issue for thise?
http://plugins.jquery.com/node/add/project-issue/validate

Jörn

On Fri, Jun 12, 2009 at 7:51 AM, Gauthier Segaygauthier.se...@gmail.com wrote:

 I would like to wrap validation messages in li class=error/ with
 validate plugin

 is there any event or option I can handle to tweak the element before
 it is appended?

 I'm unsure if something like that would look ok:

 $('form').validate({wrapper:li.error});

 or either

 $('form').validate({wrapper:li class='error'/});

 Any work around is welcome.

 Best regards


[jQuery] Re: remove one element in an array

2009-06-12 Thread fabrice.regnier

 Can you give some exemple ?
$(#IdButton).click( function() {
  var pic=pimg id=\IdPicture\ name=\IdPicture[]\
class=whatever src=\../
images/icone_ko_small.png\//p
  $(this).before(pic);
});

$(img.whatever).livequery('click', function(event) {
  $(this).remove();
});

regards,

f.


 The probleme is: i want to remove, let's say, the 4th image, by
 clicking on it. I don't see where class can help me. I surely must use
 some kind of array but in which way ?

 regards,

 f.

  You can use the live event gestion if you use jquery  1.3 
  (http://docs.jquery.com/Events/live)
  Pierre

  2009/6/12 fabrice.regnier fabrice.regn...@gmail.com

   Hi all,

   When i click once on a button, i create one picture on the fly. And so
   on. It works ok.

   Then, using livequery, when i click on one of the all created
   pictures, i would like to see it removed. But it appears that only the
   first pic is removed (since all have the same name).

   What is my mistake ?

   regards,

   f.

   JQUERY

   $(#IdButton).click( function() {
    var pic=pimg id=\IdPicture\ name=\IdPicture[]\ src=\../
   images/icone_ko_small.png\//p
    $(this).before(pic);
   });

   $(#IdPicture).livequery('click', function(event) {
      $(this).remove();
   });

   HTML

   input type=submit id=IdButton class=button


[jQuery] Re: remove one element in an array

2009-06-12 Thread Charlie





changing to class will do what you need

here's an example using live() instead of livequery since it is built
into jquery now and works for click function you are using

I just changed to a UL instead of images
http://jsbin.com/ewutu


fabrice.regnier wrote:

  hi ;)

  
  
An id must be unique on a page. In your code, every created image as the
same id maybe the problem is here but i'm not sure.

  
  Yes, i guess, this is the problem.

  
  
I think the first step is to replace id with a class and see if it works.

  
  Can you give some exemple ?

The probleme is: i want to remove, let's say, the 4th image, by
clicking on it. I don't see where class can help me. I surely must use
some kind of array but in which way ?

regards,

f.


  
  
You can use the live event gestion if you use jquery  1.3 (http://docs.jquery.com/Events/live)
Pierre

2009/6/12 fabrice.regnier fabrice.regn...@gmail.com





  Hi all,
  


  When i click once on a button, i create one picture on the fly. And so
on. It works ok.
  


  Then, using livequery, when i click on one of the all created
pictures, i would like to see it removed. But it appears that only the
first pic is removed (since all have the same name).
  


  What is my mistake ?
  


  regards,
  


  f.
  


  JQUERY
  


  $("#IdButton").click( function() {
var pic="pimg id=\"IdPicture\" name=\"IdPicture[]\" src=""
images/icone_ko_small.png\"//p"
$(this).before(pic);
});
  


  $("#IdPicture").livequery('click', function(event) {
 $(this).remove();
});
  


  HTML
  


  input type="submit" id="IdButton" class="button"
  

  
  
  






[jQuery] Re: Jquery Widgets !!

2009-06-12 Thread Charlie





look on jquery UI main page, there's a developers guide for widgets and
tutorial

Amit wrote:
Hi Group, 
  
I just wanted to
knew if we can create widgets using jquery , if yes, how??
  
 
  
  
  -- 


  
  
  Regards, 
  Amit Kr. Sharma
  Mobile: 09780141161
  
  
  
  






[jQuery] Re: textarea chars counter

2009-06-12 Thread dreame4

Thanks for your accurate remark.

I came up with adding some event but I don't know which. Focus doesn't
work as I want to. It doesn't update counter immediately after pasting
text. Until after leaving input. Just as focus event works.

Some other ideas?

On 12 Cze, 14:35, MorningZ morni...@gmail.com wrote:
 But id doesn't work when I click the right mouse button on it and
 choose Paste

 And this should be easy as cake to understand:

 Copy and Paste will *not* fire the keyup event which your code is
 requiring

 You'll need to wire that event to more events to make it work with
 CP  (focus would come to mind)

 On Jun 12, 7:40 am, dreame4 91drea...@gmail.com wrote:

  Hi,

  I need to count characters in textarea so I wrote sth like this:

  $input.keyup(function() {
          var new_length = $(this).val().length;
          $word_counter.text(new_length);
          if(new_length = min  new_length = max) {
                  $word_counter.addClass('git');
          } else {
                  $word_counter.removeClass('git');
          }

  });

  But id doesn't work when I click the right mouse button on it and
  choose Paste. Counter is not updated.

  Can anyone help?

  Thanks,
  Adam


[jQuery] Re: how to make a function with JQuery

2009-06-12 Thread MorningZ

jQuery *function*?

Do you mean jQuery plugin?

http://www.learningjquery.com/2007/10/a-plugin-development-pattern


On Jun 11, 10:54 pm, marcelsnews marcelsn...@gmail.com wrote:
 Hello every one,

 I'm a new user of JQuery and i'm trying to use it on a web site that
 i'm building. Keep in mind that i'm also new on the web.

 So i wanted to know:
 -  How to define a function with JQuery.
 -  Does it works similary like woring with Javascript and DOM ?
 - Shall my function, if allowed, be defined in the $(document).ready
 () ... ?

 thank


[jQuery] Re: textarea chars counter

2009-06-12 Thread MorningZ

But id doesn't work when I click the right mouse button on it and
choose Paste

And this should be easy as cake to understand:

Copy and Paste will *not* fire the keyup event which your code is
requiring

You'll need to wire that event to more events to make it work with
CP  (focus would come to mind)



On Jun 12, 7:40 am, dreame4 91drea...@gmail.com wrote:
 Hi,

 I need to count characters in textarea so I wrote sth like this:

 $input.keyup(function() {
         var new_length = $(this).val().length;
         $word_counter.text(new_length);
         if(new_length = min  new_length = max) {
                 $word_counter.addClass('git');
         } else {
                 $word_counter.removeClass('git');
         }

 });

 But id doesn't work when I click the right mouse button on it and
 choose Paste. Counter is not updated.

 Can anyone help?

 Thanks,
 Adam


[jQuery] Re: how to make a function with JQuery

2009-06-12 Thread Michael Lawson

It almost sounds to me like you're confused on what jQuery actually is?  
Does it works similary like woring with Javascript and DOM ? in your email

jQuery is a code library for use by javascript code.  It provides easy
access to the DOM and tons of other convenient features for you, so that
you don't have to implement them yourself in javascript.

In javascript, you would define a function as follows

function foo()
{
//code here
}

or, several jQuery functions can take anonymous functions as input.  For
example
jQuery.get(http://www.my-great-site.com,function(xml){
//code here can use the xml returned by the http get
}

does that help at all?

Here is a reference on creating javascript functions:
http://www.w3schools.com/js/js_functions.asp


cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone:  1-276-206-8393
E-mail:  mjlaw...@us.ibm.com

'Examine my teachings critically, as a gold assayer would test gold. If you
find they make sense, conform to your experience, and don't harm yourself
or others, only then should you accept them.'


   
  From:   MorningZ morni...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   06/12/2009 09:00 AM  
   
  Subject:[jQuery] Re: how to make a function with JQuery  
   






jQuery *function*?

Do you mean jQuery plugin?

http://www.learningjquery.com/2007/10/a-plugin-development-pattern


On Jun 11, 10:54 pm, marcelsnews marcelsn...@gmail.com wrote:
 Hello every one,

 I'm a new user of JQuery and i'm trying to use it on a web site that
 i'm building. Keep in mind that i'm also new on the web.

 So i wanted to know:
 -  How to define a function with JQuery.
 -  Does it works similary like woring with Javascript and DOM ?
 - Shall my function, if allowed, be defined in the $(document).ready
 () ... ?

 thank

inline: graycol.gifinline: ecblank.gif

[jQuery] Using jQuery with Prototype by using jQuery noConflict

2009-06-12 Thread Terry

Hi all. I am new to jquery and prototype and have the need to use
both. I am currently trying to use the jquery Cycle with Lightbox that
needs prototype and the two are conflicting. I have been told that I
will need to use the jquery no conflict, but I simply can't get it to
work. I just don't understand enough about it, but not from the lack
of trying. I just don't know what code to paste where in the html. I
am using dreamweaver on a mac.

Any help would be greatly appreciated. I am stuck at the moment.



[jQuery] Re: Using jQuery with Prototype by using jQuery noConflict

2009-06-12 Thread Terry

Sorry, I meant to say Lightview and not lightbox.

On Jun 12, 8:27 am, Terry te...@baileygraphicdesign.com wrote:
 Hi all. I am new to jquery and prototype and have the need to use
 both. I am currently trying to use the jquery Cycle with Lightbox that
 needs prototype and the two are conflicting. I have been told that I
 will need to use the jquery no conflict, but I simply can't get it to
 work. I just don't understand enough about it, but not from the lack
 of trying. I just don't know what code to paste where in the html. I
 am using dreamweaver on a mac.

 Any help would be greatly appreciated. I am stuck at the moment.


[jQuery] Re: BlockUI not always firing

2009-06-12 Thread Shadraq

Donny

That did the trick!

-Shadraq


[jQuery] Re: Regular Expressions and jQuery

2009-06-12 Thread MorningZ

$('input[name=piResults]').fieldValue()

.fieldValue() ?

Why aren't you just using .val() ?


On Jun 12, 9:16 am, John jmcl...@birchrunsoccer.org wrote:
 Hello all,
 I have some experience in Regular Expressions but this one has me
 pulling my hair out.

 I have a form with several input fields including a phone number
 field.  I have a submit button that is linked to jquery form plugin.
 My validation is checked on beforeSubmit. ( i.e. beforeSubmit:
 validateForm )
 I've used validateForm() for other simple validation via javascript.
 This time I'm using jQuery Form which shouldn't be and isn't a
 problem.   My issue is in the validation of phone number.

 Within validateForm is this...

 function validateForm(formData, jqForm, options) {

          var queryString = $.param(formData);
          alert(queryString);

         // VALIDATE ENTIRE FORM
                 //phone
                 if (validate_phone($('input[name=piResults]').fieldValue(), 
 Please
 enter a valid phone number.) == false){
                         phoneNum.focus();
                         return false;
                 }

 }

 // VALIDATE PHONE NUMBER
 function validate_phone(value,alerttxt){

         var re = /^\(\d{3}\)\d{3}-\d{4}$/;

         if( value.match(/^\(\d{3}\)\d{3}-\d{4}$/) ){
                 return false;
         }
         else{
                 return true;
         }

 }

 When validate_phone is called, the parameter value is correct. The
 problem is the match is not checked.
 Is there another way?

 Thanks for any help.

 J Mcleod


[jQuery] Regular Expressions and jQuery

2009-06-12 Thread John

Hello all,
I have some experience in Regular Expressions but this one has me
pulling my hair out.

I have a form with several input fields including a phone number
field.  I have a submit button that is linked to jquery form plugin.
My validation is checked on beforeSubmit. ( i.e. beforeSubmit:
validateForm )
I've used validateForm() for other simple validation via javascript.
This time I'm using jQuery Form which shouldn't be and isn't a
problem.   My issue is in the validation of phone number.

Within validateForm is this...

function validateForm(formData, jqForm, options) {

 var queryString = $.param(formData);
 alert(queryString);

// VALIDATE ENTIRE FORM
//phone
if (validate_phone($('input[name=piResults]').fieldValue(), 
Please
enter a valid phone number.) == false){
phoneNum.focus();
return false;
}
}

// VALIDATE PHONE NUMBER
function validate_phone(value,alerttxt){

var re = /^\(\d{3}\)\d{3}-\d{4}$/;

if( value.match(/^\(\d{3}\)\d{3}-\d{4}$/) ){
return false;
}
else{
return true;
}
}

When validate_phone is called, the parameter value is correct. The
problem is the match is not checked.
Is there another way?

Thanks for any help.

J Mcleod


[jQuery] AIR plugin for jQuery?

2009-06-12 Thread Andy Matthews
Does anyone know of a plugin for jQuery that encapsulates some, or all, of
the AIR API?


andy


[jQuery] Re: Regular Expressions and jQuery

2009-06-12 Thread John

Thanks for the reply.

'fieldValue' is used in the jquery form plugin.  When I use '.val()'
for example: $('input[name=piResults]').val()  I get nothing.


On Jun 12, 9:33 am, MorningZ morni...@gmail.com wrote:
 $('input[name=piResults]').fieldValue()

 .fieldValue() ?

 Why aren't you just using .val() ?

 On Jun 12, 9:16 am, John jmcl...@birchrunsoccer.org wrote:

  Hello all,
  I have some experience in Regular Expressions but this one has me
  pulling my hair out.

  I have a form with several input fields including a phone number
  field.  I have a submit button that is linked to jquery form plugin.
  My validation is checked on beforeSubmit. ( i.e. beforeSubmit:
  validateForm )
  I've used validateForm() for other simple validation via javascript.
  This time I'm using jQuery Form which shouldn't be and isn't a
  problem.   My issue is in the validation of phone number.

  Within validateForm is this...

  function validateForm(formData, jqForm, options) {

           var queryString = $.param(formData);
           alert(queryString);

          // VALIDATE ENTIRE FORM
                  //phone
                  if (validate_phone($('input[name=piResults]').fieldValue(), 
  Please
  enter a valid phone number.) == false){
                          phoneNum.focus();
                          return false;
                  }

  }

  // VALIDATE PHONE NUMBER
  function validate_phone(value,alerttxt){

          var re = /^\(\d{3}\)\d{3}-\d{4}$/;

          if( value.match(/^\(\d{3}\)\d{3}-\d{4}$/) ){
                  return false;
          }
          else{
                  return true;
          }

  }

  When validate_phone is called, the parameter value is correct. The
  problem is the match is not checked.
  Is there another way?

  Thanks for any help.

  J Mcleod


[jQuery] Re: Calling C#-function in the validator

2009-06-12 Thread Ivar Kunst


Ola,

Thanks for you reply, but im still not there:

My validator:

script type=text/javascript
  $(document).ready(function(){
var validator = $(#form_user).validate({
onkeyup:false,
onblur:false,
onclick:false,
errorClass: invalid,
errorLabelContainer: $(#errorBox),
wrapper: p,
rules: {
m_username: { required: true},
m_passw: {required: true},
},
messages: {
m_username: Please fill in your username,
m_passw: Please fill in your passw.
   }
});
  });
/script

And i have this funtion in the underlying aspx.cs file:

public boolean somefunction()
{
  //do a lot of stuff
  if(everythingIsOk)
  {
return true;
  }
  return false;
}


Is there a possibility that i can use the function in the aspx.cs file in
the validator?

Thanks


waseem sabjee wrote:
 
 your web service
 
 mymethod.asmx.cs
 [webmethod]
 
 public string[] getData() {
 
 // note i used a dataset
 EventsTableAdapters.EventsTableAdapter ta = new
 EventsTableAdapters.EventsTableAdapter();
 Events.EventsDataTable dt new Events.EventsDataTable();
 // C# string list
 Liststring result as new Liststring();
 
 // load data into data table from dataset
 dt = ta.GetData();
 
 // foreach row in table
 foreach(System.Data.Datarow row in dt.Rows) {
 // add each row as its own list item
 result.Add(row[event_title].ToString());
 
 }
 // return as array
 return results.ToArray();
 
 }
 
 default.aspx
 
 script type=text/javascript
  // yes you can integrate asp.net tags within script tags however you will
 not get intelisense
 
 // basically i said if the checkbox is checked get and alert the data from
 the web service.
 
 $(function() {
 % if(CheckBox1.Checked) { %
 
 $.ajax({
 url:mymethod.asmx/Getdata,
 success: function(data) {
 alert(data);
 }
 });
 
 
 % } %
 });
 
 /script
 
 On Fri, Jun 5, 2009 at 6:31 PM, Ivar Kunst iacku...@gmail.com wrote:
 


 Hello all,

 I'm quite new to Jquery, so I need some sort of advice.

 I'm working on a webbased application with a webservice. First it was a
 simple html site, but later I started using Jquery. Data is inserted in
 some
 forms, this I can easily validate through the validator. Now after all
 the
 data is ok, it's send to the webservice through the C#-code. Some
 calculations are being made with the data and a dataset is returned. Now
 some errors can occur while doing the calculations. I can't get some
 manual
 error in the errorbox of the validator.

 Is it possible to let the validator run some c#-function so I can see if
 the
 data is correct? Or can I set a unvisible checkbox to true/false through
 the
 c#-code so the validator check this box? A problem with both is, that the
 validator runs when I click on the Next-button. After the validaton,
 the
 function starts, so if I set the checkbox to false, the validator won't
 even
 notice.

 Anyone knows a handy approach for this?

 Grt,
 Ivar
 --
 View this message in context:
 http://www.nabble.com/Calling-C--function-in-the-validator-tp23891455s27240p23891455.html
 Sent from the jQuery General Discussion mailing list archive at
 Nabble.com.


 
 

-- 
View this message in context: 
http://www.nabble.com/Calling-C--function-in-the-validator-tp23891455s27240p23998567.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Regular Expressions and jQuery

2009-06-12 Thread Michael Lawson
Maybe I'm reading this wrong, but the regular expression you are using
looks like it returns a match on valid phone numbers?  If that is the case
why not
return true when it matches, false when it doesn't.  Ir just put a ! in
front of the match function

cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone:  1-276-206-8393
E-mail:  mjlaw...@us.ibm.com

'Examine my teachings critically, as a gold assayer would test gold. If you
find they make sense, conform to your experience, and don't harm yourself
or others, only then should you accept them.'



 
  From:   John jmcl...@birchrunsoccer.org 
 

 
  To: jQuery (English) jquery-en@googlegroups.com   
 

 
  Date:   06/12/2009 09:38 AM   
 

 
  Subject:[jQuery] Regular Expressions and jQuery   
 

 






Hello all,
I have some experience in Regular Expressions but this one has me
pulling my hair out.

I have a form with several input fields including a phone number
field.  I have a submit button that is linked to jquery form plugin.
My validation is checked on beforeSubmit. ( i.e. beforeSubmit:
validateForm )
I've used validateForm() for other simple validation via javascript.
This time I'm using jQuery Form which shouldn't be and isn't a
problem.   My issue is in the validation of phone number.

Within validateForm is this...

function validateForm(formData, jqForm, options) {

  var queryString = $.param(formData);
  alert(queryString);

 // VALIDATE ENTIRE FORM
 //phone
 if (validate_phone($('input
[name=piResults]').fieldValue(), Please
enter a valid phone number.) == false){
 phoneNum.focus();
 return false;
 }
}

// VALIDATE PHONE NUMBER
function validate_phone(value,alerttxt){

 var re = /^\(\d{3}\)\d{3}-\d{4}$/;

 if( value.match(/^\(\d{3}\)\d{3}-\d{4}$/) ){
 return false;
 }
 else{
 return true;
 }
}

When validate_phone is called, the parameter value is correct. The
problem is the match is not checked.
Is there another way?

Thanks for any help.

J Mcleod

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: remove one element in an array

2009-06-12 Thread fabrice.regnier

thank you Pierre and Charlie, this is exactely what i'm looking for ;)

regards,

f.


[jQuery] Re: Regular Expressions and jQuery

2009-06-12 Thread John

Good call.

Here are my changes.

function validate_phone(value,alerttxt){

var re = /^\(\d{3}\)\d{3}-\d{4}$/;
alert(re);

if( $('input[name=unitContactPhoneNumber]').fieldValue().match(/^\(\d
{3}\)\d{3}-\d{4}$/) ){
alert('match');
return true;
}
else{
alert(alerttxt);
return false;
}
}

But when I check, the alert(re) fires but the other 'alerts' do not.
It's like the .match() is not called.

John


On Jun 12, 9:48 am, Michael Lawson mjlaw...@us.ibm.com wrote:
 Maybe I'm reading this wrong, but the regular expression you are using
 looks like it returns a match on valid phone numbers?  If that is the case
 why not
 return true when it matches, false when it doesn't.  Ir just put a ! in
 front of the match function

 cheers

 Michael Lawson
 Development Lead, Global Solutions, ibm.com
 Phone:  1-276-206-8393
 E-mail:  mjlaw...@us.ibm.com

 'Examine my teachings critically, as a gold assayer would test gold. If you
 find they make sense, conform to your experience, and don't harm yourself
 or others, only then should you accept them.'

   From:       John jmcl...@birchrunsoccer.org                               
                                                    

   To:         jQuery (English) jquery-en@googlegroups.com                 
                                                    

   Date:       06/12/2009 09:38 AM                                             
                                                    

   Subject:    [jQuery] Regular Expressions and jQuery                         
                                                    

 Hello all,
 I have some experience in Regular Expressions but this one has me
 pulling my hair out.

 I have a form with several input fields including a phone number
 field.  I have a submit button that is linked to jquery form plugin.
 My validation is checked on beforeSubmit. ( i.e. beforeSubmit:
 validateForm )
 I've used validateForm() for other simple validation via javascript.
 This time I'm using jQuery Form which shouldn't be and isn't a
 problem.   My issue is in the validation of phone number.

 Within validateForm is this...

 function validateForm(formData, jqForm, options) {

               var queryString = $.param(formData);
               alert(queryString);

              // VALIDATE ENTIRE FORM
                          //phone
                          if (validate_phone($('input
 [name=piResults]').fieldValue(), Please
 enter a valid phone number.) == false){
                                      phoneNum.focus();
                                      return false;
                          }

 }

 // VALIDATE PHONE NUMBER
 function validate_phone(value,alerttxt){

              var re = /^\(\d{3}\)\d{3}-\d{4}$/;

              if( value.match(/^\(\d{3}\)\d{3}-\d{4}$/) ){
                          return false;
              }
              else{
                          return true;
              }

 }

 When validate_phone is called, the parameter value is correct. The
 problem is the match is not checked.
 Is there another way?

 Thanks for any help.

 J Mcleod

  graycol.gif
  1KViewDownload

  ecblank.gif
  1KViewDownload


[jQuery] Re: create a floating Superfish menu

2009-06-12 Thread Yuri Timofeev

It worked!
Thanks a lot!

On Jun 12, 2:42 pm, Charlie charlie...@gmail.com wrote:
 give ul.sf-menu an absolute position with css and apply the floating script 
 to ul.sf-menu instead of the div container in example
 everything else in menu css and script remains the same
 I believe dimensions.js is deprecated in current jquery.js and is now built 
 into core
  
 Yuri Timofeev wrote:Hi I am newbie in jQuery. I use Superfish menu basic 
 style in my small FOSS project. Question: How can I make a horizontal 
 Superfish menu, floating, like 
 ishttp://net.tutsplus.com/tutorials/html-css-techniques/creating-a-floating-html-menu-using-jquery-and-css/?


[jQuery] Change form action based on button clicked

2009-06-12 Thread ciupaz

Hi all,
I have a form like this:

form id=my_form method=post action=

Name: br /
input type=text id=name name=name /

input type=submit id=submit1 value=Go to page 1 /
input type=submit id=submit2 value=Go to page 2 /

/form

how can I change my action form so the form goes to Page1.htm with
click on button1 and goes to Page2.htm to click on button2, and
mantein the value inserted in textbox name?

Thanks a lot.

Luis


[jQuery] Re: Change form action based on button clicked

2009-06-12 Thread Glazz

View this page 
http://www.komodomedia.com/blog/2008/07/using-jquery-to-save-form-details/

On 12 Jun, 15:25, ciupaz luigi.zambe...@gmail.com wrote:
 Hi all,
 I have a form like this:

 form id=my_form method=post action=

     Name: br /
     input type=text id=name name=name /

     input type=submit id=submit1 value=Go to page 1 /
     input type=submit id=submit2 value=Go to page 2 /

 /form

 how can I change my action form so the form goes to Page1.htm with
 click on button1 and goes to Page2.htm to click on button2, and
 mantein the value inserted in textbox name?

 Thanks a lot.

 Luis


[jQuery] Re: Change form action based on button clicked

2009-06-12 Thread Michael Lawson
function go(button)
{
 $(#my_form).attr(action,button.value);
}

and then in your button tag add this
onclick='go(this)'

cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone:  1-276-206-8393
E-mail:  mjlaw...@us.ibm.com

'Examine my teachings critically, as a gold assayer would test gold. If you
find they make sense, conform to your experience, and don't harm yourself
or others, only then should you accept them.'



 
  From:   ciupaz luigi.zambe...@gmail.com 
 

 
  To: jQuery (English) jquery-en@googlegroups.com   
 

 
  Date:   06/12/2009 10:27 AM   
 

 
  Subject:[jQuery] Change form action based on button clicked   
 

 






Hi all,
I have a form like this:

form id=my_form method=post action=

Name: br /
input type=text id=name name=name /

input type=submit id=submit1 value=Go to page 1 /
input type=submit id=submit2 value=Go to page 2 /

/form

how can I change my action form so the form goes to Page1.htm with
click on button1 and goes to Page2.htm to click on button2, and
mantein the value inserted in textbox name?

Thanks a lot.

Luis

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Change form action based on button clicked

2009-06-12 Thread ciupaz

Thanks, it's work, and how can I recover the input text value, without
using the querystring?

Luis


[jQuery] Re: Change form action based on button clicked

2009-06-12 Thread Glazz

Cookies?! See the link i've posted above!

On 12 Jun, 15:48, ciupaz luigi.zambe...@gmail.com wrote:
 Thanks, it's work, and how can I recover the input text value, without
 using the querystring?

 Luis


[jQuery] Highlight Current Button on jCarousel Lite When Using External Controls

2009-06-12 Thread Build Interactive

Is it possible? I have seen this requested numerous times but found no
solution. When using the external controls, I want to add a class to
the selected navigation number. I'm assuming this could be done using
the callback but I don't know how. Ideas? Thanks


[jQuery] Re: Calling C#-function in the validator

2009-06-12 Thread waseem sabjee
STEP ONE.

lets create our XML Web Service

[WebMethod]
public string Check(string key)
{
return your key is  + key;
}

you will notice in the webservice.cs file a line of code with a comment
above it looks somthing like
[Webservice.scripts]

un-comment that line to allow external script access

STEP 2. create an ajax function
$.ajax({  type: POST, // use method POST
  url: MyWebServicePath.asmx/Change, // path to web service
  data: {'key': ' This is the key' }, // data to post
  contentType: application/json; charset=utf-8, // content type
  dataType: json, // data type
  success: function(data) { // on success
 alert(data.d);
  },
  error: function() { // on failure
  // do nothing to prevent application from breaking
  }
  });

from the above what i have done is :

I posted my key string to the web service and i could basiaclly do all my
validation in C# then return the output :)

what I usually do is a return the output from my webservice as an HTML
string so that i can just inject it directly into a div.



On Fri, Jun 12, 2009 at 3:10 PM, Ivar Kunst iacku...@gmail.com wrote:



 Ola,

 Thanks for you reply, but im still not there:

 My validator:

 script type=text/javascript
  $(document).ready(function(){
var validator = $(#form_user).validate({
onkeyup:false,
onblur:false,
onclick:false,
errorClass: invalid,
errorLabelContainer: $(#errorBox),
wrapper: p,
rules: {
m_username: { required: true},
m_passw: {required: true},
},
messages: {
m_username: Please fill in your username,
m_passw: Please fill in your passw.
   }
});
  });
 /script

 And i have this funtion in the underlying aspx.cs file:

 public boolean somefunction()
 {
  //do a lot of stuff
  if(everythingIsOk)
  {
return true;
  }
  return false;
 }


 Is there a possibility that i can use the function in the aspx.cs file in
 the validator?

 Thanks


 waseem sabjee wrote:
 
  your web service
 
  mymethod.asmx.cs
  [webmethod]
 
  public string[] getData() {
 
  // note i used a dataset
  EventsTableAdapters.EventsTableAdapter ta = new
  EventsTableAdapters.EventsTableAdapter();
  Events.EventsDataTable dt new Events.EventsDataTable();
  // C# string list
  Liststring result as new Liststring();
 
  // load data into data table from dataset
  dt = ta.GetData();
 
  // foreach row in table
  foreach(System.Data.Datarow row in dt.Rows) {
  // add each row as its own list item
  result.Add(row[event_title].ToString());
 
  }
  // return as array
  return results.ToArray();
 
  }
 
  default.aspx
 
  script type=text/javascript
   // yes you can integrate asp.net tags within script tags however you
 will
  not get intelisense
 
  // basically i said if the checkbox is checked get and alert the data
 from
  the web service.
 
  $(function() {
  % if(CheckBox1.Checked) { %
 
  $.ajax({
  url:mymethod.asmx/Getdata,
  success: function(data) {
  alert(data);
  }
  });
 
 
  % } %
  });
 
  /script
 
  On Fri, Jun 5, 2009 at 6:31 PM, Ivar Kunst iacku...@gmail.com wrote:
 
 
 
  Hello all,
 
  I'm quite new to Jquery, so I need some sort of advice.
 
  I'm working on a webbased application with a webservice. First it was a
  simple html site, but later I started using Jquery. Data is inserted in
  some
  forms, this I can easily validate through the validator. Now after all
  the
  data is ok, it's send to the webservice through the C#-code. Some
  calculations are being made with the data and a dataset is returned. Now
  some errors can occur while doing the calculations. I can't get some
  manual
  error in the errorbox of the validator.
 
  Is it possible to let the validator run some c#-function so I can see if
  the
  data is correct? Or can I set a unvisible checkbox to true/false through
  the
  c#-code so the validator check this box? A problem with both is, that
 the
  validator runs when I click on the Next-button. After the validaton,
  the
  function starts, so if I set the checkbox to false, the validator won't
  even
  notice.
 
  Anyone knows a handy approach for this?
 
  Grt,
  Ivar
  --
  View this message in context:
 
 http://www.nabble.com/Calling-C--function-in-the-validator-tp23891455s27240p23891455.html
  Sent from the jQuery General Discussion mailing list archive at
  Nabble.com.
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Calling-C--function-in-the-validator-tp23891455s27240p23998567.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.




[jQuery] Question about 'ready' event

2009-06-12 Thread Bernad

Hello everybody.

I have one problem but I can't solve it.

I have one page with 3 iframes. The first iframe has a 'ready' event.
Inside this event I am calling a function which is in the parent page.
This function needs that the page was loaded, I mean, when the page is
loaded this function can be called, not before.
My problem is that when I'm calling this function the parent page is
not loaded yet, so, I need to call it when the page whas ready.

Any idea?


[jQuery] Trouble constructing selector string.

2009-06-12 Thread rinse_my_phonebook

Hi there, I'm having a bad time trying to work out what is wrong with
my approach and hoping someone can enlighten me. Consider the
following.

var t = 'input.ffControl[value=Add a Value]:first';
var s = 'input.ffControl[value=Add a 
'+$(this).attr('class')
+']:first';
if(s == t)  alert(s);
$(s,this).val('gotcha');

The condition on line 3 evaluates to true and the alert appears. If I
replace the fourth line with

$(t,this).val('gotcha');

The values of the input that I'm trying to change does not change.

This baffles me now. Probably friday fever. I'll be glad of any
suggestions.

Rinse


[jQuery] append() does not properly resize div when adding content

2009-06-12 Thread Eric-Sebastien Lachance

Hello,

I'm creating a page that lists the available songs that I have for
karaoke, and I'm having some difficulties with formatting. I'm using
jquery to retrieve an XML created by php, and outputting it to the
html page using jquery's append() function. However, when I do this,
the DIV that contains the data (the one I'm appending) simply does not
re-size with the data - so I have a div that's a few pixels high, and
a data list that just floods out of it in the emptiness of my body
background (white).

The page is here:
http://lucas.is-a-geek.com:8181/jquery/

The append code is:
$.get('backend.php', function(parsexml){

$(parsexml).find('song').each(function(){

var id = $(this).find(ID).text();
var artist = $(this).find(artist).text();
var title = $(this).find(title).text();

html = div id=\songid + id + \ style=\float: 
left; width:
830px; height: 20px; border-top:1px solid #000;\;
html = html + div class=\artist\ style=\float: 
left; width:
250px\ + artist + /div;
html = html + div class=\title\ style=\float: 
left; width:
300px\ + title + /div;
html = html + /div;

$(#resultscontainer).append(html);
//$(#resultscontainer).append(p id=songid + id +  
class=
\trigger ui-state-default\a href=\#\ + author +  -  + title
+ /a/p);
});
});

The DIV is simply:
div id=resultscontainer class=ui-state-highlight ui-corner-all
style=height: 100px; width:835px;
/div

Does anyone know how to fix this? I've tried setting a % or px height
to the div, with no change in behavior. Oh, it happens both in Firefox
and Internet Explorer equally.


[jQuery] Position to use to have the Horizontal SuperFish at the top

2009-06-12 Thread nyliferocks

Hi, On my website www.mydabbler.info I wanted the superfish horizontal
menu directly below the green banner at the top. I am using this to
replace the top 2 menus in the middle. The current top 2 middle menus
use User 1 on the middle left and User 2 for the middle right. If I
use Superfish with one of these positions it does not sit high enough.
What would everyone suggest? Thanks!


[jQuery] Re: document.body is null or is not an object

2009-06-12 Thread mhofmann

Some of my clients have actually seen this, too:
Javascript Error: 'document.body' is null or not an object

The error line refers to the line document.body.appendChild( div );
in jquery.js.

It has definitely happened for people on IE6, and I believe for people
on IE7 as well... however, it is very sporadic (I've only seen it
happen a handful of times).  Maybe it is a race condition, depending
on how/where you include the jquery script, and how you are
initializing the page body?


On Jun 12, 4:21 am, Lideln lid...@gmail.com wrote:
 Up :)

 On Jun 10, 6:40 pm, Lideln lid...@gmail.com wrote:

  Up !

  I really need some help... Am I the only one experiencing such a
  problem ?
  I can't use IE6 for now... It's really paralyzing me because I work in
  a professional environment.

  Thank you all for your help !

  On Jun 8, 12:18 pm, Lideln lid...@gmail.com wrote:

   Hi,

   Thank you for that long answer !

   The problem is that on my computer and that of my colleague where it
   bugs, we are automatically redirected to the login page. So it'll be
   hard to compare the two versions of HTML.

   I also tried to deactivate debugging in IE6 (the two checkboxes in the
   options), but nothing new...

   We are two developers, dev_A (me) and dev_B (the one who tests only
   with IE7, and where everything works), we have the same SVN up to date
   code.
   There are 2 colleagues who will test the issue : test_C and test_D.

   If it comes from an IE6 configuration error, why does it work for
   test_C when he points to the dev_B machine, and not when it points to
   the dev_A (my) machine ?

   If it comes from an apache configuration error, why does it work for
   test_D when he points to the dev_A (my) machine ?

   It's really disappointing... I decided ealier (as you advise me now)
   to move on, because I can't find a way to correct it, and as it seems
   to work for everyone when pointing to the dev_B machine, and because
   it only bugs on my machine, only sometimes, and only with IE6.

   On Jun 8, 11:45 am, kranthi kranthi...@gmail.com wrote:

there is one more thing which i forgot to mention earlier...

if i encounter an IE specific error the first thing i do is disable
all debugging addons in IE, restore all the advanced options to
default.

open the source code in IE of your colleague(on whose computer it is
working fine).
open the source code in IE of your computer.
compare that line by line (use tortoise merge or kdiff)

if they dont match... probably u'll be able to find the error.
if they do match .. that is a configuration prob in your IE(if this is
the case i recommend you to forget the error and move on)

and finally ..
as far as i know both web developer console and firebug console show
the same (javascript) errors as that of inbuilt firefox console. they
only differ when ter is a page refresh. firebug console does not
remember javascript errors of previous pages opened in that browser.
while web developer console shows all javascript errors occoured
till then.




[jQuery] Jquery Ajax Post question

2009-06-12 Thread jef...@gmail.com

$.post(test.php, { func: getNameAndTime },
  function(data){
process(data);
  });

Is one of the examples given for Jquery.

Now I am trying to implement Jquery Ajax instead of a custom class we
have here so am trying to catch on so bear with me.

Above, it shows POST variable func containing getNameAndTime as a
value correct? So if I wanted to pass along say names I would pass
along {first: Bob, last: Smith}?

I find adding the callback function right in the call a little awkward
(probably because I'm new to Jquery). Basically I was adding a onClick
function to a link to a function (function test()) and inside I was
going to add this jquery code. I just wanted to then have the returned
data at my disposal in a variable but it looks like I need to pass it
somewhere else?

I basically wanted to do this:

function disableTips ()
{
$.post(./test.php, {id : id_val}, function(data){
something here?
}
}) ;

  then do something with data here
}

Am I going about it completely the wrong way with jquery?


[jQuery] Trouble constructing selector string.

2009-06-12 Thread rinse_my_phonebook

var t = 'input.ffControl[value=Add a Value]:first';
var s = 'input.ffControl[value=Add a 
'+$(this).attr('class')
+']:first';
if(s == t) { alert(s); }
$(t,this).val('gotcha');

Hi there, Can anyone help me understand why changing the fourth line
of the above snippet to

$(s, this).val('gotcha')

does not have the effect that the orignal line has when the alert on
line 3 always shows?

Many thanks in advance for any effort, I appreciate it,

Rinse


[jQuery] Replace content with title attribute value

2009-06-12 Thread jay7

Hi, I have this:

span class=date title=May 14, 200914 May 2009/span

.. and I'd like JQuery script to output it as this:

span class=date title=May 14, 2009/span

Basically, I'm checking the browser language and I want to display all
dates in US date format to all users with EN-CA and EN-US browser
language (and UK format to all other users). Please let me know if
there is a better way of doing it, I couldn't find anything. Thanks.


[jQuery] AIR plugin for jQuery?

2009-06-12 Thread Andy Matthews

Does anyone know of a plugin for jQuery that encapsulates some, or
all, of the AIR API?


andy


[jQuery] Re: AIR plugin for jQuery?

2009-06-12 Thread Jack Killpatrick


This may be of interest, though it's not jQuery encapsulation, it does 
provide an abstraction layer:


http://www.activerecordjs.org/index.html

I've been using the ActiveRecord js implementation in AIR for a while 
now and it's proven to be solid so far:


http://www.activerecordjs.org/record.html

- Jack

Andy Matthews wrote:

Does anyone know of a plugin for jQuery that encapsulates some, or
all, of the AIR API?


andy

  





[jQuery] jQuery UI 1.7.2 released

2009-06-12 Thread Neal Jansons

Download:

http://blog.jqueryui.com/2009/06/jquery-ui-172/

Changelog

Summary

This is a maintenance release for jQuery UI 1.7. It changes only the
plugins listed below. In addition to the plugin fixes below, 7 new
themes were added: Sunny, Overcast, Le Frog, Flick, Pepper Grinder,
Eggplant and Dark Hive.
Widgets
Accordion

* Fixed: changestart event not documented (4471)

Datepicker

* Fixed: Datepicker: Datepicker: destroy, disable, and enable
methods affect sibling datepickers (4240)
* Fixed: Datepicker: Datepicker: option dateFormat getter does not
return same value as setter (4301)

Dialog

* Fixed: modal dialog + button locks page (4065)
* Fixed: Opening multiple modal dialogs causes access problems to
inputs (4309)

Progressbar

* Fixed: progressbar('value') returns a reference to this instead
of the value (4427)

Slider

* Fixed: ui-state-hover, ui-state-active and disabled sliders
(4391)
* Fixed: some handles get stuck when using two or more handles
(3736)
* Fixed: Slider code doesn't pack, due to missing semicolons
(4492)

Effects

* Fixed: effects.core corrupts jQuery toggle functionality (4473)

CSS Framework

* Fixed: UI Icons are not even, causes misaligned buttons (4447)
* Fixed: added a rule for widget embedding font size. Resets ui-
widget class font-size to 1em when inside another ui-widget. (r2372)
* Fixed: Update Google CDN with @import-less CSS (4463)
* Themes: minor changes to Blitzer, South Street, Cupertino, Mint
Choc, Excite Bike (4517)
* Themes: Added new gallery themes: Sunny, Overcast, Le Frog,
Flick, Pepper Grinder, Eggplant and Dark Hive (4517)

Website
Download builder

* Fixed: Redmond theme not included in latest build (4302)
* Fixed: 1.7 download fails WinZip Vista 64bit (4340)
* Fixed: Zip file containing CSS theme files does not unzip (4503)
* Fixed: Download Page Corrupt Zip File (4505)
* Fixed: Cannot download jQuery UI 1.7.1 custom theme (4507)
* Fixed: an issue with IE and the downloadbuilder (4291)
* Fixed: Custom theme generator produces buggy file (4496)
* Fixed: The Compressed (zipped) Folder is invalid or corrupted.
(4574)
* Fixed: Themes Not Downloading (4283)
* Fixed: Invalid Zip Files when downloading (4323)
* Fixed: unable to download the UI themes (4384)
* Fixed: downloadbuilder - bung zip file (4426)
* Fixed: themeroller download outputs corrupted zip file (4543)
* Fixed: Theme roller does not seem to be working (4546)
* Fixed: Custom JQuery UI - created with theme roller is producing
a corrupt zip file (4552)
* Fixed: Files for custom theme are not generated - default theme
is downloaded instead (4594)


[jQuery] Re: append() does not properly resize div when adding content

2009-06-12 Thread amuhlou

you're declaring a fixed height inline.  the div is being told to only
be 100px tall, so it doesn't matter how much content is inside it.
try replacing height: 100px with float: left;

On Jun 12, 11:38 am, Eric-Sebastien Lachance eslacha...@gmail.com
wrote:
 Hello,

 I'm creating a page that lists the available songs that I have for
 karaoke, and I'm having some difficulties with formatting. I'm using
 jquery to retrieve an XML created by php, and outputting it to the
 html page using jquery's append() function. However, when I do this,
 the DIV that contains the data (the one I'm appending) simply does not
 re-size with the data - so I have a div that's a few pixels high, and
 a data list that just floods out of it in the emptiness of my body
 background (white).

 The page is here:http://lucas.is-a-geek.com:8181/jquery/

 The append code is:
     $.get('backend.php', function(parsexml){

         $(parsexml).find('song').each(function(){

                         var id = $(this).find(ID).text();
                         var artist = $(this).find(artist).text();
                         var title = $(this).find(title).text();

                         html = div id=\songid + id + \ style=\float: 
 left; width:
 830px; height: 20px; border-top:1px solid #000;\;
                         html = html + div class=\artist\ style=\float: 
 left; width:
 250px\ + artist + /div;
                         html = html + div class=\title\ style=\float: 
 left; width:
 300px\ + title + /div;
                         html = html + /div;

                         $(#resultscontainer).append(html);
                         //$(#resultscontainer).append(p id=songid + id + 
  class=
 \trigger ui-state-default\a href=\#\ + author +  -  + title
 + /a/p);
                 });
         });

 The DIV is simply:
         div id=resultscontainer class=ui-state-highlight ui-corner-all
 style=height: 100px; width:835px;
         /div

 Does anyone know how to fix this? I've tried setting a % or px height
 to the div, with no change in behavior. Oh, it happens both in Firefox
 and Internet Explorer equally.


[jQuery] Re: Replace content with title attribute value

2009-06-12 Thread amuhlou

I would probably do something like this:

var formattedDate = $('span.date').attr('title');
$('span.date').html(formattedDate);

if you have multiple date spans on the page, you may need to use
the .each() method



On Jun 12, 12:33 pm, jay7 jayd...@gmail.com wrote:
 Hi, I have this:

 span class=date title=May 14, 200914 May 2009/span

 .. and I'd like JQuery script to output it as this:

 span class=date title=May 14, 2009/span

 Basically, I'm checking the browser language and I want to display all
 dates in US date format to all users with EN-CA and EN-US browser
 language (and UK format to all other users). Please let me know if
 there is a better way of doing it, I couldn't find anything. Thanks.


[jQuery] load spinner not working

2009-06-12 Thread Alex

Hi all,

Need a little help from you guys here.

I tried to show load spinner will ajax doing its work on a complex
page item load. In my case I am trying to load a large image and at
the same time load large amount of data onto a table. But it only
works in FireFox 3 but it doesn't works on FireFox2, IE6, and IE7.

I have done a sample to simulate what I am trying to do. Please
download the sample zipped file from the link below, take a look and
run the file on those browsers. You will see what I mean.

http://www.mediafire.com/?sharekey=cba41bca4e108e1ced24a2875c7fa58ee04e75f6e8ebb871

Hope someone can help.

Thanks!

Alex


[jQuery] Re: AIR plugin for jQuery?

2009-06-12 Thread Andy Matthews

Thanks Jack...that's not quite what I meant.

For example, even though the AIR method for minimizing a window to the
system tray is short:
nativeWindow.minimize();

It would be cool if this functionality was packaged up so that you
could apply the minimize method directly to an object. Here's what I
do now:

// this assigns the minimize functionality to the minimize button
$('#minimize').bind('click', function(event) {
iface.minimize();
});

and here's how it could look:
// this assigns the minimize functionality to the minimize button
$('#minimize').air.minimize();

Obviously that's not a great example, but the code for adding a menu
to an icon running in the task bar is much lengthier. You can see how
this might benefit from an abstraction layer:

setupIconTray: function() {

// shortcut to the nativeApplication object
var app = air.NativeApplication.nativeApplication;
app.addEventListener(air.Event.COMPLETE, iconLoadComplete);

// create new instance of icon loader
var iconLoader = new air.Loader();

//  these lines let me add a menu to the system tray.
//  we're not going to use this for now, but I want to keep it 
around
//  icontray.menu = new air.NativeMenu();
//  var exitCommand = icontray.menu.addItem(new air.NativeMenuItem
(Exit Bullhorn));
//  exitCommand.addEventListener(air.Event.SELECT, winmgr.close);

if(air.NativeApplication.supportsSystemTrayIcon){

iconLoader.contentLoaderInfo.addEventListener(air.Event.COMPLETE,
iconLoadComplete);
iconLoader.load(new air.URLRequest(images/AIRApp_16.png));
app.icon.addEventListener
(window.runtime.flash.events.MouseEvent.CLICK, this.restore);
app.icon.tooltip = Shrinkadoo;
// app.icon.menu = icontray.menu;
}

//  if(air.NativeApplication.supportsMenu) {
//  app.menu.addSubmenu(icontray.menu, Windows);

function iconLoadComplete(event) {
app.icon.bitmaps = new runtime.Array
(event.target.content.bitmapData);
}

}


Anyway...I might start writing one, but would love to get input from
others who would be interested in helping out.




On Jun 12, 11:52 am, Jack Killpatrick j...@ihwy.com wrote:
 This may be of interest, though it's not jQuery encapsulation, it does
 provide an abstraction layer:

 http://www.activerecordjs.org/index.html

 I've been using the ActiveRecord js implementation in AIR for a while
 now and it's proven to be solid so far:

 http://www.activerecordjs.org/record.html

 - Jack



 Andy Matthews wrote:
  Does anyone know of a plugin for jQuery that encapsulates some, or
  all, of the AIR API?

  andy


[jQuery] Re: append() does not properly resize div when adding content

2009-06-12 Thread Eric-Sebastien Lachance

Awesome, that works!

I hadn't set a static height at first, hadn't put any style in fact,
so I was in a bind, but this works great for me.

Thanks a lot!
Eric.

On Jun 12, 1:24 pm, amuhlou amysch...@gmail.com wrote:
 you're declaring a fixed height inline.  the div is being told to only
 be 100px tall, so it doesn't matter how much content is inside it.
 try replacing height: 100px with float: left;

 On Jun 12, 11:38 am, Eric-Sebastien Lachance eslacha...@gmail.com
 wrote:

  Hello,

  I'm creating a page that lists the available songs that I have for
  karaoke, and I'm having some difficulties with formatting. I'm using
  jquery to retrieve an XML created by php, and outputting it to the
  html page using jquery's append() function. However, when I do this,
  the DIV that contains the data (the one I'm appending) simply does not
  re-size with the data - so I have a div that's a few pixels high, and
  a data list that just floods out of it in the emptiness of my body
  background (white).

  The page is here:http://lucas.is-a-geek.com:8181/jquery/

  The append code is:
      $.get('backend.php', function(parsexml){

          $(parsexml).find('song').each(function(){

                          var id = $(this).find(ID).text();
                          var artist = $(this).find(artist).text();
                          var title = $(this).find(title).text();

                          html = div id=\songid + id + \ style=\float: 
  left; width:
  830px; height: 20px; border-top:1px solid #000;\;
                          html = html + div class=\artist\ style=\float: 
  left; width:
  250px\ + artist + /div;
                          html = html + div class=\title\ style=\float: 
  left; width:
  300px\ + title + /div;
                          html = html + /div;

                          $(#resultscontainer).append(html);
                          //$(#resultscontainer).append(p id=songid + id 
  +  class=
  \trigger ui-state-default\a href=\#\ + author +  -  + title
  + /a/p);
                  });
          });

  The DIV is simply:
          div id=resultscontainer class=ui-state-highlight ui-corner-all
  style=height: 100px; width:835px;
          /div

  Does anyone know how to fix this? I've tried setting a % or px height
  to the div, with no change in behavior. Oh, it happens both in Firefox
  and Internet Explorer equally.


[jQuery] Re: AIR plugin for jQuery?

2009-06-12 Thread Jack Killpatrick
OK, yeah, that's what I figured you were looking for. I haven't seen 
anything like that, but it would be cool if it existed. Doesn't seem 
like it would be a ton of work (famous last words). Have you got any 
thoughts about how it might work across the sandbox bridges? I use the 
bridges and build the non-app sandbox stuff very much like a regular web 
app and create and expose certain functions via the bridges to/from the 
app and non-app sandbox, since all the direct air API access can only 
happen in the app sandbox.


I haven't really thought it out, but wondering if maybe you have. Maybe 
you're looking maybe for something that would just be used in the app 
sandbox and it'd be up to the end user to create the bridge stuff that 
they need?


- Jack


Andy Matthews wrote:

Thanks Jack...that's not quite what I meant.

For example, even though the AIR method for minimizing a window to the
system tray is short:
nativeWindow.minimize();

It would be cool if this functionality was packaged up so that you
could apply the minimize method directly to an object. Here's what I
do now:

// this assigns the minimize functionality to the minimize button
$('#minimize').bind('click', function(event) {
iface.minimize();
});

and here's how it could look:
// this assigns the minimize functionality to the minimize button
$('#minimize').air.minimize();

Obviously that's not a great example, but the code for adding a menu
to an icon running in the task bar is much lengthier. You can see how
this might benefit from an abstraction layer:

setupIconTray: function() {

// shortcut to the nativeApplication object
var app = air.NativeApplication.nativeApplication;
app.addEventListener(air.Event.COMPLETE, iconLoadComplete);

// create new instance of icon loader
var iconLoader = new air.Loader();

//  these lines let me add a menu to the system tray.
//  we're not going to use this for now, but I want to keep it 
around
//  icontray.menu = new air.NativeMenu();
//  var exitCommand = icontray.menu.addItem(new air.NativeMenuItem
(Exit Bullhorn));
//  exitCommand.addEventListener(air.Event.SELECT, winmgr.close);

if(air.NativeApplication.supportsSystemTrayIcon){

iconLoader.contentLoaderInfo.addEventListener(air.Event.COMPLETE,
iconLoadComplete);
iconLoader.load(new air.URLRequest(images/AIRApp_16.png));
app.icon.addEventListener
(window.runtime.flash.events.MouseEvent.CLICK, this.restore);
app.icon.tooltip = Shrinkadoo;
// app.icon.menu = icontray.menu;
}

//  if(air.NativeApplication.supportsMenu) {
//  app.menu.addSubmenu(icontray.menu, Windows);

function iconLoadComplete(event) {
app.icon.bitmaps = new runtime.Array
(event.target.content.bitmapData);
}

}


Anyway...I might start writing one, but would love to get input from
others who would be interested in helping out.




On Jun 12, 11:52 am, Jack Killpatrick j...@ihwy.com wrote:
  

This may be of interest, though it's not jQuery encapsulation, it does
provide an abstraction layer:

http://www.activerecordjs.org/index.html

I've been using the ActiveRecord js implementation in AIR for a while
now and it's proven to be solid so far:

http://www.activerecordjs.org/record.html

- Jack



Andy Matthews wrote:


Does anyone know of a plugin for jQuery that encapsulates some, or
all, of the AIR API?
  
andy
  


  




[jQuery] Re: remove question

2009-06-12 Thread Kean

W3C says that id should not start with a number

Here's probably what you need.

$('#1').remove();


On Jun 11, 7:44 pm, David .Wu chan1...@gmail.com wrote:
 Can I remove div1 but div2 keep there?

 div id=1
 div id=2/div
 /div


[jQuery] Re: css() function returns different results on different browsers

2009-06-12 Thread Kean

It's not really a huge bug and please do submit this as an enhancement
to jQuery tracker.

On Jun 11, 12:57 pm, upsilon upsilo...@gmail.com wrote:
 Hi everyone!

 Today I've tried to create simple hover effect on a div: if the
 cursor is over the box, the background-image css property of the div
 is modified.

 On the HTML side, a div with an id:
 div id=roundpBlah blah/p/div

 On the CSS:
 div#round {
 background-image: url(pics/bg_round.png);

 }

 In order to get the background-image property, I wrote:
 var imgName = $(#round).css('background-image');

 The issue is on what I get from this function in Internet Explorer and
 in Firefox:
 IE : url(http://blabla/images/bg_round.png;)
 FF : url(http://blabla/images/bg_round.png)

 OK, the difference is not huge, and I've already solved the problem by
 replacing quotes by nothing in the string.

 But... Is this a bug? A feature? jQuery is intended for erasing
 differences between browsers, and here it's not the case...
 What do you think of it?

 Thanks!
 upsilon

 PS: sorry for my English (I'm French), I'm afraid that 15 years of
 studies aren't enough for me... :(


[jQuery] Re: AIR plugin for jQuery?

2009-06-12 Thread Andy Matthews
Jack...
 
I just blogged about this idea:
http://andymatthews.net/read/2009/06/12/jQuery-and-AIR:-AIR-methods-abstract
ed-into-jQuery-plugin
 
I think that this is a great idea and I'd love to get involved in it, but
I'd want others to be included as well. My jQuery foo is fairly strong, but
I've never written a plugin, and would really want someone to provide a good
code review for best practices. The cool thing is that there wouldn't be
much jQuery in the plugin. It's mostly an abstraction of the AIR APIs into
a tighter, simpler package.
 
I think the best place to start would be some of the lower hanging fruit.
Some of the API methods that are straightforward and don't require a lot of
options. Then we could move into SQLite, File System access, etc.
 
Thoughts?

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jack Killpatrick
Sent: Friday, June 12, 2009 1:07 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: AIR plugin for jQuery?


OK, yeah, that's what I figured you were looking for. I haven't seen
anything like that, but it would be cool if it existed. Doesn't seem like it
would be a ton of work (famous last words). Have you got any thoughts
about how it might work across the sandbox bridges? I use the bridges and
build the non-app sandbox stuff very much like a regular web app and create
and expose certain functions via the bridges to/from the app and non-app
sandbox, since all the direct air API access can only happen in the app
sandbox.

I haven't really thought it out, but wondering if maybe you have. Maybe
you're looking maybe for something that would just be used in the app
sandbox and it'd be up to the end user to create the bridge stuff that they
need?

- Jack


Andy Matthews wrote: 

Thanks Jack...that's not quite what I meant.



For example, even though the AIR method for minimizing a window to the

system tray is short:

nativeWindow.minimize();



It would be cool if this functionality was packaged up so that you

could apply the minimize method directly to an object. Here's what I

do now:



// this assigns the minimize functionality to the minimize button

$('#minimize').bind('click', function(event) {

iface.minimize();

});



and here's how it could look:

// this assigns the minimize functionality to the minimize button

$('#minimize').air.minimize();



Obviously that's not a great example, but the code for adding a menu

to an icon running in the task bar is much lengthier. You can see how

this might benefit from an abstraction layer:



setupIconTray: function() {



// shortcut to the nativeApplication object

var app = air.NativeApplication.nativeApplication;

app.addEventListener(air.Event.COMPLETE, iconLoadComplete);



// create new instance of icon loader

var iconLoader = new air.Loader();



//  these lines let me add a menu to the system tray.

//  we're not going to use this for now, but I want to keep it
around

//  icontray.menu = new air.NativeMenu();

//  var exitCommand = icontray.menu.addItem(new
air.NativeMenuItem

(Exit Bullhorn));

//  exitCommand.addEventListener(air.Event.SELECT,
winmgr.close);



if(air.NativeApplication.supportsSystemTrayIcon){


iconLoader.contentLoaderInfo.addEventListener(air.Event.COMPLETE,

iconLoadComplete);

iconLoader.load(new air.URLRequest(images/AIRApp_16.png));

app.icon.addEventListener

(window.runtime.flash.events.MouseEvent.CLICK, this.restore);

app.icon.tooltip = Shrinkadoo;

// app.icon.menu = icontray.menu;

}



//  if(air.NativeApplication.supportsMenu) {

//  app.menu.addSubmenu(icontray.menu, Windows);



function iconLoadComplete(event) {

app.icon.bitmaps = new runtime.Array

(event.target.content.bitmapData);

}



}





Anyway...I might start writing one, but would love to get input from

others who would be interested in helping out.









On Jun 12, 11:52 am, Jack Killpatrick  mailto:j...@ihwy.com
j...@ihwy.com wrote:

  

This may be of interest, though it's not jQuery encapsulation, it does

provide an abstraction layer:



http://www.activerecordjs.org/index.html



I've been using the ActiveRecord js implementation in AIR for a while

now and it's proven to be solid so far:



http://www.activerecordjs.org/record.html



- Jack







Andy Matthews wrote:



Does anyone know of a plugin for jQuery that encapsulates some, or

all, of the AIR API?

  

andy

  



  




[jQuery] Re: Question about 'ready' event

2009-06-12 Thread Pierre Bellan
I see one fast solution,

You put a variable isLoaded in your top frame.
At first, the value is false, and when it's ready you change the value to
true.

Inside the iframe that need the function, you check the value of the
variable inside a periodic call.
When the value is true, you can make the call and you must stop the periodic
call

Fast solution, but not very clean. Maybe someone had a better idea ?

Pierre

2009/6/12 Bernad davidber...@gmail.com


 Hello everybody.

 I have one problem but I can't solve it.

 I have one page with 3 iframes. The first iframe has a 'ready' event.
 Inside this event I am calling a function which is in the parent page.
 This function needs that the page was loaded, I mean, when the page is
 loaded this function can be called, not before.
 My problem is that when I'm calling this function the parent page is
 not loaded yet, so, I need to call it when the page whas ready.

 Any idea?



[jQuery] Re: document.body is null or is not an object

2009-06-12 Thread Lideln

Hi !

Thanks for the answer. But, if it is due to the code, why does it work
on another developer computer, with the exact same code ?
And why would it work for one tester out of 3 ?

I can't explain that, and as far as I can't explain that, I will not
likely consider it is due to the code.
Actually, I have absolutely no clue, but I would love to !


On 12 juin, 18:27, mhofmann rmhofm...@gmail.com wrote:
 Some of my clients have actually seen this, too:
 Javascript Error: 'document.body' is null or not an object

 The error line refers to the line document.body.appendChild( div );
 in jquery.js.

 It has definitely happened for people on IE6, and I believe for people
 on IE7 as well... however, it is very sporadic (I've only seen it
 happen a handful of times).  Maybe it is a race condition, depending
 on how/where you include the jquery script, and how you are
 initializing the page body?

 On Jun 12, 4:21 am, Lideln lid...@gmail.com wrote:

  Up :)

  On Jun 10, 6:40 pm, Lideln lid...@gmail.com wrote:

   Up !

   I really need some help... Am I the only one experiencing such a
   problem ?
   I can't use IE6 for now... It's really paralyzing me because I work in
   a professional environment.

   Thank you all for your help !

   On Jun 8, 12:18 pm, Lideln lid...@gmail.com wrote:

Hi,

Thank you for that long answer !

The problem is that on my computer and that of my colleague where it
bugs, we are automatically redirected to the login page. So it'll be
hard to compare the two versions of HTML.

I also tried to deactivate debugging in IE6 (the two checkboxes in the
options), but nothing new...

We are two developers, dev_A (me) and dev_B (the one who tests only
with IE7, and where everything works), we have the same SVN up to date
code.
There are 2 colleagues who will test the issue : test_C and test_D.

If it comes from an IE6 configuration error, why does it work for
test_C when he points to the dev_B machine, and not when it points to
the dev_A (my) machine ?

If it comes from an apache configuration error, why does it work for
test_D when he points to the dev_A (my) machine ?

It's really disappointing... I decided ealier (as you advise me now)
to move on, because I can't find a way to correct it, and as it seems
to work for everyone when pointing to the dev_B machine, and because
it only bugs on my machine, only sometimes, and only with IE6.

On Jun 8, 11:45 am, kranthi kranthi...@gmail.com wrote:

 there is one more thing which i forgot to mention earlier...

 if i encounter an IE specific error the first thing i do is disable
 all debugging addons in IE, restore all the advanced options to
 default.

 open the source code in IE of your colleague(on whose computer it is
 working fine).
 open the source code in IE of your computer.
 compare that line by line (use tortoise merge or kdiff)

 if they dont match... probably u'll be able to find the error.
 if they do match .. that is a configuration prob in your IE(if this is
 the case i recommend you to forget the error and move on)

 and finally ..
 as far as i know both web developer console and firebug console show
 the same (javascript) errors as that of inbuilt firefox console. they
 only differ when ter is a page refresh. firebug console does not
 remember javascript errors of previous pages opened in that browser.
 while web developer console shows all javascript errors occoured
 till then.


[jQuery] Re: remove question

2009-06-12 Thread amuhlou

putting it all together, you'd get something like:

$('#div1').replaceWith($('#div2')).remove();

first you find div1, then replace it with div2, then remove div1


On Jun 12, 2:12 pm, Kean shenan...@gmail.com wrote:
 W3C says that id should not start with a number

 Here's probably what you need.

 $('#1').remove();

 On Jun 11, 7:44 pm, David .Wu chan1...@gmail.com wrote:

  Can I remove div1 but div2 keep there?

  div id=1
  div id=2/div
  /div


[jQuery] Re: Plugins/Validation/validate is there a way to add css class to wrapper option?

2009-06-12 Thread Gauthier Segay

Jörn, thanks for your answer

I tried your tip and it seems to work showing the items right at first
sight.

There is one flaw nonetheless, when the item is revoved, the wrapper
element is leave present in it's container

About the ticket, I just created one as you proposed:

http://plugins.jquery.com/node/8612

I'm unsure what is the most convinient way for the solution, it could
be either

- support jquery selectors or raw dom strings (picking the one the
most logic according to other optins)

or

- support event handler for attach/detach message or such? (I'm not
used to events defined in most plugins at the moment)

thanks for your help

On Jun 12, 1:47 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 wrapper: li class='error' would work in one place (where the wrapper
 is created), but not in another, where the same option is used as a
 selector.

 Could you file an issue for 
 thise?http://plugins.jquery.com/node/add/project-issue/validate

 Jörn



 On Fri, Jun 12, 2009 at 7:51 AM, Gauthier Segaygauthier.se...@gmail.com 
 wrote:

  I would like to wrap validation messages in li class=error/ with
  validate plugin

  is there any event or option I can handle to tweak the element before
  it is appended?

  I'm unsure if something like that would look ok:

  $('form').validate({wrapper:li.error});

  or either

  $('form').validate({wrapper:li class='error'/});

  Any work around is welcome.

  Best regards


[jQuery] Re: AIR plugin for jQuery?

2009-06-12 Thread Jack Killpatrick
From your examples, it looks like you're thinking more about helper 
methods than just exposing the API, which makes sense, but then the 
question is what helper methods should we create to make this a good 
framework? (I think). If that's the case, have you thought about it 
much? Helper method meaning something that wraps a chunk of air native 
code up to support some reusable functionality beyond the lower level 
air stuff.


- Jack

Andy Matthews wrote:

Jack...
 
I just blogged about this idea:

http://andymatthews.net/read/2009/06/12/jQuery-and-AIR:-AIR-methods-abstracted-into-jQuery-plugin
 
I think that this is a great idea and I'd love to get involved in it, 
but I'd want others to be included as well. My jQuery foo is fairly 
strong, but I've never written a plugin, and would really want someone 
to provide a good code review for best practices. The cool thing is 
that there wouldn't be much jQuery in the plugin. It's mostly an 
abstraction of the AIR APIs into a tighter, simpler package.
 
I think the best place to start would be some of the lower hanging 
fruit. Some of the API methods that are straightforward and don't 
require a lot of options. Then we could move into SQLite, File System 
access, etc.
 
Thoughts?



*From:* jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] 
*On Behalf Of *Jack Killpatrick

*Sent:* Friday, June 12, 2009 1:07 PM
*To:* jquery-en@googlegroups.com
*Subject:* [jQuery] Re: AIR plugin for jQuery?

OK, yeah, that's what I figured you were looking for. I haven't seen 
anything like that, but it would be cool if it existed. Doesn't seem 
like it would be a ton of work (famous last words). Have you got any 
thoughts about how it might work across the sandbox bridges? I use the 
bridges and build the non-app sandbox stuff very much like a regular 
web app and create and expose certain functions via the bridges 
to/from the app and non-app sandbox, since all the direct air API 
access can only happen in the app sandbox.


I haven't really thought it out, but wondering if maybe you have. 
Maybe you're looking maybe for something that would just be used in 
the app sandbox and it'd be up to the end user to create the bridge 
stuff that they need?


- Jack


Andy Matthews wrote:

Thanks Jack...that's not quite what I meant.

For example, even though the AIR method for minimizing a window to the
system tray is short:
nativeWindow.minimize();

It would be cool if this functionality was packaged up so that you
could apply the minimize method directly to an object. Here's what I
do now:

// this assigns the minimize functionality to the minimize button
$('#minimize').bind('click', function(event) {
iface.minimize();
});

and here's how it could look:
// this assigns the minimize functionality to the minimize button
$('#minimize').air.minimize();

Obviously that's not a great example, but the code for adding a menu
to an icon running in the task bar is much lengthier. You can see how
this might benefit from an abstraction layer:

setupIconTray: function() {

// shortcut to the nativeApplication object
var app = air.NativeApplication.nativeApplication;
app.addEventListener(air.Event.COMPLETE, iconLoadComplete);

// create new instance of icon loader
var iconLoader = new air.Loader();

//  these lines let me add a menu to the system tray.
//  we're not going to use this for now, but I want to keep it 
around
//  icontray.menu = new air.NativeMenu();
//  var exitCommand = icontray.menu.addItem(new air.NativeMenuItem
(Exit Bullhorn));
//  exitCommand.addEventListener(air.Event.SELECT, winmgr.close);

if(air.NativeApplication.supportsSystemTrayIcon){

iconLoader.contentLoaderInfo.addEventListener(air.Event.COMPLETE,
iconLoadComplete);
iconLoader.load(new air.URLRequest(images/AIRApp_16.png));
app.icon.addEventListener
(window.runtime.flash.events.MouseEvent.CLICK, this.restore);
app.icon.tooltip = Shrinkadoo;
// app.icon.menu = icontray.menu;
}

//  if(air.NativeApplication.supportsMenu) {
//  app.menu.addSubmenu(icontray.menu, Windows);

function iconLoadComplete(event) {
app.icon.bitmaps = new runtime.Array
(event.target.content.bitmapData);
}

}


Anyway...I might start writing one, but would love to get input from
others who would be interested in helping out.




On Jun 12, 11:52 am, Jack Killpatrick j...@ihwy.com wrote:
  

This may be of interest, though it's not jQuery encapsulation, it does
provide an abstraction layer:

http://www.activerecordjs.org/index.html

I've been using the ActiveRecord js implementation in AIR for a while
now and it's proven to be solid so far:

http://www.activerecordjs.org/record.html

- Jack



Andy 

[jQuery] loading data from a file, then appending it to DIV section

2009-06-12 Thread tampascorpion

Hi,
   I am a newbie to jQuery, and I'm trying to do something that I
think can be done, just not familiar enough with jQuery to figure it
out.  I'm using Uploadify to upload multiple files.  I want to load
data from a file (using Perl), then append the results to a DIV
section in my HTML.

I can get the load to work, and the append to work independantly, but
can't figure out how to get the both to act together to achieve my
desired results.

Here is my load function that works:

 'onComplete' : function(event, queueID, fileObj, response, data) {
  $('#filesUploaded').load(/jscript/jquery/uploadify/
showimageinfo.pl?account=clientnamerawfile= + fileObj.name)
  },

It passes the info to the Perl program (I print out Client:
clientname  Rawfile: img009.jpg) so I know it's executing the Perl
pgm, but what happens is when I upload multiple files the results of
the Perl program are over-written in the DIV section:

eg:
-
Client: clientname  Rawfile: img009.jpg
  (overwrites DIV sectiion)
Client: clientname  Rawfile: img010.jpg
--


when it should look like:
- (both records should appear on the screen)
Client: clientname  Rawfile: img009.jpg
Client: clientname  Rawfile: img010.jpg
--


I get the append to work also, but it's literal text that I put in
the  argument:
$('#filesUploaded').append(/jscript/jquery/uploadify/showimageinfo.pl?
account=clientnamerawfile= + fileObj.name)
results in:
/jscript/jquery/uploadify/showimageinfo.pl?
account=clientnamerawfile=img009.jpg/jscript/jquery/uploadify/
showimageinfo.pl?account=clientnamerawfile=img010.jpg


Can someone point me in the right direction - I really need to get
both functions to work together!

Thanks!!!


J.D. Hill



[jQuery] jquery.animate with className only

2009-06-12 Thread DiggityDan

I'm new to Jquery and I was wondering if this feature exists anywhere.

the animate() function where instead of parameters you pass in a
classname and it reads the parameters from available css definitions.

I am trying to keep my css specifics out of my javascript files.


[jQuery] Re: jquery.animate with className only

2009-06-12 Thread amuhlou

This got me curious and after a little digging I find a plugin called
animateToClass

http://igorvieira.com/blog/animate-to-class-en

It seems to be what you're looking for.

cheers,
~amy

On Jun 12, 2:04 pm, DiggityDan edn...@gmail.com wrote:
 I'm new to Jquery and I was wondering if this feature exists anywhere.

 the animate() function where instead of parameters you pass in a
 classname and it reads the parameters from available css definitions.

 I am trying to keep my css specifics out of my javascript files.


[jQuery] Re: jQuery UI 1.7.2 released

2009-06-12 Thread Rey Bango


Thanks for posting this Neal!

Rey

Neal Jansons wrote:

Download:

http://blog.jqueryui.com/2009/06/jquery-ui-172/

Changelog

Summary

This is a maintenance release for jQuery UI 1.7. It changes only the
plugins listed below. In addition to the plugin fixes below, 7 new
themes were added: Sunny, Overcast, Le Frog, Flick, Pepper Grinder,
Eggplant and Dark Hive.
Widgets
Accordion

* Fixed: changestart event not documented (4471)

Datepicker

* Fixed: Datepicker: Datepicker: destroy, disable, and enable
methods affect sibling datepickers (4240)
* Fixed: Datepicker: Datepicker: option dateFormat getter does not
return same value as setter (4301)

Dialog

* Fixed: modal dialog + button locks page (4065)
* Fixed: Opening multiple modal dialogs causes access problems to
inputs (4309)

Progressbar

* Fixed: progressbar('value') returns a reference to this instead
of the value (4427)

Slider

* Fixed: ui-state-hover, ui-state-active and disabled sliders
(4391)
* Fixed: some handles get stuck when using two or more handles
(3736)
* Fixed: Slider code doesn't pack, due to missing semicolons
(4492)

Effects

* Fixed: effects.core corrupts jQuery toggle functionality (4473)

CSS Framework

* Fixed: UI Icons are not even, causes misaligned buttons (4447)
* Fixed: added a rule for widget embedding font size. Resets ui-
widget class font-size to 1em when inside another ui-widget. (r2372)
* Fixed: Update Google CDN with @import-less CSS (4463)
* Themes: minor changes to Blitzer, South Street, Cupertino, Mint
Choc, Excite Bike (4517)
* Themes: Added new gallery themes: Sunny, Overcast, Le Frog,
Flick, Pepper Grinder, Eggplant and Dark Hive (4517)

Website
Download builder

* Fixed: Redmond theme not included in latest build (4302)
* Fixed: 1.7 download fails WinZip Vista 64bit (4340)
* Fixed: Zip file containing CSS theme files does not unzip (4503)
* Fixed: Download Page Corrupt Zip File (4505)
* Fixed: Cannot download jQuery UI 1.7.1 custom theme (4507)
* Fixed: an issue with IE and the downloadbuilder (4291)
* Fixed: Custom theme generator produces buggy file (4496)
* Fixed: The Compressed (zipped) Folder is invalid or corrupted.
(4574)
* Fixed: Themes Not Downloading (4283)
* Fixed: Invalid Zip Files when downloading (4323)
* Fixed: unable to download the UI themes (4384)
* Fixed: downloadbuilder - bung zip file (4426)
* Fixed: themeroller download outputs corrupted zip file (4543)
* Fixed: Theme roller does not seem to be working (4546)
* Fixed: Custom JQuery UI - created with theme roller is producing
a corrupt zip file (4552)
* Fixed: Files for custom theme are not generated - default theme
is downloaded instead (4594)



[jQuery] Plugin API the jQuery way

2009-06-12 Thread Christopher
Hei there,

since http://marcgrabanski.com/article/jquery-tools-vs-jquery-ui it isn't
nice to make your own plugin api.

Now i am trying to build a plugin api for  a pagination in the jquery ui way
- llike that

$myDiv.pagination('click', function(){ ... });


but the whole ui construct with core and so on don't let me see the way i
have to implement the api.
does somebody know an easy plugin where i could spy in ?

thx chris


[jQuery] Re: jQuery UI 1.7.2 released

2009-06-12 Thread MorningZ

Nice!  A fixed downloader!

I was to the point where I was downloading the full blown versions and
using YUI compressor to compress myself...

Totally digging the Themeroller stuff... keep up the great work!



On Jun 12, 3:13 pm, Rey Bango r...@reybango.com wrote:
 Thanks for posting this Neal!

 Rey

 Neal Jansons wrote:
  Download:

 http://blog.jqueryui.com/2009/06/jquery-ui-172/

  Changelog

  Summary

  This is a maintenance release for jQuery UI 1.7. It changes only the
  plugins listed below. In addition to the plugin fixes below, 7 new
  themes were added: Sunny, Overcast, Le Frog, Flick, Pepper Grinder,
  Eggplant and Dark Hive.
  Widgets
  Accordion

      * Fixed: changestart event not documented (4471)

  Datepicker

      * Fixed: Datepicker: Datepicker: destroy, disable, and enable
  methods affect sibling datepickers (4240)
      * Fixed: Datepicker: Datepicker: option dateFormat getter does not
  return same value as setter (4301)

  Dialog

      * Fixed: modal dialog + button locks page (4065)
      * Fixed: Opening multiple modal dialogs causes access problems to
  inputs (4309)

  Progressbar

      * Fixed: progressbar('value') returns a reference to this instead
  of the value (4427)

  Slider

      * Fixed: ui-state-hover, ui-state-active and disabled sliders
  (4391)
      * Fixed: some handles get stuck when using two or more handles
  (3736)
      * Fixed: Slider code doesn't pack, due to missing semicolons
  (4492)

  Effects

      * Fixed: effects.core corrupts jQuery toggle functionality (4473)

  CSS Framework

      * Fixed: UI Icons are not even, causes misaligned buttons (4447)
      * Fixed: added a rule for widget embedding font size. Resets ui-
  widget class font-size to 1em when inside another ui-widget. (r2372)
      * Fixed: Update Google CDN with @import-less CSS (4463)
      * Themes: minor changes to Blitzer, South Street, Cupertino, Mint
  Choc, Excite Bike (4517)
      * Themes: Added new gallery themes: Sunny, Overcast, Le Frog,
  Flick, Pepper Grinder, Eggplant and Dark Hive (4517)

  Website
  Download builder

      * Fixed: Redmond theme not included in latest build (4302)
      * Fixed: 1.7 download fails WinZip Vista 64bit (4340)
      * Fixed: Zip file containing CSS theme files does not unzip (4503)
      * Fixed: Download Page Corrupt Zip File (4505)
      * Fixed: Cannot download jQuery UI 1.7.1 custom theme (4507)
      * Fixed: an issue with IE and the downloadbuilder (4291)
      * Fixed: Custom theme generator produces buggy file (4496)
      * Fixed: The Compressed (zipped) Folder is invalid or corrupted.
  (4574)
      * Fixed: Themes Not Downloading (4283)
      * Fixed: Invalid Zip Files when downloading (4323)
      * Fixed: unable to download the UI themes (4384)
      * Fixed: downloadbuilder - bung zip file (4426)
      * Fixed: themeroller download outputs corrupted zip file (4543)
      * Fixed: Theme roller does not seem to be working (4546)
      * Fixed: Custom JQuery UI - created with theme roller is producing
  a corrupt zip file (4552)
      * Fixed: Files for custom theme are not generated - default theme
  is downloaded instead (4594)


[jQuery] Find the height of a div, apply the height to other divs, redo the heights on click

2009-06-12 Thread Dave

I am working on a UI that, when you click on a menu option, a div
opens and show three divs inside. These divs all have different
heights. The heights are based on the divs content.

The problem I'm having is... how do I measure what the divs height
should be? IE, how do I grab the height for a div BEFORE it has had
any style applied to it.

Any ideas?

Lemme know.
Dave


[jQuery] Re: Can I validate and update the entered value before doing the search?

2009-06-12 Thread JohnT

Hi. I the jQuery source code there is a function called onChange that
sends the value of the input box to the backend server and/or checks
the local cache. I've implemented a function that checks for valid
characters via a regex first before send the result to the backend
server for processing. I suppose you could do something similar there
with the string replace function.

John

On May 14, 8:58 am, Ulf Renman ulf.ren...@gmail.com wrote:
 Hi

 When typing data into the autocomplete-field the list of matches is updated
 at every key pressed.
 Is it possible in any way to check and correct the data before doing the
 match. Or could you alter the way the match is done.

 The perfect example is when you have lots of users entering decimal values
 into a filed. Some people uses comma and some decimal-point. So you would
 like to permit both 2.23 and 2,23 to be matched against 2.23 in the list.

 I have some other usecases aswell so I would really like some suggestions on
 this.

 I have posted a similar question 
 here:http://stackoverflow.com/questions/857690/how-do-i-alter-enterd-text-...

 Thanks
 /Ulf Renman


[jQuery] json question.

2009-06-12 Thread David .Wu

This the html file
I want to catch the object property inside obj and make them a json
string like

'{div: [{name: div1, w: 100, h: 100}, {name: div2,
w: 200, h: 200 }], img: [{name:, img1, w: 50, h:
50}]}';

any suggestion to accomplish it?

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=utf-8 /
titlejson question/title
script type=text/javascript src=js/jquery-1.3.2.min.js/script
/head

body
div id=obj
img src=1.jpg width=50 height=50 status=img id=img1 /
div id=div1 status=div style=width: 100px; height: 100px;/
div
div id=div2 status=div style=width: 200px; height: 200px;/
div
/div
/body
/html


[jQuery] vertically scroll text

2009-06-12 Thread -Dman100-

Is there a jquery plugin that can scroll text in a div vertically?  I
have div with a set height that is filled with more content than can
be seen.  I'm looking for a way to vertically scroll the text or some
way to page thru the content.

Thanks for any help.


[jQuery] cycle plugin pagerAnchorBuilder

2009-06-12 Thread jjon

Dear all,

I've worked out that the pagerAnchorBuilder option will probably get
me what I'm trying for, but I'm trying to add a wrinkle.

I've got a slide show using next/prev, but I also want the user to be
able to click on links in ullis to go to specific images in the
slide collection.

the image collection looks something like this:
div id=cycleport
img class=cimg src=images/1.jpg alt = /
img class=cimg src=images/2.jpg alt = /
img class=cimg src=images/3.jpg alt = /
img class=cimg src=images/4.jpg alt = /
img class=cimg src=images/5.jpg alt = /
img class=cimg src=images/6.jpg alt = /
/div

and the links list like this:
ul
lia href=#Foo text/a/li
lia href=#Bar text/a/li
lia href=#Baz text/a/li
/ul

I'd like the user to be able to click on Foo text and fade in 1.jpg,
Bar text to fade in 3.jpg, and on Baz text to fade in 5.jpg. Could
I add an attribute to the anchors that would feed the necessary index
to the pagerAnchorBuilder?

currently in the cycle options object :
pagerAnchorBuilder: function(idx, slide) {
return '#clientList li:eq(' + (idx) + ') a';
}

this works fine and it doesn't disrupt the prev/next cycle, but it
just cycles 1.jpg, 2.jpg, 3.jpg

Any suggestions?

Jon


[jQuery] Re: AIR plugin for jQuery?

2009-06-12 Thread Andy Matthews
I suppose you're right...
 
The AIR API is actually pretty well done. It needs better documentation, but
Adobe's done a great job setting it all up. I suppose I'm talking about a
framework then. I already have a series of files for my AIR apps which I
treat as classes. Interface.js deals with interface elements, sqlite.js
deals with SQLite implementation, etc. But those files are specific to my
app.
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jack Killpatrick
Sent: Friday, June 12, 2009 1:49 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: AIR plugin for jQuery?


From your examples, it looks like you're thinking more about helper methods
than just exposing the API, which makes sense, but then the question is
what helper methods should we create to make this a good framework? (I
think). If that's the case, have you thought about it much? Helper method
meaning something that wraps a chunk of air native code up to support some
reusable functionality beyond the lower level air stuff.

- Jack

Andy Matthews wrote: 

Jack...
 
I just blogged about this idea:
http://andymatthews.net/read/2009/06/12/jQuery-and-AIR:-AIR-methods-abstract
ed-into-jQuery-plugin
 
I think that this is a great idea and I'd love to get involved in it, but
I'd want others to be included as well. My jQuery foo is fairly strong, but
I've never written a plugin, and would really want someone to provide a good
code review for best practices. The cool thing is that there wouldn't be
much jQuery in the plugin. It's mostly an abstraction of the AIR APIs into
a tighter, simpler package.
 
I think the best place to start would be some of the lower hanging fruit.
Some of the API methods that are straightforward and don't require a lot of
options. Then we could move into SQLite, File System access, etc.
 
Thoughts?

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jack Killpatrick
Sent: Friday, June 12, 2009 1:07 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: AIR plugin for jQuery?


OK, yeah, that's what I figured you were looking for. I haven't seen
anything like that, but it would be cool if it existed. Doesn't seem like it
would be a ton of work (famous last words). Have you got any thoughts
about how it might work across the sandbox bridges? I use the bridges and
build the non-app sandbox stuff very much like a regular web app and create
and expose certain functions via the bridges to/from the app and non-app
sandbox, since all the direct air API access can only happen in the app
sandbox.

I haven't really thought it out, but wondering if maybe you have. Maybe
you're looking maybe for something that would just be used in the app
sandbox and it'd be up to the end user to create the bridge stuff that they
need?

- Jack


Andy Matthews wrote: 

Thanks Jack...that's not quite what I meant.



For example, even though the AIR method for minimizing a window to the

system tray is short:

nativeWindow.minimize();



It would be cool if this functionality was packaged up so that you

could apply the minimize method directly to an object. Here's what I

do now:



// this assigns the minimize functionality to the minimize button

$('#minimize').bind('click', function(event) {

iface.minimize();

});



and here's how it could look:

// this assigns the minimize functionality to the minimize button

$('#minimize').air.minimize();



Obviously that's not a great example, but the code for adding a menu

to an icon running in the task bar is much lengthier. You can see how

this might benefit from an abstraction layer:



setupIconTray: function() {



// shortcut to the nativeApplication object

var app = air.NativeApplication.nativeApplication;

app.addEventListener(air.Event.COMPLETE, iconLoadComplete);



// create new instance of icon loader

var iconLoader = new air.Loader();



//  these lines let me add a menu to the system tray.

//  we're not going to use this for now, but I want to keep it
around

//  icontray.menu = new air.NativeMenu();

//  var exitCommand = icontray.menu.addItem(new
air.NativeMenuItem

(Exit Bullhorn));

//  exitCommand.addEventListener(air.Event.SELECT,
winmgr.close);



if(air.NativeApplication.supportsSystemTrayIcon){


iconLoader.contentLoaderInfo.addEventListener(air.Event.COMPLETE,

iconLoadComplete);

iconLoader.load(new air.URLRequest(images/AIRApp_16.png));

app.icon.addEventListener

(window.runtime.flash.events.MouseEvent.CLICK, this.restore);

app.icon.tooltip = Shrinkadoo;

// app.icon.menu = icontray.menu;

}



//  if(air.NativeApplication.supportsMenu) {

//  app.menu.addSubmenu(icontray.menu, Windows);



function iconLoadComplete(event) {


[jQuery] Re: autocomplete

2009-06-12 Thread Tom Worster

On 6/10/09 1:11 AM, smiling_face rd.welco...@gmail.com wrote:

 
 first of all thanks for your gr8 plugins to add autocomplete feature
 using jquery. but I am facing a problem to implement this in my
 application. As in error console it is showing
 syntext error
 .ac_results {
 
 
  and showing the list of probables as simple ul viwe (with bullets)
 plz suggest me further.
 
  I am using  Revision: $Id: jquery.autocomplete.js 5747 2008-06-25
 18:30:55Z

are you using the stylesheet that comes with the plugin?




[jQuery] Re: Autocomplete Behavior clarification

2009-06-12 Thread Tom Worster

On 6/10/09 1:17 PM, Brad nrmlcrpt...@gmail.com wrote:

 
 I have an Autocomplete on a form that uses local data. However, the
 input allows users to enter values that are not in the local data
 array. If the user enters and selects matching data the .result
 callback function sets a corresponding key value that is submitted
 with the form. The intent is to help enter known values, but others
 are allowed.
 
 What I'm observing is that if a match is entered, the corresponding
 key will be set. But if the user further edits the matched value the
 autocomplete doesn't fire again. This creates a problem because the
 key never changes. Is that expected autocomplete behavior? If so, is
 there a workaround?
 
 Here's the code:
 
 $(#calibration_location_name).autocomplete( locations, {
 minChars: 0,
 width: 310,
 selectFirst: false,
 scroll: true,
 matchContains: word,
 mustMatch: false,
 autoFill: false,
 formatItem: function(row, i, max) {
 return row.name;
 },
 formatMatch: function(row, i, max) {
 return row.name;
 },
 formatResult: function(row) {
 return row.name;
 }
 })
 .result(LocationAutoCompleteCallback)
 .blur( function(){
 if($(this).val() === '') {
 $(#calibration_locationkey).val(0);
 }
 });

i'm not sure i understand your problem entirely but my guess is that the
formatX methods aren't necessarily the right solution for your problem. if
what you want is to submit the key associated with the string in the input
if and only if one exists in your array then you could perhaps do the key
lookup at form submit time quite independently of the autocompletion plugin. 




[jQuery] Re: DivMenu

2009-06-12 Thread Glazz

nobody can help me out?


[jQuery] jQuery Conference for 2009?

2009-06-12 Thread ak732

Any word on the much-anticipated jQuery conference 2009?


[jQuery] ajax start stop of multiple animations

2009-06-12 Thread Peter Marino
Hi jQuery,
I have successfully got my ajax working.
I'm now in the processing of put an animation gif on the site to show it's
sending/retrieving date via. ajax.

my problem is that I have multiple ajax calls on the same page.. and I want
each call to be represented by
a unique gif animation.

I tried to use the ajaxStart and ajaxStop which works fine but seems to only
work on a global scope which
means all my animations become active (visible) when an ajax event is
called.

I'm using the $.ajax method.. is there any way I can make each $.ajax
show/hide the gif animation the relates
to that $.ajax

any suggestions?
Peter

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


[jQuery] tables and chairs app

2009-06-12 Thread Jack Killpatrick


Hi All,

I'm thinking out how to put together a web app that allows a user to 
have a room and in that room, place tables and chairs, which will then 
be used for a scheduling app. The scheduling part I'm on top of. The 
graphical part for positioning tables and chairs is what I'm looking for 
a good solution to.


At minimum the user has to be able to drag/drop and rotate the tables 
and chairs, to position them in a way that resembles the real room. 
Ideally, they should be able to either resize the table (drag sides of a 
rectangle or enlarge a circle) or, less desirably, I could give them a 
set of different tables to choose from (or both).


Right now I'm thinking of using canvas and looking into jQuery plugins. 
Any pointers?


Thanks,
Jack



[jQuery] [autocomplete]

2009-06-12 Thread shaded

im a newbie trying to use the autocomplete plugin. I have a php array
returning a name and an id.

the autocomplete drop down displays only the first value before the |
in   name|id

This is fine but how do i get the 'id' part to be stored in a hidden
field. I've looked at the examples 
herehttp://view.jquery.com/trunk/plugins/autocomplete/demo/
and it seems single bird does what i need, but im not sure how the
hidden field get populated.

please help
thanks.


[jQuery] jQuery's :nth-child selector doesn't work inside GreaseMonkey 0.8

2009-06-12 Thread elzr

Hi,

This is my first post here and I did try searching for this in the
archives. Please be gentle.

I believe jQuery's :nth-child selector doesn't work inside
GreaseMonkey 0.8.
(At the bottom is a quick GM script to test this.)
Why is this?
Is this a known limitation from working inside GreaseMonkey?
Can anyone recommend a way around this?

Also, why is it that _some_ (definitely not all)  jQuery queries run
*much* slower inside GreaseMonkey, I don't have a quick benchmark test
right now, but I've noticed it often as I was building a pretty
complex GM script that relied heavily in GM, 
http://elzr.com/posts/backbars-on-social-link-sites.
I would run my code outside GM, in Firebug, and things would be
snappy, inside GM, the browser was brought to its knees. I know I'm
being vague but I was wondering if there are some architectural
reasons in GM or jQuery why this would be the case.

Thanks!

-elzr

// ==UserScript==
// @name  Test of nth-child
// @namespace http://elzr.com
// @description   nth-child doesn't work in jQuery within GreaseMonkey
// @include   http://en.wikipedia.org/*
// @require   http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js
// @authorEliazar Parra elzr.com
// ==/UserScript==
//
// For detailed info and screenshots see 
http://elzr.com/posts/wikipedia-backbars

$(document).ready(function() {
console.log($('a:nth-child(1)').length)
});


[jQuery] replace text on hover

2009-06-12 Thread aw

Hey there, I'm redesigning my website at the moment and am looking to
do things a little more efficiently this time around.
Currently, I have something that looks like this like this:


HEADING NUMBER ONE
image one
image two
image three

HEADING NUMBER TWO
image four
image five
image six


When someone hovers over image one, the actual text of HEADING NUMBER
ONE changes to IMAGE ONE IS COOL, and reverts when their cursor
passes out of the image.
When someone hovers over image five, the actual text of HEADING
NUMBER TWO changes to IMAGE FIVE IS THE COOLEST, and reverts when
their cursor passes out of the image.

The images in question will actually be used to manipulate a
Galleriffic 1.0 slideshow, built on jQuery, so I'd love to find a
nice, efficient way to do this, also using jQuery.

Any thoughts?
Thanks!



[jQuery] Superfish menu issue - flyouts expand beyond window boundaries

2009-06-12 Thread fongd

Hi,

I'm using Superfish to generate a horizontal menu for a project and
the problem I'm having is that the flyout menus close to the right-
hand side of the page run off the right-edge of the browser window
instead of wrapping around like other menu systems I've used (this
project was started before I got involved, hence my unfamiliarity with
Superfish). Is there a way to fix this to get the desired behaviour? I
notice that the examples on the Superfish website suffer from the same
problem.

Thanks,

-f-


--
Derek Fong
Web Application Developer
subtitle designs inc. http://www.subtitled.com/

Mistakes are the portals of discovery. --James Joyce
GPG key/fingerprint available upon request 


[jQuery] Datepicker ui Altering Button Panel

2009-06-12 Thread aronduby

On the UI website under the datepicker display button bar option it
says

Each button is enabled by default when the bar is displayed, but can
be turned off with additional options. Button text is customizable.

I can't find anywhere that states how to turn off buttons or customize
the text. Anybody know how to accomplish this?

More importantly, is it possible to add buttons to this panel? Ideally
there would be a way I could pass buttons to it just like I do for
dialogs.


[jQuery] Using Zend IDE with jquery

2009-06-12 Thread Arun

Hi,
Has anyone ever tried using the zend ide with jquery? Any comments on
this would be appreciated.

Arun


[jQuery] Re: remove question

2009-06-12 Thread brian

On Fri, Jun 12, 2009 at 2:37 PM, amuhlouamysch...@gmail.com wrote:

 putting it all together, you'd get something like:

 $('#div1').replaceWith($('#div2')).remove();

 first you find div1, then replace it with div2, then remove div1

There's no need for remove() because it will have been replaced already.


[jQuery] Re: css() function returns different results on different browsers

2009-06-12 Thread Dave Methvin

 The issue is on what I get from this function in
 Internet Explorer and in Firefox:
 IE : url(http://blabla/images/bg_round.png;)
 FF : url(http://blabla/images/bg_round.png)

Either is valid CSS; the URL only needs to be quoted if it contains
certain special characters.

http://www.w3.org/TR/CSS2/syndata.html#uri

If you are trying to parse out the URL, your code needs to be able to
handle either format. The browser should accept either format,
although it wouldn't surprise me if IE was pickier.

 PS: sorry for my English (I'm French)

Your English is excellent!


[jQuery] Re: replace text on hover

2009-06-12 Thread waseem sabjee
script type=text/javascript

$(function() { // wait for page to fully load

// if you want the text to revert on mouse out set this placeholder
var placeholdertext = Heading Number One;
// create an array of image text
var imagetext = new Array();
// assing text to each array note : 0 = first image
imagetext[0] = Image One is cool;
// JQuery hover function
$(.imgone).hover(function() {
// hover enter
// replace the heading text
$(.heading).text(imagetext[0]);

}, function() {
// hover exit
// revert the heading text back.
$(.heading).text(placeholdertext);

});

});

/script

The Important thing is A JQuery hover event is a little different from a CSS
hover event as element properties do not automatically revert to what it
previously was

On Fri, Jun 12, 2009 at 11:27 PM, aw alokw...@gmail.com wrote:


 Hey there, I'm redesigning my website at the moment and am looking to
 do things a little more efficiently this time around.
 Currently, I have something that looks like this like this:


 HEADING NUMBER ONE
 image one
 image two
 image three

 HEADING NUMBER TWO
 image four
 image five
 image six


 When someone hovers over image one, the actual text of HEADING NUMBER
 ONE changes to IMAGE ONE IS COOL, and reverts when their cursor
 passes out of the image.
 When someone hovers over image five, the actual text of HEADING
 NUMBER TWO changes to IMAGE FIVE IS THE COOLEST, and reverts when
 their cursor passes out of the image.

 The images in question will actually be used to manipulate a
 Galleriffic 1.0 slideshow, built on jQuery, so I'd love to find a
 nice, efficient way to do this, also using jQuery.

 Any thoughts?
 Thanks!




[jQuery] Re: Superfish menu issue - flyouts expand beyond window boundaries

2009-06-12 Thread Charlie





simplest solution is to add an extra class to the culprit sub ul's
either by hard coding it in markup or using jquery . From there it
depends on the situation you have, number of sub levels and which
levels are being troublesome. If it's just a matter of sliding first
level left a bit, use negative left in your css. Can also have subs you
select by class open to left side instead of right with css adjustments
of float and position. 



fongd wrote:

  Hi,

I'm using Superfish to generate a horizontal menu for a project and
the problem I'm having is that the flyout menus close to the right-
hand side of the page run off the right-edge of the browser window
instead of wrapping around like other menu systems I've used (this
project was started before I got involved, hence my unfamiliarity with
Superfish). Is there a way to fix this to get the desired behaviour? I
notice that the examples on the Superfish website suffer from the same
problem.

Thanks,

-f-


--
Derek Fong
Web Application Developer
subtitle designs inc. http://www.subtitled.com/

"Mistakes are the portals of discovery." --James Joyce
GPG key/fingerprint available upon request