[jQuery] Re: XML Sorting using jQuery - is it possible?

2009-01-22 Thread Ricardo Tomasi

What kind of sorting?

xml = 'base';
xml += 'item type=cone/item';
xml += 'item type=btwo/item';
xml += 'item type=dthree/item';
xml += 'item type=fthree/item';
xml += 'item type=athree/item';
xml += '/base';

var sorted = $(xml).filter('item').get().sort(function(a,b){
   var at = $(a).attr('type'), bt = $(b).attr('type');
   return (at  bt) ? -1 : 1;
});

$(sorted).each(function(){
  console.log( this );
});

https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Global_Objects/Array/Sort

- ricardo

On Jan 21, 10:01 pm, skube sku...@gmail.com wrote:
 It seems jQuery is really great at traversing an XML object. It is
 quite easy to gather and filter node data. However I can't seem to
 find any information regarding sorting XML using jQuery. Is it
 possible? Or is there a plug-in?

 I have a project which requires me to read an XML file, then filter
 and sort the data. Filtering I can do, but I have no idea how to sort
 XML. Since arrays are easily sortable in JS, my idea is to convert the
 XML into an array first, then filter the array (which is not as easy
 as filtering XML w/ jQuery) then sort the array.

 Does anyone have any better ideas?

 thanks,
 skube


[jQuery] Re: ui.tabs question

2009-01-22 Thread Alexandre Plennevaux

So i've tried using the latest build of ui1.6rc5, including the tabs +
jquery 1.3 and i reproduced exactly the demo sample available on the
jqueryUI ui.Tabs demo page with the required CSS files, but it still
breaks the tabbing functionality. I've reduced my code to simply call
$(#mydiv  ul).tabs();
Klaus can you please tell me if something has changed in the necessary
html markup from tabs 3 to the latest tab release? Is there something
else, specific, that i should look for ?
I'll try to isolate further my implementation to understand what the
problem is in the meanwhile but any pointers would be time savers for
me. Thanks a lot

alexandre

On Wed, Jan 21, 2009 at 11:30 PM, Alexandre Plennevaux
aplennev...@gmail.com wrote:
 In that case, thank you Klaus for the preventive comment.

 On Wed, Jan 21, 2009 at 11:25 PM, Klaus Hartl
 klaus.ha...@googlemail.com wrote:

 Sorry to hear that, but I was only referring to MorningZ's example,
 which contained an outdated syntax and I wanted to prevent you (and
 everybody else) to use it and wonder why it wouldn't work.

 I'll try to quote better next time.

 --Klaus


 On 21 Jan., 22:43, Alexandre Plennevaux aplennev...@gmail.com wrote:
 Well, quite Frankly Klaus, i started this project 3 years ago and i
 used the tabs when it was but a plugin like another.
 The fact that now i have to integrate ui.core with ui.tabs is not
 really a good thing in my case: i don't have needs for anything else
 from the ui library, therefore i wish that alongside, there was a
 distro as a standalone plugin.
 I'm using jquery 1.3 so i've made myself a personalised ui distro
 using rc5, but now it breaks the hell out of my app, i don't have tabs
 anymore so here i go, back to the starting point, redoing things that
 were actually working well, but for that one missing callback.

 ah, it's hard to have a reproach to make to jquery. First in 3 years
 in my case, and it's not like i'm mad or anything. Just ... annoyed.

 :)

 On Wed, Jan 21, 2009 at 7:30 PM, Klaus Hartl klaus.ha...@googlemail.com 
 wrote:

  Seems to be using a fairly outdated version. The event's name to bind
  has changed since quite a while. Why not take a look at the
  documentation:
 http://docs.jquery.com/UI/Tabs#Events

  --Klaus

  On 21 Jan., 16:36, MorningZ morni...@gmail.com wrote:
  I've got this code working if it helps

  $(#TabContainer ul.tabs).tabs().bind(select.ui-tabs, function(e,
  ui) {
   //Code inside here runs when tab is selected

  });

  On Jan 21, 10:29 am, Alexandre Plennevaux aplennev...@gmail.com
  wrote:

   Hi all,

   I'm using ui.tabs and i would like to trigger a function when a tab is
   clicked, or more precisely, when a new panel gets shown.

   I figured from the doc i should use the select callback but that does
   not work... HEre is the code i use

   var $tabs = $(#tabbedTextContent).tabs({
   selected: 0,
   fx: { opacity: 'toggle', duration: 
   200 },
   select: function(e, ui)
   {
   alert(hi);  //!-- the
   alert() never gets called
   var $img =
   $('#tabbedTextContent div.ui-tabs_panel:visible img.albumImage');
   if ($img.length)
   {

   $('#imageLegend').text($img.attr('title'));
   }
   }
   });

   So, the tabs are displayed and work correctly, but  the select
   callback (namely, the alert() call) never gets fired...

   Right after that block of code i have

   $('#tabbedTextContent img.albumImage')
   .css('cursor', 'pointer')
   //.attr('title', Click to view the 
   next image)
   .click(function()
   { // in image albums, clicking on an
   image brings the user to the next image
   var currentTab =
   $tabs.data('selected.tabs');

   $('#imageLegend').text($(this).attr('title'));
   var nextTab = (currentTab 
   $tabs.length - 1) ? currentTab + 1 : 0;
   $tabs.tabs('select', nextTab);
   return false;
   });

   which works just fine.



[jQuery] .append with a var

2009-01-22 Thread Nikola

Hello, I am trying to figure out how to .append a php session $var to
a given div.  I'm not sure what the correct syntax is.  I was trying
something along the lines of how I'd display the var in HTML:

$(#someDiv).append(Some value is:b'.$var.'/b);

I'm not sure the best way to go about this.  Any input is
appreciated.  Thanks much.


[jQuery] Re: select next n somethings

2009-01-22 Thread Ricardo Tomasi

Yeah, 'prox' should be 'n'. I got the wrong version of the script,
here is the proper one:

$.fn.until = function(end){
   var n = this.next(), h = [];
   while( n[0]  !n.is(end) ) {
 h.push(n[0]);
 n = n.next();
   }
   return this.add(h);
};

$('nada') or was there to create an empty jQuery object, as $()
returns the document. John Resig's plugin performs a lot better (I
finally understood it!), and works on multiple elements.

I didn't get any errors on Safari (windows) with it, test page at
http://jsbin.com/okoce/

cheers,
- ricardo

On Jan 22, 12:36 am, JLundell jlund...@pobox.com wrote:
 RIcardo,

 Thanks. Removing the .r and properly (I think) installing nextUntil as
 a plugin (that was part of my problem) made it work for Mac FF3, but
 not for Safari, which still complains about an undefined symbol.
 Unfortunately, the symbol isn't specified in the log, an the line
 number reference is past the end.

 WRT until: I take it that 'prox' should be 'n'?

 And what's the 'end' argument? Same as nextUntil()'s?

 Out of idle curiosity, what's the 'nada' business?

 On Jan 19, 11:56 pm, Ricardo Tomasi ricardob...@gmail.com wrote:

  Hmm. No idea what that 'r' property was.

  Changing that line to

  if ( jQuery.filter( expr, [i] ).length ) break;

  seems to fix it.

  or use this:

  $.fn.until = function(end){
     end = $(end)[0];
     var n = this.next(), h = $('nada');
     while( n[0] != end ) {
           h = h.add(prox);
           n = n.next();
     }
     return this.add(h);

  };

  cheers,
  - ricardo

  On Jan 19, 10:20 pm,JLundelljlund...@pobox.com wrote:

   Well, almost. I'm getting an undefined on this line, I think on the
   length call:

   if ( jQuery.filter( expr, [i] ).r.length ) break;


[jQuery] Re: AJAX delay response.

2009-01-22 Thread Genus Project

Bump.

It is the same on IE7.
I really have no idea why. I am using this same setup to my previous
projects but they are all working fine :)


