Re: [jQuery] previous

2009-12-08 Thread lennon1980

hi Scott,

Cheers..thats pretty cool.  One more thing actually..I need the element to
be a div..how do I add this to the selector..I actually managed to write
something using recursion yesterday but its pretty nasty..i would much
prefer to use something like what you've give me.

function findClass(el) {
var $myel = $(el).prev();
var $class = ''
if ($myel.is('div')) {
if ($myel.attr('class') == '') {
$class = findClass($myel);
} else {
$class = $myel.attr('class');
}
} else {
$class = findClass($myel);
}
return $class;
}

thanks for your help



Scott Sauyet-2 wrote:
 
 On Dec 7, 10:23 am, lennon1980 ja...@publiczone.co.uk wrote:
 I want to find all previous elements in the DOM (not parent elements) of
 element called 'feature' [ ... ]
 But I want to find all previous divs that have a css class assinged to
 them.
 the first previous div it finds I want to be able to retrieve the class
 name
 of that dic in a string.
 
 Will this do what you want?:
 
 var item = $(#feature).prevAll([class]:first);
 if (item) alert(item.attr(class));
 
 You can pass a selector into prevAll.  Here we select only those
 elements that contain an attribute named class and then choose just
 the first one of these.  ('First' here does not mean document order
 but something more like 'closest'.)
 
 Cheers,
 
   -- Scott
 
 

-- 
View this message in context: 
http://old.nabble.com/previous-tp26678777s27240p26690836.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Document undefined error

2009-12-08 Thread Firefox
Many thanks for your replies.

Yes I can confirm we have web developers that are re-writing our
entire website, and they will be using jquery within it.

I know the code itself does not do anything, but the developers seem
convinced it should at least display the same info as it does when run
with firefox.  The team I work for is responsible for looking at
GPO's, I guess I really just need to know if there are any particular
IE settings that have to be enabled.  If the answer is no, that is
fine, because then I can go back to them with that :-D

thanks for your time


Re: [jQuery] Re: Very Strange !!! The same HTML code works well, but append() it not !!!

2009-12-08 Thread Michael Geary
Eric, you really need to put up a test page so we can try actually loading
it. Otherwise it's too hard to tell what might be wrong. I'm not even sure
what the problem is we're supposed to be looking at!

-Mike

On Mon, Dec 7, 2009 at 11:44 PM, Eric Zhong ericiszhongwen...@gmail.comwrote:

 i have modified the code , but the result is the same, even if i write this
 in one line !!! Help !!!

 one line version:
 


 html
 head
 script src=
 http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js;/script
 SCRIPT LANGUAGE=JavaScript
 !--
 $(function(){
 // /*
 var html_video ='table id=tb_all width=724pxtrtd
 valign=toptable id=tb_video class=tb_widthtr
 class=tb_headtdnbsp/tdtdfilename/tdtdlen(s)/tdtdsize(KB)/td/tr/table/td/tr/table';

 $(body).append( html_video );

 var data =
 [
 {name: 1, len: 432, size: 321},
 {name: 2, len: 54543, size: 432},
 {name: 3, len: 3243, size: 432},
 {name: 4, len: 543, size: 432},
 {name: 5, len: 543, size: 654},
 {name: 6, len: 654, size: 654},
 {name: 7, len: 765, size: 654},
 {name: 8, len: 765, size: 765},
 {name: 9, len: 53, size: 654}
 ];

 var a = data;
 if ( a != null ){
 for(var i=0; ia.length; i++){
 var d = a[i];
 $(#tb_video).append('trtdinput type=checkbox
 //tdtd' + d.name + '/tdtd' + d.len + '/tdtd' + d.size +
 '/tdtr');
 }
 }

 $(#tb_video).closest(tr).append('td width=80px
 align=center style=vertical-align:topinput id=pl_bt_up type=button
 value=↑ /input id=pl_bt_down type=button value=↓ //td');
 // */
 $(#pl_bt_up).click(function() {
 var $all = $(#tb_video tr);
 var $trs = $(#tb_video tr:has(input:checked));
 if( $all.index($trs.get(0)) != 1 ){
 $trs.each(function(){
 $(this).prev().before($(this));
 });
 }
 });

 $(#pl_bt_down).click(function() {
 var $all = $(#tb_video tr);
 var $trs = $(#tb_video tr:has(input:checked));

 if( $all.index( $trs.get($trs.length-1) ) != $all.length-1
 ){
 for( i = $trs.length-1; i=0; i-- ) {
 var $item = $( $trs.get(i) );
 $item.insertAfter($item.next());
 }
 }
 });
 });
 --
 /SCRIPT
 /head
 body
 !--
 table id=tb_all width=724px
 tr
 td valign=top
 table id=tb_video class=tb_width
 tr class=tb_head
 tdnbsp/td
 tdfilename/td
 tdlen(s)/td
 tdsize(KB)/td
 /tr
 trtdinput type=checkbox
 //tdtd1/tdtd222/tdtd432/td/tr
 trtdinput type=checkbox
 //tdtd2/tdtd333/tdtd543/td/tr
 trtdinput type=checkbox
 //tdtd3/tdtd444/tdtd654/td/tr
 trtdinput type=checkbox
 //tdtd4/tdtd555/tdtd765/td/tr
 trtdinput type=checkbox
 //tdtd5/tdtd666/tdtd876/td/tr
 trtdinput type=checkbox
 //tdtd6/tdtd777/tdtd432/td/tr
 trtdinput type=checkbox
 //tdtd7/tdtd888/tdtd543/td/tr
 trtdinput type=checkbox
 //tdtd8/tdtd999/tdtd265/td/tr
 /table
 /td
 td width=80px align=center style=vertical-align:top
 input id=pl_bt_up type=button value=↑ /
 input id=pl_bt_down type=button value=↓ /
 /td
 /tr
 /table
 --
 /body
 /html

 



 2009/12/8 seasoup seas...@gmail.com

 javascript cant read strings over line breaks.

   $(#tb_video).append(' \
  tr \
  tdinput
  type=checkbox //td \
  td' + d.name + '/td \
  td' + d.len + '/td \
  td' + d.size + '/td \
  tr ');

 must be

   $(#tb_video).append('tr'+
  'tdinput type=checkbox
 //td'+
  'td' + d.name + '/td'+
  'td' + d.len + '/td'+
  'td' + d.size + '/td'+
  'tr ');

 On Dec 7, 6:30 pm, Eric Zhong 

[jQuery] onclick send parameter to a JQuery function?

2009-12-08 Thread theUnseen
Hi guys,

I show a table with mysql data with an edit option/link for each
record, but i want the edit link to call a jquery function onclick and
it must pass the $ec_arr[4] as the argument/parameter which is the id
of the record in the mysql table to JQuery. how can I do this
please...?

table border=1
tr
   tdFullname/td
   tdRelationship/td
   tdContact number/td
   tdResidential address/td
   tdnbsp;/td
 /tr
?php foreach(get_emergency_contact_fields($var) as $ec_arr): ?
  tr
 td?php echo $ec_arr[0] ?/td
 td?php echo $ec_arr[1] ?/td
 td?php echo $ec_arr[2] ?/td
 td?php echo $ec_arr[3] ?/td
 tda href=#Edit/a /td
   /tr
   ?php endforeach; ?
/table


[jQuery] IE 6-7 autosubmit forms, JSON objects and weird behaviours

2009-12-08 Thread elpatator
Here's the beginning of the description for my problem (made the
mistake to open this thread in the wrong group, sorry for that).

http://groups.google.com/group/jquery-dev/browse_thread/thread/8c2edf79fdebf61e

Unfortunatelly, I cannot provide an online test page. But I can keep
on describing error alerts, and IE's behaviour.

First, here's the code I came up with today :

$(document).ready(function(){


/*
 * BOF // Fonction pour garder la session active
 */
var sessionKeepAlive = 1000 * 50;
function keepSessionAlive(){
$.ajax({
url: '/actions/keepAlive',
success: function(data){
setTimeout(function(){
keepSessionAlive();
}, sessionKeepAlive);
},
error: function(XMLHttpRequest, textStatus, errorThrown){
setTimeout(function(){
keepSessionAlive();
}, sessionKeepAlive);
}
});
}
keepSessionAlive();

/*
 * EOF // Fonction pour garder la session active
 */

/*
 * BOF // Fonction de gestion / validation/ Submit du formulaire
de coordonnées de facturation
 */
 $(#formulaireFinalCreationCompte input).live(change, function(){
$(#formulaireFinalCreationCompte).validate({
errorPlacement: function(error, element){
error.appendTo(element);
},
rules: {
facturationCivilite: required,
facturationNom: required,
facturationPrenom: required,
facturationAdresse1: required,
facturationCodePostal: {
required: true,
rangelength: [5, 5],
number: true
},
facturationVille: required,
facturationTel: {
number: true,
required: true
},
facturationEmail: {
required: true,
email: true
}
},
submitHandler: function(form){
var action = $(form).attr('action');
var data = $(form).serialize();
$.ajax({
cache: false,
url: action,
data: data,
success: function(reponse){
$('#coordonneesFacturation').empty();
$('#coordonneesFacturation').html(reponse);
}
});
}
});
if ($(#formulaireFinalCreationCompte).valid()){
$(#formulaireFinalCreationCompte).submit();
}
});
/*
 * EOF // Fonction de gestion / validation/ Submit du formulaire
de coordonnées de facturation
 */



 /*
 * BOF // Fonction de génération 'otf' du panier dynamique (objet
JSON parsé)
 */
  function generationTable(json){
var reponse = eval('(' + json + ')');
$.each(reponse.articles,function(i,article) {
var articleRow = $(tr).addClass
(ligneArticlePrincipal).appendTo(#panierDetail tbody);
$(td).addClass(libelleArticlePrincipal).text
(article.libelle).appendTo(articleRow);

var prixAffiche = parseInt(article.prixAffiche);
if (prixAffiche != 0) {
$(td).addClass('prixTotalLigne').text
(article.prixAffiche).appendTo(articleRow);
}
else {
$(td).html('input type=text
id=prixUnitaireArticle value=0 name=prixCommandeCarte/
').appendTo(articleRow);
}
var inputText = $(td).html('input type=text
id=quantitePrincipal class=quantite value=' + article.quantite +
' name=quantiteLigneCommande(' + article.id + ')/').appendTo
(articleRow);
var inputHidden = $(input type=\hidden\/).attr
('value', article.id).attr('id', 'articlePrincipalCourantId').attr
('name', 'articlePrincipalCourantId');

var remiseLigneArticle = $(td).addClass
('remiseLigneArticle').html('span id=remiseLigneArticle' +
article.montantRemise + '/span').appendTo(articleRow);

$(inputHidden).appendTo(inputText);
var prixTotalArticle = 00,00;
if (article.prixTotal != ) {
prixTotalArticle = article.prixTotal;
}
var totalLigneArticle = $(td).addClass
('prixTotalLigne').html('span id=totalArticle' + prixTotalArticle
+ '/span').appendTo(articleRow);
});

$(tfoot td.prixTotalLigne).html(reponse.totalPanier);

}

/*
 * BOF  Support du live('change')
 */
var articleEnCoursVal ;
$(.quantite).live(focus,function(){
articleEnCoursVal = parseInt($(this).val());
});

$(.quantite).live(change, function(){
var formulaire = 

Re: [jQuery] onclick send parameter to a JQuery function?

2009-12-08 Thread Michel Belleville
First of all you'll need to write your $ec_arr[4] somewhere in your page, or
your client-side jQuery script won't be able to even guess it. Ideally it
should be placed as near as possible from your edit link. Wait, what's a
link for ? Bringing the client to another url, the href attribute exists for
this very purpose. And we want to pass an argument / parameter when we click
on that link... Hey, why not put it right on the href attribute then ?

tda href=?php echo $ec_arr[4] ?Edit/a/td

Hmm, something seems a bit out of place. I mean, unless whatever is in
$ec_arr[4] is an actual url, it's not quite proper to put just this in a
link's href right ? Right. So, let's assume you've got an edit script
located there : http://somewhere.over.therainbow.com/way/up_high.php;,
which takes id as a parameter, and that this id is what's in $ec_arr[4] :

tda href=http://somewhere.over.therainbow.com/way/up_high.php?id=?php
echo $ec_arr[4] ?Edit/a/td

This way, even when your user wouldn't have JavaScript, this is still
working for him if a bit less friendly. Now how do I easily set up a click
callback on each link of a table ?

$('table a').click(function() { alert('OMG someone clicked me !'); });

And how do we get the clicked element in a click callback ?

$('table a').click(function() { alert('OMG someone clicked me again ! And I
totally have this href thingy : ' + $(this).attr('href')); });

Now I'll let you figure out how to put all this together with whatever
.load() or .get() or something else you'd like to do to get your form back
on your page.

Michel Belleville


2009/12/8 theUnseen themba.ntl...@gmail.com

 Hi guys,

 I show a table with mysql data with an edit option/link for each
 record, but i want the edit link to call a jquery function onclick and
 it must pass the $ec_arr[4] as the argument/parameter which is the id
 of the record in the mysql table to JQuery. how can I do this
 please...?

 table border=1
tr
   tdFullname/td
   tdRelationship/td
   tdContact number/td
   tdResidential address/td
   tdnbsp;/td
 /tr
?php foreach(get_emergency_contact_fields($var) as $ec_arr): ?
  tr
 td?php echo $ec_arr[0] ?/td
 td?php echo $ec_arr[1] ?/td
 td?php echo $ec_arr[2] ?/td
 td?php echo $ec_arr[3] ?/td
 tda href=#Edit/a /td
   /tr
   ?php endforeach; ?
 /table



Re: [jQuery] Filtering on hidden contents

2009-12-08 Thread Mauricio (Maujor) Samy Silva
 Try this:

( $('.location div:visible').length == 0 ) ? $('.location').hide() : ''; 

Maurício
  De: wandrian 
  Para: jQuery (English) 
  Enviada em: segunda-feira, 7 de dezembro de 2009 23:21
  Assunto: [jQuery] Filtering on hidden contents


  I am trying to figure out if all the child divs of a containing div
  are hidden and if so I then want to hide the parent containing div.

  I am trying some thing like this:

  $('div.location').filter(function(){
  return (($this*:visible).length==0)
  }).hide();



Re: [jQuery] onclick send parameter to a JQuery function?

2009-12-08 Thread Themba Ntleki
Thanks Michel,

I found a solution, my mistake was trying to create the function inside :
$(document).ready(function() {

the onClick could not find the function. I have defined the function
separately and the onclick does work. Basically, I want to do the edit
action using ajax, but thanks a mil for the response!!



2009/12/8 Michel Belleville michel.bellevi...@gmail.com

 First of all you'll need to write your $ec_arr[4] somewhere in your page,
 or your client-side jQuery script won't be able to even guess it. Ideally it
 should be placed as near as possible from your edit link. Wait, what's a
 link for ? Bringing the client to another url, the href attribute exists for
 this very purpose. And we want to pass an argument / parameter when we click
 on that link... Hey, why not put it right on the href attribute then ?

 tda href=?php echo $ec_arr[4] ?Edit/a/td

 Hmm, something seems a bit out of place. I mean, unless whatever is in
 $ec_arr[4] is an actual url, it's not quite proper to put just this in a
 link's href right ? Right. So, let's assume you've got an edit script
 located there : http://somewhere.over.therainbow.com/way/up_high.php;,
 which takes id as a parameter, and that this id is what's in $ec_arr[4] :

 tda href=http://somewhere.over.therainbow.com/way/up_high.php?id=?php
 echo $ec_arr[4] ?Edit/a/td

 This way, even when your user wouldn't have JavaScript, this is still
 working for him if a bit less friendly. Now how do I easily set up a click
 callback on each link of a table ?

 $('table a').click(function() { alert('OMG someone clicked me !'); });

 And how do we get the clicked element in a click callback ?

 $('table a').click(function() { alert('OMG someone clicked me again ! And I
 totally have this href thingy : ' + $(this).attr('href')); });

 Now I'll let you figure out how to put all this together with whatever
 .load() or .get() or something else you'd like to do to get your form back
 on your page.

 Michel Belleville


 2009/12/8 theUnseen themba.ntl...@gmail.com

 Hi guys,

 I show a table with mysql data with an edit option/link for each
 record, but i want the edit link to call a jquery function onclick and
 it must pass the $ec_arr[4] as the argument/parameter which is the id
 of the record in the mysql table to JQuery. how can I do this
 please...?

 table border=1
tr
   tdFullname/td
   tdRelationship/td
   tdContact number/td
   tdResidential address/td
   tdnbsp;/td
 /tr
?php foreach(get_emergency_contact_fields($var) as $ec_arr): ?
  tr
 td?php echo $ec_arr[0] ?/td
 td?php echo $ec_arr[1] ?/td
 td?php echo $ec_arr[2] ?/td
 td?php echo $ec_arr[3] ?/td
 tda href=#Edit/a /td
   /tr
   ?php endforeach; ?
 /table





Re: [jQuery] onclick send parameter to a JQuery function?

2009-12-08 Thread Michel Belleville
I fail to see where your problem was related to your question ; anyway, what
I just explained will work with AJAX (that was even the point really), you
just have to add the .load() or the .get() and give them the appropriate
parameters to have a nice and shiny ajax interface for your users to enjoy.

Michel Belleville


2009/12/8 Themba Ntleki themba.ntl...@gmail.com

 Thanks Michel,

 I found a solution, my mistake was trying to create the function inside :
 $(document).ready(function() {

 the onClick could not find the function. I have defined the function
 separately and the onclick does work. Basically, I want to do the edit
 action using ajax, but thanks a mil for the response!!



 2009/12/8 Michel Belleville michel.bellevi...@gmail.com

 First of all you'll need to write your $ec_arr[4] somewhere in your page,
 or your client-side jQuery script won't be able to even guess it. Ideally it
 should be placed as near as possible from your edit link. Wait, what's a
 link for ? Bringing the client to another url, the href attribute exists for
 this very purpose. And we want to pass an argument / parameter when we click
 on that link... Hey, why not put it right on the href attribute then ?

 tda href=?php echo $ec_arr[4] ?Edit/a/td

 Hmm, something seems a bit out of place. I mean, unless whatever is in
 $ec_arr[4] is an actual url, it's not quite proper to put just this in a
 link's href right ? Right. So, let's assume you've got an edit script
 located there : http://somewhere.over.therainbow.com/way/up_high.php;,
 which takes id as a parameter, and that this id is what's in $ec_arr[4] :

 tda href=http://somewhere.over.therainbow.com/way/up_high.php?id=?php
 echo $ec_arr[4] ?Edit/a/td

 This way, even when your user wouldn't have JavaScript, this is still
 working for him if a bit less friendly. Now how do I easily set up a click
 callback on each link of a table ?

 $('table a').click(function() { alert('OMG someone clicked me !'); });

 And how do we get the clicked element in a click callback ?

 $('table a').click(function() { alert('OMG someone clicked me again ! And
 I totally have this href thingy : ' + $(this).attr('href')); });

 Now I'll let you figure out how to put all this together with whatever
 .load() or .get() or something else you'd like to do to get your form back
 on your page.

 Michel Belleville


 2009/12/8 theUnseen themba.ntl...@gmail.com

 Hi guys,

 I show a table with mysql data with an edit option/link for each
 record, but i want the edit link to call a jquery function onclick and
 it must pass the $ec_arr[4] as the argument/parameter which is the id
 of the record in the mysql table to JQuery. how can I do this
 please...?

 table border=1
tr
   tdFullname/td
   tdRelationship/td
   tdContact number/td
   tdResidential address/td
   tdnbsp;/td
 /tr
?php foreach(get_emergency_contact_fields($var) as $ec_arr): ?
  tr
 td?php echo $ec_arr[0] ?/td
 td?php echo $ec_arr[1] ?/td
 td?php echo $ec_arr[2] ?/td
 td?php echo $ec_arr[3] ?/td
 tda href=#Edit/a /td
   /tr
   ?php endforeach; ?
 /table













[jQuery] looking for a gallery/shideshow plugin with specific functions

2009-12-08 Thread neonwiredpixels
I'm looking for a slideshow/gallery jquery script that can be used to
cycle through small previews and open full size lightbox style on
clicking. Anyone know which, if any, can do this?


Re: [jQuery] is there a way to add a class to the body when window is resized below a certain width

2009-12-08 Thread Rafał Pocztarski
2009/12/5 ripple ripple...@yahoo.com

 $(window).resize(function(){
 reSize();
 });

 function reSize() {

 if ($('#page').width()  1000) {
 //do something
 }

Nice idea with the less important columns disappearing when the window
gets smaller. I just want to point out that when you only have one
function call inside your handler then you can just pass it directly
without the anonymous function:

$(window).resize(function(){ reSize(); });

can be simplified to:

$(window).resize(reSize);


Rafał Pocztarski


Re: [jQuery] How to monitor scrolling of a page?

2009-12-08 Thread Rafał Pocztarski
2009/12/5 rtpHarry rtpha...@gmail.com:
 I am investigating to see if its possible to track how far down the
 user scrolls on a page.

 Ideal situation is track if they got to a percentage of the page
 height like 90% or even if they reached the bottom of the page.

You can do something like this:

$(window).scroll(function(){
  var bottom = $(window).height() + $(window).scrollTop();
  var height = $(document).height();
  var percentage = Math.round(100*bottom/height);
  // do something with percentage
});

Or instead of just checking the percentage you can check if some
element that you are interested in got visible by comparing it's
position on the page to the bottom variable.

Rafał Pocztarski


[jQuery] drop down error

2009-12-08 Thread test11

hi
 when i am using superfish, during the page load beore the image/flash
gets loaded all the drop down list are getting displayed at a time .can u
suggest me how to hide those dropdown untill the image has been loaded

-- 
View this message in context: 
http://old.nabble.com/drop-down-error-tp26693913s27240p26693913.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



Re: [jQuery] New site with jquery: Cpluv

2009-12-08 Thread RobG


Escape-Artist wrote:
 Which site are you talking about?

You can check out more about us: Shaperstudio on
http://www.shaperstudio.com our site 

 There's no flash on the cpluv site.

Great, but the home page is over 800kb, half of which is script. Good
luck.

--
Rob



[jQuery] Re: Newby question - jquery tablesort demo

2009-12-08 Thread MorningZ
With just doesn't work, it makes it next to impossible to even think
about helping   do you have an example of your code?

the plugin most definitely works when utilized and implemented
properly

On Dec 7, 4:20 pm, Don Moore donsmo...@gmail.com wrote:
 Hello all, I'm an experienced LAMP developer and I am having trouble
 getting the tablesort demo working.

 http://tablesorter.com/docs/

 I hope this is the correct list to be asking this - if not please
 advise.

 I have been attempting to get this to work for a couple hours and the
 instructions appear to be incorrect and out of date.
 I am just trying to get the sample table to work with sorting. I have
 been able to figure out that there is a css for the styles.
 This seems like a very cool tool  -  Everyone could probably use it
 but I cant seem to get it to work. Sometimes it will sort but not
 both ways (will sort asecneding only not asc/desc) Sometimes the
 little arrows will show up sometimes not. Its driving me nuts
 trying to figure this out. Also it looks different in chrome and ie on
 my test but not on his site.

 Anyone know about this? Any input will be greatly appreciated.

 Thanks
 don


[jQuery] Re: Positioning of nested child elements when using sliders/carousels?

2009-12-08 Thread O.J. Tibi - @ojtibi
Help, anyone?


[jQuery] Accordian functionality

2009-12-08 Thread Aaron Gusman
I'd like to create my own type of accordian however I am finding
difficulty with creating the query for selection.

Say I have a div with another two divs inside - I will call this
parent div as the SideBox.

The first child div is the header and it is the one that will be
clicked - I will call this div the SideBoxHeader as even the CSS class
will have this name .
The second div will contain other things and it is the one that will
hide when the the Header is clicked - I will call this div the
SideBoxContent .

I am trying to create jquery syntax to associate code to the header
div so that it hides the Content div when clicked the first time and
shows it back when clicked a second time.  Note that we will have more
than one SideBox on the same page.

$(.SideBox .SideBoxHeader).toggle(function () {  }, function
() {# });

How will I find the .SideBoxContent sibling of the SideBoxHeader that
was clicked??

I do not know how to write a selector that works on another
selection.  In one of the toggle functions how can I find the sibling
of the SideBoxHeader I clicked??? $(this)(???)



RE: [jQuery] New site with jquery: Cpluv

2009-12-08 Thread Rick Faircloth
The site loaded quickly for me...as quick or quicker than
many mainly html sites...talking about ShaperStudio.com...

-Original Message-
From: jquery-en+ow...@googlegroups.com
[mailto:jquery-en+ow...@googlegroups.com] On Behalf Of RobG
Sent: Tuesday, December 08, 2009 8:41 AM
To: jQuery (English)
Subject: Re: [jQuery] New site with jquery: Cpluv



Escape-Artist wrote:
 Which site are you talking about?

You can check out more about us: Shaperstudio on
http://www.shaperstudio.com our site 

 There's no flash on the cpluv site.

Great, but the home page is over 800kb, half of which is script. Good
luck.

--
Rob





[jQuery] Re: Accordian functionality

2009-12-08 Thread MorningZ
Here's a simple example based on your class names

http://jsbin.com/ayate/edit


On Dec 8, 9:40 am, Aaron Gusman ict.aarongus...@gmail.com wrote:
 I'd like to create my own type of accordian however I am finding
 difficulty with creating the query for selection.

 Say I have a div with another two divs inside - I will call this
 parent div as the SideBox.

 The first child div is the header and it is the one that will be
 clicked - I will call this div the SideBoxHeader as even the CSS class
 will have this name .
 The second div will contain other things and it is the one that will
 hide when the the Header is clicked - I will call this div the
 SideBoxContent .

 I am trying to create jquery syntax to associate code to the header
 div so that it hides the Content div when clicked the first time and
 shows it back when clicked a second time.  Note that we will have more
 than one SideBox on the same page.

 $(.SideBox .SideBoxHeader).toggle(function () {  }, function
 () {# });

 How will I find the .SideBoxContent sibling of the SideBoxHeader that
 was clicked??

 I do not know how to write a selector that works on another
 selection.  In one of the toggle functions how can I find the sibling
 of the SideBoxHeader I clicked??? $(this)(???)


[jQuery] Re: google map with jquery and php(please help me)

2009-12-08 Thread StephenJacob
That is a very nice tutorial. It's too bad that the creator stylized
it that way... makes me head hurt just looking at it.

On Dec 7, 6:57 pm, Charlie charlie...@gmail.com wrote:
 This set of many tutorials is one of the best Google map resources you can 
 find:http://econym.org.uk/gmap/
 StephenJacob wrote:I'd suggest checking out the Google API documentation for 
 examples. You can also look into some jquery google map examples at 
 ajaxrain.com ... but i think you'll find more things useful at the google api 
 site.http://code.google.com/apis/maps/documentation/index.htmlhttp://www.ajaxrain.com/searchOn
  Dec 7, 1:30 pm, hamed763hosse...@gmail.comwrote:hi i need some code like 
 google map with jquery and php i dont want use api,i want create some page 
 with some map for user can click on map and save some information on map and 
 show like google map.


Re: [jQuery] Help... anyone!

2009-12-08 Thread brian
I'm not sure I understand in what sense the page is freezing
sometimes. I've had a look in FF (Linux) and haven't seen anything
untoward.

It could be that you've specified that the page never be cached. Try
removing that, clear your cache, and click around some. You do have a
fair number of JS files to load.

I don't see any reason to unbind the click event for that other link.

Also, you might want to remove the outline from the jCarousel
back/forward buttons. If so, have a look at this and adjust for your
needs:
http://css-tricks.com/removing-the-dotted-outline/

On Mon, Dec 7, 2009 at 3:44 PM, Mike mike.croteau1...@gmail.com wrote:

 Before I dive into my issue, I just finished reading Learning jQuery
 1.3 and decided to go full fledged and create my first site
 implementing jQuery only!  I had a little experience before this but
 found that jQuery is a lot of fun and easy to implement, even for a
 semi noob. (maybe a total noob after you read about my issue)

 However, I am have a page freeze issue and I am not sure why or how to
 track down. In this site, I am using Cufon for custom text
 replacement, DD_belatedPNG fix for transparent pngs in IE and jQuery
 for all my pretty UI enhancements.

 Being new, I have a feeling that I am leaving something open, maybe
 not unbinding an element or maybe my implementation of all 3 is out of
 whack... I dont know.  Has anyone run into an issue like this where
 their page freezes from time to time?  When accessing in IE, Safari,
 Opera and Chrome... no freeze.

 It seems to happen on 1 page most of the time.  I have jCarousel Lite,
 Cufon, DD_belated, and some custom jQuery code running.  I have a
 subscribe button that submits a form and I set it up as

 $('a#button').click(function(){
  dosomething();
 }

 Am I suppose to unbind this?

 Also when ever someone clicks on a left or right toggle on my
 jCarousel Lite plugin, I call Cufon.replace() on top of the base
 interaction for those toggle buttons.

   if(replacefont){
      $('div.toggles a').click(function(e){
         Cufon.replace('#slides h1, #slides a');

      });

      Cufon.replace('h1, h2, h3, h4, h5, #slides p, a.buttons, #quote
 p, b, #main-menu a, .container p');
   }


 The web template I am working on can be found here:

 http://themeforest.gfunkmedia.com/comercia-web/lite/index.html

 I have not been able to duplicate the issue on demand... but think it
 happens on the home pages and if you click on home multiple times it
 may happen.  I disabled right click, so if you would like to see code,
 please let me know.

 Much appreciated to the jQuery guys and enthusiasts!

 Best
 Mike



Re: [jQuery] Selector fails and works

2009-12-08 Thread brian
I believe this is the problem:

input[type=radio][checked=true]

The correct value for the checked attribute is checked, not true
(don't ask me why; I think it's a stinker), so jQuery comes up
empty-handed.

Whereas the other way you're approaching this:

if (this.checked)

... works because you're testing for a (boolean) property that is
assigned by jQuery *after* it has used your more general selector to
create a list of objects.

A simpler way to approach this would be to use some of jQuery's
built-in selector goodness:

$('#selected_courses .course input:radio:checked')

However, note that you drop '.course' from this if there are never any
other radio buttons within #selected_courses but outside of a .course
div.

On Mon, Dec 7, 2009 at 4:40 PM, Beardsley Ruml b...@ruml.com wrote:
 Sorry that this take a while to demonstrate but it's a complete puzzle (to
 me)!

 I would like to determine whether there are any checked radio buttons within
 the
 div selected_courses in the following HTML:

  div id=selected_courses
     div class=course
       input type=radio name=1st .. /
         [ 5 more radio buttons]
     /div
        [ 2 more courses ]
  /div

 When the code below is executed, there are 3 selected courses; since
 each course has six radio buttons, there are 18 radio buttons.  When I
 add the further qualification to select only the checked radio buttons,
 the reponse is zero buttons (although there are in fact 3 checked buttons).

 However, if I approach the search in another more roundabout way -- by
 examining
 each of the radio buttons in turn to determine how many are checked, the
 answer
 is the correct one: 3 (one within each course).

 Notice that within the following each loop, I look among the
 selected_courses
 for an input element with a specified name which is checked and *that*
 doubly
 conditioned selector works as expected; that is, the if statement is
 executed.

 So why does the double condition on the input selector fail the first time
 and succeed the second time

 Perhaps relevant:
 When I replace:
  $('#selected_courses .course input[type=radio][checked=true]')
 with
  $sel_courses.find('input[type=radio][checked=true]')
 the selection works.  Is there some difference between three levels of
 selection criteria without an initial jQuery object and using find() to
 apply a single criterion to an existing jQuery object?

 Code:
 
 if (ui.panel.id == final_ordered_list) {
  console.log(Clicked on Final Ordered List tab:);
  var $sel_courses = $(#selected_courses .course);
  console.log(Have  + $sel_courses.length +  selected courses.);
  var $radio_buttons = $('#selected_courses .course input[type=radio]');
  console.log(Have  + $radio_buttons.length +  radio buttons.);
  var $chked_radio_buttons = $('#selected_courses .course
 input[type=radio][checked=true]');
  console.log(Got  + $chked_radio_buttons.length +  straight checked radio
 buttons.);
  var checked_radio_buttons = 0;
  $radio_buttons.each(function() { if (this.checked) checked_radio_buttons +=
 1; });
  console.log(Got  + checked_radio_buttons +  roundabout checked radio
 buttons.);
  if (checked_radio_buttons  0) {
    console.log(      + $sel_courses.length +  selected courses);
    console.log(      + checked_radio_buttons +  checked radio buttons);
    $.each([1st,2nd,3rd,4th,5th,6th], function(index,
 curr_ordinal) {
      // if there is a course with the curr_ordinal radio button checked
      // (can only be one), then copy to Final Ordered List;
      var $checked_radio_button = $sel_courses.find('input[name=' +
 curr_ordinal + '][checked=true]')
      if ($checked_radio_button.length  0) {
        // do something;
      }
    });
  });
 });

 Console output:
 ==
 Clicked on Final Ordered List tab:
 Have 3 selected courses.
 Have 18 radio buttons.
 Got 0 straight checked radio buttons.
 Got 3 roundabout checked radio buttons.
 3 selected courses
 3 checked radio buttons

 Many thanks for any insights into what's happening!

 B Ruml




Re: [jQuery] : FileUpload Problem

2009-12-08 Thread brian
See here:

http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F

And you're loading the MultiFile plugin twice. You need either
MultFile.js or MultiFile.pack.js, but not both.

Also, keep in mind that you're cloning an element with an ID, which
must always be unique.

But it looks to me like you're trying to do something that's
unnecessary. Why are you cloning anything at all?

On Mon, Dec 7, 2009 at 2:45 PM, jayakumar ala alajay...@gmail.com wrote:
 Hi All,
  I am using the following code to upload file and add the file tag
 dynamically for my application. Jquery doen't seem to be working for the
 dynamically added file.
 Any help is appreciated.

 html
 script type=text/javascript src=js/jquery.js/script
 script type=text/javascript src=js/jquery.MultiFile.js/script
 script type=text/javascript src=js/jquery.MultiFile.pack.js/script
 script language=javascript
 var intVal = 1;
 function addUploadFile() {
   var innerinVal = ++intVal;
   var divTagVal = divTagTemplate.cloneNode(true);
   document.getElementById('outerVal').appendChild(divTagVal);
  }
 /script
 form action=doUpload enctype=multipart/form-data method=post
 div id=outerVal
 p
 Type some text (if you like):br
 input type=text name=textline size=30
 /p
 p id=addVal1
 Please specify a file, or a set of files:br
 input type=file class=multi id=test1 name=datafile size=40
 /p
 div
 input type=submit value=Send
 input type=button class=button value=Add File
 onclick=javascript:addUploadFile(); id=addFileButton /
 /div
 /div
 /form
 script var divTagTemplate =
 document.getElementById('addVal1').cloneNode(true);
 /script
 /html


Re: [jQuery] Problem with images loaded dynamically

2009-12-08 Thread brian
Can you see the images ok if you type in the direct URL for each one?


On Mon, Dec 7, 2009 at 2:35 PM, jlee patrykk...@gmail.com wrote:
 Hi,
 I'm stuck here - I'm trying to load images dynamically on my website,
 but for some reason the method I use works on a server on my local
 computer, but behaves very strangely on a remote server...

 I use this code to load the images:
 function replaceImage(imgName, container) {
 $j(container).hide(); //so it fades out once the image has loaded
 $j(container).image(imgName, function() { //this is a simple plugin,
 i'll paste it's code below
 if(container != #galImage) { //if it's a thumbnail, i want to be
 able to click on it
 $j(container).empty().append(this).wrap(a href=\#\/a);
 } else { //it's not a thumbnail, so no a wrapper
 $j(container).empty().append(this);
 }
 $j(container).fadeIn(); //finally, show the image
 });
 }

 The simple plugin for loading images into a container:
 $.fn.image = function(src, f){
 return this.each(function(){
 var i = new Image();
 i.src = src;
 i.onload = f;
 this.appendChild(i);
 });
 }

 This code is used like this: replaceImage('images/' + imgName,
 'imgCont1');

 As I said, everything works just fine on my machine with apache server
 installed. But, when I open the website located on a server, it turns
 out that most images don't appear at all, and the ones that do show up
 are severely distorted... Does anybody know what could cause that?
 Here's an example of such distorted image: 
 http://www.eurydicesite.info/error.jpg

 The non-working site is available here: http://www.eurydicesite.info -
 when you click on portfolio, 9 thumbnail images should appear to
 the left, but they don't.



Re: [jQuery] Having issues with selecthing $(this).find('.classname') with webkit browsers (Chrome/Safari)

2009-12-08 Thread brian
How about this?

$('.secondlevelcontainer', $(this)).fadeIn(500);

On Mon, Dec 7, 2009 at 3:34 PM, Leonard Teo teo.leon...@gmail.com wrote:
 Hi guys,

 I'm looking for a workaround... I'm having some issues with the
 following code:

        //Navbar hover
        $('.toplevel').hover(
                function(event){
                        $(this).find('.secondlevelcontainer').fadeIn(500);    
 -- doesn't
 work in Safari/Chrome
                }, function(event){
                        $(this).find('.secondlevelcontainer').fadeOut(500);   
 -- doesn't
 work in Safari/Chrome
                }
        );      //navbar hover

 Basically, it doesn't work in Safari and Chrome. Works fine in Firefox
 and Internet Explorer.

 Is there a better way to do the above code that works cross platform?

 Thanks!

 Leonard



Re: [jQuery] Re: Document undefined error

2009-12-08 Thread Michael Geary
No, there are no IE settings that need to be enabled. jQuery works with
every modern browser out of the box.

Loading a .js file directly from the browser address bar is not how it would
ever be used in the context of a website, so no conclusions should be drawn
from that experience. jQuery will work as expected in all browsers when it
is loaded in the normal way using a script tag within an HTML document
(either a static HTML document or an HTML page generated dynamically by any
server language).

Just to amplify the point, remember when you loaded jquery.min.js in the
Firefox address bar and it displayed the content of the .js file in the
Firefox window? That certainly isn't what you'd want to happen on your
website either. You wouldn't want the JavaScript code to be displayed in
your web page when someone visits! :-)

But you don't need to worry about what happens when you try to view the .js
file directly in Firefox or IE. It's not the same as how it will work when
the .js file is loaded in the normal manner from a script tag in your
page.

Hope that helps,

-Mike

On Tue, Dec 8, 2009 at 1:23 AM, Firefox barrie.wh...@gmail.com wrote:

 Many thanks for your replies.

 Yes I can confirm we have web developers that are re-writing our
 entire website, and they will be using jquery within it.

 I know the code itself does not do anything, but the developers seem
 convinced it should at least display the same info as it does when run
 with firefox.  The team I work for is responsible for looking at
 GPO's, I guess I really just need to know if there are any particular
 IE settings that have to be enabled.  If the answer is no, that is
 fine, because then I can go back to them with that :-D

 thanks for your time



[jQuery] Re: Having issues with selecthing $(this).find('.classname') with webkit browsers (Chrome/Safari)

2009-12-08 Thread seasoup
lets see the html.

On Dec 7, 12:34 pm, Leonard Teo teo.leon...@gmail.com wrote:
 Hi guys,

 I'm looking for a workaround... I'm having some issues with the
 following code:

         //Navbar hover
         $('.toplevel').hover(
                 function(event){
                         $(this).find('.secondlevelcontainer').fadeIn(500);    
 -- doesn't
 work in Safari/Chrome
                 }, function(event){
                         $(this).find('.secondlevelcontainer').fadeOut(500);   
 -- doesn't
 work in Safari/Chrome
                 }
         );      //navbar hover

 Basically, it doesn't work in Safari and Chrome. Works fine in Firefox
 and Internet Explorer.

 Is there a better way to do the above code that works cross platform?

 Thanks!

 Leonard


Re: [jQuery] Re: Very Strange !!! The same HTML code works well, but append() it not !!!

2009-12-08 Thread Michael Geary
Hi Eric,

Please forgive me for not explaining clearly.

Here is what I meant by a test page: post your HTML page on a website
somewhere and give us the URL to that page. Then we can click the link and
load your page, just like any other web page. That makes it much easier to
help you troubleshoot.

Here, since I didn't explain myself well, I went ahead and uploaded your
files to my own site:

http://mg.to/test/zhong/OK.html

http://mg.to/test/zhong/Error.html

Now when I load the page I can see the strange behavior you noticed.

I also noticed that the two pages display slightly differently from each
other. Do you see how the Error page has more spacing between the rows than
the OK page? This made me think there is something different in the
dynamically generated code.

To find the difference, I used the View Source Chart extension for Firefox:

https://addons.mozilla.org/en-US/firefox/addon/655

along with the Araxis Merge file comparison program:

http://www.araxis.com/

I opened your OK.html file in Firefox and selected View Source Chart from
the View menu.

I also opened a new file comparison window in Araxis Merge. (Araxis Merge is
an excellent but fairly expensive commercial product. You could use any file
comparison or diff program, though.)

Then I did a select all and copy, and pasted the result into the left
panel in Araxis Merge.

I did the same thing with your Error.html file and pasted the result into
the right panel in Araxis Merge.

This showed me the difference between the straight HTML version and the
JavaScript-generated version.

I saved the comparison report here for you to look at:

http://mg.to/test/zhong/compare.html

Scroll down in that page and take a look around line 116 on the left, line
256 on the right. Do you see the extra /tr and tr tags there, and the
same thing in the lines below that?

In the JavaScript-generated version, there is an *extra* empty table row in
between each of your table rows.

This is why your up and down buttons are acting strangely. They probably
*are* moving the table row(s) up and down as expected, but those empty table
rows are interfering with that. I'm sure if you get rid of the empty rows it
will work as you want.

This also explains why there is a small difference in layout between the two
versions. Do you see where the JavaScript version has more spacing between
the rows (at least in Firefox)? That is caused by the empty rows.

I'll let you sort out what part of your JavaScript code is causing those
extra rows to be added.

Hope that helps,

-Mike

On Tue, Dec 8, 2009 at 1:59 AM, Eric Zhong ericiszhongwen...@gmail.comwrote:

 thanks for your reply, my english is poor , i can't understand what is
 test page,  you meant  src file or description for the result ???


 description:
 1. when you use HTML code,  it runs well , you can select one or more
 select box and click up or down button, the selected line will up and down
 immediately.
 2. but when you use jQuery  to append() the code , you do the same action ,
 the selected line, will move or not some times, and when you multiselect
 lines, you will see the strange result, it's hard to say with my poor
 english, sorry !!!

 i attach 2 files, one is OK, and another is Error. you can run it (double
 click) , and to opt and to see what difference.


 2009/12/8 Michael Geary m...@mg.to

 Eric, you really need to put up a test page so we can try actually loading
 it. Otherwise it's too hard to tell what might be wrong. I'm not even sure
 what the problem is we're supposed to be looking at!

 -Mike


 On Mon, Dec 7, 2009 at 11:44 PM, Eric Zhong 
 ericiszhongwen...@gmail.comwrote:

 i have modified the code , but the result is the same, even if i write
 this in one line !!! Help !!!

 one line version:
 


 html
 head
 script src=
 http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js;/script
 SCRIPT LANGUAGE=JavaScript
 !--
 $(function(){
 // /*
 var html_video ='table id=tb_all width=724pxtrtd
 valign=toptable id=tb_video class=tb_widthtr
 class=tb_headtdnbsp/tdtdfilename/tdtdlen(s)/tdtdsize(KB)/td/tr/table/td/tr/table';

 $(body).append( html_video );

 var data =
 [
 {name: 1, len: 432, size: 321},
 {name: 2, len: 54543, size: 432},
 {name: 3, len: 3243, size: 432},
 {name: 4, len: 543, size: 432},
 {name: 5, len: 543, size: 654},
 {name: 6, len: 654, size: 654},
 {name: 7, len: 765, size: 654},
 {name: 8, len: 765, size: 765},
 {name: 9, len: 53, size: 654}
 ];

 var a = data;
 if ( a != null ){
 for(var i=0; ia.length; i++){
 var d = a[i];
 $(#tb_video).append('trtdinput type=checkbox
 //tdtd' + d.name + '/tdtd' + d.len + 

[jQuery] Re: Filtering on hidden contents

2009-12-08 Thread wandrian
Thanks Mauricio for the idea, but that code did not work, but I think
I understand where you were going with it.

In the spirit of sharing and for anyone who is interested I figured
this out: http://jsbin.com/eneyu/edit

$('.location:not(:has(.trip:visible))').hide();

(or you could add a class of .hide if you want to keep the css out of
the markup)


[jQuery] jQuery validation error: 'settings' is null or not an object

2009-12-08 Thread NovoGeek
Hi all,
I'm using jQuery validation plugin and everything works fine in
Firefox. But in IE (78), when I try to validate my form, I get the
error - ['settings' is null or not an object].

I'm using simple rules like this:

$(#FormID).validate({
rules: {
FirstNameText:required
},
messages:{
FirstNameText: Please enter first name
}
});

I searched for similar posts and found this:
http://groups.google.com/group/jquery-en/browse_thread/thread/831feb27923dc32c
. However, a convincing answer is not given.

Can some one tell me why this error is coming?


Re: [jQuery] : FileUpload Problem

2009-12-08 Thread jayakumar ala
Brian,
Thnaks for the reply.
I am trying to do is add same p tag by cloning and change the id's.
 It is suppose to behave same way as the first element but when i add file
it is not applying any class.
 Here i am adding the updated code that will update the class value and Id
while cloning in the addUploadFile() function. But the newly added file tags
are not working as the main tag when i add file. Hope you got the problem.
I checked the same in firebug it seems that add function is adding the right
classes. But the functionality is missing when i browse a file to chose
multiple file to the newly added file tag.

I am new to this Jquery , i might be missing somethins here.

html
script type=text/javascript src=js/jquery.js/script
script type=text/javascript src=js/jquery.MultiFile.js/script

script
var divTagTemplate ;
  $(document).ready(function(){

divTagTemplate = document.getElementById('addVal1').cloneNode(true);
  });
  /script

script language=javascript
var intVal = 1;
function addUploadFile() {
  var divTagTemplateCopy = divTagTemplate.cloneNode(true);
  var innerinVal = ++intVal;
  divTagTemplateCopy.setAttribute(id,'addVal'+innerinVal);

  var stringVal = divTagTemplateCopy.innerHTML;
  stringVal = stringVal.replace(/MultiFile1/g,MultiFile+innerinVal);
  divTagTemplateCopy.innerHTML = stringVal;
  var divTagVal = divTagTemplateCopy.cloneNode(true);
  //divValList = divTagVal.getElementByTagName('input');
  document.getElementById('outerVal').appendChild(divTagVal);
 }
/script


form action=doUpload enctype=multipart/form-data method=post
div id=outerVal
p
Type some text (if you like):br
input type=text name=textline size=30
/p
p id=addVal1
Please specify a file, or a set of files:br
input type=file class=multi name=datafile size=40
/p
div
input type=submit value=Send
input type=button class=button value=Add File
onclick=javascript:addUploadFile(); id=addFileButton /
/div
/div
/form
script


/script
/html
Any help is appreciated.

Thanks
Jay

On Tue, Dec 8, 2009 at 10:12 AM, brian zijn.digi...@gmail.com wrote:

 See here:


 http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F

 And you're loading the MultiFile plugin twice. You need either
 MultFile.js or MultiFile.pack.js, but not both.

 Also, keep in mind that you're cloning an element with an ID, which
 must always be unique.

 But it looks to me like you're trying to do something that's
 unnecessary. Why are you cloning anything at all?

 On Mon, Dec 7, 2009 at 2:45 PM, jayakumar ala alajay...@gmail.com wrote:
  Hi All,
   I am using the following code to upload file and add the file tag
  dynamically for my application. Jquery doen't seem to be working for the
  dynamically added file.
  Any help is appreciated.
 
  html
  script type=text/javascript src=js/jquery.js/script
  script type=text/javascript src=js/jquery.MultiFile.js/script
  script type=text/javascript
 src=js/jquery.MultiFile.pack.js/script
  script language=javascript
  var intVal = 1;
  function addUploadFile() {
var innerinVal = ++intVal;
var divTagVal = divTagTemplate.cloneNode(true);
document.getElementById('outerVal').appendChild(divTagVal);
   }
  /script
  form action=doUpload enctype=multipart/form-data method=post
  div id=outerVal
  p
  Type some text (if you like):br
  input type=text name=textline size=30
  /p
  p id=addVal1
  Please specify a file, or a set of files:br
  input type=file class=multi id=test1 name=datafile size=40
  /p
  div
  input type=submit value=Send
  input type=button class=button value=Add File
  onclick=javascript:addUploadFile(); id=addFileButton /
  /div
  /div
  /form
  script var divTagTemplate =
  document.getElementById('addVal1').cloneNode(true);
  /script
  /html



Re: [jQuery] jQuery validation error: 'settings' is null or not an object

2009-12-08 Thread Michael Geary
It's pretty hard to tell what could possibly be wrong from just that code
snippet. If you can post a link to a test page that demonstrates the
problem, it will be much easier for someone to help.

-Mike

On Tue, Dec 8, 2009 at 10:17 AM, NovoGeek kris.techg...@gmail.com wrote:

 Hi all,
 I'm using jQuery validation plugin and everything works fine in
 Firefox. But in IE (78), when I try to validate my form, I get the
 error - ['settings' is null or not an object].

 I'm using simple rules like this:

 $(#FormID).validate({
rules: {
FirstNameText:required
},
messages:{
FirstNameText: Please enter first name
}
});

 I searched for similar posts and found this:

 http://groups.google.com/group/jquery-en/browse_thread/thread/831feb27923dc32c
 . However, a convincing answer is not given.

 Can some one tell me why this error is coming?



[jQuery] Ajax , Json, and error firing instead of success

2009-12-08 Thread elpatator
Hi people,
I'm trying to make an ajax request, hoping for a clean json response
to come up. Firefox, as usual, behaves like a charm, but when it comes
to IE 6 and 7, it's the error function that's fired.
$.ajax({
  url: action,
  data: data,
  type: GET,
  dataType: json,
  error: function(msg) {
   alert(Error:  + msg);
   alert(URL:  + action);
   alert(DATA:  + data);
  },
  success: function(reponse) {
var result = eval((+reponse+));
alert(result);
console.info(reponse);
   [... ...]

Using Charles Web DEbbuging Proxy, I started tracing what's happening
when IE calls for ajax;
here's what Charles says:
{
  totalPanier: 0,00amp;euro;,
  articles: [
{
  id: 8a8b8d632481567f01248156fac90009,
  prixAffiche: 0,00,
  quantite: 0,
  libelle: Carte BEST CADEAUX à montant variable,
  montantRemise: ,
  prixTotal: 00,00amp;euro;
},
{
  id: 8a8b8d632481567f0124815706910010,
  prixAffiche: 80,00,
  quantite: 0,
  libelle: Carte BEST CADEAUX 80 Euros,
  montantRemise: ,
  prixTotal: 00,00amp;euro;
},
{
  id: 8a8b8d632481567f012481570578000f,
  prixAffiche: 50,00,
  quantite: 0,
  libelle: Carte BEST CADEAUX 50 Euros,
  montantRemise: ,
  prixTotal: 00,00amp;euro;
},
{
  id: 8a8b8d632481567f012481570549000e,
  prixAffiche: 30,00,
  quantite: 0,
  libelle: Carte BEST CADEAUX 30 Euros,
  montantRemise: ,
  prixTotal: 00,00amp;euro;
},
{
  id: 8a8b8d632481567f012481570364000d,
  prixAffiche: 15,00,
  quantite: 0,
  libelle: Carte BEST CADEAUX 15 Euros,
  montantRemise: ,
  prixTotal: 00,00amp;euro;
}
  ]
}
That's ... JSON, perfectlly formated.
Here's for the headers now:
HTTP/1.1 200 OK
Server  Apache-Coyote/1.1
X-Powered-ByServlet 2.4; JBoss-4.0.3SP1 (build:
CVSTag=JBoss_4_0_3_SP1 date=200510231054)/Tomcat-5.5
Content-Typeapplication/json;charset=UTF-8
Content-Length  1221
DateTue, 08 Dec 2009 18:41:05 GMT

Woot! What the hell am I missing ? Thanks for the great help you could
(and I hope, will) provide !!!


[jQuery] Re: Help... anyone!

2009-12-08 Thread Mike

Thanks for the response.  I was unable to find where to set firefox to
clear cache automatically.   I went to about:config ... found some
cache settings, but not clear settings.  I can duplicate the issue.
If you click on home then About then back to home and do it
rather quickly numerous times.  At one point it freezes.  Now I know
most users wont interact like this... but it makes me think that there
is an issue with either Cufon, my Script or my implementation.   So,
still having issues.  Please try what I mentioned above to see if you
run into the same problem.

btw, thanks for that little dotted outline fix!  Makes it look much
cleaner!


Again, MUCH APPRECIATED.

Best
Mike

On Dec 8, 11:49 am, brian zijn.digi...@gmail.com wrote:
 I'm not sure I understand in what sense the page is freezing
 sometimes. I've had a look in FF (Linux) and haven't seen anything
 untoward.

 It could be that you've specified that the page never be cached. Try
 removing that, clear your cache, and click around some. You do have a
 fair number of JS files to load.

 I don't see any reason to unbind the click event for that other link.

 Also, you might want to remove the outline from the jCarousel
 back/forward buttons. If so, have a look at this and adjust for your
 needs:http://css-tricks.com/removing-the-dotted-outline/

 On Mon, Dec 7, 2009 at 3:44 PM, Mike mike.croteau1...@gmail.com wrote:

  Before I dive into my issue, I just finished reading Learning jQuery
  1.3 and decided to go full fledged and create my first site
  implementing jQuery only!  I had a little experience before this but
  found that jQuery is a lot of fun and easy to implement, even for a
  semi noob. (maybe a total noob after you read about my issue)

  However, I am have a page freeze issue and I am not sure why or how to
  track down. In this site, I am using Cufon for custom text
  replacement, DD_belatedPNG fix for transparent pngs in IE and jQuery
  for all my pretty UI enhancements.

  Being new, I have a feeling that I am leaving something open, maybe
  not unbinding an element or maybe my implementation of all 3 is out of
  whack... I dont know.  Has anyone run into an issue like this where
  their page freezes from time to time?  When accessing in IE, Safari,
  Opera and Chrome... no freeze.

  It seems to happen on 1 page most of the time.  I have jCarousel Lite,
  Cufon, DD_belated, and some custom jQuery code running.  I have a
  subscribe button that submits a form and I set it up as

  $('a#button').click(function(){
   dosomething();
  }

  Am I suppose to unbind this?

  Also when ever someone clicks on a left or right toggle on my
  jCarousel Lite plugin, I call Cufon.replace() on top of the base
  interaction for those toggle buttons.

    if(replacefont){
       $('div.toggles a').click(function(e){
          Cufon.replace('#slides h1, #slides a');

       });

       Cufon.replace('h1, h2, h3, h4, h5, #slides p, a.buttons, #quote
  p, b, #main-menu a, .container p');
    }

  The web template I am working on can be found here:

 http://themeforest.gfunkmedia.com/comercia-web/lite/index.html

  I have not been able to duplicate the issue on demand... but think it
  happens on the home pages and if you click on home multiple times it
  may happen.  I disabled right click, so if you would like to see code,
  please let me know.

  Much appreciated to the jQuery guys and enthusiasts!

  Best
  Mike


[jQuery] Re: Accordian functionality

2009-12-08 Thread Aaron Gusman
Thank you for that.  This suits my requirements.  However, is there a
way to do .. sort of... subqueries???  First a selector, than another
selection filter over the result.

Example:
var AllSideBoxes = $(.SideBox); //gets all sideboxes
var SomeItems = $(AllSideBoxes).SubQuery(.SideItem); //gets all
SideItems from the result of the previous query

Thanks
Aaron

On Dec 8, 5:02 pm, MorningZ morni...@gmail.com wrote:
 Here's a simple example based on your class names

 http://jsbin.com/ayate/edit

 On Dec 8, 9:40 am, Aaron Gusman ict.aarongus...@gmail.com wrote:



  I'd like to create my own type of accordian however I am finding
  difficulty with creating the query for selection.

  Say I have a div with another two divs inside - I will call this
  parent div as the SideBox.

  The first child div is the header and it is the one that will be
  clicked - I will call this div the SideBoxHeader as even the CSS class
  will have this name .
  The second div will contain other things and it is the one that will
  hide when the the Header is clicked - I will call this div the
  SideBoxContent .

  I am trying to create jquery syntax to associate code to the header
  div so that it hides the Content div when clicked the first time and
  shows it back when clicked a second time.  Note that we will have more
  than one SideBox on the same page.

  $(.SideBox .SideBoxHeader).toggle(function () {  }, function
  () {# });

  How will I find the .SideBoxContent sibling of the SideBoxHeader that
  was clicked??

  I do not know how to write a selector that works on another
  selection.  In one of the toggle functions how can I find the sibling
  of the SideBoxHeader I clicked??? $(this)(???)


[jQuery] Jquery, ajax and if-modified-since

2009-12-08 Thread Magnus O.
Hi!

I can't get the if-modified-since header to work with jquery ajax.

I tried to fet an xml like this:

$.get(url, function(xml){
 //Do something with response.
 }, xml);

On these requests the if-modified-since is not set.

Then I tried like this:

$.ajax({
type: GET,
url: url,
dataType: xml,
complete: function(XMLHttpRequest, textStatus){

},
ifModified: true,
cache: true
});

This cause the if-modified-since to be set to:  Thu, 01 Jan 1970
00:00:00 GMT

If I just load the url in the browser directly the headers are set
correctly and the server can return a 304.

These are the request headers:

Hostlocalhost:8080
User-Agent  Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5)
Gecko/20091102 Firefox/3.5.5
Accept  application/xml, text/xml, */*
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive  300
Connection  keep-alive
If-Modified-Since   Thu, 01 Jan 1970 00:00:00 GMT
X-Requested-WithXMLHttpRequest
Referer http://localhost:8080/
Cookie  __utma=1.1594413898.1260294412.1260294412.1260294412.1;
__utmc=1; __utmz=1.1260294412.1.1.utmcsr=(direct)|utmccn=(direct)|
utmcmd=(none); re_ret=0; re_ses=UQskC-7167631552; re_ses_indx=2;
position=57.717%2C11.967%2C11


And here are the response headers:

Server  Development/1.0
DateTue, 08 Dec 2009 19:30:05 GMT
Content-Typetext/xml
Cache-Control   public, max-age=3600
Last-Modified   Tue, 08 Dec 2009 18:49:08 GMT
Expires Tue, 08 Dec 2009 19:49:08 GMT
Content-Length  148018

Why does not jquery ajax set the correct if-modifed-since header?

//Magnus



Re: [jQuery] Re: Help... anyone!

2009-12-08 Thread brian
On Tue, Dec 8, 2009 at 1:48 PM, Mike mike.croteau1...@gmail.com wrote:

 Thanks for the response.  I was unable to find where to set firefox to
 clear cache automatically.   I went to about:config ... found some
 cache settings, but not clear settings.

Edit  Preferences  Advanced  Network  Clear Now


 I can duplicate the issue.
 If you click on home then About then back to home and do it
 rather quickly numerous times.  At one point it freezes.  Now I know
 most users wont interact like this... but it makes me think that there
 is an issue with either Cufon, my Script or my implementation.   So,
 still having issues.  Please try what I mentioned above to see if you
 run into the same problem.

I don't see anything. I still don't know what I'm looking for. When
you say the page freezes, do you mean it doesn't complete the load?
Things don't work? Something else?

The pages do take a while to load but that's not unusual given you've
specified no caching.


[jQuery] Re: Accordian functionality

2009-12-08 Thread MorningZ
is there a way to do .. sort of... subqueries???

http://docs.jquery.com/Traversing/find#expr


On Dec 8, 2:28 pm, Aaron Gusman ict.aarongus...@gmail.com wrote:
 Thank you for that.  This suits my requirements.  However, is there a
 way to do .. sort of... subqueries???  First a selector, than another
 selection filter over the result.

 Example:
 var AllSideBoxes = $(.SideBox); //gets all sideboxes
 var SomeItems = $(AllSideBoxes).SubQuery(.SideItem); //gets all
 SideItems from the result of the previous query

 Thanks
 Aaron

 On Dec 8, 5:02 pm, MorningZ morni...@gmail.com wrote:

  Here's a simple example based on your class names

 http://jsbin.com/ayate/edit

  On Dec 8, 9:40 am, Aaron Gusman ict.aarongus...@gmail.com wrote:

   I'd like to create my own type of accordian however I am finding
   difficulty with creating the query for selection.

   Say I have a div with another two divs inside - I will call this
   parent div as the SideBox.

   The first child div is the header and it is the one that will be
   clicked - I will call this div the SideBoxHeader as even the CSS class
   will have this name .
   The second div will contain other things and it is the one that will
   hide when the the Header is clicked - I will call this div the
   SideBoxContent .

   I am trying to create jquery syntax to associate code to the header
   div so that it hides the Content div when clicked the first time and
   shows it back when clicked a second time.  Note that we will have more
   than one SideBox on the same page.

   $(.SideBox .SideBoxHeader).toggle(function () {  }, function
   () {# });

   How will I find the .SideBoxContent sibling of the SideBoxHeader that
   was clicked??

   I do not know how to write a selector that works on another
   selection.  In one of the toggle functions how can I find the sibling
   of the SideBoxHeader I clicked??? $(this)(???)


[jQuery] Re: Ajax , Json, and error firing instead of success

2009-12-08 Thread MorningZ
Is there a reason why you have eval() ?   jQuery will do that by
itself if you are telling it to retrieve JSON


On Dec 8, 1:44 pm, elpatator romain.simi...@gmail.com wrote:
 Hi people,
 I'm trying to make an ajax request, hoping for a clean json response
 to come up. Firefox, as usual, behaves like a charm, but when it comes
 to IE 6 and 7, it's the error function that's fired.
                 $.ajax({
                   url: action,
                   data: data,
                   type: GET,
                   dataType: json,
                   error: function(msg) {
                alert(Error:  + msg);
                            alert(URL:  + action);
                            alert(DATA:  + data);
                   },
                   success: function(reponse) {
                                 var result = eval((+reponse+));
                                 alert(result);
                         console.info(reponse);
            [... ...]

 Using Charles Web DEbbuging Proxy, I started tracing what's happening
 when IE calls for ajax;
 here's what Charles says:
 {
   totalPanier: 0,00amp;euro;,
   articles: [
     {
       id: 8a8b8d632481567f01248156fac90009,
       prixAffiche: 0,00,
       quantite: 0,
       libelle: Carte BEST CADEAUX à montant variable,
       montantRemise: ,
       prixTotal: 00,00amp;euro;
     },
     {
       id: 8a8b8d632481567f0124815706910010,
       prixAffiche: 80,00,
       quantite: 0,
       libelle: Carte BEST CADEAUX 80 Euros,
       montantRemise: ,
       prixTotal: 00,00amp;euro;
     },
     {
       id: 8a8b8d632481567f012481570578000f,
       prixAffiche: 50,00,
       quantite: 0,
       libelle: Carte BEST CADEAUX 50 Euros,
       montantRemise: ,
       prixTotal: 00,00amp;euro;
     },
     {
       id: 8a8b8d632481567f012481570549000e,
       prixAffiche: 30,00,
       quantite: 0,
       libelle: Carte BEST CADEAUX 30 Euros,
       montantRemise: ,
       prixTotal: 00,00amp;euro;
     },
     {
       id: 8a8b8d632481567f012481570364000d,
       prixAffiche: 15,00,
       quantite: 0,
       libelle: Carte BEST CADEAUX 15 Euros,
       montantRemise: ,
       prixTotal: 00,00amp;euro;
     }
   ]}

 That's ... JSON, perfectlly formated.
 Here's for the headers now:
 HTTP/1.1 200 OK
 Server  Apache-Coyote/1.1
 X-Powered-By    Servlet 2.4; JBoss-4.0.3SP1 (build:
 CVSTag=JBoss_4_0_3_SP1 date=200510231054)/Tomcat-5.5
 Content-Type    application/json;charset=UTF-8
 Content-Length  1221
 Date    Tue, 08 Dec 2009 18:41:05 GMT

 Woot! What the hell am I missing ? Thanks for the great help you could
 (and I hope, will) provide !!!


Re: [jQuery] New site with jquery: Cpluv

2009-12-08 Thread Escape-Artist

Great, but the home page is over 800kb, half of which is script. Good
luck.

As it says on my first message, we still haven't done any optimization on
our scripts. Almost all of them are not minified yet for example.
But cheers :)


RobG-2 wrote:
 
 
 
 Escape-Artist wrote:
 Which site are you talking about?
 
 You can check out more about us: Shaperstudio on
 http://www.shaperstudio.com our site 
 
 There's no flash on the cpluv site.
 
 Great, but the home page is over 800kb, half of which is script. Good
 luck.
 
 --
 Rob
 
 
 

-- 
View this message in context: 
http://old.nabble.com/New-site-with-jquery%3A-Cpluv-tp26687047s27240p26700186.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



Re: [jQuery] Re: Ajax , Json, and error firing instead of success

2009-12-08 Thread Michael Geary
Yeah, the eval() is undoubtedly wrong, but that wouldn't be the issue here
if it's never getting to the success callback.

Is there any clue about the error in the arguments passed to the error
callback? You have the wrong parameter list in that function. It takes three
arguments as shown here:

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

error: function( XMLHttpRequest, textStatus, errorThrown ) {
  // typically only one of textStatus or errorThrown
  // will have info
}

-Mike

On Tue, Dec 8, 2009 at 12:20 PM, MorningZ morni...@gmail.com wrote:

 Is there a reason why you have eval() ?   jQuery will do that by
 itself if you are telling it to retrieve JSON


 On Dec 8, 1:44 pm, elpatator romain.simi...@gmail.com wrote:
  Hi people,
  I'm trying to make an ajax request, hoping for a clean json response
  to come up. Firefox, as usual, behaves like a charm, but when it comes
  to IE 6 and 7, it's the error function that's fired.
  $.ajax({
url: action,
data: data,
type: GET,
dataType: json,
error: function(msg) {
 alert(Error:  + msg);
 alert(URL:  + action);
 alert(DATA:  + data);
},
success: function(reponse) {
  var result = eval((+reponse+));
  alert(result);
  console.info(reponse);
 [... ...]
 
  Using Charles Web DEbbuging Proxy, I started tracing what's happening
  when IE calls for ajax;
  here's what Charles says:
  {
totalPanier: 0,00amp;euro;,
articles: [
  {
id: 8a8b8d632481567f01248156fac90009,
prixAffiche: 0,00,
quantite: 0,
libelle: Carte BEST CADEAUX à montant variable,
montantRemise: ,
prixTotal: 00,00amp;euro;
  },
  {
id: 8a8b8d632481567f0124815706910010,
prixAffiche: 80,00,
quantite: 0,
libelle: Carte BEST CADEAUX 80 Euros,
montantRemise: ,
prixTotal: 00,00amp;euro;
  },
  {
id: 8a8b8d632481567f012481570578000f,
prixAffiche: 50,00,
quantite: 0,
libelle: Carte BEST CADEAUX 50 Euros,
montantRemise: ,
prixTotal: 00,00amp;euro;
  },
  {
id: 8a8b8d632481567f012481570549000e,
prixAffiche: 30,00,
quantite: 0,
libelle: Carte BEST CADEAUX 30 Euros,
montantRemise: ,
prixTotal: 00,00amp;euro;
  },
  {
id: 8a8b8d632481567f012481570364000d,
prixAffiche: 15,00,
quantite: 0,
libelle: Carte BEST CADEAUX 15 Euros,
montantRemise: ,
prixTotal: 00,00amp;euro;
  }
]}
 
  That's ... JSON, perfectlly formated.
  Here's for the headers now:
  HTTP/1.1 200 OK
  Server  Apache-Coyote/1.1
  X-Powered-ByServlet 2.4; JBoss-4.0.3SP1 (build:
  CVSTag=JBoss_4_0_3_SP1 date=200510231054)/Tomcat-5.5
  Content-Typeapplication/json;charset=UTF-8
  Content-Length  1221
  DateTue, 08 Dec 2009 18:41:05 GMT
 
  Woot! What the hell am I missing ? Thanks for the great help you could
  (and I hope, will) provide !!!



re[jQuery] ference to undefin...operty jQuery

2009-12-08 Thread mvBeach

Hi, 

I am getting this message when I start firebug and reload page. 

reference to undefin...operty jQuery..

checked both 1.2.6 and 1.3.2 versions same issue.  

also read in other posts its the doc type= no its not, I changed to
several doc types and same issue. 

Anybody has any idea...

I am trying to debug some js scripts and this is really annoying. 


 
-- 
View this message in context: 
http://old.nabble.com/reference-to-undefin...operty--jQuery-tp26700373s27240p26700373.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] unsub

2009-12-08 Thread Lucas Deaver
I need to unsubscribe from your incessant emails but you put no link  
in the email for this. It is common practice since the stone age of  
emails to do that, you are very frustrating to work with and I don't  
like you now.


PLEASE UNSUBSCRIBE ME!!



[jQuery] Re: Hide Table Row - Fundamentally I'm wrong.

2009-12-08 Thread Toolman
This example hides but doesn't unhide in iE6 for me.

On Dec 3, 5:00 am, Leonardo K leo...@gmail.com wrote:
 I tested here and worked:

 http://jsbin.com/ivude

 On Wed, Dec 2, 2009 at 13:32, mickey mwjbea...@googlemail.com wrote:
  Anyone?


[jQuery] SOAP message handling in jquery

2009-12-08 Thread Hariharan.t
Is there a plugin/utility by jquery to convert a SOAP message to JSON
object or any easy way to read output from SOAP message.


[jQuery] Re: Accordian functionality

2009-12-08 Thread al...@ourlaughingplace.com
Have you tried using ui-accordion in jQuery-ui ?

On Dec 8, 9:40 am, Aaron Gusman ict.aarongus...@gmail.com wrote:
 I'd like to create my own type of accordian however I am finding
 difficulty with creating the query for selection.



[jQuery] Client-Side Verification

2009-12-08 Thread Mopar003
I have a form that uses jquery and everything works quite nicely.  I
have added in client side validation of the form elements and as long
as there are no errors (so I never get a return false) it works
great.  However, when I do get a return false, it removes the last
document uploaded from the results.  How do I deal with this to be
able to use the jquery multiple upload and still have basic client
side validation?



[jQuery] learn

2009-12-08 Thread police
hi guys, i am interested learn j query, how to learn, can u send any
easy way to learn site?


[jQuery] odd sorts from tablesorter with commas in the numbers

2009-12-08 Thread Madog
Hi
I am getting odd sorts from tablesorter with commas in the numbers
11,466
11,466
3,673
3,690
4,349

for example, as will as grouping if some of the numbers in the column
have a comma and other do not.
Maybe the same type of grouping from the 11,466 and 3,673 not sure??

Does anyone know of a work around for this type of behave??
Thx
Erny

ernest.grend...@gmail.com


[jQuery] jQuery ajax post issue with IE7 and earlier versions of IE.

2009-12-08 Thread Wesley
I'm using jQuery to do an ajax post on the key up event of a text
input box (ajax search). As the user types a jQuery ajax post is made
and a delimited string is returned (ex. 12345|Event Name#*#23456|
Event Name) with all of the search results. Each result is then split
into individual results by splitting the response of the ajax post by
#*# and then further split into an id and name by splitting on |.
Javascript is then used to loop through all the results and generate a
div for each result returned like so divinput type=hidden
value=12345Event Name/divdivinput type=hidden
value=23456Event Name/div.

jQuery then takes that list of div tags and appends it to a specified
div. This works fine in both firefox and chrome but IE is having some
issues with it. Specifically IE7 and earlier versions. IE8 works fine.
In IE7 and older versions only the first div of the ajax response is
rendered properly on the page.

Here is an example of my code...

$(#search_pane .aj2query)
.keyup(function(){
var me = $(this);
var aid = $(#aid).val();
var search = $(this).val();
var results = $(me).closest(.aj2).find(.aj2results)

var o = $(me.results).empty().addClass(aj2load);

$.ajax({
type: POST,
dataType: me.dataType,
url: ./events_roster_ajax.asp,
cache: false,
data: cmd=eventsq=demo,
complete: function() {
$(o).removeClass(aj2load);
me.lastSearch = q;
},
success: function(msg){
arrMsg = msg.split(#*#);
$(results).empty();

$.each(msg,function(i,v){
if (v.split(|)[0] == NULL){
$(span + 
v.split(|)[1] + /span).appendTo(results);
}
else{
$(divinput 
type=\hidden\ value=\ + v.split(|)[0] +
\ + v.split(|)[1] + /div).appendTo(results);
}
});

//alert(Show em!);

//alert($(results).html());

$(results).find(div)
.click(function(){
var crs_id = 
$(this).find(:hidden).val();

$(me).val($(this).text());
$(#cid).val(crs_id);

$(results).empty().slideUp(fast);
getEventInfo();
});
});
});
});

The alert($(results).html()); line alerts all of the html that was
generated by the ajax post however the results div only displays the
first div generated by the ajax post. Another funny thing about this
is that if I were to uncomment the alert(Show em!); line of code all
the divs render correctly.


[jQuery] Cannot add script tag dynamically

2009-12-08 Thread aNT
I try to create script script type='text/html'/script tag and
put html template inside it using the following code.

$(script type='text/html'/script).attr(id, MyTemplate).text
(data);

data contains html template string. eg div${MyData}/data

It throws exception when calling text() method in IE8. It works fine
in FireFox 3.5.

Is there any solution that can work with almost all types of browsers.

Thanks,
ant.


[jQuery] Jquery Media Plugin with nonverblasterhover player

2009-12-08 Thread stepmr
I can't seem to get the Jquery Media plugin to work with
nonverblasterhover ...

This is what I'm using  am I doing something wrong?

script type=text/javascript
$(function() {
$.fn.media.defaults.flvPlayer = 'js/NonverBlaster.swf';
$.fn.media.defaults.mp3Player = 'js/NonverBlaster.swf';
$.fn.media.mapFormat('mp3','flash');
$.fn.media.mapFormat('mov','flash');
$('a.media').media();
});
/script


http://nonverbla.de/blog/2008/09/15/nonverblasterhover/comment-page-5/#comment-3372



[jQuery] .trigger and .triggerHandler methods

2009-12-08 Thread T.J.
Hi all,

I have a click event bound to a button that I'm needing to call
without any user interaction on the button. I'm using the fragment
portion of the URL to determine how many times the button's click
function needs to fire and using a for loop to (attempt to, at least)
trigger the click. I've tried this with .click(), .trigger(click),
and .triggerHandler(click) but with no success. I could write a
JavaScript function and call that within the loop, but that's
unnecessary code..

Is what I'm doing valid, or can the .trigger/.triggerHandler methods
not be called from within a loop? The syntax I'm using is as follows:

$(#button).triggerHandler(click);

Thanks,
T.J.


[jQuery] Hello all!

2009-12-08 Thread Eugene Hourany
Hello everyone,

I'm new to this group, and had a question concerning how to get a movie to
popup on click in a different window, but have that nice light glow effect
in the frame. I was told that jQuery could do that.

Thanks,

Eugene aka Eggers


[jQuery] ui-accordion page is not working in Firefox

2009-12-08 Thread al...@ourlaughingplace.com
I have a page using UI-Accordion which has been up for a few months.
I just discovered that it is not working right on firefox 3.5.5, the
entire accordion is compressed into one fat line.  This page works
fine in all other browsers, Chrome, IE8, IE6, Safari 4, Opera.  I have
other pages on same website which use ui-accordion and they work fine
in Firefox, using the same jQuery file set.

Here is a link to the page:  http://www.ourlaughingplace.com/aspx/dining.aspx

This is an asp.net, C# code.  Accordion code looks like this, content
is filled in by back end script:

div id=accordion style=width:580px
h1a href='#'Magic Kingdom/a/h1
div asp:Label id=MKRest runat=server/asp:Label
/div
h1a href='#'Epcot/a/h1
div asp:Label id=EpcotRest runat=server/asp:Label
/div
h1a href='#'Disney's Hollywood Studios/a/h1
div asp:Label id=MGMRest runat=server/asp:Label
/div
h1a href='#'Animal Kingdom/a/h1
div asp:Label id=AKRest runat=server/asp:Label
/div
h1a href='#'Downtown Disney (Florida)/a/h1
div asp:Label id=DTDRest runat=server/asp:Label
/div
h1a href='#'Walt Disney Worldreg; Resorts/a/h1
div 

div id=WDWaccordion style=width:570px
h1a href='#'Disney's Animal Kingdom Lodge  Villas/
a/h1
div asp:Label id=AKLRest runat=server/asp:Label
/div
h1a href='#'Disney's Yacht Club Resort, Beach Club
Resort  Villas/a/h1
div asp:Label id=BCRest runat=server/asp:Label
/div
h1a href='#'Disney's Boardwalk Inn  Villas/a/h1
div asp:Label id=BWRest runat=server/asp:Label
/div
h1a href='#'Contemporary Resort  Bay Lake Towers/a/
h1
div asp:Label id=CRest runat=server/asp:Label
/div
h1a href='#'Dolphin  Swan Resorts/a/h1
div asp:Label id=SwanRest runat=server/asp:Label
/div
h1a href='#'Disney's Grand Floridian Resort  Spa/a/
h1
div asp:Label id=GFRest runat=server/asp:Label
/div
h1a href='#'Polynesian Resort/a/h1
div asp:Label id=PRest runat=server/asp:Label
/div
h1a href='#'Wilderness Lodge  Villas/a/h1
div asp:Label id=WLRest runat=server/asp:Label
/div
h1a href='#'Caribbean, Coronado, Port Orleans Resorts/
a/h1
div asp:Label id=ModRest runat=server/asp:Label
/div
h1a href='#'Fort Wilderness Resort  Campground/a/
h1
div asp:Label id=FWRest runat=server/asp:Label
/div
h1a href='#'Old Key West, Saratoga Springs/a/h1
div asp:Label id=OKWRest runat=server/asp:Label
/div
h1a href='#'Pop Century, All-Star Music, Movies,
Sports/a/h1
div asp:Label id=ASRest runat=server/asp:Label
/div
/div

asp:Label id=WDWResortRest runat=server/asp:Label
/div
h1a href='#'Walt Disney Worldreg; Other/a/h1
div asp:Label id=WDWOther runat=server/asp:Label
/div
h1a href='#'Disneyland Park/a/h1
divasp:Label id=DLRest runat=server/asp:Label
/div 
h1a href='#'Disney's California Adventure/a/h1
divasp:Label id=CARest runat=server/asp:Label
/div 
h1a href='#'Downtown Disney District (California)/a/h1
div asp:Label id=DDDRest runat=server/asp:Label
/div
h1a href='#'Disneyland Resorts/a/h1
div asp:Label id=DLResortRest runat=server/asp:Label
/div
h1a href='#'Disney Magicreg;/a/h1
div asp:Label id=MagRest runat=server/asp:Label
/div
h1a href='#'Disney Wonderreg;/a/h1
div asp:Label id=WonRest runat=server/asp:Label
/div
h1a href='#'Vero Beach/a/h1
div asp:Label id=VeroRest runat=server/asp:Label
/div
/div

Help!


[jQuery] ui-accordion page is not working in Firefox

2009-12-08 Thread al...@ourlaughingplace.com
I have a page using UI-Accordion which has been up for a few months.
I just discovered that it is not working right on firefox 3.5.5, the
entire accordion is compressed into one fat line.  This page works
fine in all other browsers, Chrome, IE8, IE6, Safari 4, Opera.  I have
other pages on same website which use ui-accordion and they work fine
in Firefox, using the same jQuery file set.

Here is a link to the page:  http://www.ourlaughingplace.com/aspx/dining.aspx

This is an asp.net, C# code.  Accordion code looks like this, content
is filled in by back end script:

div id=accordion style=width:580px
h1a href='#'Magic Kingdom/a/h1
div asp:Label id=MKRest runat=server/asp:Label
/div
h1a href='#'Epcot/a/h1
div asp:Label id=EpcotRest runat=server/asp:Label
/div
h1a href='#'Disney's Hollywood Studios/a/h1
div asp:Label id=MGMRest runat=server/asp:Label
/div
h1a href='#'Animal Kingdom/a/h1
div asp:Label id=AKRest runat=server/asp:Label
/div
h1a href='#'Downtown Disney (Florida)/a/h1
div asp:Label id=DTDRest runat=server/asp:Label
/div
h1a href='#'Walt Disney Worldreg; Resorts/a/h1
div 

div id=WDWaccordion style=width:570px
h1a href='#'Disney's Animal Kingdom Lodge  Villas/
a/h1
div asp:Label id=AKLRest runat=server/asp:Label
/div
h1a href='#'Disney's Yacht Club Resort, Beach Club
Resort  Villas/a/h1
div asp:Label id=BCRest runat=server/asp:Label
/div
h1a href='#'Disney's Boardwalk Inn  Villas/a/h1
div asp:Label id=BWRest runat=server/asp:Label
/div
h1a href='#'Contemporary Resort  Bay Lake Towers/a/
h1
div asp:Label id=CRest runat=server/asp:Label
/div
h1a href='#'Dolphin  Swan Resorts/a/h1
div asp:Label id=SwanRest runat=server/asp:Label
/div
h1a href='#'Disney's Grand Floridian Resort  Spa/a/
h1
div asp:Label id=GFRest runat=server/asp:Label
/div
h1a href='#'Polynesian Resort/a/h1
div asp:Label id=PRest runat=server/asp:Label
/div
h1a href='#'Wilderness Lodge  Villas/a/h1
div asp:Label id=WLRest runat=server/asp:Label
/div
h1a href='#'Caribbean, Coronado, Port Orleans Resorts/
a/h1
div asp:Label id=ModRest runat=server/asp:Label
/div
h1a href='#'Fort Wilderness Resort  Campground/a/
h1
div asp:Label id=FWRest runat=server/asp:Label
/div
h1a href='#'Old Key West, Saratoga Springs/a/h1
div asp:Label id=OKWRest runat=server/asp:Label
/div
h1a href='#'Pop Century, All-Star Music, Movies,
Sports/a/h1
div asp:Label id=ASRest runat=server/asp:Label
/div
/div

asp:Label id=WDWResortRest runat=server/asp:Label
/div
h1a href='#'Walt Disney Worldreg; Other/a/h1
div asp:Label id=WDWOther runat=server/asp:Label
/div
h1a href='#'Disneyland Park/a/h1
divasp:Label id=DLRest runat=server/asp:Label
/div 
h1a href='#'Disney's California Adventure/a/h1
divasp:Label id=CARest runat=server/asp:Label
/div 
h1a href='#'Downtown Disney District (California)/a/h1
div asp:Label id=DDDRest runat=server/asp:Label
/div
h1a href='#'Disneyland Resorts/a/h1
div asp:Label id=DLResortRest runat=server/asp:Label
/div
h1a href='#'Disney Magicreg;/a/h1
div asp:Label id=MagRest runat=server/asp:Label
/div
h1a href='#'Disney Wonderreg;/a/h1
div asp:Label id=WonRest runat=server/asp:Label
/div
h1a href='#'Vero Beach/a/h1
div asp:Label id=VeroRest runat=server/asp:Label
/div
/div

Help!


Re: [jQuery] learn

2009-12-08 Thread Charlie Griefer
read http://docs.jquery.com

search amazon for jQuery.  there are a few books.

On Tue, Dec 8, 2009 at 2:24 AM, police atharikmoha...@gmail.com wrote:

 hi guys, i am interested learn j query, how to learn, can u send any
 easy way to learn site?




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] unsub

2009-12-08 Thread Charlie Griefer
Here's a link.

http://groups.google.com/group/jquery-en

On Tue, Dec 8, 2009 at 1:26 PM, Lucas Deaver luk...@gmail.com wrote:

 I need to unsubscribe from your incessant emails but you put no link in the
 email for this. It is common practice since the stone age of emails to do
 that, you are very frustrating to work with and I don't like you now.

 PLEASE UNSUBSCRIBE ME!!




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] unsub

2009-12-08 Thread Göran Törnquist

Firstly, this is how you do it:

http://docs.jquery.com/Discussion

In the end of the web page you find info about how to unsubscribe (hint: 
search for unsubscribe).


Secondly. Use nice, pleasant and courteous language. You are addressing 
a potential client or employee...


Best Regards

/Göran

Lucas Deaver wrote:
I need to unsubscribe from your incessant emails but you put no link 
in the email for this. It is common practice since the stone age of 
emails to do that, you are very frustrating to work with and I don't 
like you now.


PLEASE UNSUBSCRIBE ME!!





--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



[jQuery] Re: Cycle plugin postback problem in ASP.Net

2009-12-08 Thread Mike Alsup
View the markup after the postback (use firebug).  I can almost
guarantee there are extra elements in the slideshow container, perhaps
brs or empty paragraphs or something.  Post a link if you can.

Mike


On Dec 7, 11:31 pm, Michael mikedr...@gmail.com wrote:
 Anyone have an ideas or advice?

 Mike

 On Dec 1, 9:10 am, Michael mikedr...@gmail.com wrote:

  Hi Everyone!
  I have encountered an issue trying to use the cycle plugin to show a
  very simple image slideshow in ASP.Net. I have the cycle plugin in a
  master page and it works great until a postback is performed on a
  page. When I perform a postback an empty slide is inserted between
  every image. The slideshow becomes: blank - image 1 - blank - image
  2 - blank - image 1 ...

  Once I navigate to another page the slideshow is fine again until a
  postback is performed.

  Has anyone had any experience with this?

  Mike

  Just in case anyone finds it helpful, here is what I am doing ...

  Here is my master page:

  %@ Master Language=C# AutoEventWireup=true
  CodeBehind=Master.master.cs
      Inherits=WebProject %

  !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
      titleUntitled/title
      asp:ContentPlaceHolder ID=head runat=server
      /asp:ContentPlaceHolder
      link rel=Stylesheet type=text/css href=Master/
  HeaderSlideshow.css /
  /head
  body style=margin-left: 0px; margin-right: 0px;
      form id=form runat=server

      script src='%=ResolveUrl(~/Scripts/jquery.js ) %' type=text/
  javascript/script
      script src='%=ResolveUrl(~/Scripts/jquery.cycle.plugin.js )
  %' type=text/javascript/script
      script src='%=ResolveUrl(~/Master/HeaderSlideshow.js ) %'
  type=text/javascript/script

      div
          asp:ScriptManager ID=sm runat=server
          /asp:ScriptManager
          div class=headerSlideshow
              asp:Repeater runat=server ID=slideshowRepeater
                  ItemTemplate
                      dxe:ASPxImage runat=server ID=image
  ImageUrl='%# Container.DataItem %' EnableViewState=false
                      /dxe:ASPxImage
                  /ItemTemplate
              /asp:Repeater
          /div
      /div
      /form
  /body
  /html

  Here is my javascript (HeaderSlideshow.js):

  $(document).ready(function() {
          $('.headerSlideshow').cycle({
                  fx: 'scrollDown',
                  speed: 1000,
                  cleartype: true,
                  cleartypeNoBg: true,
                  timeoutFn: calculateSlideTimeout
          });

  });

  function calculateSlideTimeout(currElement, nextElement, opts,
  isForward) {
      // Set odd number slides (which will always be the eas logo) to
  have 11 second timeouts
      // and even number slides (which will be RAC, broker or
  association logos) to have 4 second timeouts
      var index = opts.currSlide;
      return index % 2 ? 4000 : 11000;

  }

  Here is my css (HeaderSlideshow.css):

  .headerSlideshow
  {
          width:300px;
          height:80px;
          margin:1px;
          overflow:hidden;
          border:0px;

  }

  .headerSlideshow img {
      top:  0;
      left: 0;

  }




[jQuery] Linked Menus Help

2009-12-08 Thread rob
I built a little utility modeling a linked menus concept... Click an
item in the parent menu, and the child menu will update.

When a parent option is selected the childMenu is reloaded with new
options.  Selecting these no longer triggers $(#childMenu 
option).click(function(){});  Does anyone have any idea why this may
be happening?

Here's an example:

$(.parentMenu).click(function(){
var s = $(#parentMenu :selected).text();

$.ajax({
type: 'GET',
url: 'xml/file.xml',
datatype: 'xml',
success: function(xml){

alert(s);  //this is displaying correctly

$('#childMenu').empty();

$(xml).find(series[name='+s+']).each(function(){
$(this).find(model).each(function(){
var model = $(this).text();
var modelHTML = option id=' +model+ '
value='+model+' +model+ /option;
$(#childMenu).append(modelHTML);
});
});

});

alert(s) will show when the menu is the original content (whether it
is parentMenu or childMenu), but once that content is changed with
something else, it no longer works.

Any help would be greatly appreciated.


Re: [jQuery] odd sorts from tablesorter with commas in the numbers

2009-12-08 Thread aquaone
It doesn't expect numbers to have commas. You need to use your own parser.
e.g.

  // custom parser
  $.tablesorter.addParser({
id: commaNum,
is: function(s) {
  return /^[\d-]?[\d,]*(\.\d+)?$/.test(s);

  },
format: function(s) {
  return s.replace(/,/g,'');
  },
type: 'numeric'
});




On Tue, Dec 8, 2009 at 13:36, Madog ernest.grend...@gmail.com wrote:

 Hi
 I am getting odd sorts from tablesorter with commas in the numbers
 11,466
 11,466
 3,673
 3,690
 4,349

 for example, as will as grouping if some of the numbers in the column
 have a comma and other do not.
 Maybe the same type of grouping from the 11,466 and 3,673 not sure??

 Does anyone know of a work around for this type of behave??
 Thx
 Erny

 ernest.grend...@gmail.com



RE: [jQuery] SOAP message handling in jquery

2009-12-08 Thread Smith, Allex
Have you looked at using the xml dataType with $.ajax?

-Original Message-
From: jquery-en+ow...@googlegroups.com 
[mailto:jquery-en+ow...@googlegroups.com] On Behalf Of Hariharan.t
Sent: Tuesday, December 08, 2009 4:44 AM
To: jQuery (English)
Subject: [jQuery] SOAP message handling in jquery

Is there a plugin/utility by jquery to convert a SOAP message to JSON
object or any easy way to read output from SOAP message.


Re: [jQuery] Linked Menus Help

2009-12-08 Thread T.J. Simmons
This is somewhere in the jQuery documentation, but use .live(click,  
function(){


instead of .click(function(){

to delegate the function to all matched elements on the page and  
loaded in via AJAX or otherwise.


Hope that helps.

T.J. Simmons
Sent from my iPhone

On Dec 8, 2009, at 5:28 PM, rob rob.sche...@gmail.com wrote:


I built a little utility modeling a linked menus concept... Click an
item in the parent menu, and the child menu will update.

When a parent option is selected the childMenu is reloaded with new
options.  Selecting these no longer triggers $(#childMenu 
option).click(function(){});  Does anyone have any idea why this may
be happening?

Here's an example:

$(.parentMenu).click(function(){
   var s = $(#parentMenu :selected).text();

   $.ajax({
   type: 'GET',
   url: 'xml/file.xml',
   datatype: 'xml',
   success: function(xml){

   alert(s);  //this is displaying correctly

   $('#childMenu').empty();

   $(xml).find(series[name='+s+']).each(function(){
   $(this).find(model).each(function(){
   var model = $(this).text();
   var modelHTML = option id=' +model+ '
value='+model+' +model+ /option;
   $(#childMenu).append(modelHTML);
   });
   });

});

alert(s) will show when the menu is the original content (whether it
is parentMenu or childMenu), but once that content is changed with
something else, it no longer works.

Any help would be greatly appreciated.


Re: [jQuery] ui-accordion page is not working in Firefox

2009-12-08 Thread Richard D. Worth
Any chance you've fixed it since you sent your email? Caus it looks fine to
me in Firefox 3.5.5. If it's still giving you problems, perhaps clear your
cache, disable all add-ons (including Firebug), inspect with Firebug (after
you've ruled out all add-ons and re-enabled it).

- Richard

On Tue, Dec 8, 2009 at 8:48 AM, al...@ourlaughingplace.com 
al...@ourlaughingplace.com wrote:

 I have a page using UI-Accordion which has been up for a few months.
 I just discovered that it is not working right on firefox 3.5.5, the
 entire accordion is compressed into one fat line.  This page works
 fine in all other browsers, Chrome, IE8, IE6, Safari 4, Opera.  I have
 other pages on same website which use ui-accordion and they work fine
 in Firefox, using the same jQuery file set.

 Here is a link to the page:
 http://www.ourlaughingplace.com/aspx/dining.aspx

 This is an asp.net, C# code.  Accordion code looks like this, content
 is filled in by back end script:

 div id=accordion style=width:580px
h1a href='#'Magic Kingdom/a/h1
div asp:Label id=MKRest runat=server/asp:Label
/div
h1a href='#'Epcot/a/h1
div asp:Label id=EpcotRest runat=server/asp:Label
/div
h1a href='#'Disney's Hollywood Studios/a/h1
div asp:Label id=MGMRest runat=server/asp:Label
/div
h1a href='#'Animal Kingdom/a/h1
div asp:Label id=AKRest runat=server/asp:Label
/div
h1a href='#'Downtown Disney (Florida)/a/h1
div asp:Label id=DTDRest runat=server/asp:Label
/div
h1a href='#'Walt Disney Worldreg; Resorts/a/h1
div 

div id=WDWaccordion style=width:570px
h1a href='#'Disney's Animal Kingdom Lodge  Villas/
 a/h1
div asp:Label id=AKLRest runat=server/asp:Label
/div
h1a href='#'Disney's Yacht Club Resort, Beach Club
 Resort  Villas/a/h1
div asp:Label id=BCRest runat=server/asp:Label
/div
h1a href='#'Disney's Boardwalk Inn  Villas/a/h1
div asp:Label id=BWRest runat=server/asp:Label
/div
h1a href='#'Contemporary Resort  Bay Lake Towers/a/
 h1
div asp:Label id=CRest runat=server/asp:Label
/div
h1a href='#'Dolphin  Swan Resorts/a/h1
div asp:Label id=SwanRest runat=server/asp:Label
/div
h1a href='#'Disney's Grand Floridian Resort  Spa/a/
 h1
div asp:Label id=GFRest runat=server/asp:Label
/div
h1a href='#'Polynesian Resort/a/h1
div asp:Label id=PRest runat=server/asp:Label
/div
h1a href='#'Wilderness Lodge  Villas/a/h1
div asp:Label id=WLRest runat=server/asp:Label
/div
h1a href='#'Caribbean, Coronado, Port Orleans Resorts/
 a/h1
div asp:Label id=ModRest runat=server/asp:Label
/div
h1a href='#'Fort Wilderness Resort  Campground/a/
 h1
div asp:Label id=FWRest runat=server/asp:Label
/div
h1a href='#'Old Key West, Saratoga Springs/a/h1
div asp:Label id=OKWRest runat=server/asp:Label
/div
h1a href='#'Pop Century, All-Star Music, Movies,
 Sports/a/h1
div asp:Label id=ASRest runat=server/asp:Label
/div
/div

asp:Label id=WDWResortRest runat=server/asp:Label
/div
h1a href='#'Walt Disney Worldreg; Other/a/h1
div asp:Label id=WDWOther runat=server/asp:Label
/div
h1a href='#'Disneyland Park/a/h1
divasp:Label id=DLRest runat=server/asp:Label
/div 
h1a href='#'Disney's California Adventure/a/h1
divasp:Label id=CARest runat=server/asp:Label
/div 
h1a href='#'Downtown Disney District (California)/a/h1
div asp:Label id=DDDRest runat=server/asp:Label
/div
h1a href='#'Disneyland Resorts/a/h1
div asp:Label id=DLResortRest runat=server/asp:Label
/div
h1a href='#'Disney Magicreg;/a/h1
div asp:Label id=MagRest runat=server/asp:Label
/div
h1a href='#'Disney Wonderreg;/a/h1
div asp:Label id=WonRest runat=server/asp:Label
/div
h1a href='#'Vero Beach/a/h1
div asp:Label id=VeroRest runat=server/asp:Label
/div
 /div

 Help!



Re: [jQuery] Re: Very Strange !!! The same HTML code works well, but append() it not !!!

2009-12-08 Thread Eric Zhong
Michael, thank you very much


I find the bug, the last tr should be /tr.

$(#tb_video).append('tr
tdinput type=checkbox //tdtd' + d.name + '/tdtd' + d.len +
'/tdtd' + d.size + '/tdtr');

this bug trouble me more than 2 days, thank you again, you not only give a
good tools which aid me to find the bug, also you show me a way  to find bug
!

I kill another bug use  View Source Chart less than 2 minute which trouble
me in a long time too.

Thank You !!!


2009/12/9 Michael Geary m...@mg.to

 Hi Eric,

 Please forgive me for not explaining clearly.

 Here is what I meant by a test page: post your HTML page on a website
 somewhere and give us the URL to that page. Then we can click the link and
 load your page, just like any other web page. That makes it much easier to
 help you troubleshoot.

 Here, since I didn't explain myself well, I went ahead and uploaded your
 files to my own site:

 http://mg.to/test/zhong/OK.html

 http://mg.to/test/zhong/Error.html

 Now when I load the page I can see the strange behavior you noticed.

 I also noticed that the two pages display slightly differently from each
 other. Do you see how the Error page has more spacing between the rows than
 the OK page? This made me think there is something different in the
 dynamically generated code.

 To find the difference, I used the View Source Chart extension for Firefox:

 https://addons.mozilla.org/en-US/firefox/addon/655

 along with the Araxis Merge file comparison program:

 http://www.araxis.com/

 I opened your OK.html file in Firefox and selected View Source Chart from
 the View menu.

 I also opened a new file comparison window in Araxis Merge. (Araxis Merge
 is an excellent but fairly expensive commercial product. You could use any
 file comparison or diff program, though.)

 Then I did a select all and copy, and pasted the result into the left
 panel in Araxis Merge.

 I did the same thing with your Error.html file and pasted the result into
 the right panel in Araxis Merge.

 This showed me the difference between the straight HTML version and the
 JavaScript-generated version.

 I saved the comparison report here for you to look at:

 http://mg.to/test/zhong/compare.html

 Scroll down in that page and take a look around line 116 on the left, line
 256 on the right. Do you see the extra /tr and tr tags there, and the
 same thing in the lines below that?

 In the JavaScript-generated version, there is an *extra* empty table row in
 between each of your table rows.

 This is why your up and down buttons are acting strangely. They probably
 *are* moving the table row(s) up and down as expected, but those empty table
 rows are interfering with that. I'm sure if you get rid of the empty rows it
 will work as you want.

 This also explains why there is a small difference in layout between the
 two versions. Do you see where the JavaScript version has more spacing
 between the rows (at least in Firefox)? That is caused by the empty rows.

 I'll let you sort out what part of your JavaScript code is causing those
 extra rows to be added.

 Hope that helps,

 -Mike


 On Tue, Dec 8, 2009 at 1:59 AM, Eric Zhong ericiszhongwen...@gmail.comwrote:

 thanks for your reply, my english is poor , i can't understand what is
 test page,  you meant  src file or description for the result ???


 description:
 1. when you use HTML code,  it runs well , you can select one or more
 select box and click up or down button, the selected line will up and down
 immediately.
 2. but when you use jQuery  to append() the code , you do the same action
 , the selected line, will move or not some times, and when you multiselect
 lines, you will see the strange result, it's hard to say with my poor
 english, sorry !!!

 i attach 2 files, one is OK, and another is Error. you can run it (double
 click) , and to opt and to see what difference.


 2009/12/8 Michael Geary m...@mg.to

 Eric, you really need to put up a test page so we can try actually loading
 it. Otherwise it's too hard to tell what might be wrong. I'm not even sure
 what the problem is we're supposed to be looking at!

 -Mike


 On Mon, Dec 7, 2009 at 11:44 PM, Eric Zhong ericiszhongwen...@gmail.com
  wrote:

 i have modified the code , but the result is the same, even if i write
 this in one line !!! Help !!!

 one line version:
 


 html
 head
 script src=
 http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js;/script
 SCRIPT LANGUAGE=JavaScript
 !--
 $(function(){
 // /*
 var html_video ='table id=tb_all width=724pxtrtd
 valign=toptable id=tb_video class=tb_widthtr
 class=tb_headtdnbsp/tdtdfilename/tdtdlen(s)/tdtdsize(KB)/td/tr/table/td/tr/table';

 $(body).append( html_video );

 var data =
 [
 

[jQuery] Re: SOAP message handling in jquery

2009-12-08 Thread Hariharan.t
Yes i have specified the datatype to be xml.
And i get a proper SOAP message as an output.
But is there a simple way to convert the message into a javascript
object(removing the soap headers and extracting data).


On Dec 9, 4:55 am, Smith, Allex allex.sm...@chelanpud.org wrote:
 Have you looked at using the xml dataType with $.ajax?



 -Original Message-
 From: jquery-en+ow...@googlegroups.com 
 [mailto:jquery-en+ow...@googlegroups.com] On Behalf Of Hariharan.t
 Sent: Tuesday, December 08, 2009 4:44 AM
 To: jQuery (English)
 Subject: [jQuery] SOAP message handling in jquery

 Is there a plugin/utility by jquery to convert a SOAP message to JSON
 object or any easy way to read output from SOAP message.


[jQuery] Re: Ajax , Json, and error firing instead of success

2009-12-08 Thread elpatator
Dear all,
as suggested above, I just made a quick test using
  error: function(XMLHttpRequest, textStatus, errorThrown) {
   alert(XMLHttpRequest:  + XMLHttpRequest);
   alert(textStatus:  + textStatus);
   alert(errorThrown:  + errorThrown);
  },

Wich, in IE6/7, returns me textStatus:parseerror. What the hell ?