On Jan 21, 6:14 am, Samuel samuel.yh...@gmail.com wrote:
 I think this is a firebug problem, which delayed the page load. if you
 disable firebug, it can be loaded much faster ( hundreds of times faster).

 For gmail, there's the similar problem.



 On Wed, Jan 21, 2009 at 1:00 AM, Zach zach.leo.ship...@gmail.com wrote:

  I need to bump this.  I'm getting the exact same problem.  Using
  jQuery 1.3 and the load() function.

  Firebug will show the full response within a couple hundred
  milliseconds, but the browser will not display the response for at
  least three more seconds.  I'm really not sure what's going on.  I'll
  be working on this one.  If any kind soul would like to lend a hand,
  you can view the site athttp://tev.educationvacation.org.  Thanks!

  On Jan 12, 1:27 am, Genus Project genusproj...@gmail.com wrote:
   Could anyone tell me what is wrong with this code? :(

   function sendAjaxRequest(param,listener){
   $.ajax({
      type: POST,
      dataType: json,
      url: index.php?page=ajax,
      data: param,
      success: function(data){
        if(data.status==0){
           $(#+listener).trigger('trueSuccess',[data]);
        }else{
           $(#+listener).trigger('trueError',[data]);
        }
    },
       error: function(){
         data='An Unexpected error has occured. Please try again later.';
         $(#+listener).trigger('unexpectedError',[data]);
       }
     });}

   success event trigger a few more seconds after the response is already
   received from the server.

   1. response received + few more seconds before triggering success.
   this is the only time i encountered this one. some of my projects is
   not the same as this. But on my previous projects i did not put it in
   a function and not in a separate JS file. this is right here is on a
   different js file and within a function. Does it matter? Im really
   lost pls help

   website ishttp://creativouae.com/creativo_leave

 --
 Samuel Wu


[jQuery] Re: Download a file from server...

2009-01-22 Thread Genus Project

or you can do this.
1. your php create the file from your post.
2. return something to the script ($.post) that says you have
successfully created the file
or maybe with the filepath in it in json or whichever format it
is.
3. redirect your current window to the path of this file.

But it may show the file as is because browser can usually display a
txt file.

I am not sure how to open up the browser dialog save us box :)



On Jan 22, 3:46 am, AlexDeLarge perkeleenperkelesaat...@gmail.com
wrote:
 Hi,

 I have situation like this: I post certain data with $.post to PHP-
 script which is supposed to handle the data, create a file from it and
 then trigger browser to open a Save As-dialog. Everything works just
 fine except the Save As-dialog, I just can't make it pop-up.

 For the Save As dialog the PHP-script ha s following statements:

 header('Content-disposition: attachment; filename=stats.txt');
 header('Content-type: text/plain');
 readfile('stats.txt');

 And this just doesn't work through $.post, or at least I can't make it
 happen.

 Is there any way to make this work?


[jQuery] Slide down and up element and remain vertical size

2009-01-22 Thread Mech7

I have an example here:
http://www.mech7.net/tmp/slide_down/

When i hover the elements it jumps a little in vertical space, does
anybody know a solution how to remain the space my code is :

$(document).ready(function(){
$('#portfolio div.item:first  div').addClass('open');
$('#portfolio div.item:first  h3').addClass('active');

function slideDownEffect(){
var speed = 100;

$('#portfolio div.item').mouseenter(function () {
if($(this).children('h3').hasClass('active') == false)
{
$('#portfolio div.item div').slideUp(speed);
$(this).children('div').slideDown(speed, 
slideDownEffect);
$(#portfolio div.item).unbind('mouseenter');
$('#portfolio div.item h3').removeClass('active');
$(this).children('h3').addClass('active');
}
});
}
slideDownEffect();
});


[jQuery] select the parent recursively

2009-01-22 Thread Gill Bates

current we have the html like following and I always want get element:
span xmlns=asa started from the element input:

span xmlns=asa
   span
 p
  input value= size=10 class=exercise-input exercise-input-
formula name=1/
 /p
  /span
/span

or

span xmlns=asa
  span/span
   span
 p
  input value= size=10 class=exercise-input exercise-input-
formula name=1/
 /p
  /span
/span

so the only fixed element in this html is the input element and input
has a far far parent span xmlns=asa.
Now if I want select this span xmlns=asa, can I use some recursive
method like:

var $replace=jQuery(input);
while($replace.attr(xmlns)!=asa){
$replace=$replace.parent();
alert($replace.attr(xmlns));
}



apparently this code above doesn't work, but it's my idea.
Anyone could help?


[jQuery] Re: .append with a var

2009-01-22 Thread Liam Potter


you would need to have the javascript with the php in the same file so 
it would be something like this


?php $var = testing; ?

script type=text/javascript
$(function () {
   $(#someDiv).append(Some value is:b?php $var ?/b);
});
/script


Nikola wrote:

Hello, I am trying to figure out how to .append a php session $var to
a given div.  I'm not sure what the correct syntax is.  I was trying
something along the lines of how I'd display the var in HTML:

$(#someDiv).append(Some value is:b'.$var.'/b);

I'm not sure the best way to go about this.  Any input is
appreciated.  Thanks much.
  


[jQuery] Is A Child Of?

2009-01-22 Thread James Hughes

 
Hi,
 
This is probably a really easy question an I apologise if it appear stupid but 
I am clueless right now.  Given 2 jQuery objects (a,b) how can I tell if b is a 
child of a?
 
James


This e-mail is intended solely for the addressee and is strictly confidential; 
if you are not the addressee please destroy the message and all copies. Any 
opinion or information contained in this email or its attachments that does not 
relate to the business of Kainos 
is personal to the sender and is not given by or endorsed by Kainos. Kainos is 
the trading name of Kainos Software Limited, registered in Northern Ireland 
under company number: NI19370, having its registered offices at: Kainos House, 
4-6 Upper Crescent, Belfast, BT7 1NT, 
Northern Ireland. Registered in the UK for VAT under number: 454598802 and 
registered in Ireland for VAT under number: 9950340E. This email has been 
scanned for all known viruses by MessageLabs but is not guaranteed to be virus 
free; further terms and conditions may be 
found on our website - www.kainos.com 




[jQuery] not updating images after ajax request

2009-01-22 Thread pere roca


hi all,

I'm having problems updating images dynamically. The thing is that the src
attribute is allways the same (that's not an error but I need it this way)
but the file the src points to is dynamically created via php (an xml that
is used to create the new image).
The new image is not updated (well, sometimes work, sometimes not, that's
the worse);
if I take from the HTML, the src of the image and open in a new window, the
correct image appears. 

That is:
$.get('function.php', function()
{ 
//function.php has created a new xml file 
$(#image).show();
//i have tried a setTimeout of 2 sec, suspecting that the new XML is not
completely created (it should be correctly created, as we are on tha
callback) without success; 
})

any idea? 
thanks!

Pere
-- 
View this message in context: 
http://www.nabble.com/not-updating-images-after-ajax-request-tp21600610s27240p21600610.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: referring back to a specific element

2009-01-22 Thread Ron

Oh... I thought that there must be some kind of an attribute, like
this.objid or something similar to get the reference to the object,
but could not find it. Apparently it is much simpler than I thought...
I did a quick test and it seems to be working fine. Thanks a lot
Ricardo.


[jQuery] Re: Slide down and up element and remain vertical size

2009-01-22 Thread Richard D. Worth
You may want to look at the jQuery UI Accordion (if you haven't already):

http://ui.jquery.com/demos/accordion#mouseover

- Richard

On Thu, Jan 22, 2009 at 4:08 AM, Mech7 chris.de@gmail.com wrote:


 I have an example here:
 http://www.mech7.net/tmp/slide_down/

 When i hover the elements it jumps a little in vertical space, does
 anybody know a solution how to remain the space my code is :

 $(document).ready(function(){
$('#portfolio div.item:first  div').addClass('open');
$('#portfolio div.item:first  h3').addClass('active');

function slideDownEffect(){
var speed = 100;

$('#portfolio div.item').mouseenter(function () {
if($(this).children('h3').hasClass('active') ==
 false)
 {
$('#portfolio div.item div').slideUp(speed);
$(this).children('div').slideDown(speed,
 slideDownEffect);
$(#portfolio div.item).unbind('mouseenter');
$('#portfolio div.item h3').removeClass('active');
$(this).children('h3').addClass('active');
}
});
}
slideDownEffect();
 });


[jQuery] Re: Is A Child Of?

2009-01-22 Thread Richard D. Worth
My first thought was to try these and neither worked

$(b, a).length

a.find(b).length

Also, no luck here

$(b[0], a[0]).length

a.find(b[0]).length

In the end this is the one I could get to work

$(b).parents().filter(function() { return this === a[0]; }).length

- Richard

On Thu, Jan 22, 2009 at 4:25 AM, James Hughes j.hug...@kainos.com wrote:



 Hi,

 This is probably a really easy question an I apologise if it appear stupid
 but I am clueless right now.  Given 2 jQuery objects (a,b) how can I tell if
 b is a child of a?

 James

 
 This e-mail is intended solely for the addressee and is strictly
 confidential; if you are not the addressee please destroy the message and
 all copies. Any opinion or information contained in this email or its
 attachments that does not relate to the business of Kainos
 is personal to the sender and is not given by or endorsed by Kainos. Kainos
 is the trading name of Kainos Software Limited, registered in Northern
 Ireland under company number: NI19370, having its registered offices at:
 Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT,
 Northern Ireland. Registered in the UK for VAT under number: 454598802 and
 registered in Ireland for VAT under number: 9950340E. This email has been
 scanned for all known viruses by MessageLabs but is not guaranteed to be
 virus free; further terms and conditions may be
 found on our website - www.kainos.com





[jQuery] Re: Is A Child Of?

2009-01-22 Thread James Hughes

Excellent.  Funny it seems like such a common task when you think about it 
though I've never needed it before and given the verbosity of the solution it 
seems not many other people have need it either :-P
 
Anyways thanks again you saved my sanity.
 
James.



From: jquery-en@googlegroups.com on behalf of Richard D. Worth
Sent: Thu 22/01/2009 09:39
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Is A Child Of?


My first thought was to try these and neither worked

$(b, a).length

a.find(b).length

Also, no luck here

$(b[0], a[0]).length

a.find(b[0]).length

In the end this is the one I could get to work

$(b).parents().filter(function() { return this === a[0]; }).length

- Richard


On Thu, Jan 22, 2009 at 4:25 AM, James Hughes j.hug...@kainos.com wrote:




Hi,

This is probably a really easy question an I apologise if it appear 
stupid but I am clueless right now.  Given 2 jQuery objects (a,b) how can I 
tell if b is a child of a?

James http://www.kainos.com/ 







This e-mail is intended solely for the addressee and is strictly confidential; 
if you are not the addressee please destroy the message and all copies. Any 
opinion or information contained in this email or its attachments that does not 
relate to the business of Kainos 
is personal to the sender and is not given by or endorsed by Kainos. Kainos is 
the trading name of Kainos Software Limited, registered in Northern Ireland 
under company number: NI19370, having its registered offices at: Kainos House, 
4-6 Upper Crescent, Belfast, BT7 1NT, 
Northern Ireland. Registered in the UK for VAT under number: 454598802 and 
registered in Ireland for VAT under number: 9950340E. This email has been 
scanned for all known viruses by MessageLabs but is not guaranteed to be virus 
free; further terms and conditions may be 
found on our website - www.kainos.com 




[jQuery] Re: Slide down and up element and remain vertical size

2009-01-22 Thread Mech7

That is what i used first but it's very specific about the html
elements like it expects a p tag as content, that's why i decided
to make my own... :)

On Jan 22, 4:28 pm, Richard D. Worth rdwo...@gmail.com wrote:
 You may want to look at the jQuery UI Accordion (if you haven't already):

 http://ui.jquery.com/demos/accordion#mouseover

 - Richard

 On Thu, Jan 22, 2009 at 4:08 AM, Mech7 chris.de@gmail.com wrote:

  I have an example here:
 http://www.mech7.net/tmp/slide_down/

  When i hover the elements it jumps a little in vertical space, does
  anybody know a solution how to remain the space my code is :

  $(document).ready(function(){
         $('#portfolio div.item:first  div').addClass('open');
         $('#portfolio div.item:first  h3').addClass('active');

         function slideDownEffect(){
                 var speed = 100;

                 $('#portfolio div.item').mouseenter(function () {
                         if($(this).children('h3').hasClass('active') ==
  false)
  {
                         $('#portfolio div.item div').slideUp(speed);
                         $(this).children('div').slideDown(speed,
  slideDownEffect);
                         $(#portfolio div.item).unbind('mouseenter');
                         $('#portfolio div.item h3').removeClass('active');
                         $(this).children('h3').addClass('active');
                         }
                 });
         }
         slideDownEffect();
  });




[jQuery] Re: Slide down and up element and remain vertical size

2009-01-22 Thread Jörn Zaefferer

Actually you can use pretty much any element you want. More details
here: http://docs.jquery.com/UI/Accordion/accordion

Jörn

On Thu, Jan 22, 2009 at 11:03 AM, Mech7 chris.de@gmail.com wrote:

 That is what i used first but it's very specific about the html
 elements like it expects a p tag as content, that's why i decided
 to make my own... :)

 On Jan 22, 4:28 pm, Richard D. Worth rdwo...@gmail.com wrote:
 You may want to look at the jQuery UI Accordion (if you haven't already):

 http://ui.jquery.com/demos/accordion#mouseover

 - Richard

 On Thu, Jan 22, 2009 at 4:08 AM, Mech7 chris.de@gmail.com wrote:

  I have an example here:
 http://www.mech7.net/tmp/slide_down/

  When i hover the elements it jumps a little in vertical space, does
  anybody know a solution how to remain the space my code is :

  $(document).ready(function(){
 $('#portfolio div.item:first  div').addClass('open');
 $('#portfolio div.item:first  h3').addClass('active');

 function slideDownEffect(){
 var speed = 100;

 $('#portfolio div.item').mouseenter(function () {
 if($(this).children('h3').hasClass('active') ==
  false)
  {
 $('#portfolio div.item div').slideUp(speed);
 $(this).children('div').slideDown(speed,
  slideDownEffect);
 $(#portfolio div.item).unbind('mouseenter');
 $('#portfolio div.item h3').removeClass('active');
 $(this).children('h3').addClass('active');
 }
 });
 }
 slideDownEffect();
  });




[jQuery] Calling my JQuery function after adding new list items

2009-01-22 Thread cajchris

Hi,

I have the following list structure on my site:

  UL id=topnav
LI
A id=11386_Tab onclick= href=#Home/A
UL style=TOP: 1.7em
  LI
  A id=m11387 title=Complaint Search onclick=
href=#Complaint Search/A
  UL style=LEFT: 11.1em
LI
A id=m11388 title=Open onclick= href=#Open/
A
/LI
LI
A id=m11389 title=Pending onclick=
href=t#Pending/A
/LI
LI
A id=m11390 title=Closed onclick=
href=#Closed/A
/LI
LI
A id=m15012 title=fdgdfgdg onclick=
href=#fdgdfgdg/A
/LI
  /UL
  /LI
   /UL
   /LI
   /UL

I have removed the href and onclick contents for simplicity. I also
have the following Javascript file containing:

function mainmenu(){
$( #topnav ul ).css({display: none}); // Opera Fix
$( #topnav li).hover(function(){
$(this).find('ul:first').css({visibility: visible,display:
none}).show(400);
},function(){
$(this).find('ul:first').css({visibility: hidden});
});
}



 $(document).ready(function(){
mainmenu();
});

However at various points throughout the site, when a user clicks a
particular link it takes them to a page and adds a link to that page
into the appropriate place in the navigation. So for example the new
list structure would be (see the new link under Closed):

  UL id=topnav
LI
A id=11386_Tab onclick= href=#Home/A
UL style=TOP: 1.7em
  LI
  A id=m11387 title=Complaint Search onclick=
href=#Complaint Search/A
  UL style=LEFT: 11.1em
LI
A id=m11388 title=Open onclick= href=#Open/
A
/LI
LI
A id=m11389 title=Pending onclick=
href=t#Pending/A
/LI
LI
A id=m11390 title=Closed onclick=
href=#Closed/A
 UL
  LI
  A id=m11391 title=New link
onclick= href=#New link/A
  /LI
 /UL
/LI
LI
A id=m15012 title=fdgdfgdg onclick=
href=#fdgdfgdg/A
/LI
  /UL
  /LI
   /UL
   /LI
   /UL

However when I hover over my menu structure again no sub menus appear
as was the case before the change.

The change does involve replacing all the content within the UL
id=topnav. The source of the page does have the new structure
included, but the JQuery no longer seems to recognise this.

So to my question, is there a way to recall or refresh the JQuery
function so that it now picks up the new sub-list?

Just to note, the onlclicks are not important to the way the menu
operates. It is solely on hovering.

Regards
Chris


[jQuery] Re: Calling my JQuery function after adding new list items

2009-01-22 Thread Liam Potter


if you are using v1.2.6 use the LiveQuery plugin, if you are using v1.3 
use the .live() function

http://docs.jquery.com/Events/live#typefn

cajchris wrote:

Hi,

I have the following list structure on my site:

  UL id=topnav
LI
A id=11386_Tab onclick= href=#Home/A
UL style=TOP: 1.7em
  LI
  A id=m11387 title=Complaint Search onclick=
href=#Complaint Search/A
  UL style=LEFT: 11.1em
LI
A id=m11388 title=Open onclick= href=#Open/
A
/LI
LI
A id=m11389 title=Pending onclick=
href=t#Pending/A
/LI
LI
A id=m11390 title=Closed onclick=
href=#Closed/A
/LI
LI
A id=m15012 title=fdgdfgdg onclick=
href=#fdgdfgdg/A
/LI
  /UL
  /LI
   /UL
   /LI
   /UL

I have removed the href and onclick contents for simplicity. I also
have the following Javascript file containing:

function mainmenu(){
$( #topnav ul ).css({display: none}); // Opera Fix
$( #topnav li).hover(function(){
$(this).find('ul:first').css({visibility: visible,display:
none}).show(400);
},function(){
$(this).find('ul:first').css({visibility: hidden});
});
}



 $(document).ready(function(){
mainmenu();
});

However at various points throughout the site, when a user clicks a
particular link it takes them to a page and adds a link to that page
into the appropriate place in the navigation. So for example the new
list structure would be (see the new link under Closed):

  UL id=topnav
LI
A id=11386_Tab onclick= href=#Home/A
UL style=TOP: 1.7em
  LI
  A id=m11387 title=Complaint Search onclick=
href=#Complaint Search/A
  UL style=LEFT: 11.1em
LI
A id=m11388 title=Open onclick= href=#Open/
A
/LI
LI
A id=m11389 title=Pending onclick=
href=t#Pending/A
/LI
LI
A id=m11390 title=Closed onclick=
href=#Closed/A
 UL
  LI
  A id=m11391 title=New link
onclick= href=#New link/A
  /LI
 /UL
/LI
LI
A id=m15012 title=fdgdfgdg onclick=
href=#fdgdfgdg/A
/LI
  /UL
  /LI
   /UL
   /LI
   /UL

However when I hover over my menu structure again no sub menus appear
as was the case before the change.

The change does involve replacing all the content within the UL
id=topnav. The source of the page does have the new structure
included, but the JQuery no longer seems to recognise this.

So to my question, is there a way to recall or refresh the JQuery
function so that it now picks up the new sub-list?

Just to note, the onlclicks are not important to the way the menu
operates. It is solely on hovering.

Regards
Chris
  


[jQuery] Re: not updating images after ajax request

2009-01-22 Thread Genus Project

maybe it is caching the image :)


On Jan 22, 1:27 pm, pere roca pero...@gmail.com wrote:
 hi all,

 I'm having problems updating images dynamically. The thing is that the src
 attribute is allways the same (that's not an error but I need it this way)
 but the file the src points to is dynamically created via php (an xml that
 is used to create the new image).
 The new image is not updated (well, sometimes work, sometimes not, that's
 the worse);
 if I take from the HTML, the src of the image and open in a new window, the
 correct image appears.

 That is:
 $.get('function.php', function()
 {
 //function.php has created a new xml file
 $(#image).show();
 //i have tried a setTimeout of 2 sec, suspecting that the new XML is not
 completely created (it should be correctly created, as we are on tha
 callback) without success;

 })

 any idea?
 thanks!

 Pere
 --
 View this message in 
 context:http://www.nabble.com/not-updating-images-after-ajax-request-tp216006...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: Calling my JQuery function after adding new list items

2009-01-22 Thread cajchris

But I do not see how I can use this. The problem I have is that when
some back end java code adds a new UL sub menu I need my JQuery to
refresh and pick this up. LiveQuery seems to require some event such
as a click, mouseout etc etc. I don't think this applies here.

Cheers

On Jan 22, 10:35 am, Liam Potter radioactiv...@gmail.com wrote:
 if you are using v1.2.6 use the LiveQuery plugin, if you are using v1.3
 use the .live() functionhttp://docs.jquery.com/Events/live#typefn

 cajchris wrote:
  Hi,

  I have the following list structure on my site:

                UL id=topnav
                  LI
                  A id=11386_Tab onclick= href=#Home/A
                  UL style=TOP: 1.7em
                    LI
                    A id=m11387 title=Complaint Search onclick=
  href=#Complaint Search/A
                    UL style=LEFT: 11.1em
                      LI
                      A id=m11388 title=Open onclick= href=#Open/
  A
                      /LI
                      LI
                      A id=m11389 title=Pending onclick=
  href=t#Pending/A
                      /LI
                      LI
                      A id=m11390 title=Closed onclick=
  href=#Closed/A
                      /LI
                      LI
                      A id=m15012 title=fdgdfgdg onclick=
  href=#fdgdfgdg/A
                      /LI
                    /UL
                    /LI
                 /UL
                 /LI
             /UL

  I have removed the href and onclick contents for simplicity. I also
  have the following Javascript file containing:

  function mainmenu(){
  $( #topnav ul ).css({display: none}); // Opera Fix
  $( #topnav li).hover(function(){
             $(this).find('ul:first').css({visibility: visible,display:
  none}).show(400);
             },function(){
             $(this).find('ul:first').css({visibility: hidden});
             });
  }

   $(document).ready(function(){
     mainmenu();
  });

  However at various points throughout the site, when a user clicks a
  particular link it takes them to a page and adds a link to that page
  into the appropriate place in the navigation. So for example the new
  list structure would be (see the new link under Closed):

                UL id=topnav
                  LI
                  A id=11386_Tab onclick= href=#Home/A
                  UL style=TOP: 1.7em
                    LI
                    A id=m11387 title=Complaint Search onclick=
  href=#Complaint Search/A
                    UL style=LEFT: 11.1em
                      LI
                      A id=m11388 title=Open onclick= href=#Open/
  A
                      /LI
                      LI
                      A id=m11389 title=Pending onclick=
  href=t#Pending/A
                      /LI
                      LI
                      A id=m11390 title=Closed onclick=
  href=#Closed/A
                           UL
                                LI
                                    A id=m11391 title=New link
  onclick= href=#New link/A
                                /LI
                           /UL
                      /LI
                      LI
                      A id=m15012 title=fdgdfgdg onclick=
  href=#fdgdfgdg/A
                      /LI
                    /UL
                    /LI
                 /UL
                 /LI
             /UL

  However when I hover over my menu structure again no sub menus appear
  as was the case before the change.

  The change does involve replacing all the content within the UL
  id=topnav. The source of the page does have the new structure
  included, but the JQuery no longer seems to recognise this.

  So to my question, is there a way to recall or refresh the JQuery
  function so that it now picks up the new sub-list?

  Just to note, the onlclicks are not important to the way the menu
  operates. It is solely on hovering.

  Regards
  Chris


[jQuery] Re: select the parent recursively

2009-01-22 Thread Stephan Veigl

try:
var input = $(input);
var parent = input.parents(span[xmlns]);

by(e)
Stephan


[jQuery] Re: Calling my JQuery function after adding new list items

2009-01-22 Thread Liam Potter


the event would be the hover...

cajchris wrote:

But I do not see how I can use this. The problem I have is that when
some back end java code adds a new UL sub menu I need my JQuery to
refresh and pick this up. LiveQuery seems to require some event such
as a click, mouseout etc etc. I don't think this applies here.

Cheers

On Jan 22, 10:35 am, Liam Potter radioactiv...@gmail.com wrote:
  

if you are using v1.2.6 use the LiveQuery plugin, if you are using v1.3
use the .live() functionhttp://docs.jquery.com/Events/live#typefn

cajchris wrote:


Hi,
  
I have the following list structure on my site:
  
  UL id=topnav

LI
A id=11386_Tab onclick= href=#Home/A
UL style=TOP: 1.7em
  LI
  A id=m11387 title=Complaint Search onclick=
href=#Complaint Search/A
  UL style=LEFT: 11.1em
LI
A id=m11388 title=Open onclick= href=#Open/
A
/LI
LI
A id=m11389 title=Pending onclick=
href=t#Pending/A
/LI
LI
A id=m11390 title=Closed onclick=
href=#Closed/A
/LI
LI
A id=m15012 title=fdgdfgdg onclick=
href=#fdgdfgdg/A
/LI
  /UL
  /LI
   /UL
   /LI
   /UL
  
I have removed the href and onclick contents for simplicity. I also

have the following Javascript file containing:
  
function mainmenu(){

$( #topnav ul ).css({display: none}); // Opera Fix
$( #topnav li).hover(function(){
   $(this).find('ul:first').css({visibility: visible,display:
none}).show(400);
   },function(){
   $(this).find('ul:first').css({visibility: hidden});
   });
}
  
 $(document).ready(function(){

   mainmenu();
});
  
However at various points throughout the site, when a user clicks a

particular link it takes them to a page and adds a link to that page
into the appropriate place in the navigation. So for example the new
list structure would be (see the new link under Closed):
  
  UL id=topnav

LI
A id=11386_Tab onclick= href=#Home/A
UL style=TOP: 1.7em
  LI
  A id=m11387 title=Complaint Search onclick=
href=#Complaint Search/A
  UL style=LEFT: 11.1em
LI
A id=m11388 title=Open onclick= href=#Open/
A
/LI
LI
A id=m11389 title=Pending onclick=
href=t#Pending/A
/LI
LI
A id=m11390 title=Closed onclick=
href=#Closed/A
 UL
  LI
  A id=m11391 title=New link
onclick= href=#New link/A
  /LI
 /UL
/LI
LI
A id=m15012 title=fdgdfgdg onclick=
href=#fdgdfgdg/A
/LI
  /UL
  /LI
   /UL
   /LI
   /UL
  
However when I hover over my menu structure again no sub menus appear

as was the case before the change.
  
The change does involve replacing all the content within the UL

id=topnav. The source of the page does have the new structure
included, but the JQuery no longer seems to recognise this.
  
So to my question, is there a way to recall or refresh the JQuery

function so that it now picks up the new sub-list?
  
Just to note, the onlclicks are not important to the way the menu

operates. It is solely on hovering.
  
Regards

Chris
  


[jQuery] Newsgroup Quote Etiquette

2009-01-22 Thread Liam Potter


Hello,
I've noticed this more and more lately and I think it is due to people 
using web based readers like Google Groups and Nabble.


When replying to a thread please leave the quotes intact, it can be 
quite frustrating to come across an answer or question and have no idea 
in relation to what without having to dig through all the posts and find 
the conversation.


Thanks,
Liam



[jQuery] Re: Syntax similar to IN in SQL

2009-01-22 Thread Rick Faircloth

Good stuff, Ricardo!

Rick

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
 Behalf Of Ricardo Tomasi
 Sent: Wednesday, January 21, 2009 11:50 PM
 To: jQuery (English)
 Subject: [jQuery] Re: Syntax similar to IN in SQL
 
 
 
 var abc = /^A|B|C$/.test( $('#price_group_lesson').val() );
 $('#price_group_lesson_yes')[abc ? 'slideDown' : 'slideUp']('fast')
 
 (it could be a one-liner but I splitted it for readability)
 
 A simpler improvement you could have done:
 
 var p = $('#price_group_lesson').val();
 if ( p == 'A' || p == 'B' || p == 'C' )
 $('#price_group_lesson_yes').slideDown('fast');
 else
 $('#price_group_lesson_yes').slideUp('fast');
 
 or
 
 var p = $('#price_group_lesson').val();
 ( p == 'A' || p == 'B' || p == 'C' )
 ? $('#price_group_lesson_yes').slideDown('fast') //if
 : $('#price_group_lesson_yes').slideUp('fast'); //else
 
 Or to top it off, a hacky way of checking the value:
 
 ($('#price_group_lesson').val() in {A:1, B:1, C:1})
 ? $('#price_group_lesson_yes').slideDown('fast')
 : $('#price_group_lesson_yes').slideUp('fast');
 
 
 - ricardo
 
 On Jan 21, 7:15 pm, pixelwiz pixel...@gmail.com wrote:
  Hi All,  I am sure this is an easy question for someone in here.  Is
  there a better, cleaner, shorter way to write this:
 
  if ( ($('#price_group_lesson').attr(value) == 'B') || ($
  ('#price_group_lesson').attr(value) == 'C') || ($
  ('#price_group_lesson').attr(value) == 'D') ){
                                  
  $('#price_group_lesson_yes').slideDown('fast');}
                                  
  else{$('#price_group_lesson_yes').slideUp('fast');}
 
  I am creating a pretty custom questionnaire, and it has a lot of logic
  in it.  I wish I didn't have to type it all out like that.  I am sure
  there is something in javascript or jquery where I can say $
  ('#var').attr('value').in(A,B,C)
 
  Thanks



[jQuery] Re: sortable portlets

2009-01-22 Thread posh beck
On 
Tuehttp://streamyx-router.blogspot.com/2008/06/streamyx-wireless-router-linksys.html,
Jan 20, 2009 at 8:01 PM, shmuelzon shmuel...@gmail.com wrote:


 hey,

 i'm new to the whole jQuery scene, and i'm trying to create a small
 portal with frames you can rearrange (igoogle style)
 i've seen this demo:
 http://jquery-ui.googlecode.com/svn/trunk/demos/sortable/portlets.html
 and tweaked it a bit, but i can't figure out how (if at all possible)
 i can make the frames move only if i click on the frame title and not
 the whole frame.

 thanks ind advanced!



[jQuery] Catching ajax request errors

2009-01-22 Thread ZNS

Is this possible? I do not want to use the $.ajaxError event but
catching the error directly like this:

try
{
$.getJSON(.);
}
catch (x)
{
alert(failed);
}


[jQuery] Autocomlete plugin not working in Opera and IE 6

2009-01-22 Thread xfactorx

Am trying to use the Autocomplete plugin which so far works in Firefox
but doesn't work in IE6 and opera 9.x on Ubuntu Linux. Below is my
code. So sorry if this has been answered before.


-Backend Code--
?php
$name = $_GET['q'];
if (!isset($name)) return;

$link = mysql_connect('localhost', 'root', '');
mysql_select_db('espreadv2', $link) or die(Error connecting to
db);



// try to sanitize
if (get_magic_quotes_gpc()) {
  $name = stripslashes($name);
}

$sql = sprintf('select stockcode from stock where stockcode like
%s%%', mysql_real_escape_string($name));
$results = mysql_query($sql);




if (mysql_num_rows($results) == 0) {
echo no such stock;
} else {
while ($row = mysql_fetch_object($results)) {
   echo $row-stockcode.\n ;

}
}

mysql_close($link);


?


Html code
?php include 'stocks.php'; ?
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN
http://www.w3.org/TR/html4/strict.dtd;
html lang=en
head
meta http-equiv=Content-type content=text/html; charset=utf-8
titlejQuery load example/title
style type=text/css media=screen
!--
body { font: 1em Trebuchet MS, verdana, arial, sans-serif; font-
size: 100%; color: #000; padding: 20px;}
input, textarea { font-family: Arial; font-size: 100%; padding: 3px;
margin-left: 10px; }
#wrapper { width: 600px; margin: 0 auto; }
/style
link rel=stylesheet type=text/css href=js/main.css /


script src=js/jquery.js type=text/javascript/script
script src=js/jquery.autocomplete.js type=text/javascript/
script
script src=js/jquery.ajaxQueue.js type='text/javascript'/script
script type=text/javascript
$(document).ready(function () {
$(#search).autocomplete(stocks.php, {
width: 260,
selectFirst: false
});


})
/script
/head
body
   form autocomplete=off 
p
labelStocks:/label
input type=text id=search name=name/

/p
/form
/body


[jQuery] showing animated gif when redirecting to new a page

2009-01-22 Thread misskittyt

Hi all,
I'm having trouble showing an animated gif (to indicate that the page
is loading) when redirecting to a new page.  There are several tabs a
user can choose, each taking them to a different page in the site.  I
think this almost works, but I don't like how the screen goes entirely
blank.  I've tried using fadeTo but the gif will show up as being
unanimated.  The same seems to be true if I don't use use the fadeOut
and only use the fadeIn.

How can I just show the animated gif as a user is redirected to the
new page?

Thank you!
M-

$(document).ready(function()
{
  $(.tab).click(function()
  {
$(body).fadeOut(fast);
$(body).fadeIn(slow).append(div class=\progress\br /
img src=\Images/bigsnake.gif\ alt=\\/Processing...please
wait.br /br //div);
  });
});


[jQuery] jQuery Form Validator

2009-01-22 Thread marzapower

I've written a small jQuery Form Validator plugin, of which you can
find info at:
http://www.marzapower.com/blog/show/250

Please, download it, try it and let me know what you think!


[jQuery] Display GIF animation during jQuery loop

2009-01-22 Thread Borax

Hi,

I have a probably basic problem.
I actually want to display a simple GIF animation during a jQuery
function which actually takes a few seconds to run.

Basically, I do :

  $('IMG.my_gif_animation').show();
  try {
$('...').each(function() { ... }); // which takes a few seconds
  } finally {
$('IMG.my_gif_animation').hide();
  }

My problem is simple : the GIF image is correctly displayed but as
soon as the jQuery loop starts, GIF animation is stopped !
Any hint would be welcome...

Thanks,
Thierry


[jQuery] Callback problem

2009-01-22 Thread Alex Sergeev

Hello!

i have a code

var handler = editElementName;
function showModalBox(width, height, handler, id)
{
...
$(.btnSave).click(handler + Save);
...
}

function editElementNameSave(e)
{
alert(1);
}

Why dont work event click?

PS sorry for my English - i am from Russia


[jQuery] deserialize plugin latest version?

2009-01-22 Thread c.sokun

does anyone happen to know what was the latest version of form
deserialize plugin?
Where can I grab it?

Cheers


[jQuery] Cluetip: Close on clicking another tip

2009-01-22 Thread Sonny

Hi -
I'm completely stuck with a Cluetip issue.

Ive set activation to 'click' and sticky to 'true'. However, I wish to
make it so that if another cluetip link is clicked whilst one is
already open, it will close the current one and open the new one that
the user has clicked.

I hope that made sense. Essentially, can I close open Cluetips when
the user clicks to open another one?

My set up is as follows:

$(document).ready(function() {
  $('a.tip').cluetip({activation: 'click', sticky: true});

});

Cheers


[jQuery] 1.3.1 is over 10x slower than 1.2.6

2009-01-22 Thread Loren

Hello,

I have an application that does lots of HTML injection, animation, and
manipulation, and I'm a long time user and fan of jQuery.

Recently I downloaded 1.3.1, and my app became really sluggish.
Normally it loads in under a second, but with 1.3.1 it takes over 3
seconds to load, and the animation is choppy.

The problem *really* shows up when I use firebug.  Normally my app
loads in about 3-4 seconds in firebug, but the 1.3.1 library increases
the firebug load time to about 50 seconds (you read that right).

Here is a link to two screen shots of the firebug profiler.  The first
screen shot is using 1.2.6:

http://public.hotwall.com/tmp/jQuery1.2.6.jpg

The next link is the same profile (loading the app).  The only
difference is it's using 1.3.1:

http://public.hotwall.com/tmp/jQuery1.3.1.jpg

The profiler numbers show where the time is being spent.
Is anyone else having speed problems with the new 1.3 jQuery?

-Loren


[jQuery] Re: Form Plugin with file upload

2009-01-22 Thread Mike Alsup

 Sorry for the delayed response. I tried taking a break from it and
 coming back to it with a fresh mind. It's not easy for me to set up a
 page for you to test because the app requires a log in.

It is always helpful if you can simplify the problem down to a small
test page.  90% of the time this is how people find the root of the
problem.  I realize it's not always easy to do this, but I encourage
you to try if you get the time.



 In Firefox, when a file is attached, the beforeSubmit AND success
 handler are called. However, the POST action does not appear in
 Firebugs Net  XHR panel so it seems that the post is not sent. I
 figured out that the reason why my form is suddenly disappearing is
 because in my success callback it is trying to grab message from the
 responseXML but since the POST isn't really being sent, there is a
 blank response.


File uploads do not use ajax, so you will not see an entry in the xhr
panel.  Not sure what you mean by the 'blank response'.  Is the
responseXML null?  Is the returned XML valid?


 In Internet Explorer 6 however, the beforeSubmit is called but it does
 not make it to the success handler. And since it doesn't make it that
 far, my form does not disappear. Instead it is stuck in Loading as
 noted in the comments of my JS below. The data is not saved.

 Any help you could give would be really helpful. I can't figure out
 why the POST is not successful. Perhaps there is something wrong in my
 JS?


Nothing obvious in your JS jumps out at me.

Mike


[jQuery] Re: form standart submit event doesn't handle by jquery submit event

2009-01-22 Thread Mike Alsup

 Example from documentation

 $(form).submit(function() {
       if ($(input:first).val() == correct) {
         $(span).text(Validated...).show();
         return true;
       }
       $(span).text(Not valid!).show().fadeOut(1000);
       return false;
     });

 html:
 pType 'correct' to validate./p
   form action=javascript:alert('success!'); id=smth_id
     div
       input type=text /
       input type=submit /
     /div
   /form
   span/span

 BUT! When you get form throw document.getElementById and submit it by
 javascript:
 var form = document.getElementById('smth_id');
 form.submit();
 jquery event handler doesn't work

 How to attach event to form by jquery correctly?

 I need it for tinyMCE integration, I think it will be usefull for 3d
 party libs integration anyway


Instead of this:

formElement.submit();

do this:

$(formElement).submit();

or this:

$(formElement).triggerHandler('submit');

http://docs.jquery.com/Events/submit
http://docs.jquery.com/Events/triggerHandler


[jQuery] Re: Catching ajax request errors

2009-01-22 Thread Mike Alsup

 Is this possible? I do not want to use the $.ajaxError event but
 catching the error directly like this:

 try
 {
 $.getJSON(.);}

 catch (x)
 {
 alert(failed);

 }



No, that won't work.  Either use the global error handler or use
$.ajax instead of $.getJSON and pass in a local error handler.

http://docs.jquery.com/Ajax/jQuery.ajax#options


[jQuery] Re: Callback problem

2009-01-22 Thread jQuery Lover

I have tried this:

var handler = editElementName;
function editElementNameSave()
{
alert('Hurray!');
console.log(1);
}
function showModalBox(handler)
{
$(.1).click(function(){
console.log(2);
(handler + Save)();
});
console.log(3);
}
$(document).ready(function(){
showModalBox(handler);
});


And I got editElementNameSave is not a function error !!!

Error refers to line - (handler + Save)();


Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Thu, Jan 22, 2009 at 1:15 PM, Alex Sergeev sergeev.sa...@gmail.com wrote:

 Hello!

 i have a code

 var handler = editElementName;
 function showModalBox(width, height, handler, id)
 {
 ...
 $(.btnSave).click(handler + Save);
 ...
 }

 function editElementNameSave(e)
 {
 alert(1);
 }

 Why dont work event click?

 PS sorry for my English - i am from Russia



[jQuery] Need access to index within loop

2009-01-22 Thread elduderino


HI,

I have this code:

   $(document).ready(function(){

  $('li').each(function(i) {
  alert(i);
  $('li:eq(i)').fadeIn('slow');
  });

  });

I want to iterate over each li element and fade it inwith a delay for
each onei'll deal with the delay in a bit but currently the problem is
this bit  $('li:eq(i)')it won't accept the i parameter...it wants a
literal numberhow do I do this?

-- 
View this message in context: 
http://www.nabble.com/Need-access-to-index-within-loop-tp21601683s27240p21601683.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] how to use namespace and Class in jQuery ?

2009-01-22 Thread Alex
Hi all,

   I ' m new to jQuery.

  How to use namespace and Class , like this:

   cm.TestClass = function {

  
   }

   cm is namespace.


Alex

[jQuery] USING FLASH + ACTIONSCRIPT CALLBACK FUNCTION.

2009-01-22 Thread Jacob Jarquin

Hi,

The problem i faced when i use iframes to post data is that i can not
send information to parent frame (like a json response) if the url of
the iframe is different.


You can use Flash + actionscript to POST DATA crossdomain.

You only need a crossdomain file policy in your server web root.

An example:
http://blog.monstuff.com/Flash4AJAX/static/Xdomain.html

if have something like this

var Panel = {
 _posts : [],
 Save : function(data, functionCallBack){
   var index = this._posts.length;
   this._posts[index] = {
 onFinish : function(strJson){
  if(functionCallBack)functionCallBack(json);
  }
   };

  var url = http://www.yourdomain.com;;
  var vars = accion= + encodeURIComponent(data.accion);
  vars = Name= + encodeURIComponent(data.name);
  vars = Company= + encodeURIComponent(data.company);

 var fs = FlashHelper.getFlash();
 // URL, CALLBACK FUNCTION, METHOD,..
 fs.XmlHttp(url, Panel._posts[+index+].onFinish, POST,
vars, application/x-www-form-urlencoded);

}

}

so you only need to use

Panel.Save({Name:Jarquin,Company:Fujarsys},function(strJson){
 alert(json);
});


[jQuery] Re: Cluetip: Close on clicking another tip

2009-01-22 Thread Sonny

Sorry all, looks like my JS file got corrupted.
All fixed now.

On Jan 22, 11:22 am, Sonny endofra...@gmail.com wrote:
 Hi -
 I'm completely stuck with a Cluetip issue.

 Ive set activation to 'click' and sticky to 'true'. However, I wish to
 make it so that if another cluetip link is clicked whilst one is
 already open, it will close the current one and open the new one that
 the user has clicked.

 I hope that made sense. Essentially, can I close open Cluetips when
 the user clicks to open another one?

 My set up is as follows:

 $(document).ready(function() {
   $('a.tip').cluetip({activation: 'click', sticky: true});

 });

 Cheers


[jQuery] Re: not updating images after ajax request

2009-01-22 Thread pere roca



ok, I understand, thanks.

I have seen over there that a possible solution can be just to add a time
stamp to the image:
$(#somethin).attr(src, user1.jpg?x= + new Date()); 

but it's not useful in my case, as my src points to a web service that
creates an images with the parameters you send; it's something like...

http://edit.csic.es/geoserver/wms/GetLegendGraphic?VERSION=1.0.0FORMAT=image/pngWIDTH=25HEIGHT=20LAYER=topp:test_csvimportgispoints2sld=http://edit.csic.es/fitxers/sld/initial/points/NO_BORRAR.sld

where sld is the XML file I update (but keeping the same name). So, this URL
cannot accept extra parameters.
I wanna avoid creating new XMLs each one with different names.

Some other idea?
Pere


Genus Project wrote:
 
 
 maybe it is caching the image :)
 
 
 On Jan 22, 1:27 pm, pere roca pero...@gmail.com wrote:
 hi all,

 I'm having problems updating images dynamically. The thing is that the
 src
 attribute is allways the same (that's not an error but I need it this
 way)
 but the file the src points to is dynamically created via php (an xml
 that
 is used to create the new image).
 The new image is not updated (well, sometimes work, sometimes not, that's
 the worse);
 if I take from the HTML, the src of the image and open in a new window,
 the
 correct image appears.

 That is:
 $.get('function.php', function()
 {
 //function.php has created a new xml file
 $(#image).show();
 //i have tried a setTimeout of 2 sec, suspecting that the new XML is not
 completely created (it should be correctly created, as we are on tha
 callback) without success;

 })

 any idea?
 thanks!

 Pere
 --
 View this message in
 context:http://www.nabble.com/not-updating-images-after-ajax-request-tp216006...
 Sent from the jQuery General Discussion mailing list archive at
 Nabble.com.
 
 

-- 
View this message in context: 
http://www.nabble.com/not-updating-images-after-ajax-request-tp21600610s27240p21603076.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Can't get typed value of input

2009-01-22 Thread abhisek

Thanks for your response.
I think that was a livequery issue. Used the following function to get
input elements:
document.getInputByName = function(name)
{
allInputs = document.getElementsByTagName(input);
for(i=0;iallInputs.length;i++)
{
if(allInputs[i].getAttribute(name) == name  allInputs
[i].getAttribute(type) == text)
{
mainInput = allInputs[i];
break;
}
}
return mainInput;
}
Then access the value like:
input = document.getInputByName(some_name);
value = input.value;

Regards
Abhisek


[jQuery] Re: Looping through headers object

2009-01-22 Thread shinobi

Sorry, yes, I'm using tablesorter plugin.

Thank you Ricardo for the answer, this evening i'm going to try your
solution.

Mattia

On 22 Gen, 06:06, Ricardo Tomasi ricardob...@gmail.com wrote:
 I assume you're using the Tablesorter plugin? This should work.

 var headers = {};
 $('#table thead th').each(function(index){
     if (index  2)
         headers[index] = { sorter: false };

 });

 $(#table).tablesorter({
     headers: headers

 });

 You can also disable headers using metadata, with a more concise
 syntax:

 $('#table thead th:lt(3)').addClass('{sorter: false}');

 seehttp://docs.jquery.com/Selectors/lt#index

 - ricardo

 On Jan 21, 8:21 pm, shinobi mattia.bargell...@gmail.com wrote:

  Hi everybody.
  I have an html table with a fixed number columns (or headers) and a
  variable number of columns, that may vary in numbers depending on data
  in the DB.

  I want to make sortable one or two columns of the fixed ones, so I
  would like to know how to loop through the headers object in order to
  set to sorter:false all the headers that I want to be UN-sortable.

  In other words, something like:

  for(i=0;icolNum;i++) {
      if(i != x) {
          headers: { i: {sorter: false} }
     }

  }

  where x is the index I want to be sortable.

  Sorry for my stupid question, but me and javascript aren't good
  friends :(

  Thanks in advance for any answer.

  Mattia (Italy)


[jQuery] jQuery 1.3 incompatible plugins

2009-01-22 Thread Gordon

Is there a list of plugins that aren't compatible with jQuery 1.3 or
that have been updated in order to do so?  I'd like to be able to
check my plugins against a list if there is one before upgrading so I
don't get any nasty surprises.


[jQuery] jQuery 1.3 incompatible plugins

2009-01-22 Thread Gordon

Just a quick question, is there a list of plugins that don't work with
jQuery 1.3, or a list of plugins that have been upgraded to work with
it?  I want to be able to quickly check my list of plugins against a
list of known incompatibilities before upgrading.


[jQuery] vsdoc for new jquery 1.3.1

2009-01-22 Thread Fisher Ning
Hi guys,

Does anyone know when the jQuery Visual studio doc (jquery-vsdoc.js) will be 
updated for new 1.3.1? Is there any plan for this?

 

 

Regards,

Fisher

 

 



[jQuery] Re: not updating images after ajax request

2009-01-22 Thread Mike Alsup

 I have seen over there that a possible solution can be just to add a time
 stamp to the image:
 $(#somethin).attr(src, user1.jpg?x= + new Date());

 but it's not useful in my case, as my src points to a web service that
 creates an images with the parameters you send; it's something like...

 http://edit.csic.es/geoserver/wms/GetLegendGraphic?VERSION=1.0.0FORM...

 where sld is the XML file I update (but keeping the same name). So, this URL
 cannot accept extra parameters.
 I wanna avoid creating new XMLs each one with different names.


Is it your web service?  If you can't change the URL then the server
needs to set the response cache headers so that the client does not
cache the resource.

Mike


[jQuery] Re: vsdoc for new jquery 1.3.1

2009-01-22 Thread John Resig

The team at Microsoft is already working on it. Hopefully it'll be ready soon.

--John

On 1/22/09, Fisher Ning ning...@gmail.com wrote:
 Hi guys,

 Does anyone know when the jQuery Visual studio doc (jquery-vsdoc.js) will be
 updated for new 1.3.1? Is there any plan for this?





 Regards,

 Fisher








-- 
--John


[jQuery] Re: 1.3.1 is over 10x slower than 1.2.6

2009-01-22 Thread John Resig

I'm not seeing this, no. Do you have a link to the app? What version
of Firebug are you using?

--John

On 1/22/09, Loren lorenw...@gmail.com wrote:

 Hello,

 I have an application that does lots of HTML injection, animation, and
 manipulation, and I'm a long time user and fan of jQuery.

 Recently I downloaded 1.3.1, and my app became really sluggish.
 Normally it loads in under a second, but with 1.3.1 it takes over 3
 seconds to load, and the animation is choppy.

 The problem *really* shows up when I use firebug.  Normally my app
 loads in about 3-4 seconds in firebug, but the 1.3.1 library increases
 the firebug load time to about 50 seconds (you read that right).

 Here is a link to two screen shots of the firebug profiler.  The first
 screen shot is using 1.2.6:

 http://public.hotwall.com/tmp/jQuery1.2.6.jpg

 The next link is the same profile (loading the app).  The only
 difference is it's using 1.3.1:

 http://public.hotwall.com/tmp/jQuery1.3.1.jpg

 The profiler numbers show where the time is being spent.
 Is anyone else having speed problems with the new 1.3 jQuery?

 -Loren



-- 
--John


[jQuery] Re: Syntax similar to IN in SQL

2009-01-22 Thread pixelwiz

That's some cool code.  Thanks Guys!

-Roman

On Jan 21, 11:49 pm, Ricardo Tomasi ricardob...@gmail.com wrote:
 var abc = /^A|B|C$/.test( $('#price_group_lesson').val() );
 $('#price_group_lesson_yes')[abc ? 'slideDown' : 'slideUp']('fast')

 (it could be a one-liner but I splitted it for readability)

 A simpler improvement you could have done:

 var p = $('#price_group_lesson').val();
 if ( p == 'A' || p == 'B' || p == 'C' )
     $('#price_group_lesson_yes').slideDown('fast');
 else
     $('#price_group_lesson_yes').slideUp('fast');

 or

 var p = $('#price_group_lesson').val();
 ( p == 'A' || p == 'B' || p == 'C' )
     ? $('#price_group_lesson_yes').slideDown('fast') //if
     : $('#price_group_lesson_yes').slideUp('fast'); //else

 Or to top it off, a hacky way of checking the value:

 ($('#price_group_lesson').val() in {A:1, B:1, C:1})
     ? $('#price_group_lesson_yes').slideDown('fast')
     : $('#price_group_lesson_yes').slideUp('fast');

 - ricardo

 On Jan 21, 7:15 pm, pixelwiz pixel...@gmail.com wrote:

  Hi All,  I am sure this is an easy question for someone in here.  Is
  there a better, cleaner, shorter way to write this:

  if ( ($('#price_group_lesson').attr(value) == 'B') || ($
  ('#price_group_lesson').attr(value) == 'C') || ($
  ('#price_group_lesson').attr(value) == 'D') ){
                                  
  $('#price_group_lesson_yes').slideDown('fast');}
                                  
  else{$('#price_group_lesson_yes').slideUp('fast');}

  I am creating a pretty custom questionnaire, and it has a lot of logic
  in it.  I wish I didn't have to type it all out like that.  I am sure
  there is something in javascript or jquery where I can say $
  ('#var').attr('value').in(A,B,C)

  Thanks


[jQuery] Re: jQuery Form Plugin - success callback function isn't called

2009-01-22 Thread Redzzzzz


Hello, 

Topic is somewhat old, but I'm stuck on the same thing.. 'success' isn't
called 

I've managed to narrow it down somewhat on:
http://www.manneke.com/ajaxform/test.php

The first form is to an external php file that echoes 'hello' afterwhich
success IS NOT called. 

The second form is to a php file on the same server that also echoes 'hello'
afterwhich success IS called. 

The only apperant difference is the fact that the receiving php file is on
my local server and the other post is to an external php file.. 

Some help would really be appreciated 

malsup wrote:
 
 
 Actually if you put a debugger;  statement there and debug with
 firebug you will see that it actually gets called. But for some reason
 the alert does not work. But other js code will work so you can show
 your messages somewhere else on the page if you want or need to.
 
 Post a link so we can see it in action.
 
 

-- 
View this message in context: 
http://www.nabble.com/jQuery-Form-Plugin---%22success%22-callback-function-isn%27t-called-tp20130127s27240p21604545.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Catching ajax request errors

2009-01-22 Thread MorningZ

I've got a wrapper function i use around the .getJSON method which
handles errors nicely

function reqJSON(url, params, success, error) {
var CallParams = {};
CallParams.type = params.Method || POST;
CallParams.url = url;
CallParams.processData = true;
CallParams.data = params;
CallParams.dataType = json;
CallParams.success = success;
if (error) {
CallParams.error = error;
}
$.ajax(CallParams);
}


So instead of

$.getJSON(
 location url,
 { Data to send },
 function(json) {
 // Handle result
 }
);

I call


reqJSON(
 location url,
 { Data to send },
 function(json) {
 // Handle result
 },
 function(x,y,z) {
 //  x.responseText   holds the error message
 }
);


It's been working out great.  i'll note too, that by default this
call to my function POST-s, not GET-s.  just switch the .type
line to reflect if you would rather GET



On Jan 22, 4:35 am, ZNS ulrik.anders...@gmail.com wrote:
 Is this possible? I do not want to use the $.ajaxError event but
 catching the error directly like this:

 try
 {
 $.getJSON(.);}

 catch (x)
 {
 alert(failed);

 }


[jQuery] Re: superfish question

2009-01-22 Thread mckag001

Hi...thanks for your interest. Unfortunately I can't give you a link
because it's on an intranet. I guess I'm beyond help.

Thanks again for the reply.

On Jan 21, 11:23 am, David Meiser dmei...@gmail.com wrote:
 Do you have a link?  It's a little hard to diagnose without being able to
 see the problem(s).

 Thanks!



 On Wed, Jan 21, 2009 at 10:04 AM, mckag001 tmcka...@gmail.com wrote:

  I have superfish dialed in great except for two little issues.

  1. In IE6, whenever I hit the back button after clicking on a button,
  the button (along with the dropdown) appears with the highlighted
  color. Almost as if something is set to remind the user where he/she
  is coming from? I want to disable this.

  2. How do I make it stay on the highlighted color per section? Right
  now the highlighted button goes away and you have no way of knowing
  what section you're in. Is there something built in already, or will I
  have to set variables with conditional statements per section?

  Thanks in advance!- Hide quoted text -

 - Show quoted text -


[jQuery] Re: jQuery Form Plugin - success callback function isn't called

2009-01-22 Thread Mike Alsup

 Topic is somewhat old, but I'm stuck on the same thing.. 'success' isn't
 called

 I've managed to narrow it down somewhat 
 on:http://www.manneke.com/ajaxform/test.php

 The first form is to an external php file that echoes 'hello' afterwhich
 success IS NOT called.

 The second form is to a php file on the same server that also echoes 'hello'
 afterwhich success IS called.

 The only apperant difference is the fact that the receiving php file is on
 my local server and the other post is to an external php file..


That is x-domain browser security kicking in.


[jQuery] help with jQuery and updating multiple div ids at same time

2009-01-22 Thread eXhaLe

Hi, I've made a website with a shoutbox and a login form for admins,
the thing is.. I want the login div to update when i type in a
nickname in the shoutbox and vise verca, which it acturally does when
nick is typed in on shoutbox but not the other way around.
When the logout button and the welcome message apear in the login div
it doesn't respond.
I also want the content of the shoutbox to update on an interval but
unsure how to do this.

just to make things even harder I've made an restriction on the
shoutbox. if a sertant nick is used you have to type in a password,
but when the password field should be showing after typing in the nick
i just goes back to type in nick.

And when/if there is a message displayed, ect. floodtimer is triggered
meaning you have to wait 15 sec between each post on the shoutbox it
should come a red message right over the message input field, which
only is visable for a split second before its back to the message
input again.

you can see the page at: www.exhale.no/divcool/

Hope someone can help me with this, I've been at this for a while and
its getting really annoying not finding the right combination.

Thanks in advance
eXhaLe



[jQuery] Calling Joel Birch! - jQuery menu widget Issue

2009-01-22 Thread mckag001

I'm using your Superfish v1.4.8 - jQuery menu widget and am having an
issue. When I navigate away from the main index page and then use the
back button, the menu in which I used is still there, opened up and
highlighted.

If you have any insight on what could be causing this I would greatly
appreciate hearing.

Thanks!


[jQuery] Re: multiple submit sends with CSS Button

2009-01-22 Thread Robert


any idea?


[jQuery] Re: jQuery 1.3 incompatible plugins

2009-01-22 Thread Stefan Sturm

Hello,

good Question. I have problems with Fancybox and jQuery 1.3...

Greetings,
Stefan Sturm

2009/1/22 Gordon grj.mc...@googlemail.com:

 Just a quick question, is there a list of plugins that don't work with
 jQuery 1.3, or a list of plugins that have been upgraded to work with
 it?  I want to be able to quickly check my list of plugins against a
 list of known incompatibilities before upgrading.



[jQuery] bug in id selector?

2009-01-22 Thread Finn Herpich

Hi everyone,

the attached example-code shows a problem I encountered today (firebug 
needed).


If an id-attribute contains dots, like
p id=test2.3/p
 jQuery isn't able to find it.
If the dots are replaced by underscores everything works fine.

Afaik there is no limitation for the id which prohibit dots as a used 
symbol, so I guess this is a bug or for some reason not wanted?


Cheers


test.xhtml
Description: application/xhtml


[jQuery] Re: jQuery 1.3 incompatible plugins

2009-01-22 Thread Gordon

Sorry for the double posting! Google groups seems to have gone nuts on
me, it's also decided that my google email address should be my
primary address instead of the address I've used for years, and as a
result I'm no longer subscribed to any of my groups.

On Jan 22, 2:26 pm, Stefan Sturm stefan.s.st...@googlemail.com
wrote:
 Hello,

 good Question. I have problems with Fancybox and jQuery 1.3...

 Greetings,
 Stefan Sturm

 2009/1/22 Gordon grj.mc...@googlemail.com:



  Just a quick question, is there a list of plugins that don't work with
  jQuery 1.3, or a list of plugins that have been upgraded to work with
  it?  I want to be able to quickly check my list of plugins against a
  list of known incompatibilities before upgrading.


[jQuery] Re: bug in id selector?

2009-01-22 Thread Liam Potter


jQuery will read it as id test2 with the class 3

While periods are allowed in the attribute I would advise against them, 
as it's not just jQuery that could struggle with them but most CSS as 
well, as #test2.3 with again read as id test2 with the class 3.


Finn Herpich wrote:

Hi everyone,

the attached example-code shows a problem I encountered today (firebug 
needed).


If an id-attribute contains dots, like
p id=test2.3/p
 jQuery isn't able to find it.
If the dots are replaced by underscores everything works fine.

Afaik there is no limitation for the id which prohibit dots as a used 
symbol, so I guess this is a bug or for some reason not wanted?


Cheers


[jQuery] Re: Syntax similar to IN in SQL

2009-01-22 Thread Eric Garside

Oh, neat idea for some quick prototypes if you'll be using this a lot.

String.prototype.is = function(){ var rgx = new RegExp('^' +
[].slice.call(arguments).join(|) + '$'); return rgx.test(this) }

Should mimic: /^A|B|C$/.test( $('#price_group_lesson').val() );

Called by:  $('#price_group_lesson').val().is('A','B','C','D');

On Jan 22, 9:00 am, pixelwiz pixel...@gmail.com wrote:
 That's some cool code.  Thanks Guys!

 -Roman

 On Jan 21, 11:49 pm, Ricardo Tomasi ricardob...@gmail.com wrote:

  var abc = /^A|B|C$/.test( $('#price_group_lesson').val() );
  $('#price_group_lesson_yes')[abc ? 'slideDown' : 'slideUp']('fast')

  (it could be a one-liner but I splitted it for readability)

  A simpler improvement you could have done:

  var p = $('#price_group_lesson').val();
  if ( p == 'A' || p == 'B' || p == 'C' )
      $('#price_group_lesson_yes').slideDown('fast');
  else
      $('#price_group_lesson_yes').slideUp('fast');

  or

  var p = $('#price_group_lesson').val();
  ( p == 'A' || p == 'B' || p == 'C' )
      ? $('#price_group_lesson_yes').slideDown('fast') //if
      : $('#price_group_lesson_yes').slideUp('fast'); //else

  Or to top it off, a hacky way of checking the value:

  ($('#price_group_lesson').val() in {A:1, B:1, C:1})
      ? $('#price_group_lesson_yes').slideDown('fast')
      : $('#price_group_lesson_yes').slideUp('fast');

  - ricardo

  On Jan 21, 7:15 pm, pixelwiz pixel...@gmail.com wrote:

   Hi All,  I am sure this is an easy question for someone in here.  Is
   there a better, cleaner, shorter way to write this:

   if ( ($('#price_group_lesson').attr(value) == 'B') || ($
   ('#price_group_lesson').attr(value) == 'C') || ($
   ('#price_group_lesson').attr(value) == 'D') ){
                                   
   $('#price_group_lesson_yes').slideDown('fast');}
                                   
   else{$('#price_group_lesson_yes').slideUp('fast');}

   I am creating a pretty custom questionnaire, and it has a lot of logic
   in it.  I wish I didn't have to type it all out like that.  I am sure
   there is something in javascript or jquery where I can say $
   ('#var').attr('value').in(A,B,C)

   Thanks


[jQuery] Re: not updating images after ajax request

2009-01-22 Thread pere roca



   sorry, unexpectedly adding a random bonus works! 
   thanks to all of you

  
http://edit.csic.es/geoserver/wms/GetLegendGraphic?VERSION=1.0.0FORMAT=image/pngWIDTH=25HEIGHT=20LAYER=topp:test_csvimportgispoints2sld=http://edit.csic.es/fitxers/sld/initial/points/NO_BORRAR.sld?x=yy
 

   Pere

malsup wrote:
 
 
 I have seen over there that a possible solution can be just to add a time
 stamp to the image:
 $(#somethin).attr(src, user1.jpg?x= + new Date());

 but it's not useful in my case, as my src points to a web service that
 creates an images with the parameters you send; it's something like...

 http://edit.csic.es/geoserver/wms/GetLegendGraphic?VERSION=1.0.0FORM...

 where sld is the XML file I update (but keeping the same name). So, this
 URL
 cannot accept extra parameters.
 I wanna avoid creating new XMLs each one with different names.
 
 
 Is it your web service?  If you can't change the URL then the server
 needs to set the response cache headers so that the client does not
 cache the resource.
 
 Mike
 
 

-- 
View this message in context: 
http://www.nabble.com/not-updating-images-after-ajax-request-tp21600610s27240p21606289.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: bug in id selector?

2009-01-22 Thread finn.herp...@marfinn-software.de

Sounds good.

Too bad my ids are given by an external xml-file. But since I wrote a
workaround to replace all . in the ids with _ it's fine for me ;).

Thanks

Cheers

On Jan 22, 4:13 pm, Liam Potter radioactiv...@gmail.com wrote:
 jQuery will read it as id test2 with the class 3

 While periods are allowed in the attribute I would advise against them,
 as it's not just jQuery that could struggle with them but most CSS as
 well, as #test2.3 with again read as id test2 with the class 3.



 Finn Herpich wrote:
  Hi everyone,

  the attached example-code shows a problem I encountered today (firebug
  needed).

  If an id-attribute contains dots, like
  p id=test2.3/p
   jQuery isn't able to find it.
  If the dots are replaced by underscores everything works fine.

  Afaik there is no limitation for the id which prohibit dots as a used
  symbol, so I guess this is a bug or for some reason not wanted?

  Cheers


[jQuery] Re: XML Sorting using jQuery - is it possible?

2009-01-22 Thread skube

Thanks for the reply, but that doesn't seem to be an XML object at
all. Isn't that simply a string that looks like XML. Also, by using get
() aren't you simply converting that string into an array anyway?


On Jan 22, 3:00 am, Ricardo Tomasi ricardob...@gmail.com wrote:
 What kind ofsorting?

 xml= 'base';xml+= 'item type=cone/item';xml+= 'item 
 type=btwo/item';xml+= 'item type=dthree/item';xml+= 'item 
 type=fthree/item';xml+= 'item type=athree/item';xml+= '/base';

 var sorted = $(xml).filter('item').get().sort(function(a,b){
    var at = $(a).attr('type'), bt = $(b).attr('type');
    return (at  bt) ? -1 : 1;

 });

 $(sorted).each(function(){
   console.log( this );

 });

 https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Global...

 - ricardo

 On Jan 21, 10:01 pm, skube sku...@gmail.com wrote:

  It seems jQuery is really great at traversing anXMLobject. It is
  quite easy to gather and filter node data. However I can't seem to
  find any information regardingsortingXMLusing jQuery. Is it
  possible? Or is there a plug-in?

  I have a project which requires me to read anXMLfile, then filter
  and sort the data. Filtering I can do, but I have no idea how to sort
 XML. Since arrays are easily sortable in JS, my idea is to convert the
 XMLinto an array first, then filter the array (which is not as easy
  as filteringXMLw/ jQuery) then sort the array.

  Does anyone have any better ideas?

  thanks,
  skube


[jQuery] Re: Download a file from server...

2009-01-22 Thread Mario Soto

It must be using http headers:

header('Content-Disposition: inline; filename='.
$filename.'.pdf');
header('Content-type: application/x-pdf');
echo $pdfData;
die();

By example. -


On Jan 22, 3:05 am, Genus Project genusproj...@gmail.com wrote:
 or you can do this.
 1. your php create the file from your post.
 2. return something to the script ($.post) that says you have
 successfully created the file
     or maybe with the filepath in it in json or whichever format it
 is.
 3. redirect your current window to the path of this file.

 But it may show the file as is because browser can usually display a
 txt file.

 I am not sure how to open up the browser dialog save us box :)

 On Jan 22, 3:46 am, AlexDeLarge perkeleenperkelesaat...@gmail.com
 wrote:

  Hi,

  I have situation like this: I post certain data with $.post to PHP-
  script which is supposed to handle the data, create a file from it and
  then trigger browser to open a Save As-dialog. Everything works just
  fine except the Save As-dialog, I just can't make it pop-up.

  For the Save As dialog the PHP-script ha s following statements:

  header('Content-disposition: attachment; filename=stats.txt');
  header('Content-type: text/plain');
  readfile('stats.txt');

  And this just doesn't work through $.post, or at least I can't make it
  happen.

  Is there any way to make this work?


[jQuery] Re: Download a file from server...

2009-01-22 Thread Mario Soto

In the post above by Alexandre Plennevaux, the link says how to. :)

On Jan 22, 9:38 am, Mario Soto canc...@gmail.com wrote:
 It must be using http headers:

         header('Content-Disposition: inline; filename='.
 $filename.'.pdf');
         header('Content-type: application/x-pdf');
         echo $pdfData;
         die();

 By example. -

 On Jan 22, 3:05 am, Genus Project genusproj...@gmail.com wrote:

  or you can do this.
  1. your php create the file from your post.
  2. return something to the script ($.post) that says you have
  successfully created the file
      or maybe with the filepath in it in json or whichever format it
  is.
  3. redirect your current window to the path of this file.

  But it may show the file as is because browser can usually display a
  txt file.

  I am not sure how to open up the browser dialog save us box :)

  On Jan 22, 3:46 am, AlexDeLarge perkeleenperkelesaat...@gmail.com
  wrote:

   Hi,

   I have situation like this: I post certain data with $.post to PHP-
   script which is supposed to handle the data, create a file from it and
   then trigger browser to open a Save As-dialog. Everything works just
   fine except the Save As-dialog, I just can't make it pop-up.

   For the Save As dialog the PHP-script ha s following statements:

   header('Content-disposition: attachment; filename=stats.txt');
   header('Content-type: text/plain');
   readfile('stats.txt');

   And this just doesn't work through $.post, or at least I can't make it
   happen.

   Is there any way to make this work?


[jQuery] Add Checkboxes in a table.

2009-01-22 Thread Andy

I need to be able to dynamically add a new rows to a table and add
elements such as check boxes, plain text and hyperlinks.  I cannot
find any examples of this.  Would anyone have any samples or a good
url?

Thanks!


[jQuery] Re: [validate] Problem with trigger submit in validation plugin update 1.5.1

2009-01-22 Thread viktorlidh...@gmail.com

Thanks for the quick reply!

Your code does submit the form, however it does unfortunately submit
the form even though verification should fail. :(
Anyone got an idea of how to solve this issue?

Regards,
Viktor

On 21 Jan, 14:58, Liam Potter radioactiv...@gmail.com wrote:
 $(”form a.form_submit”).click(function() {|
         document.form-name-here.submit();
 |       return false;

 });
 viktorlidh...@gmail.com wrote:
  Thanks for a great plugin! Unfortunately I got a problem with the
  latest version (and jquery 1.3).

  I need to submit forms through links instead of input buttons. I’ve
  used the following code to do this:

  $(”form a.form_submit”).click(function() {
    $(this).parents().filter(”form”).trigger(”submit”);
    return false;
  });

  This used to work perfectly together with the validation plugin, but
  is broken since the update (the form isn’t submitted). Any ideas for a
  workaround, or will I need to downgrade jquery?

  Thanks,

  Viktor


[jQuery] Re: [validate] Problem with trigger submit in validation plugin update 1.5.1

2009-01-22 Thread Liam Potter


Never rely on client-side scripting to validate forms completely, use it 
to make the site more user friendly sure, but you should definitely be 
checking it server side.


why aren't you using a form submit button?

viktorlidh...@gmail.com wrote:

Thanks for the quick reply!

Your code does submit the form, however it does unfortunately submit
the form even though verification should fail. :(
Anyone got an idea of how to solve this issue?

Regards,
Viktor

On 21 Jan, 14:58, Liam Potter radioactiv...@gmail.com wrote:
  

$(”form a.form_submit”).click(function() {|
document.form-name-here.submit();
|   return false;

});
viktorlidh...@gmail.com wrote:


Thanks for a great plugin! Unfortunately I got a problem with the
latest version (and jquery 1.3).
  
I need to submit forms through links instead of input buttons. I’ve

used the following code to do this:
  
$(”form a.form_submit”).click(function() {

  $(this).parents().filter(”form”).trigger(”submit”);
  return false;
});
  
This used to work perfectly together with the validation plugin, but

is broken since the update (the form isn’t submitted). Any ideas for a
workaround, or will I need to downgrade jquery?
  
Thanks,
  
Viktor
  


[jQuery] Re: XML Sorting using jQuery - is it possible?

2009-01-22 Thread Balazs Endresz

jQuery can parse most text to xml but that doesn't work in all cases:
http://groups.google.com/group/jquery-en/browse_frm/thread/95718c9aab2c7483/af37adcb54b816c3?lnk=gstq=parsexml#af37adcb54b816c3
You can also copy Array.prototype.sort to $.fn and it will work on the
jQuery object as well:

function parseXML( xml ) {
 if( window.ActiveXObject  window.GetObject ) {
  var dom = new ActiveXObject( 'Microsoft.XMLDOM' );
  dom.loadXML( xml );
  return dom;
 }
  if( window.DOMParser )
   return new DOMParser().parseFromString( xml, 'text/xml' );
   throw new Error( 'No XML parser available' );
}

var xml = 'base';
xml += 'item type=cone/item';
xml += 'item type=btwo/item';
xml += 'item type=dthree/item';
xml += 'item type=fthree/item';
xml += 'item type=athree/item';
xml += '/base';

$.fn.sort=[].sort; //copy the array method

$(parseXML(xml).childNodes[0].childNodes)
.sort(function(a,b){  //using the native sort here
   var at = $(a).attr('type'), bt = $(b).attr('type');
   return (at  bt) ? -1 : 1;
});

On Jan 22, 4:36 pm, skube sku...@gmail.com wrote:
 Thanks for the reply, but that doesn't seem to be an XML object at
 all. Isn't that simply a string that looks like XML. Also, by using get
 () aren't you simply converting that string into an array anyway?

 On Jan 22, 3:00 am, Ricardo Tomasi ricardob...@gmail.com wrote:

  What kind ofsorting?

  xml= 'base';xml+= 'item type=cone/item';xml+= 'item 
  type=btwo/item';xml+= 'item type=dthree/item';xml+= 'item 
  type=fthree/item';xml+= 'item type=athree/item';xml+= '/base';

  var sorted = $(xml).filter('item').get().sort(function(a,b){
     var at = $(a).attr('type'), bt = $(b).attr('type');
     return (at  bt) ? -1 : 1;

  });

  $(sorted).each(function(){
    console.log( this );

  });

 https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Global...

  - ricardo

  On Jan 21, 10:01 pm, skube sku...@gmail.com wrote:

   It seems jQuery is really great at traversing anXMLobject. It is
   quite easy to gather and filter node data. However I can't seem to
   find any information regardingsortingXMLusing jQuery. Is it
   possible? Or is there a plug-in?

   I have a project which requires me to read anXMLfile, then filter
   and sort the data. Filtering I can do, but I have no idea how to sort
  XML. Since arrays are easily sortable in JS, my idea is to convert the
  XMLinto an array first, then filter the array (which is not as easy
   as filteringXMLw/ jQuery) then sort the array.

   Does anyone have any better ideas?

   thanks,
   skube


[jQuery] Re: Need access to index within loop

2009-01-22 Thread brian

You're passing the string i. Remember that the selector is just a
string passed to the jQuery object. Try this:

$('li:eq('+i+')').fadeIn('slow');

On Thu, Jan 22, 2009 at 5:41 AM, elduderino jamesfiltn...@gmail.com wrote:


 HI,

 I have this code:

   $(document).ready(function(){

  $('li').each(function(i) {
  alert(i);
  $('li:eq(i)').fadeIn('slow');
  });

  });

 I want to iterate over each li element and fade it inwith a delay for
 each onei'll deal with the delay in a bit but currently the problem is
 this bit  $('li:eq(i)')it won't accept the i parameter...it wants a
 literal numberhow do I do this?

 --
 View this message in context: 
 http://www.nabble.com/Need-access-to-index-within-loop-tp21601683s27240p21601683.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.




[jQuery] Re: Add Checkboxes in a table.

2009-01-22 Thread ryan.joyce...@googlemail.com

maybe try .append-ing stuff to the table?

$('table#my_table').append( stuff to append goes here )

On Jan 22, 3:42 pm, Andy adharb...@gmail.com wrote:
 I need to be able to dynamically add a new rows to a table and add
 elements such as check boxes, plain text and hyperlinks.  I cannot
 find any examples of this.  Would anyone have any samples or a good
 url?

 Thanks!


[jQuery] Re: jQuery Form Plugin - success callback function isn't called

2009-01-22 Thread Sander Manneke | Internet Today

Right, didn't think of that.

I think I'll tackle that using Yahoo's suggested solution
http://developer.yahoo.com/javascript/samples/proxy/php_proxy_simple.txt

Thanks..



-Oorspronkelijk bericht-
Van: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] Namens
Mike Alsup
Verzonden: donderdag 22 januari 2009 15:11
Aan: jQuery (English)
Onderwerp: [jQuery] Re: jQuery Form Plugin - success callback function
isn't called


 Topic is somewhat old, but I'm stuck on the same thing.. 'success' isn't
 called

 I've managed to narrow it down somewhat
on:http://www.manneke.com/ajaxform/test.php

 The first form is to an external php file that echoes 'hello' afterwhich
 success IS NOT called.

 The second form is to a php file on the same server that also echoes
'hello'
 afterwhich success IS called.

 The only apperant difference is the fact that the receiving php file is on
 my local server and the other post is to an external php file..


That is x-domain browser security kicking in.

No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.176 / Virus Database: 270.10.12/1908 - Release Date: 21-1-2009
21:15



[jQuery] Re: vsdoc for new jquery 1.3.1

2009-01-22 Thread Fisher Ning
Excellent. Thank you.

2009/1/22 John Resig jere...@gmail.com


 The team at Microsoft is already working on it. Hopefully it'll be ready
 soon.

 --John

 On 1/22/09, Fisher Ning ning...@gmail.com wrote:
  Hi guys,
 
  Does anyone know when the jQuery Visual studio doc (jquery-vsdoc.js) will
 be
  updated for new 1.3.1? Is there any plan for this?
 
 
 
 
 
  Regards,
 
  Fisher
 
 
 
 
 
 


 --
 --John




-- 
Fisher Ning
飞雪尔
www.21show.com


[jQuery] Bug? ajax request headers not being modified by beforeSend (jquery 1.3.1)

2009-01-22 Thread Nicolas R

I need some help here guys.
I'm trying to modify the content-type and accept-charset request
headers of an ajax call and it seems that beforeSend does not really
change the XHR object.

My code is something like this:
beforeSend : function(xhr) {
xhr.setRequestHeader('Accept-Charset','windows-1253');

xhr.setRequestHeader('Content-type','application/x-www-form-
urlencoded;charset=windows-1253')
}


I need the charset to be windows-1253 and not UTF-8, as the database
and everything in between (server side scripts) are encoded with
windows-1253.

My html page has the correct charset specified:
meta http-equiv=Content-Type content=text/html;
charset=windows-1253 /
meta http-equiv=Content-Script-Type content=text/javascript;
charset=windows-1253 /

If I submit the form without ajax, the charset is ok and my data is
saved correctly. Otherwise non-latin characters are replaced with
weird characters. From what I understand, changing the charset 
encoding to UTF-8 is currently not an option.

Any suggestions? Is this a jquery bug or I'm I doing something wrong?


[jQuery] Re: Callback problem

2009-01-22 Thread Michael Geary

Alex's code was doing the equivalent of:

$(.btnSave).click(editElementNameSave);

The click() function, like all event functions, expects to receive a
*reference* to a function, not the *name* of a function.

Your code is doing the equivalent of:

editElementNameSave();

You can't call a string as if it were a function.

If editElementNameSave() is a global function (not nested inside another
function), you can do:

$(.btnSave).click( window[handler+'Save'] );

Alex, if you could explain the purpose of the code and give a more complete
example, there may be a better way to do it.

-Mike

 From: jQuery Lover
 
 I have tried this:
 
 var handler = editElementName;
 function editElementNameSave()
 {
   alert('Hurray!');
   console.log(1);
 }
 function showModalBox(handler)
 {
   $(.1).click(function(){
   console.log(2);
   (handler + Save)();
   });
   console.log(3);
 }
 $(document).ready(function(){
   showModalBox(handler);
 });
 
 
 And I got editElementNameSave is not a function error !!!
 
 Error refers to line - (handler + Save)();
 
 
 Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com
 
 
 
 On Thu, Jan 22, 2009 at 1:15 PM, Alex Sergeev 
 sergeev.sa...@gmail.com wrote:
 
  Hello!
 
  i have a code
 
  var handler = editElementName;
  function showModalBox(width, height, handler, id) { ...
  $(.btnSave).click(handler + Save); ...
  }
 
  function editElementNameSave(e)
  {
  alert(1);
  }
 
  Why dont work event click?
 
  PS sorry for my English - i am from Russia
 
 



[jQuery] Book-like UI for jQuery?

2009-01-22 Thread ChimericDream

I've seen a number of sites using a book-like navigation for catalogs
and such.  Essentially, you can grab a page by it's edge and flip
the page, just like you would a real book.  Does anything like this
exist for jQuery?  I tried searching the plugins, I looked at the UI
library, and couldn't find anything on Google.

Thanks in advance.

Bill Parrott


[jQuery] Jquery tree menu Ul Li Ul

2009-01-22 Thread mehstg1319

Hi everybody

Just looking for a couple of words of advice really as I haven't seen
anything on the web that seems to fit what I am looking for.

Basically...I have built a two tier menu system using Jquery to show
and hide the second level when certain parts are clicked.

I was wondering if it was possible to have it's state stay the same
between pages on the site. I.e. have a second level stay open after a
link is clicked and the page changes.

At the moment, as soon as the page changes, the menu closes back up to
default state, which is what would be expected.

My code is as follows.

$(document).ready(function() {
//Hides Level 2 Menu Tree Elements
$(div#leftnav  ul  li  ul).hide();

// TREE MENU EVENT
$(div#leftnav  ul  li  a).click(function(event) {
if ($(this).attr(href) == # ) {
event.preventDefault();
if ($(this).next().is(ul) == true ) {
var classCheck = $(this).attr(class);

$(ul).filter(.active).hide(slow);
$(ul).filter(.active).removeClass();
$(a).removeClass(active);

if (classCheck != active) {
$(this).addClass(active);
$(this).next(ul).addClass(active);
$(ul).filter(.active).show(slow);
}
}
else
{
$(ul).filter(.active).hide(slow);
$(ul).filter(.active).removeClass();
$(a).removeClass(active);
}
}
})
})


Paul


[jQuery] Popup going under flash object

2009-01-22 Thread ptmurphy

I have a web page I have been working on and everything looks good in
IE.  However, in Firefox I am having a problem with the datepicker
popup window going under a flash object that is below the input field
on the page.

The datepicker.css file (this is the only css file I am using in this
application) sets the z-index to  (which is much higher than
anything else on the page, and I have set it to as high as 1000
just to check).  I have tried to set the input field to an extremely
high z-index, as well as setting the z-index of the flash div to -1.

Nothing seems to help in Firefox, but IE does everything correctly,
putting the datepicker popup over the flash object.

Has anyone run into anything similar and can offer some suggestions?

Thanks for any help or suggestions...

PTM


[jQuery] $.ajax timeout and trouble with Microsoft IIS 6

2009-01-22 Thread Stefano Corallo

Hi all,

i've a client side scrit that do a request to a server the server
sleep for a 10 seconds and the respond, in the client side script i
setup the timeout option at 1 second (1000) and i want to catch the
error thrown (like explained all around the web :) )

a bit of code explain better:

//client side
$.ajax({
   type: GET,
   url: some.php,
   data: name=Johnlocation=Boston,
   timeout: 1000
   success: function(msg){
 alert( Data Saved:  + msg );
   },
   error:function(request, errorType, errorThrown){
  alert(oppps  );
   }
 });

//backend some.php
?
 //simulate long task
sleep(10); //sleep 10 seconds

//send response
echo some test data;
?


Now the problem is that under apache all work good and i can see the
alert message opp, but under the iis 6 no alert message popup and
after 10 seconds the some test data came back to the client ...

Have any one experience a problem like this? There something to set in
iis ?

Any help appreciated :D

ps: sorry for my bad english :(


[jQuery] Programatically enabling ''submit' button in ASP.NET

2009-01-22 Thread yaip

I have the following aspx page

%@ Page Language=VB AutoEventWireup=false
CodeFile=Default.aspx.vb Inherits=_Default %

!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 runat=server
title/title

script src=Scripts/jquery-1.2.6.js type=text/javascript/
script
/head
body
form id=form1 runat=server
div
script language=javascript type=text/javascript
$(document).ready(function() {
$(.checkedfield).blur(function() {
var allFilled = true;
$(.checkedfield).each(function() {
if (this.value == ) {
allFilled = false;
return;
};
});

if (allFilled) {
$(#btnSubmit).attr(disabled, false);
}
else
$(#btnSubmit).attr(disabled, true);
});
});
/script
asp:TextBox ID=tb1 class=checkedfield runat=server/
asp:TextBox
asp:TextBox ID=tb2 class=checkedfield runat=server/
asp:TextBox
asp:TextBox ID=tb3 class=checkedfield runat=server/
asp:TextBox
br /
asp:Button ID=btnSubmit runat=server Text=Button
Enabled=false /
/div
/form
/body
/html

It works. However, the button is enabled only when I tab out of the
last empty field (after entering something in it). It should be
enabled as soon as I start typing something. How?




[jQuery] Re: JQuery error with java applet running

2009-01-22 Thread turbonick

Thanks, I upgraded and no more error message!

Nick

On Jan 21, 5:06 pm, Mike Alsup mal...@gmail.com wrote:
   Java class LobbyClientApp has no public field or method named
  jQuery1232546999783
   In jquery-1.2.6.js Line 667

  The JQuery code in that file is: id = elem[ expando ] = ++uuid;

  I can’t understand why this bit of JQuery would be trying to interact
  with the applet. Does anyone have any ideas on why this is happening
  or suggestions how to best troubleshoot it?

 Upgrade to 1.3.  There are many tickets filed against prior versions
 for applet support.


[jQuery] Index of Parent TD

2009-01-22 Thread Aarron

Hi there,

I have a link which sits inside a td within a tr within a table.  What
I would like to do is find out which td (which column) in the table
this link is within - I need to find the column index.

Once I have this I can then remove the column from the table.

Any ideas on how to do this?  I've tried the core index - but to no
avail.

Thanks!


[jQuery] Split data grid

2009-01-22 Thread Mandrake

I've been using flexigrid and tablesorter for my data grid needs.
However, i need a split datagrid function that these two do not have.

You can check out what I mean by following this URL.

http://dhtmlx.com/docs/products/dhtmlxGrid/samples/frozen_columns/pro_grid_split.html#

Basically I just need to pause the first few columns from moving while
being able to sort the data.

Anyone has any ideas?

Thanks


[jQuery] problem with jqmodal and ui datepicker

2009-01-22 Thread Netzai


Hello.
Some body can help me? 
I heave a problem with datepicker inside a modal window with this plugins
(jqModal and ui datepicker).
when datepicker show this appear in a back layer.

How can i do for fixit?

My javascript code:
var x = $(document)
x.ready(function(){
$(#wmContent).jqm()
 .jqDrag('.jqDrag');
$(#boton).click(windowMod);
$(#date).datepicker();
$(#btnCancel).click(function(){
$(#wmContent).jqmHide();  
});// #btnCancel

});//#x.Ready

function windowMod()
{
$(#wmContent).jqmShow();
}
-- 
View this message in context: 
http://www.nabble.com/problem-with-jqmodal-and-ui-datepicker-tp21593716s27240p21593716.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: select next n somethings

2009-01-22 Thread Joe

This:  var preBefore = $('p:eq(3)').prev('pre').text();

Only grabs the text of the preceding text contained within the pre
tag.  If you need all the pre tags prior, then use prevAll()

http://docs.jquery.com/Traversing/prevAll

Joe

http://www.subprint.com

On Jan 19, 5:03 pm, JLundell jlund...@pobox.com wrote:
 Thanks, guys. nextUntil() looks like what I need.

 Joe, am I right that your suggestion grabs all the following pre's? I
 need to stop on the first following non-pre.


[jQuery] Re: Popup going under flash object

2009-01-22 Thread amuhlou

Is the flash div given a position, either relative or absolute?  If
not, try giving it position relative along with the low z-index.

Also, do you have a test page somewhere?

On Jan 22, 10:36 am, ptmurphy ptmur...@bellsouth.net wrote:
 I have a web page I have been working on and everything looks good in
 IE.  However, in Firefox I am having a problem with the datepicker
 popup window going under a flash object that is below the input field
 on the page.

 The datepicker.css file (this is the only css file I am using in this
 application) sets the z-index to  (which is much higher than
 anything else on the page, and I have set it to as high as 1000
 just to check).  I have tried to set the input field to an extremely
 high z-index, as well as setting the z-index of the flash div to -1.

 Nothing seems to help in Firefox, but IE does everything correctly,
 putting the datepicker popup over the flash object.

 Has anyone run into anything similar and can offer some suggestions?

 Thanks for any help or suggestions...

 PTM


[jQuery] redmond theme accordion IE6 bug

2009-01-22 Thread Dan Vega

I am using the accordion and everything is working great in FF3/IE7.
In IE 6 the images used for the headers are about 50 pixels below
where the accordion is. Does anyone know why this would be happening?


[jQuery] Re: Location Persistence... Almost

2009-01-22 Thread betweenbrain

Hi Jed,

Are you using cookies (I seem to remember example 3 or 4) ? Also, I
believe treeview uses span as the parent element. That may clue you
in the right direction.

It would be helpful if you could post your code or a website with this
example.

Best,

Matt

On Jan 21, 6:42 pm, Jed jrdor...@gmail.com wrote:
 I went back and changed the code to match exactly what's behind Sample
 0 on the treeview demo page, but still no joy.

 I can see the tree expand to show the proper subs, but then the page
 changes, and when the tree reloads that new sub is closed again.


[jQuery] Re: Book-like UI for jQuery?

2009-01-22 Thread Richard D. Worth
This isn't exactly what you describe, but gets you maybe half-way:

http://www.webresourcesdepot.com/attractive-jquery-page-curl-plugin/

- Richard

On Thu, Jan 22, 2009 at 12:45 PM, ChimericDream muz...@gmail.com wrote:


 I've seen a number of sites using a book-like navigation for catalogs
 and such.  Essentially, you can grab a page by it's edge and flip
 the page, just like you would a real book.  Does anything like this
 exist for jQuery?  I tried searching the plugins, I looked at the UI
 library, and couldn't find anything on Google.

 Thanks in advance.

 Bill Parrott



[jQuery] Re: redmond theme accordion IE6 bug

2009-01-22 Thread Jörn Zaefferer

This has been fixed in the repository. You can get the latest
accordion css file here:
http://jquery-ui.googlecode.com/svn/trunk/themes/base/ui.accordion.css
The changset is here: http://ui.jquery.com/bugs/changeset/1755

Jörn

On Thu, Jan 22, 2009 at 7:24 PM, Dan Vega danv...@gmail.com wrote:

 I am using the accordion and everything is working great in FF3/IE7.
 In IE 6 the images used for the headers are about 50 pixels below
 where the accordion is. Does anyone know why this would be happening?


[jQuery] Re: Popup going under flash object

2009-01-22 Thread Kean

Problem might be with flash.

add param wmode=transparent
embed wmode=transparent

On Jan 22, 7:36 am, ptmurphy ptmur...@bellsouth.net wrote:
 I have a web page I have been working on and everything looks good in
 IE.  However, in Firefox I am having a problem with the datepicker
 popup window going under a flash object that is below the input field
 on the page.

 The datepicker.css file (this is the only css file I am using in this
 application) sets the z-index to  (which is much higher than
 anything else on the page, and I have set it to as high as 1000
 just to check).  I have tried to set the input field to an extremely
 high z-index, as well as setting the z-index of the flash div to -1.

 Nothing seems to help in Firefox, but IE does everything correctly,
 putting the datepicker popup over the flash object.

 Has anyone run into anything similar and can offer some suggestions?

 Thanks for any help or suggestions...

 PTM


[jQuery] Re: Add Checkboxes in a table.

2009-01-22 Thread Kean

Let me guess, you wanted to add a new row and it is almost identical
to the row before it.

This will probably work.

$row = $('table tr:last-child').clone();
$row.appendTo('table');


On Jan 22, 7:42 am, Andy adharb...@gmail.com wrote:
 I need to be able to dynamically add a new rows to a table and add
 elements such as check boxes, plain text and hyperlinks.  I cannot
 find any examples of this.  Would anyone have any samples or a good
 url?

 Thanks!


[jQuery] Re: jQuery.support IE6 or later

2009-01-22 Thread Eric Martin

The question is - how to use the new $.support code to achieve the
same result.

I submitted a patch that seems to work. It needs a review and some
testing:
http://dev.jquery.com/ticket/3960

On Jan 21, 3:43 am, Mauricio \(Maujor\) Samy Silva
css.mau...@gmail.com wrote:
 It will be maintained !

 Fromhttp://docs.jquery.com/Release:jQuery_1.3#Overview

 Heading: No More Browser Sniffing 
 ...
 It's important to note that jQuery.browser is still in jQuery - and will be
 for the foreseeable future (too many plugins and pieces of code depend on
 it). ...

 Maurício

 -Mensagem Original-
 De: Neil Craig neil.big.cr...@gmail.com
 Para: jQuery (English) jquery-en@googlegroups.com
 Enviada em: quarta-feira, 21 de janeiro de 2009 09:20
 Assunto: [jQuery] jQuery.support  IE6 or later



  I fully understand why support detection is considered much better
  than browser sniffing. But I have yet to see a way to detect the flash/
  selectbox bleed-through issue that exists in IE version 6 or earlier.

  For that reason, I think that jQuery.browser should be maintained in
  future releases of jQuery.




[jQuery] Re: Popup going under flash object

2009-01-22 Thread amuhlou

In Firefox 2 Mac the wmode=transparent parameter causes a bug.  If
flash with wmode=transparent is playing, some things that go over top
of the flash area will actually pause or stop the movie. It's fixed in
FF3 Mac so not a whole lot you can do for those still on v2, but at
least the amount of people using it is pretty small.



On Jan 22, 1:50 pm, Kean shenan...@gmail.com wrote:
 Problem might be with flash.

 add param wmode=transparent
 embed wmode=transparent

 On Jan 22, 7:36 am, ptmurphy ptmur...@bellsouth.net wrote:

  I have a web page I have been working on and everything looks good in
  IE.  However, in Firefox I am having a problem with the datepicker
  popup window going under a flash object that is below the input field
  on the page.

  The datepicker.css file (this is the only css file I am using in this
  application) sets the z-index to  (which is much higher than
  anything else on the page, and I have set it to as high as 1000
  just to check).  I have tried to set the input field to an extremely
  high z-index, as well as setting the z-index of the flash div to -1.

  Nothing seems to help in Firefox, but IE does everything correctly,
  putting the datepicker popup over the flash object.

  Has anyone run into anything similar and can offer some suggestions?

  Thanks for any help or suggestions...

  PTM




[jQuery] Re: bug in id selector?

2009-01-22 Thread spinnach

I believe that it will function as intended if you escape the dot,
like so:
$(#test2\.3)

although I've tried now in Firebug and it seems you have to escape the
slash too, like so (don't know why, is it because of Firebug, or?):
$(#test2\\.3)

Cheers,
Dennis.

On Jan 22, 5:21 pm, finn.herp...@marfinn-software.de
finn.herp...@marfinn-software.de wrote:
 Sounds good.

 Too bad my ids are given by an external xml-file. But since I wrote a
 workaround to replace all . in the ids with _ it's fine for me ;).

 Thanks

 Cheers

 On Jan 22, 4:13 pm, Liam Potter radioactiv...@gmail.com wrote:

  jQuery will read it as id test2 with the class 3

  While periods are allowed in the attribute I would advise against them,
  as it's not just jQuery that could struggle with them but most CSS as
  well, as #test2.3 with again read as id test2 with the class 3.

  Finn Herpich wrote:
   Hi everyone,

   the attached example-code shows a problem I encountered today (firebug
   needed).

   If an id-attribute contains dots, like
   p id=test2.3/p
    jQuery isn't able to find it.
   If the dots are replaced by underscores everything works fine.

   Afaik there is no limitation for the id which prohibit dots as a used
   symbol, so I guess this is a bug or for some reason not wanted?

   Cheers


  1   2   >