Re: [jQuery] How to add a button

2010-03-03 Thread Cesar Sanz

what???

- Original Message - 
From: "podeig" 

To: "jQuery (English)" 
Sent: Wednesday, March 03, 2010 8:22 AM
Subject: [jQuery] How to add a button



Hello!

Is it possible to add a button (like standard drop down list has) to
open the list with all the results? I need two ways to select item by
typing and selection from the list.

If not, may be you can add this functionality to this plug-in?

Thank you! :)


Re: [jQuery] What I need to know?

2010-03-03 Thread Cesar Sanz

jquery does not work with your backend system.. just can init a request and
your server side will handle all that stuffs (like insertions, deletions, 
etc)


regards
- Original Message - 
From: "Nathan Klatt" 

To: 
Sent: Tuesday, March 02, 2010 4:00 PM
Subject: Re: [jQuery] What I need to know?



On Tue, Mar 2, 2010 at 3:31 PM, Danjojo  wrote:

Is it possible with jQuery to update a database / call a stored
procedure when I update an Input box that represents Quantity of an
item?


http://api.jquery.com/category/ajax/

There are some AJAX tutorials targeting jQuery use linked to here:

http://docs.jquery.com/Tutorials 




Re: [jQuery] Re: FOUND THE SOLUTION FOR ROUNDIES FOR IE8 !!!!!!

2010-02-26 Thread Cesar Sanz

this IS interesting!!
Some geeks works fine!

- Original Message - 
From: "Vikas Patidar" 

To: 
Sent: Thursday, February 25, 2010 2:51 PM
Subject: Re: [jQuery] Re: FOUND THE SOLUTION FOR ROUNDIES FOR IE8 !!



Hi, there is another solution more easy and cool

try it...

CSS Rounded Corners In All Browsers (With No Images)

http://jonraasch.com/blog/css-rounded-corners-in-all-browsers


On 2/25/10, Cesar Sanz  wrote:

thanks..

First time I heard about it.. .cool stuff!
- Original Message -
From: "Erik" 
To: "jQuery (English)" 
Sent: Wednesday, February 24, 2010 6:32 PM
Subject: [jQuery] Re: FOUND THE SOLUTION FOR ROUNDIES FOR IE8 !!


http://www.dillerdesign.com/experiment/DD_roundies/

On Feb 23, 3:09 pm, "Cesar Sanz"  wrote:

What are roundies?



- Original Message -
From: "Erik" 
To: "jQuery (English)" 
Sent: Tuesday, February 23, 2010 10:50 AM
Subject: [jQuery] Re: FOUND THE SOLUTION FOR ROUNDIES FOR IE8 !!

> Use the ROUNDIES script for IE7, which is really easy. I personally
> don't care for IE8 so I convert IE8 to work like IE7 by placing the
> following tag under the :

> 




Re: [jQuery] Re: FOUND THE SOLUTION FOR ROUNDIES FOR IE8 !!!!!!

2010-02-25 Thread Cesar Sanz

thanks..

First time I heard about it.. .cool stuff!
- Original Message - 
From: "Erik" 

To: "jQuery (English)" 
Sent: Wednesday, February 24, 2010 6:32 PM
Subject: [jQuery] Re: FOUND THE SOLUTION FOR ROUNDIES FOR IE8 !!


http://www.dillerdesign.com/experiment/DD_roundies/

On Feb 23, 3:09 pm, "Cesar Sanz"  wrote:

What are roundies?



- Original Message -
From: "Erik" 
To: "jQuery (English)" 
Sent: Tuesday, February 23, 2010 10:50 AM
Subject: [jQuery] Re: FOUND THE SOLUTION FOR ROUNDIES FOR IE8 !!

> Use the ROUNDIES script for IE7, which is really easy. I personally
> don't care for IE8 so I convert IE8 to work like IE7 by placing the
> following tag under the :

> 


Re: [jQuery] Re: FOUND THE SOLUTION FOR ROUNDIES FOR IE8 !!!!!!

2010-02-23 Thread Cesar Sanz

What are roundies?

- Original Message - 
From: "Erik" 

To: "jQuery (English)" 
Sent: Tuesday, February 23, 2010 10:50 AM
Subject: [jQuery] Re: FOUND THE SOLUTION FOR ROUNDIES FOR IE8 !!



Use the ROUNDIES script for IE7, which is really easy.  I personally
don't care for IE8 so I convert IE8 to work like IE7 by placing the
following tag under the :




Re: [jQuery] Re: New Forums

2010-01-22 Thread Cesar Sanz

Do not close the email list
Do not close the email list
Do not close the email list
Do not close the email list
Do not close the email list
- Original Message - 
From: "Nathan Klatt" 

To: 
Sent: Friday, January 22, 2010 3:43 PM
Subject: Re: [jQuery] Re: New Forums


On Fri, Jan 22, 2010 at 3:13 PM, John Arrowwood  
wrote:



What if the forums were 'published' to the mailing list, and the mailing
...
The mailing list could be set up so that nobody except the forum 'bot' 
could
post to it, which would make spam go away.  People that have 
accessibility
issues or just prefer to get their information via their email client 
could
continue to read things that way.  And you would have all of the benefits 
of

the forum.


Oo! Man with a plan. 




Re: [jQuery] New Forums

2010-01-22 Thread Cesar Sanz
Want mailing list back ;(
  - Original Message - 
  From: Richard D. Worth 
  To: jquery-en@googlegroups.com 
  Sent: Friday, January 22, 2010 10:31 AM
  Subject: Re: [jQuery] New Forums




  On Fri, Jan 22, 2010 at 10:23 AM, Octavian Rasnita  wrote:

From: "Karl Swedberg" 



  On Jan 21, 2010, at 8:11 PM, brian wrote:


FWIW, I'm pretty sure the decision to drop Google Groups is due to
John Ressig's account being spoofed by spammers.


  No, that's not it. Okay, maybe it was one of the last straws, but
  we've been talking about moving to a forum for a couple years now. If
  you want to know what factors were involved in the decision, please read
  http://jquery14.com/day-07/new-jquery-forum/



I read that:

"Additionally, we wanted something that lowered the barrier to asking a 
question - something that anyone would be able to use"

Well, for some categories of users, the movement to a forum has done 
exactly the reverse, because a forum is much less accessible than a mailing 
list for screen reader users for example, but for other categories of users 
also.

For example, if a user uses a good mail client, he or she could configure 
it so all the messages from the list to go to a specific folder, the messages 
that contain some words in the subjects or in the body to go to another special 
folder as they arrive, the messages are automaticly grouped by conversation, 
and they can easier be all saved locally or all deleted (or individually).


  And if a user has a good rss reader they can do the same with a forum. Also, 
using rss2email services, they could have the best of both worlds.
   

The best solution from the perspective of the users would be to have a 
mailing list system that can also offer and present the messages on the web, 
but this would involve more work for JQuery developers, and it seems that this 
idea is the best, but there is nobody willing to help doing and administering 
it.

So the JQuery developers have chosen to use a forum which is administered 
by somebody else. That's very OK, but I think at least the JQuery mailing lists 
should not be disabled, while there still are users that prefer using them.

  I don't know that they will be disabled, but if not they will be completely 
unmoderated. This means way more spam than before. In addition, many active 
contributors, including jQuery team members, have moved over to the forum, so 
there will be a lot less traffic on the mailing lists. People may still find 
help and answers, but it won't be the official forum. Just as before when the 
mailing list was the official forum, people found answers elsewhere.
   



  To be honest, I've never been a fan of forums, either. But after
  spending some time in the jQuery forum, I'm starting to appreciate its
  advantages over a plain mailing list.



Can you please tell us which are those advantages?
(in general, not only regarding JQuery forum.)


  Tags
  I tag and filter emails, and it's been really nice. But it's always bothered 
me that all the tagging and filtering I do has to be duplicated by everyone 
else consuming the same content. Using tags on the website forum, all this 
metadata can be shared.

  Types
  On the forum, there are 5 type of threads: Discussions, Questions, Ideas, 
Problems, and Announcements. These can be selected by the OP and corrected be a 
moderator, and searched and filtered on. Another piece of shared metadata.

  Categories
  Before we had 5 or 6 mailing lists for different sub-topics. Many times a day 
as a moderator, I would have to kindly ask someone to move a discussion to the 
correct forum, to keep noise down, to keep the list on-topic, and to ensure 
people saw the question and the answer in the right place, whether via email or 
web archive. This was not only a real pain, but it's not that much fun for 
anyone involved, especially new users that may not have a clue that there's 
more than one list, or which list to post to: jquery-en, jquery-dev, jquery-ui, 
jquery-ui-dev, jquery-a11y, etc. On the new website forum, not only is it 
easier to see which top-level forum topics are available for posting, but if 
something is posted in the wrong forum, a moderator can simply select 'Move 
this topic' and then select the correct sub-forum. That immediately reflects in 
any sorting, filtering, or categorization anyone does. Another piece of shared 
metadata.

  Status
  In addition to being able to tag, type, and categorize each thread, a 
moderator and/or the OP can set the status of a thread. The OP can select an 
answer as the best, meaning future visitors can read 2 messages instead of 20. 
Moderators can set the status as 'more info needed', closed, answered, open, 
in-progress, etc. All these statuses can be used in sorting and filtering. 
Another piece of shared metadata.

  Noticing a trend?

  Moderation edit controls
  Posts can be edited. This isn't

Re: [jQuery] new forums used?

2010-01-19 Thread Cesar Sanz
In my case, I just have access to my email via outlook (cuz of my job).. it 
will be a shame not to

read, ask or contribute with you.


- Original Message - 
From: "Rick Faircloth" 

To: 
Sent: Monday, January 18, 2010 12:17 PM
Subject: RE: [jQuery] new forums used?



it is easier to use a spammed mailing list than a forum.


Yes... I would gladly put up with some spam to keep all messages flowing 
to

my inbox,
rather than having to use a forum.  I can filter the spam as it arrives...

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Octavian Rasnita
Sent: Monday, January 18, 2010 1:04 PM
To: jquery-en@googlegroups.com
Subject: Re: [jQuery] new forums used?

From: "Nathan Klatt" 


On Mon, Jan 18, 2010 at 10:05 AM, Octavian Rasnita

wrote:

If some of the users won't like the forum, they would be able to use
the mailing lists, while if other users wouldn't want to receive the
emails from the mailing list they could just unsubscribe, so the
mailing lists won't hurt anyone.


The mailing list is great but what's expected to happen shortly after
they stop moderating it, reportedly a significant effort, is the list
will be overrun by spammers. Hopefully their fears are unfounded but
I'm not holding my breath.

Nice knowin' y'all. ;)



Well, this is not important at all. If the mailing list subscribers will
dislike that spam so much, they will be able to unsubscribe anytime, but
maybe some of them will happily accept that spam and also like to continue
using the list.

I am subscribed to the list with a Gmail address that takes care of most 
of
the spam, and I also have an anti-spam application for other email 
accounts

I use, so it is easier to use a spammed mailing list than a forum.

Octavian







Re: [jQuery] Re: How do I extract this value?

2010-01-04 Thread Cesar Sanz
What a genius!! 


Liked the solution.

- Original Message - 
From: 

To: "jQuery (English)" 
Sent: Saturday, January 02, 2010 8:54 PM
Subject: [jQuery] Re: How do I extract this value?


Perfect!  5 stars - Dave

On Jan 2, 8:15 pm, MorningZ  wrote:

var hit = $("#myid").find("a").attr("href").match(/^.+\((\d+)\)$/);
if (hit && hit.length == 2) {
// hit[1] = "1234" in the example you provided}

else {
// didn't find the value

}

On Jan 2, 9:13 pm, "laredotorn...@zipmail.com"

 wrote:
> Hi,

> I am using JQuery 1.3. I have this basic structure in my HTML ...

> 
> ...
>  ... 
> ...
> 

> How do I extract the "1234" from HTML assuming I know the id of the
>  element?

> Thanks, - Dave

> ps - I know its bad practice to have the javascript function in there,
> but sadly this is code I inherited and I can't change the href at this
> point.


Re: [jQuery] Re: Latest JQuery File

2009-12-29 Thread Cesar Sanz

never, never touch the jquery code!!!

- Original Message - 
From: "Sime Vidas" 

To: "jQuery (English)" 
Sent: Wednesday, December 23, 2009 7:23 PM
Subject: [jQuery] Re: Latest JQuery File




LOL
If you downloaded the jQuery library from www.jquery.com, than you can
be sure that it's valid leave it as it is.
It seems that the syntax highlighter in Dreamweaver isn't smart enough
to cope with the advanced JS code from jQuery :)


Re: [jQuery] Re: Sound

2009-11-10 Thread Cesar Sanz

It is really impressive!!!

- Original Message - 
From: "shapper" 

To: "jQuery (English)" 
Sent: Saturday, November 07, 2009 8:35 AM
Subject: [jQuery] Re: Sound


On Nov 5, 11:14 pm, Erik Beeson  wrote:

No jQuery necessarily needed for this. Plenty of information here:
http://www.google.com/search?q=html+embed+audio


Not if a Play and Stop button is required ... Or maybe even a music
list.

I found the following:
http://www.happyworm.com/jquery/jplayer/

What do you think?

Thanks,
Miguel


[jQuery] Re: Can't get attributes from ajax response...

2009-09-10 Thread Cesar Sanz


Use .live instead of .click


- Original Message - 
From: "James" 

To: "jQuery (English)" 
Sent: Tuesday, September 08, 2009 4:07 PM
Subject: [jQuery] Re: Can't get attributes from ajax response...



When and where are you appending the click() code? If you're doing it
before the AJAX call, then the click event is not assigned to any new
elements. You'll need to use event delegation or the jquery live()
function. Otherwise, you'd have to call the click binding again.

Another thing to note is that IDs cannot begin with a number according
to standards. Though it might work most of the time, it is not
recommended and may cause issues depending on the browser.

On Sep 7, 4:34 pm, DesignFellow  wrote:

Hi ,

I'm making a ajax call using $.ajax
my code is

$.ajax({
type: "POST",
url: "sample.php",
dataType:"html",
data: "name="+$('#name').val(),
success: function(msg){
$('#result').append(msg);
}
});

And the response is

User1

When i try to get the Id from the response, it's seems not working..

$('.user-link').click(function(){
alert($(this).attr('id'));

});

And i need to make this work urgently...

Any help will be greatly appreciated...

Thanks in advance...


[jQuery] Re: IDE supporting jQuery

2009-09-10 Thread Cesar Sanz


Aptana Studio

- Original Message - 
From: "Saga" 

To: "jQuery (English)" 
Sent: Thursday, September 10, 2009 9:41 AM
Subject: [jQuery] IDE supporting jQuery




is there any IDE supporting jQuery..i prefer some open source
IDE...pls suggest me on


[jQuery] Re: get image size?

2009-09-09 Thread Cesar Sanz


Please, post some mark-up

- Original Message - 
From: "MorningZ" 

To: "jQuery (English)" 
Sent: Tuesday, September 08, 2009 6:45 AM
Subject: [jQuery] Re: get image size?



"Whatever picture I try, the answer is alsway 272"

You realize of course that your selector is always choosing the same
DOM object

and are you calling ".change" on an  tag?  I don't think that's a
supported event handler on that kind of tag

Maybe if you show the actual HTML it will be clearer

On Sep 8, 3:54 am, heohni 
wrote:

I haveing an issue with this:

$("#ver_bildname").change(function () {
var width = $(this).width();
alert(width);

});

returns always 272?
Whatever picture I try, the answer is alsway 272.

$(this).val(); returns me the correct name,
var ext = $('#ver_bildname').val().split('.').pop().toLowerCase(); the
coorect file extension

How can I get the current image size?

THANKS!!


[jQuery] Re: $.load doesn't trigger $(document).ready, but $.ajax({type:"GET", ...} does???

2009-09-09 Thread Cesar Sanz


Hi,

Let's say a "A" page has a  in it with id named "container" and a "B" 
page is called via ajax...


e.g $("#container").load("B")

In order to load the "B" page, the "A" page has to be already loaded, so as 
the page is already loaded it do not reload again

when you call "B" page; this is why nothing occurs in the "A" page1..

Hope it is clear

- Original Message - 
From: "Matt Wilson" 

To: "jQuery (English)" 
Sent: Wednesday, September 09, 2009 12:11 PM
Subject: [jQuery] $.load doesn't trigger $(document).ready, but 
$.ajax({type:"GET", ...} does???





It seems like when I load a page into a div like this, the $
(document).ready code in the loaded page doesn't fire:

$("#mydiv").load("/a");

But when I do this, the $(document).ready on /a does fire.

Is this correct? 




[jQuery] Re: $.post - post array is empty

2009-09-09 Thread Cesar Sanz


try _REQUEST['aa'] and see if is data is not empty

- Original Message - 
From: "atur" 

To: "jQuery (English)" 
Sent: Wednesday, September 09, 2009 3:48 AM
Subject: [jQuery] $.post - post array is empty




Hi,
I stick on a wired ajax problem. The following code works on my local
machine. But when i replace the post url to an other server the _POST
array is empty. I tried different clients, servers and browsers. $.get
(... works fine.






[jQuery] Re: Page load question

2009-09-09 Thread Cesar Sanz


Well, can you show us some mark-up?

- Original Message - 
From: "the intern" 

To: "jQuery (English)" 
Sent: Tuesday, September 08, 2009 1:54 PM
Subject: [jQuery] Page load question




What I have is a form where people will answer yes or no questions.
What I need is, that when the page is loaded, a way to go though the
questions and check to see which ones are marked as yes. The reason
for this is, when yes is checked, there are additional questions that
open up using .show(). Right now, if the page is refreshed or
reloaded, all the additional questions hide regardless if the yes is
check or not.

Thanks in advance

Aaron


[jQuery] Re: New Edit-in-Place Plugin with dynamic selects, datepicker

2009-09-09 Thread Cesar Sanz


+ 1 a demo page will be great


- Original Message - 
From: "MorningZ" 

To: "jQuery (English)" 
Sent: Tuesday, September 08, 2009 2:51 PM
Subject: [jQuery] Re: New Edit-in-Place Plugin with dynamic selects, 
datepicker




Planning on adding a "demo" page anytime soon?  I'd like to check it
out


On Sep 8, 4:21 pm, Jacob  wrote:

I've created a new edit-in-place plugin that is a modified version of
Dave Hauenstein's. It allows for selects that are generated at the
point when the editor is created, rather than on page load, as well as
the option to switch the select to an input box for adding values not
currently in the select. It also has integrated datepicker
functionality. You can download it at:

http://code.google.com/p/dynamic-select-edit-in-place/

I make no promises to the overall quality of the code, but in my
testing it works in Firefox 3.5.2, Safari 4.0.3 and Internet Explorer
6.

I've created this primarily for my own purposes, but since I was
unable to find a plugin that had this functionality I thought it would
be worth it to share it with the community. I can't promise that I'll
update it a lot, but I may, and at the least it can provide a jumping
off point for someone else. 




[jQuery] Re: HTML code inside script tag, how access to it with DOM???

2009-09-09 Thread Cesar Sanz


Why in the earth must you have a div inside  tags?


- Original Message - 
From: "Nick Fitzsimons" 

To: 
Sent: Wednesday, September 09, 2009 6:55 AM
Subject: [jQuery] Re: HTML code inside script tag, how access to it with 
DOM???




2009/9/9 Mariano :


I have an HTML page that looks like this:





some test
Now I have the will to access to the text inside test div but the code $('#test').text(); doesn't work, matter of fact nothing is returned. If my div is dragged outside of script tag, js code return me "some test" correctly, but alas, div MUST be inside script. That isn't valid HTML; even if you manage to get it to work in one browser, it may well behave differently in others. A script element can only contain script code: Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/

[jQuery] Re: Using attr in an tab AJAX call. Is it possible?

2009-09-07 Thread Cesar Sanz


maybe you can ask it here http://groups.google.com/group/jquery-ui?hl=en

- Original Message - 
From: "noahT" 

To: "jQuery (English)" 
Sent: Sunday, September 06, 2009 8:25 PM
Subject: [jQuery] Using attr in an tab AJAX call. Is it possible?




Hi, I am trying to set an html attribute after an AJAX call. Works
great on the initial tab I can't get it to work on the rest:

$('#content').tabs({

load: function(){
var postContainerHeight = $('#post_container').height() + 30;
$('#hellishpixel').attr({
height:postContainerHeight
});
}
});


[jQuery] Re: New iPhone-style button plug-in released...

2009-09-04 Thread Cesar Sanz
Great... great.. congrats..
  - Original Message - 
  From: Dan G. Switzer, II 
  To: jquery-en@googlegroups.com 
  Sent: Friday, September 04, 2009 10:45 AM
  Subject: [jQuery] Re: New iPhone-style button plug-in released...


  Keyboard support is often overlooked, but it's always high on our priority 
list because many of our users are very keyboard centric and don't like using 
the mouse at all.


  On Fri, Sep 4, 2009 at 12:23 PM, Dave Methvin  wrote:


> We've just released another jQuery plug-in which emulates the iPhone-style
> button used to toggle settings on/off.


Very nice, Dan. I like the way you haven't forgotten keyboard access.




[jQuery] Re: Click event not working?

2009-08-27 Thread Cesar Sanz


mmm.. try this..

Put a border to your div, let's say border: 10px, then click the border to 
see what happen..



- Original Message - 
From: "Kris S" 

To: "jQuery (English)" 
Sent: Wednesday, August 26, 2009 7:04 PM
Subject: [jQuery] Click event not working?




I'm trying to execute a function "animate_next()" when a "div" element
is clicked, but it isn't working. Here is what it looks like..

$('#playground').click(function(){animate_next();});

If I put..

$('#playground').ready(function(){animate_next();});

..then it will work fine.

Here is the "div" element on the page..

 




[jQuery] Re: Datepicker issue

2009-08-26 Thread Cesar Sanz


Hi,

Yo can always set the textfield readonly to avoid this.

- Original Message - 
From: "MorningZ" 

To: "jQuery (English)" 
Sent: Wednesday, August 26, 2009 7:29 AM
Subject: [jQuery] Re: Datepicker issue



"to me it seems wierd or inconsistant that the
datepicker won't allow you to pick a date beyond the maxDate, but you
can enter it manually and nothing happens"

Hence it's "date picker" and not "date enter-er", it does it's job,
let's the use *pick* a date from a calendar


On Aug 26, 7:55 am, sak  wrote:

Yeah, I was wanting to avoid the need to write a function..or
freezing the textbox.to me it seems wierd or inconsistant that the
datepicker won't allow you to pick a date beyond the maxDate, but you
can enter it manually and nothing happens (it should revert back to
the maxDate)..

anyways all good, I guess I'll have to add that functionality myself..
Thanks though

On Aug 26, 11:47 am, rupak mandal  wrote:

> hi,
> you can try this

> $("#datepicker").change(function() {
> var date1=$("#datepicker").val();
> var myday = new Date(date1);
> var today= new Date();
> var one_day=1000*60*60*24;
> chan_date=Math.ceil((myday.getTime()-today.getTime())/(one_day));

> var month = myday.getMonth()+1;
> if(month<10)
> month="0"+month;

> var dat=myday.getDate();
> if(dat<10)
> dat="0"+dat;

> if(chan_date>0)

> $("#datepicker").attr("value",month+"/"+dat+"/"+myday.getFullYear())
> });

> });

> but the better option is that restrict the user to enter date manually. 
> Made

> the datepicker text box readonly.

> Thanks
> Rupak

> On Wed, Aug 26, 2009 at 3:25 AM, sak  wrote:

> > Hi there

> > I have a problem with the date picker and was wondering if something
> > had already been developed to sort it out, or whether I would need to
> > do one myself.

> > With a datepicker in the webapp we are developing, we want to allow
> > users to view data based on past dates (ie anything from an old date
> > up to present date). So with this in mind I have set the max date on
> > the datepicker like this {maxDate: +0} so users can't pick dates
> > beyond today.

> > However if the user manually enters the dates (say beyond the maxDate)
> > then nothing happens. The date input holds the date entered even if it
> > is beyond the maxDate set.

> > What I want it to do, is if the users manually types in a date (if
> > that date is beyond the maxDate set) then it should revert back to the
> > maxDate.

> > can the datepicker do this?

> > Any help will be awesome
> > Thanks
> > Sak 




[jQuery] Re: focus() killed by return false;

2009-08-26 Thread Cesar Sanz
how many inputs with .focus class do you have? more than one?
If so, you are trying to put focus to all of then, which is imposible..

@hector is right.
  - Original Message - 
  From: Hector Virgen 
  To: jquery-en@googlegroups.com 
  Sent: Wednesday, August 26, 2009 10:16 AM
  Subject: [jQuery] Re: focus() killed by return false;


  Try calling focus() on the actual element instead of the collection.


  Change this:
  $("input.focus").focus();


  To this:
  $("input.focus")[0].focus();

  --
  Hector



  On Wed, Aug 26, 2009 at 7:37 AM, shenry  wrote:


*bump*

Any ideas?



[jQuery] Re: Asp.net AJAX form

2009-08-26 Thread Cesar Sanz
$.post.. or event better using the form plugin http://malsup.com/jquery/form/
  - Original Message - 
  From: k-one fathi 
  To: jquery-en@googlegroups.com 
  Sent: Wednesday, August 26, 2009 12:07 AM
  Subject: [jQuery] Re: Asp.net AJAX form


  I want to submit the form via AJAX ,in asp.net how I can do this?

  Thx



[jQuery] Re: How to cancel an AJAX request?

2009-08-26 Thread Cesar Sanz
Why to re-invent the wheel?
  - Original Message - 
  From: Hector Virgen 
  To: jquery-en@googlegroups.com 
  Sent: Wednesday, August 26, 2009 9:43 AM
  Subject: [jQuery] Re: How to cancel an AJAX request?


  Thanks, Rupak, but I was hoping to be able to accomplish this without a 
plugin. What I'm thinking of doing is storing the XMLHttpRequest object as a 
local variable early on, like in the beforeSend callback.


  var xmlHttpRequest = null;

  $.ajax({
  /* ... */
  beforeSend: function(request)
  {
  xmlHttpRequest = request;
  }
  });


  $.('button.canel').click(function(event)
  {
  if (null !== xmlHttpRequest) {
  xmlHttpRequest.abort();
  xmlHttpRequest = null;
  }
  event.preventDefault();
  });


  I am not sure if this would cause any issues with the overall ajax lifecycle. 
For example, if the cancel button was clicked, would the "error" callback be 
executed? I'll have to test it and see.

  --
  Hector



  On Tue, Aug 25, 2009 at 9:00 PM, rupak mandal  wrote:

Hi Hector,
you have to use abort function.

go through this link http://www.protofunc.com/scripts/jquery/ajaxManager/


Thanks
Rupak



On Wed, Aug 26, 2009 at 2:25 AM, Hector Virgen  wrote:

  Hello,


  Is there a way to stop or cancel an ajax request on demand, similar to 
pressing "stop" in the browser? I would like to provide the user with a cancel 
button on a "loading" dialog that, when clicked, closes the dialog and cancels 
the ajax request. I have the dialog working (thanks to jQuery-UI) but pressing 
cancel only closes the it.


  I do not want simply ignore the response because I have a "success" 
callback that does some heavy manipulation of the response HTML that I'd like 
to prevent from running when the user cancels.


  Any help would be appreciated. Thanks!

  --
  Hector






[jQuery] Re: $.inArray optimisation

2009-08-24 Thread Cesar Sanz


Does it works for every browser?

- Original Message - 
From: "gurdiga" 

To: "jQuery (English)" 
Sent: Sunday, August 23, 2009 1:07 PM
Subject: [jQuery] $.inArray optimisation




Hello,

The $.inArray function is defined in 
http://jqueryjs.googlecode.com/svn/trunk/jquery/src/core.js

as:

inArray: function( elem, array ) {
for ( var i = 0, length = array.length; i < length; i++ ) {
if ( array[ i ] === elem ) {
return i;
}
}

return -1;
},

I'm wondering: would it be possible to take advantage of the built-in
indexOf method of the Array present in FF Javascript engines? Im
thinking of something like:

   if (typeof Array.prototype.indexOf === 'function') {
   return array.indexOf(elem);
   }

What do you think? 




[jQuery] Re: Get inner class of event

2009-08-24 Thread Cesar Sanz


Sometimes it is good for us if you explain your solution..


- Original Message - 
From: "Liam Potter" 

To: 
Sent: Friday, August 21, 2009 4:16 AM
Subject: [jQuery] Re: Get inner class of event




This happens to me quite often, so do what I do, write the group post, but 
don't send it, just go back to trying to solve it, if you can't solve it 
then click the send button :)


Michael Price wrote:


Hello again folks – as per usual, I managed to get this working five 
minutes later! So never mind, but thanks if you were going to take a look 
at it J


Regards,

Michael Price

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

*Sent:* 21 August 2009 11:12
*To:* jquery-en@googlegroups.com
*Subject:* [jQuery] Get inner class of event

Hi all,

Got a div on a page, and we want something to happen when a user clicks 
on the div. However, within the div is a link and we want something 
DIFFERENT to happen if they click on the LINK rather than anything else 
in the div. Clicking the link is triggering the div click code as well – 
I need to stop this which I thought I could do with e.stopPropagation(); 
on the link click handler, but it doesn’t seem to be working.


Is there any way to pick up via the div click handler that it was 
actually the LINK, and react in there instead, or am I taking the wrong 
approach?


Regards,

Michael Price







[jQuery] Re: Simple Plugin for jQuery

2009-08-20 Thread Cesar Sanz


instead, it must to be something like $.makemailto({opts})

read this http://snook.ca/archives/javascript/jquery_plugin/

- Original Message - 
From: "ElJayWilson" 

To: "jQuery (English)" 
Sent: Wednesday, August 19, 2009 1:54 PM
Subject: [jQuery] Simple Plugin for jQuery




I am trying to get a handle on creating a jQuery plugin.  I have a
function that I wrote a couple of years ago that returns a formatted
email address.  I want to turn that function into a jQuery plugin.

Here is my function:
[code]
function makemailto(email,subject,text)
{
   // Makes a nice mailto link

   var returnval;

   returnval = '' + email + '';

   if (subject && text)
   {
   returnval = '' + text + '';
   }
   else if (subject)
   {
  returnval = '' + email + '';
   }
   else if (text)
   {
returnval = '' + text + '';
   }

   return(returnval);
}
[/code]

I cannot seem to figure out how to create a simple plugin that I can
call like this:

$.makemailto('some...@somewhere.com','Subject Here');

Any advice?
Thanks,

LJ Wilson


[jQuery] Re: Asp.net AJAX form

2009-08-18 Thread Cesar Sanz


when ajax request starts use

$.ajaxStart(function(){
   $("div.containing.image").show();
});

when ajax request stops use:

$.ajaxStop(function(){
   $("div.containing.image").hide();
});
- Original Message - 
From: "K1" 

To: "jQuery (English)" 
Sent: Tuesday, August 18, 2009 3:44 AM
Subject: [jQuery] Asp.net AJAX form




Hi,all.
I wanna create ajax form in asp.net that have loading image,
how can I do this?
loading image  (gif animation) will show utill postback response.

Thx
K1


[jQuery] Re: best table plugin for large tables?

2009-08-18 Thread Cesar Sanz
mmm.. don't you think is too much data to render... maybe you can paginate in 
the server

+jqGrid
  - Original Message - 
  From: Charlie 
  To: jquery-en@googlegroups.com 
  Sent: Tuesday, August 18, 2009 5:03 AM
  Subject: [jQuery] Re: best table plugin for large tables?


  take a  look at jqGrid

  AstroIvan wrote: 
I have approximately a 400-500 row table (2 of them) each with 12
columns of formatted content such as currency, percentage, name.
I tried this with http://tablesorter.com but it can't seem to handle
that much data.

Does anyone have a good plugin for large data on the page?  (and no
not interested in paginating it really)

  


[jQuery] Re: Timeout

2009-08-18 Thread Cesar Sanz


check this out http://plugins.jquery.com/project/timers

- Original Message - 
From: "James" 

To: "jQuery (English)" 
Sent: Monday, August 17, 2009 1:35 PM
Subject: [jQuery] Re: Timeout



http://www.w3schools.com/js/js_timing.asp

Depending on how you define "inactive" (e.g. no mouse movement, no
keypress, etc.) you can have such events trigger a clear timeout to
clear any existing timeout, and add a new 20 second timeout. This you
can use jQuery for to help make things easier.
http://docs.jquery.com/Events


On Aug 15, 10:36 am, shaf  wrote:

Hi Guys

How do I set a timeout in jquery ? E.g. if a page is inactive for 20
seconds a message pops up asking the user to refresh the page.


[jQuery] Re: how do I hide an element after my function completes

2009-08-18 Thread Cesar Sanz


use $.ajaxStart and $.ajaxStop for showing/hiding your loader

- Original Message - 
From: "brian" 

To: 
Sent: Sunday, August 16, 2009 12:17 PM
Subject: [jQuery] Re: how do I hide an element after my function completes



Use the 3rd param of $.get()

$(function() {
  $(".pagination a").live("click", function() {
  var loader = $('#loader')
  loader.show()   // <-- hidden loader div
  $.get(
this.href,
null,
function()
{
loader.hide();
},
"script"
);
  return false;
  })
});

Incidentally, I recently came across this handy plugin:

http://plugins.jquery.com/project/loading


On Sun, Aug 16, 2009 at 1:11 PM, Rich Sturim wrote:


I have a hidden spinner div.

When my jquery function is called -- I show the spinner. But, how do
hide I the spinner div after the ajax request has completed?


$(function() {
$(".pagination a").live("click", function() {
var loader = $('#loader')
loader.show() // <-- hidden loader div
$.get(this.href, null, null, "script");
return false;
})
});



[jQuery] Re: Hello

2009-08-17 Thread Cesar Sanz


+1 www.jsbin.com

- Original Message - 
From: "Liam Potter" 

To: 
Sent: Friday, August 14, 2009 2:44 AM
Subject: [jQuery] Re: Hello




We need to see your code, goto http://www.jsbin.com, select the jquery 
library to include, paste your javascript and your html, then send us 
the link to see it.


Praveen Alvandi wrote:

Hey guys,

HELP ME . . .

I am struck. . .

On Thu, Aug 13, 2009 at 8:44 PM, Praveen Alvandi 
mailto:praveen.alva...@gmail.com>> wrote:


Hi,
I have this script here. Hope i can paste the code. Please click
on the login tab on the right side.
The issue is, the tab slides down as well as grows. Please help.
It should only slide down, not grow.

Please help me. 







[jQuery] Re: Attribute selection not working in MSIE; eg $("input[name=name]").val()

2009-08-07 Thread Cesar Sanz


mmm..

$(document).ready(function(){ var x = $("input[name=name]").val(); 
window.alert(x); });


Works for me in IE 7


When you say "no results", do you mean, an error?? or just that 
$("input[name=name]").val() is returning an empty string??




- Original Message - 
From: "V" 

To: "jQuery (English)" 
Sent: Friday, August 07, 2009 2:45 AM
Subject: [jQuery] Re: Attribute selection not working in MSIE; eg 
$("input[name=name]").val()





Sorry about the lack of information :o

The input box is:


The jQuery code is:
$("input[name=name]").val();

And no results.

The problem exists on MSIE8, but I think to remember it also is in
MSIE7..
On firefox it works great. 




[jQuery] Re: Make event happen after a certain amount of time has passed.

2009-08-07 Thread Cesar Sanz


check this out http://plugins.jquery.com/project/timers

- Original Message - 
From: "James" 

To: "jQuery (English)" 
Sent: Thursday, August 06, 2009 4:19 PM
Subject: [jQuery] Re: Make event happen after a certain amount of time has 
passed.




Then you can do something like this:

Have a setTimeout (say, executes in 20 seconds) with a callback
function, say "moveToLocation".

Then you need a way to find out whether the div has been scrolled to
the certain location or not. That can be done by checking either for
the user's top/left coordinate of their screen, or you can set a
variable when the user clicks on that "button".

After the 20 seconds comes by and the moveToLocation function is
called, it checks for that location (or some variable you set). If
it's true (meaning, the user has scrolled to the certain location),
then do nothing. Otherwise, do the auto-scroll.

The idea is that the moveToLocation is called no matter what. It's
just that whether you do the actual action or not depends on the state
of things.


On Aug 6, 12:09 pm, Simon Vansintjan  wrote:

Well, it's pretty theoretical at the moment, so there's no code down, but
the idea would be that a div appears, and that the user can click on a
button that would scroll the div to a certain location. However, if the 
user
doesn't click, I would still want the div to move to that location (in 
case

he/she doesn't get it that it would move, dunno).



On Thu, Aug 6, 2009 at 6:03 PM, James  wrote:

> Use the setTimeout/setInterval functions with some kind of global
> counter. If some kind of action/event occurs, the counter would be
> refreshed and the function would not execute.
> Would you like to specify in more detail what you would like to
> achieve?

> On Aug 6, 11:43 am, Simon  wrote:
> > Hey,

> > After a user hasn't triggered an event for a given amount of purple,
> > would it be possible to trigger that event anyway?

> > I have no idea how to even start looking for this.

> > Thanks for any hints/ideas/whatever you can throw my way.

> > Simon

--
simon.vansintjan.org 




[jQuery] Re: Attribute selection not working in MSIE; eg $("input[name=name]").val()

2009-08-06 Thread Cesar Sanz


Can you show us your code?
this issue is in IE6, IE7 or IE8?

- Original Message - 
From: "V" 

To: "jQuery (English)" 
Sent: Thursday, August 06, 2009 4:21 AM
Subject: [jQuery] Attribute selection not working in MSIE; eg 
$("input[name=name]").val()





Just when you think you made something beautiful, MSIE screws it all
up :(

I tried to get values from a input box which works great in Firefox,
but not in MSIE;
$("input[name=name]").val();

Is there a workaround for MSIE to get this working or am I just doomed
to use id's? 




[jQuery] Re: Global AJAX events, not working?

2009-08-05 Thread Cesar Sanz


Check the height/width of the #loading element

maybe it is collapsed,so, you cannot view it

- Original Message - 
From: "Julijan Andjelic" 

To: "jQuery (English)" 
Sent: Wednesday, August 05, 2009 9:00 AM
Subject: [jQuery] Global AJAX events, not working?




I've tried like this:

$("#loading").ajaxStart(function() {
$(this).show();
}).
ajaxComplete(function() {
$(this).hide();
})

I've triple checked the id of loading image and everything, but still
doesn't work.

Any ideas what could be wrong?


[jQuery] Re: xpath not returning objects

2009-08-05 Thread Cesar Sanz


the @ symbol is no longer needed

- Original Message - 
From: "Old Orange Juice" 

To: "jQuery (English)" 
Sent: Wednesday, August 05, 2009 7:21 AM
Subject: [jQuery] Re: xpath not returning objects



IF that's the case, 
http://docs.jquery.com/DOM/Traversing/Selectors#Using_CSS_and_XPath_Together

should be changed.

That page says:

Get the input field's value with the name of 'bar':

$("inp...@name=bar]").val();

All checked radio buttons:

$("inp...@type=radio][@checked]")

it also says:

e...@foo=bar] an E element whose "foo" attribute value is exactly equal
to "bar"

which is what I did.. Why all of a sudden Jquery doesn't use '@' in
xpath expressions?

Keep the docs up to date? Are there better up to date docs I should be
looking at??

Thanks again for all the help.. very much appreciated :)

On Aug 4, 8:35 pm, Jules  wrote:

jQuery does not recognise @ as attribute indicator. Just remove the @
from your code and enclose the attribute value with ':

$("input:checkbox[name='media_type']").click(function() {
if (this.checked == true) {
alert('checkbox true');
$("div[class='mediafield']").hide
('fast');

});

On Aug 5, 7:55 am, Old Orange Juice  wrote:

> I have a bunch of divs with the same classname, 'mediafield':

> Slug:
> Big Blurb(Video)
> Big Blub(short content)
> 
> Big Blub(Audio)
> Photo Uri(images):

> and I have this jquery code in my header:
> 
> $(document).ready(function() {
> $("input:checkb...@name=media_type]").click(function() {
> if (this.checked == true) {
> alert('checkbox true');
> $("d...@class=mediafield]").hide('fast');

> });});

> 

> So I know that the click function is getting implemented.. The alert
> box appears however I get the following error in firebug:
> uncaught exception: Syntax error, unrecognized expression:
> [...@class=mediafield]

> Line 0

> Nothing happens when firebug is turned off... So I'm not sure why it's
> throwing the error.

> Any help?

> Thanks,
> ooj 




[jQuery] Re: getting the height of some div (which contains p having some margin defined)

2009-08-05 Thread Cesar Sanz


$("div").height() ???


- Original Message - 
From: "ZedroS" 

To: "jQuery (English)" 
Sent: Wednesday, August 05, 2009 5:02 AM
Subject: [jQuery] getting the height of some div (which contains p having 
some margin defined)





Hi

I would like to get the height of a div. This div contains other
markups tag like some paragraph.

However, I don't manage to get the height of this div if some
paragraphs inside of it have some margin defined, even when using
outerHeight(true)...

It looks like I'm missing something, can someone help me ?

thanks in advance

++
zedros

ps : a test case (simpel html file wit the required javascript) can be
found there :
http://www.2shared.com/file/7008972/8565e522/test2.html
http://www.megafileupload.com/en/file/124239/test2-html.html 




[jQuery] Re: Custom Attributes - Beginner tip

2009-08-05 Thread Cesar Sanz


What happens with custom attributes regarding the strict XHTML format?

- Original Message - 
From: "Rick Faircloth" 

To: 
Sent: Wednesday, August 05, 2009 5:12 AM
Subject: [jQuery] Re: Custom Attributes - Beginner tip




Thanks for the tip!

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Miket3
Sent: Tuesday, August 04, 2009 8:04 PM
To: jQuery (English)
Subject: [jQuery] Custom Attributes - Beginner tip


One issue I ran across while learning jquery was that I often wanted/
needed a way to tell jquery to get data for the current element from a
related element. jQuery immediately tends to be friendly when you need
to work with a class of elements via the CLASS attribute, or a
specific element via the ID attribute. However, when there are 2
elements that are related but do not fit within a class, a beginner
such as myself may have a little trouble trying to find the best way
to handle this issue. At this point we begin to research how to get
jQuery to recognize a custom attribute, because common rules says that
the ID attrib is basically out of the question as this needs to be
unique to each element. And the CLASS attrib just doesn't logically
help either because it can refer to too many other elements that don't
fit our rule. And when we find out that jQuery doesn't readily
recognize custom attributes it can get a little intimidating because
one of the solutions is to extend jQuery.  But there are a couple of
other standard attributes that are recognized but rarely used.  In my
particular case I started using the TITLE attribute for relating my
elements. But then I stumbled upon the correct way, (or at least until
someone corrects me on this post).  There is a REL attribute which can
be used to RELATE the to elements.  So when you feel like you need a
custom attribute, you might not need one, the REL is available and the
TITLE could be used as a backup if necessary.

I hope this helps someone.



[jQuery] Re: replaceWith()

2009-08-05 Thread Cesar Sanz
@ProfCrazyHorse:
Your solution seems simple.. why to change something that is working fine?

  - Original Message - 
  From: Charlie 
  To: jquery-en@googlegroups.com 
  Sent: Wednesday, August 05, 2009 6:38 AM
  Subject: [jQuery] Re: replaceWith()


  there are lots of ways in jQuery to create relationships between selectors 
depending on your markup. Without seeing any markup it's hard for anyone else 
to help you create those connections

 

  ProfCrazyHorse wrote: 
I want to replace one element with another, and keep the element
contents intact.  For example, here, I'm replacing all h2 elements
with h3's:

$("a #replaceWith").click(function () {
   var h2Text = $("h2").text();
   $("h2").replaceWith("" + h2Text + "");
});

I have two questions.

First, how can I do this more simply?  I tried the following, but $
(this) refers to the anchor tag and not the h2 selector.  Is there a
way in jQuery to refer to the selector, i.e. $("h2")?

$("a #replaceWith").click(function () {
   $("h2").replaceWith("" + $(this).text + "");
});

My second question:  Is there a method more appropriate than
replaceWith to replace certain elements on the apge with others?

Thank you!

  


[jQuery] Re: hide() does not hide span in IE, but does in FF

2009-08-05 Thread Cesar Sanz
I will suggest you, that instead of pasting all your code (which ALMOST nobody 
reads) you put a demo in
http://www.jsbin.com

  - Original Message - 
  From: Charlie 
  To: jquery-en@googlegroups.com 
  Sent: Wednesday, August 05, 2009 6:00 AM
  Subject: [jQuery] Re: hide() does not hide span in IE, but does in FF


  this is a lot to sift through to find one span hide issue for which there is 
likely an easy solution. You'll get a  lot better response by putting a test 
case on live link.

  jsbin.com is great for this if you don't have public access server

  msmaeda wrote: 
Hi,

With the code below, I am having an issue that only seems to occur in
IE.  The issue is that the "payer_pane" span should be hidden unless
the "NEW" option is selected in the "relationship_person_id" select
list.  In IE, the payer_pane appears despite what is selected in the
"relationship_person_id" select list.  In Firefox and Safari, the span
hides and appears as expected.

Thanks in advance for any help on this.

Kind Regards,
Matt

** JS
**

// this will need tweaking when we add multiple token types, but is
hard coded for now so we're aware of it.
var current_person_id;
var current_gateway_id;

$('document').ready(function() {
utilSetTextfieldHint( $('#relationship_name'), 'Enter new
relationship here' );
$('#relationship_name').hide();

// set up account reference and display rules
utilSetTextfieldHint( $('#new_account_reference'), 'Enter new
account reference here' );
if ( $('#account_reference') ) {
$('#new_account_reference').hide();
$('#account_reference').change(function() {
if ($(this).val() !=0 ) {
$('#new_account_reference').hide();
}
else {
$('#new_account_reference').show();
}
});
}

// populate payer information on select
$('#relationship_person_id').change(function() {
var person_id = $(this).val();
// existing person
if (person_id>0) {
$('#relationship_name').hide();
load_payer(person_id);
}
// new person
else {
$('#relationship_name').show();
populate_payer_person();
populate_payment_token();
}
if ( person_id == $('input[name=person_id]').val() ) {
$('#payer_pane').hide();
}
else {
$('#payer_pane').show();
}
});

$('#payer_pane').hide();

});

function populate_payer_person(data) {
if (!data) {
data={};
}
if (data.error) {
if ( confirm("Error: "+data.error+" - Retry?") ) {
load_payer(current_person_id);
}
}
else {
$('input[name=payer_person_id]').val(data.id||'');
$('input[name=payer_person_first_name]').val(data.first_name||'');
$('input[name=payer_person_middle_name]').val(data.middle_name||'');
$('input[name=payer_person_last_name]').val(data.last_name||'');
$('input[name=payer_person_address1]').val(data.address1||'');
$('input[name=payer_person_address2]').val(data.address2||'');
$('input[name=payer_person_city]').val(data.city||'');
$('input[name=payer_person_state]').val(data.state||'');
$('input[name=payer_person_zip]').val(data.zip||'');
$('input[name=payer_person_zipplus4]').val(data.zipplus4||'');
$('input[name=payer_person_phone1_number]').val
(data.phone1_number||'');
$('select[name=payer_person_phone1_description]').val
(data.phone1_description||'');
$('input[name=payer_person_phone2_number]').val
(data.phone2_number||'');
$('select[name=payer_person_phone2_description]').val
(data.phone2_description||'');
}
}

function load_payer(person_id) {
// grab payer info from server through ajax and populate into form
current_person_id = person_id;
populate_payer_person({ first_name: 'Loading...'});
$.getJSON(
'../../app/charge',
{   m: 'ajax_person',
person_id: person_id },
function(data) { populate_payer_person(data) }
);
}


**   HTML
**

Account Info




  

  Account Number
  
  Client/Directory Location
   

 

  Payer's relationship to the Account Holder
  
   SELF
   NEW
  
  

  
  

  Account Holder
  ...



Payer Information

   ...



  
  

  



  


[jQuery] function gt() is not working for me

2009-08-04 Thread Julio Cesar

When try to refine a jquery set with last elements using the function
gt() it just not work.

Here is an example, it was tested in firefox 3.5 and jquery 1.3.2. I
had placed 3 empty fields, with jQuery I asign an "x" value for all of
them. Then I try to asign a "y" for the last two fields using the gt()
function, but it doesn't work. (Note: to test it by you copy and paste
the code in an html file, you need to have the jquery-1.3.2.js in the
same folder)



http://www.w3.org/1999/xhtml";>


jQuery gt() function problem


jQuery(document).ready(function($) {
   $('.field').val('x'); //assign value for all
   $('.field').gt(0).val('y'); //assing value for fields 2 and 3
})



1
2
3




Any one can explain me what is happend? ...this is a bug or I missed
something?

thanks
Julio Cesar


[jQuery] Re: html() does unexpected escaping:

2009-08-04 Thread Cesar Sanz


which one is scaped??
I see that src and class, both has "" 

- Original Message - 
From: "mikerobi" 

To: "jQuery (English)" 
Sent: Tuesday, August 04, 2009 9:18 AM
Subject: [jQuery] html() does unexpected escaping:




In the following example: the src attribute is escaped but not the
class attribute.  I wouldn't expect any escaping.

$('').html())


[jQuery] Re: How to access an iFrame ID from within

2009-08-04 Thread Cesar Sanz


Can you formulate your question a little better ??

- Original Message - 
From: "Tommy1402" 

To: "jQuery (English)" 
Sent: Monday, August 03, 2009 12:22 AM
Subject: [jQuery] How to access an iFrame ID from within




Sorry if report

I have an iFrame



it loads a content, how can I access the iFrame ID, which is "myframe"
from inside index.php?
I have tried:

//index.php
jQuery(document).ready(function() {
 alert(jQuery('#myframe').attr('id'));
});

but not succeed.


[jQuery] Re: Looking for expand/collapse tree directory navigation

2009-08-03 Thread Cesar Sanz
Search in google for dynatree.
  - Original Message - 
  From: Anoop kumar V 
  To: jquery-en@googlegroups.com 
  Sent: Sunday, July 26, 2009 1:34 AM
  Subject: [jQuery] Re: Looking for expand/collapse tree directory navigation


  Would this work for you?

  http://jquery.bassistance.de/treeview/demo/

  sample 0 seems to fit your requirements.

  Thanks,
  Anoop



  On Sat, Jul 25, 2009 at 4:10 PM, Magnificent 
 wrote:


Hello,

I'm looking for an expanding/collapsing tree directory type of
navigation and was wondering if someone knows of a good one that's out
there and available.

What I'm specifically looking for is one that is triggered on the
click of a *graphic* that toggles the show/hide.  Each text nav item
should be hyperlinkable to it's own link/page.  So for example (the +
and - are the collapse/expand graphics, the dot leader is for some
formatting):

- Nav Item 1 (text should be hyperlinkable)
...Sub Nav 1(text should be hyperlinkable)
...- Sub Nav 2 (text should be hyperlinkable)
..Sub Nav 2a (text should be hyperlinkable)
..Sub Nav 2b (text should be hyperlinkable)
..Sub Nav 2c (text should be hyperlinkable)
...Sub Nav 3 (text should be hyperlinkable)
+ Nav Item 2 (text should be hyperlinkable)
+ Nav Item 3 (text should be hyperlinkable)
+ Nav Item 4 (text should be hyperlinkable)

Ideally, this would work for plain old  and  structure.  I
suppose infinite nesting would be cool, but I don't think I need to go
beyond 3 levels with the first 2 levels having the show/hide graphic
triggers.



[jQuery] Re: Looking for a Good JavaScript Editor that Supports JQuery

2009-08-03 Thread Cesar Sanz


+1 Aptana

- Original Message - 
From: "InVmedia" 

To: "jQuery (English)" 
Sent: Monday, August 03, 2009 2:37 AM
Subject: [jQuery] Re: Looking for a Good JavaScript Editor that Supports 
JQuery




Komodo Edit, for sure. http://www.activestate.com/komodo/downloads/

Comes built in with auto complete / code sense for jQuery. Free and
has built in FTP. Works well with Filezilla. Been using it for about a
year and it keeps getting better by the month (sometimes week!).

On Aug 1, 6:21 pm, S2  wrote:

Does anyone know of a good JavaScript editor that supports JQuery?
Anyone sucessfully integrate JQuery into Eclipse/WTP or JSEclipse? 




[jQuery] Re: Simple calculation

2009-07-30 Thread Cesar Sanz


What??

Math science is exact...

Can you provide your script?

- Original Message - 
From: "kalyan Chatterjee" 

To: "jQuery (English)" 
Sent: Thursday, July 30, 2009 12:32 PM
Subject: [jQuery] Simple calculation




Hi Everyone,

I am just trying to do a simple calculation - like   1440 + ( 99 * 12)
+ 795   the result should be 3423. But I am getting different answer.
Please someone help me how to do it.

Thanks
Kaly


[jQuery] Re: POST data not being sent

2009-07-29 Thread Cesar Sanz


Well, e.g   (Do you see the "data" option ?)

$.ajax({
  type: "POST",
  url: "some.php",
  data: "name=John&location=Boston",
  success: function(msg){
alert( "Data Saved: " + msg );
  }
});http://docs.jquery.com/Ajax/jQuery.ajax#options

Regards


- Original Message - 
From: "shaf" 

To: "jQuery (English)" 
Sent: Wednesday, July 29, 2009 11:48 AM
Subject: [jQuery] Re: POST data not being sent



Ok guys, thats for the advice and replies.
Cesar, if thats how you construct a GET string how would I construct a
POST string ?

On Jul 29, 5:45 pm, "Cesar Sanz"  wrote:

Hello pal, take a look at your code, do you see any strange??

Oh, yes... url: url: _HOMEDIR+"send?"+str <-- here you are building your
query string, so
jquery send it as a GET instead of POST

$.ajax({
type: "POST",
async: false,
url: _HOMEDIR+"send?"+str,
dataType: "json",
beforeSend: function() {
$("span:last").text("Sending..").show();

},
- Original Message -
From: "Brett Ritter" 
To: 
Sent: Wednesday, July 29, 2009 10:20 AM
Subject: [jQuery] Re: POST data not being sent

> On Wed, Jul 29, 2009 at 12:16 PM, Liam Potter
> wrote:
>> also, don't delete the quoted
>> posts, means everyone not using a web based group reader can follow the
>> conversation.

> However feel free to TRIM lengthy posts to the relevant parts.
> Even non-web-based group readers support threading or sorting by
> conversation, and a hint as to which part of the thread you are
> replying to is sufficient.

> --
> Brett Ritter / SwiftOne
> swift...@swiftone.org 




[jQuery] Re: POST data not being sent

2009-07-29 Thread Cesar Sanz


Hello pal, take a look at your code, do you see any strange??

Oh, yes... url: url: _HOMEDIR+"send?"+str <-- here you are building your 
query string, so

jquery send it as a GET instead of POST

$.ajax({
type: "POST",
async: false,
url: _HOMEDIR+"send?"+str,
dataType: "json",
beforeSend: function() {
$("span:last").text("Sending..").show();
},
- Original Message - 
From: "Brett Ritter" 

To: 
Sent: Wednesday, July 29, 2009 10:20 AM
Subject: [jQuery] Re: POST data not being sent




On Wed, Jul 29, 2009 at 12:16 PM, Liam Potter 
wrote:

also, don't delete the quoted
posts, means everyone not using a web based group reader can follow the
conversation.


However feel free to TRIM lengthy posts to the relevant parts.
Even non-web-based group readers support threading or sorting by
conversation, and a hint as to which part of the thread you are
replying to is sufficient.

--
Brett Ritter / SwiftOne
swift...@swiftone.org 




[jQuery] Re: My messages don't show?

2009-07-27 Thread Cesar Sanz


I takes about 3 hrs to display your first message. dunno why

- Original Message - 
From: "Jon Jackson" 

To: 
Sent: Sunday, July 26, 2009 5:23 AM
Subject: [jQuery] My messages don't show?




What could I be doing wrong?

I've joined the group, posted a message (tried it twice)... but it 
doesn't show?


Jon Jackson (JimmyHill, jonj...@googlemail.com)


[jQuery] Re: extend an Object

2009-07-23 Thread Cesar Sanz


$ = jQuery 
It is an alias
- Original Message - 
From: "jeanluca" 

To: "jQuery (English)" 
Sent: Thursday, July 23, 2009 4:26 AM
Subject: [jQuery] Re: extend an Object



I just noticed that $ and the jQuery object are the same thing!!


On Jul 23, 10:27 am, jeanluca  wrote:

thats exactly it!!
What is exactly '$' ? its not the same as 'jQuery'. Do you have a
link to a doc ?

thnx a lot!

On Jul 23, 2:23 am, Jules  wrote:

> Something like this?

> function person(name, address) {
> this.name = name;
> this.address = address;
> this.whoAmI = function() {
> if (this.creditLimit)
> alert(this.name + ' address:' + this.address + 'credit
> limit:' + this.creditLimit);
> else
> alert(this.name + ' address:' + this.address);

> }
> return this;
> }

> function customer() {
> this.creditLimit = 0;
> this.creditCheck = creditCheck;
> return this;

> function creditCheck() {
> alert(this.creditLimit);
> }
> }

> var a = new person('john smith', '10 main st');
> var cust = new customer();
> a.whoAmI();

> $.extend(a, cust);
> a.creditLimit = 1000;
> a.whoAmI();

> On Jul 22, 10:02 pm, jeanluca  wrote:

> > Hi All

> > I tried to add functions to an object like

> > function User(n, a) {
> > this.name = n ;
> > this.aux = a ;
> > }
> > function auxis() {
> > alert(this.aux);
> > }

> > $(document).ready( function() {
> > var u = new User("Jack") ;
> > u.extend({
> > whoami: function() { alert(this.name); },
> > autis: auxis
> > }) ;
> > u.whoami() ;

> > }) ;

> > Eventually I will have 2 object A and B and I want to merge A into B:

> > B.exend(A) ;

> > However it doesn't work at all. Any suggestions how to fix this ?


[jQuery] Re: [Plugins] New plugin - jqswfupload

2009-07-23 Thread Cesar Sanz


Very nice man!!

Thanks for your contribution.

- Original Message - 
From: "alexanmtz" 

To: "jQuery (English)" 
Sent: Thursday, July 23, 2009 1:19 PM
Subject: [jQuery] [Plugins] New plugin - jqswfupload




Hello everyone,

I would like to announce the jqswfupload plugin:

http://jqswfupload.alexandremagno.net/

The easier way to make a multiple file upload using swfupload. You can
create a complete interface for multiupload files based on Flickr ux
in just one line of code and them make custom settings to controll how
works all the features.

Hope everyone enjoy it!

Alexandre Magno
Interface Developer
http://blog.alexandremagno.net


[jQuery] Re: JQuery Message with Validate Plugin

2009-07-22 Thread Cesar Sanz


Hello

Check out this demo http://jquery.bassistance.de/validate/demo/marketo/

- Original Message - 
From: "pocket" 

To: "jQuery (English)" 
Sent: Sunday, July 19, 2009 11:00 AM
Subject: [jQuery] JQuery Message with Validate Plugin




I am currently using the validate plugin and I needed to find a way of
displaying a message when the user clicks submit but only if they meet
certain criteria on their postcode. I have just seen "Message" which
will display a pop up message. How do the two work together? Is it
possible?

Does the message display every time the user clicks submit or will it
work if I use a regex for the set criteria so that it will display the
message if the user has a postcode starting TA2 for example and won't
display if they don't?

I hope this makes sense.

Thanks



[jQuery] Re: Replace div with another div

2009-07-21 Thread Cesar Sanz


It is always a good idea to put the way you achieve your results.. Maybe 
other people is looking

the same as you..

We must to learn not being so selfish!
- Original Message - 
From: "expresso" 

To: "jQuery (English)" 
Sent: Thursday, July 02, 2009 8:52 PM
Subject: [jQuery] Re: Replace div with another div



Richard, I have a reason for wanting to do this other than the default
behavior.  Anyhow, I got this working without having to do any of this
in the end!

On Jul 2, 7:59 pm, Ricardo  wrote:

Are you sure you need to do that? The button is disabled when you get
to the first/last item, if you add new items following the documented
ways it is completely 
unnecessary:http://sorgalla.com/projects/jcarousel/#Dynamic-Content-Loading


-- ricardo

On Jul 2, 11:45 am, expresso  wrote:

> I want to replace it with  which is what the carousel code replaces it
> with anyway when the button IS enabled..I just viewed the source to
> see that.

> On Jul 2, 9:42 am, expresso  wrote:

> > Charlie, I just plan on using an ID or class that's already in that
> > div to reference it. For example:
> >  > disabled="true"/>

> > why couldn't I do something like $(".jcarousel-prev jcarousel-prev-
> > horizontal jcarousel-prev-
> > disabled jcarousel-prev-disabled-horizontal").replaceWith(' > class="jcarousel-prev jcarousel-prev-horizontal" style="display:
> > block;" disabled="false"/>');

> > On Jul 2, 9:04 am, Charlie  wrote:

> > > one problem you'll likely run into completely replacing that div
> > > even though the html and classes will fit in with the carousel you 
> > > could have problems due to no events attached to new div from 
> > > document ready

> > > Giovanni Battista Lenoci wrote:
> > > expresso ha scritto:I'm trying to figure out how I'd explicitely 
> > > change out a div.
> > > Lets say this div is in the page. I guess first I'd have to verify 
> > > if

> > > it's in the page:
> > >  > > disabled="true"/>
> > > And if it is, I want to remove it and add this in the same place:
> > > > > > style="display:

> > > block;" disabled="false"/>
> > > I have not a clue how to do this.
> > > If give a unique id to the div (or you have a rule to get it, for 
> > > example $('#mycontainer > div'));

> > > You can do:
> > > $('#id').replaceWith('my newmarkup!');
> > > If the selector doesn't return nothing then nothing will be 
> > > replaced.
> > > Bye 




[jQuery] Re: Input that allows only numbers.

2009-07-17 Thread Cesar Sanz


try this http://www.texotela.co.uk/code/jquery/numeric/

- Original Message - 
From: "Caio Landau" 

To: "jQuery (English)" 
Sent: Friday, July 17, 2009 9:45 AM
Subject: [jQuery] Re: Input that allows only numbers.



So let me get it, key's code numbered between (and including) 48 and
57 are numbers?

Ok, I got it, thank you :)

On Jul 17, 11:18 am, Matt Zagrabelny  wrote:

On Thu, 2009-07-16 at 16:12 -0700, Caio Landau wrote:
> Well, that a simple question, I hope. I have an input ( type="text" />) on my page, and I want it to only accept numbers, so
> if the user types anything that's not a number, it will be removed
> instantly.

> A simplified example just to illustrate:

> 
>  
> 

This works for me...





$(function() {
$('#numbersonly').keypress(
function(event) {
return ((event.which >= 48) && (event.which <= 57));
}
);});








Cheers,

--
Matt Zagrabelny - mzagr...@d.umn.edu - (218) 726 8844
University of Minnesota Duluth
Information Technology Systems & Services
PGP key 1024D/84E22DA2 2005-11-07
Fingerprint: 78F9 18B3 EF58 56F5 FC85 C5CA 53E7 887F 84E2 2DA2

He is not a fool who gives up what he cannot keep to gain what he cannot
lose.
-Jim Elliot

signature.asc
< 1KViewDownload


[jQuery] Re: ajaxStart() ajaxStop() problem

2009-07-17 Thread Cesar Sanz


Maybe the ajax in not firing again...

Have you checked the ajax calls with firebug?

besides, are you using IE for this? Think IE catch ajax calls when using 
$.get or $.load .. try $.post or $.ajax
- Original Message - 
From: "Jedrin" 

To: "jQuery (English)" 
Sent: Thursday, July 09, 2009 4:19 PM
Subject: [jQuery] ajaxStart() ajaxStop() problem




I have a page that has ajaxStart/stop as shown below to show some sort
of indicator while an ajax request is in progress. The first time an
ajax event happens, it works perfectly, the server renders some text
on the page. After that it stops working on subsequent ajax requests.
I don't see any javascript errors. Am I dong something wrong or how
could I troubleshoot ? thanks



Loading ..


..
..



$(document).ready(function(){
$("#loading").ajaxStart(function(){
 $(this).show();
});
});

$(document).ready(function(){
$("#loading").ajaxStop(function(){
 $(this).hide();
});
});


[jQuery] Re: addclass() only works with the first of the matched divs



Id must to be unique.

So, jQuery just find one element with the specified Id,

try to make id uniques
- Original Message - 
From: "Alexandre" 

To: "jQuery (English)" 
Sent: Thursday, July 16, 2009 3:40 PM
Subject: [jQuery] addclass() only works with the first of the matched divs




Hi,

I'm having an annoying issue with addClass()

I'm trying to find all divs with id name '#moldura_slides' and add the
class '.horizontal' to each one of them.
The problem is that only the first div matched gets the class. The
others are just ignored and don't get it.

$(document).ready(function()
{
$("#moldura_slides").addClass("horizontal");
});


Looked for a solution everywhere and tried other ways of doing this.
Nothing worked. Any ideas?

This is the page: http://www.labbi.com.br/index5.html

Thanks


[jQuery] Re: Disabling Button in jQuery HTML Form Plugin



you can check the message in the onclick event...

- Original Message - 
From: "icuucme" 

To: "jQuery (English)" 
Sent: Thursday, July 16, 2009 4:37 PM
Subject: [jQuery] Re: Disabling Button in jQuery HTML Form Plugin



still looking for help with this...thanks

On Jul 8, 1:36 pm, icuucme  wrote:
I am currently using this 
pluginhttp://www.malsup.com/jquery/form/#code-samples

(HTML) to display a div with content, depending on what is entered.

Is there a way to disable the submit button if the div contains a
certain message? 




[jQuery] Re: Attaching a jQuery event to a dropdown in an ASP.net Repeater?



Hi..

When working with ASP.NET controllers I always see the hltml code generated 
because

I can figure out where to inject my jquery code.


- Original Message - 
From: "Dunc" 

To: "jQuery (English)" 
Sent: Thursday, July 16, 2009 8:28 AM
Subject: [jQuery] Attaching a jQuery event to a dropdown in an ASP.net 
Repeater?





Hi,

I've got an ASP.net repeater which has an unknown number of rows, that
I'm passing as a variable into the client-side code.  Each repeater
item has two dropdowns in it, one of which I need to attach to a
jQuery event to create a cascading dropdown.

I've put the change(function() { into a for..next loop, along with the
target control.  It's not pretty, but it seems logical.  Problem I
have is whenever the function is called, the ID of the target control
is the max value of the loop + 1.

Why is my loop variable behaving like a reference type instead of a
value type?  Why is it even in scope outside the loop?  Alternatively,
is there a better way to do this?

The code:

var rows = 4; // this is populated from the server code

for (iLoop = 0; iLoopDuncan 




[jQuery] Re: trigger click on an anchor



"trigger" fires inmediatly the event.
$('#clickme').click(function()) binds an event to the element.

Both are different.. 


Just test it.. I must work.

Best regards

- Original Message - 
From: "pedalpete" 

To: "jQuery (English)" 
Sent: Monday, July 13, 2009 9:55 AM
Subject: [jQuery] Re: trigger click on an anchor



jQuery doesn't care what you are linking to, as long as that file is
there, it will be retrieved (I can't think of any reason why not).'

you could use
$('#clickme').click(function()
that would I believe be more efficient

On Jul 13, 8:45 am, sso  wrote:

if I have a link on my page like this

triggerclick

should I be able to click it with jquery?

on event {
$('#clickme').trigger('click');

}

or will it disallow it because its linking to a file


[jQuery] Re: document.ready - how to make sure all js is loaded?



There is no chance that it occurs..

js are loaded in order.. jQuery(document).ready() start executing when DOM 
is ready BUT,

if js are placed above this line of code, js will be loaded first..

- Original Message - 
From: "Lauri B." 

To: "jQuery (English)" 
Sent: Monday, July 13, 2009 3:37 AM
Subject: [jQuery] Re: document.ready - how to make sure all js is loaded?



check if there is callback for cometchat and attach your events there



On Jul 13, 10:12 am, Veeru  wrote:

I have an example for the scenario
I am using cometchat in my application.
Its a third party script, that provides a chat interface to the
website. It adds some containers to the body of the document. One such
container is cometchatbase.

I want attach something to this container on document.ready. But by
the time document.ready is fired, the container is not generated, so $j
("#cometchatbase") returns null. Does this mean, before the
cometchat.js has finished executing document.ready has already fired?

Thanks
Vru 




[jQuery] Re: jQuery on IE

Maybe you are not including jquery before $(document)

also try $(function(){
  var nome = "";
  var pos = "";
  var html = document.createElement("div");
  $(html).attr("id", "submenu");
});
  - Original Message - 
  From: Paulo Henrique 
  To: jquery-en@googlegroups.com 
  Sent: Thursday, July 09, 2009 1:45 PM
  Subject: [jQuery] jQuery on IE


  Hello people...
  I've been working with jQuery for some time now, but mostly on Firefox. But i 
was finishing an old project, and needed javascript, so I decided to use jQuery 
on it too.
  It worked perfectly on Firefox, but on IE it ain't working.
  The code is as it follows:

   
  $(document).ready(function(){
   var nome = "";
   var pos = "";
   var html = document.createElement("div");
   $(html).attr("id", "submenu");
  .
  });
  

  But the IE complains about the $ before (document), saying that an object is 
expected (object expected at line X character 1).

  Anyone out there could know what might be the reason?
  Waiting for your help, and thanks in advance for your time.


  Att.
  Paulo Henrique Vieira Neves
  Bsc. Sistemas de Informação
  +55 38 9141 5400
  MSN: paulode...@live.com
  GTALK: paulode...@gmail.com
  SKYPE: paulodemoc


[jQuery] Re: Access by item in the array



Oh men..

C'mon!! threads are supposed to be to help people out..

If you want to fight, do it in private... cuz there is a lot of people that 
may be interested in this topic too

and will find no help in your discussion... Don't be so selfish

- Original Message - 
From: "expresso" 

To: "jQuery (English)" 
Sent: Thursday, July 09, 2009 1:25 PM
Subject: [jQuery] Re: Access  by item in the array




and you blow up at my wondering why the author of that plugin

put it on there... how the @#$% am i supposed to know?

if that's "blowing up" then you need to relax when you read replies.
That in no way was "blowing up".

On Jul 9, 2:24 pm, expresso  wrote:

>>>Morning, then tell my why the code is putting that in there straight

from the JCarousel plug-in

Because previous to that, you were pretty cocky about the way you said
that disabled is not part of a  Read the post.

YOu have to take that response above in context. I was in no way
trying to be cocky, just making a point that hey, it's in there so I
don't get why then.

On Jul 9, 2:22 pm, expresso  wrote:

> Charlie, I have said thanks in a lot of my posts.

> Second, I am customizing this control way beyond what most people
> have. And yes, it's pretty frustrating to say the least when you
> create a plugin and then disappear after 2 years. While it's open
> source, still. When you email the creator nicely asking him if he's
> still contributing and you get no response, and then the forums the
> pages for that Carousel are abandoned, one's got to wonder wtf.

> My tone? Look at the kind of responses I get from people like you.
> Stuff like "Of Course that won't work". Your tone is just as cocky as
> you think mine is.

> >>>a number of the last posts directed back to you have been trying to 
> >>>give you a clue that everyone is getting really tired of all the 
> >>>frantic posts


> I don't see how they are frantic, just separated out. And I don't see
> all the people here who are getting fed up.

> I want you and Morning to know that some of the responses are
> definitely passive aggressive on your side to even start with. Do you
> need examples?

> I'm not here to argue. I'll do my best to consolidate my replies.
> And understand that people are human, sure I'm frustrated with the
> fact that the author is no longer to be found. Don't take someone's
> frustration to the point of saying I'm being negative when I was not
> THAT negative. What a way to blow this entire thing out of the water.

> On Jul 9, 2:08 pm, Charlie  wrote:

> > you sir are a complete ingrate!
> > You have had endless help from numerous people for 2 weeks on a simple 
> > carousel. I don't think you understand the tone of a number of the 
> > last posts directed back to you have been trying to give you a clue 
> > that everyone is getting really tired of all the frantic posts, 
> > condemning someone's code ( on a plugin that 100's of people have used 
> > I might add), not reading replies with solutions..and to top it 
> > off this post makes it sound like others with busy lives are just 
> > sitting around waiting to help you!
> > This post is rude! Wake up! Any reply to MorningZ's post I would have 
> > been expecting to see some thanks, rather than being a pompous A**. My 
> > bet is you just burned a big bridge to any further assistance with an 
> > attitude like the one displayed here
> > I'm betting I speak for many others who are tired of the inbox clutter 
> > from your carousel problems
> > expresso wrote:how the hell am I being rude? And second, I am giving 
> > information to help you help me. Again I try all sorts of shit before 
> > I post stuff. I don't just post on every step of the way. I am showing 
> > you what I have tried. So you either get called out for not giving 
> > enough information or giving too little. Chill On Jul 9, 11:04 am, 
> > MorningZwrote:"so it's only respectful on my part 
> > to start a new thread on a different topic that's veering off in the 
> > same thread. Not cool. " You've got it backwards it makes more 
> > sense and keeps the clutter out if you stay in the same topic. As 
> > Liam points out you already asked the index question, AND it was 
> > answered by Charlie, in the topic you created just 13 hours 
> > agohttp://groups.google.com/group/jquery-en/browse_thread/thread/8832916... 
> > and yet, here's an identical topic asking the identical question with 
> > 2 min apart two sentence ramblings on them all Realize what this 
> > list for what it is: a mailing list where lots of us provide free help 
> > out of our own time making it difficult to understand what you are 
> > asking, being rude to people trying to show you the way, rambling on 
> > and on with the same stuff all that doesn't lend itself very well 
> > to make your issues worth other peoples time and effort . On Jul 9, 
> > 11:12 am, expressowrote:Because sometimes I get 
> > into other topics not related to my original posts in 

[jQuery] Re: Cannot disable div



How come is that you want to disable a div??

Do you mean, block the content inside div?


- Original Message - 
From: "BaBna" 

To: "jQuery (English)" 
Sent: Wednesday, July 08, 2009 9:28 AM
Subject: [jQuery] Re: Cannot disable div



Maybe because there is no disabled property for DIV?

http://www.w3schools.com/tags/tag_DIV.asp


On Jul 8, 4:25 pm, expresso  wrote:












I'm trying to change disabled to true. It's not taking. And what I
also don't get is what is disable doing for a div?

I have tried this:

jQuery(".jcarousel-skin-ie7 .jcarousel-next .jcarousel-next-
horizontal").attr({ disabled: "true" });


[jQuery] Re: jQuery - Ajax and Load question



$.get and $.post are convenient methods
They both utilize $.ajax internally

- Original Message - 
From: "Glazz" 

To: "jQuery (English)" 
Sent: Tuesday, July 07, 2009 4:12 PM
Subject: [jQuery] Re: jQuery - Ajax and Load question



Thanks for the quick replies, using $.get i can do what i want, with
$.ajax i can too, except the data coming from the .php page is json
encoded so in the $.get i used 'json' at the end -> $.get(.., ..,
function(), 'json');

Is there any big difference using $.get or $.post, or just $.ajax and
defining the method ( get or post ) in $.ajax?

On 7 Jul, 22:53, James  wrote:

with $.ajax, you use the success callback.

$.ajax({
type: 'GET',
url: 'index.php',
data: 'id=' + productId + '&qtd=' +
quantidade,
success: function(data) {
alert(data);
},
error: function() {
alert('error occurred');
}
});

On Jul 7, 11:49 am, BaBna  wrote:

> You need to define your callback function. Maybe something like this?

> $.get("index.php", { id: productId , qtd: quantidade }, function(data)
> {
> doWhateverWith(data);

> });

> On Jul 7, 10:42 pm, Glazz  wrote:

> > Hello,

> > I have a function that have this:

> > $.ajax({
> > type: 'GET',
> > url: 'index.php',
> > data: 'id=' + productId + '&qtd=' + quantidade
> > });

> > This piece of code is working great, but i need to know how to get the
> > response from the specified url, for example, the response from
> > index.php is two, i need to get that to place it inside a div, i know
> > with load i can do that, but i want to be able to send in the response
> > an array with some data.

> > Hope you understand :[

> > Regards!






[jQuery] Re: How long does it take to download jquery?



hmm.. Very subjetive question..

Having a 1 Mb internet connection... it will be a breeze...


- Original Message - 
From: "MorningZ" 

To: "jQuery (English)" 
Sent: Tuesday, July 07, 2009 1:56 PM
Subject: [jQuery] Re: How long does it take to download jquery?



I'm not sure how you feel someone could give you an answer that would
be even close

like for instance, factoring in:
- Your user's CPU resources
- Their connection speed
- Network traffic
- ISP traffic
- DNS routing
- Is GZIP enabled on their browser or not
- Are they caching?

How could someone give an "85th percentile" with all that figured
in?   Impossible




On Jul 7, 3:30 pm, Geoffrey  wrote:

Simple question, and I know the answer is not simple.
How long does it take to download jquery?

Does anyone have any numbers that would shed some light on this? I
know that there are many variables, but does anyone have any numbers
reflecting how long it would take, for example, the 85th percentile or
something like that? Or have a reasonably informed guess?

Thanks
-Geoff


[jQuery] Re: long paragraph - hide some of it and show all on click



Check this out pal http://jsbin.com/ifaha


Put in a  the text to hide

e.g 



   Quisque eget tellus ut justo volutpat placerat.
   Vivamus congue lacus sed ante luctus ac dictum felis fermentum. Etiam
   vel adipiscing leo. Integer tortor justo, volutpat non ullamcorper


and then hide it with jquery

$(".hide").hide();

- Original Message - 
From: "sso" 

To: "jQuery (English)" 
Sent: Tuesday, July 07, 2009 10:08 AM
Subject: [jQuery] long paragraph - hide some of it and show all on click




Not sure the best way to approach this.

I would like all my text to be on the page (for seo reasons).  for
example

---
Some text hidden below
---

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
dapibus mi non enim convallis pharetra. Integer nisi dolor, suscipit
ut interdum non, ultrices eget eros. Nullam arcu erat, venenatis nec
ornare sit amet, pellentesque ac lectus. Sed massa dolor, hendrerit id
elementum viverra, fringilla eu lacus. Nulla sit amet felis nulla. Ut
vestibulum vehicula posuere. Sed eget nulla et odio molestie ultrices
vel quis tellus.>>  click for more

-
click would result in this below
-

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
dapibus mi non enim convallis pharetra. Integer nisi dolor, suscipit
ut interdum non, ultrices eget eros. Nullam arcu erat, venenatis nec
ornare sit amet, pellentesque ac lectus. Sed massa dolor, hendrerit id
elementum viverra, fringilla eu lacus. Nulla sit amet felis nulla. Ut
vestibulum vehicula posuere. Sed eget nulla et odio molestie ultrices
vel quis tellus. Quisque eget tellus ut justo volutpat placerat.
Vivamus congue lacus sed ante luctus ac dictum felis fermentum. Etiam
vel adipiscing leo. Integer tortor justo, volutpat non ullamcorper
vel, consectetur in metus. Nunc ut dolor ac nunc interdum bibendum.
Maecenas ultrices, diam at faucibus elementum, tellus nunc sodales
purus, eget tempus ante augue a mi. Sed libero nulla, faucibus vel
pellentesque et, tempor quis purus.


[jQuery] Re: Determine content type in $.post callback



Well, All I have to say is that you must to be aware of what kind of 
result type are you specting from your back end system.



- Original Message - 
From: "dnagir" 

To: "jQuery (English)" 
Sent: Tuesday, July 07, 2009 7:44 AM
Subject: [jQuery] Re: Determine content type in $.post callback




Anybody please?


[jQuery] Re: how to change 2,5 to 2,50 ?



Massimos'

Number.prototype.padRight = function (fill) {
   var v = this.toString().split('.'), d = v[1] || '';
   return (v[0] || '0') + '.' + d + fill.substr(d.length);
}

Very elegant solution!!

- Original Message - 
From: "Giovanni Battista Lenoci" 

To: 
Sent: Tuesday, July 07, 2009 7:30 AM
Subject: [jQuery] Re: how to change 2,5 to 2,50 ?




weidc ha scritto:

the price have to change on the page without reloading the site. the
javascript is just to look well for the customers. but thank you
anyway!

Yes, the functions I've posted are javascript trasposition of php 
functions.


In php exists the number format function: |$number = 1000; echo 
number_format($number, 2, ',', '.'); // 1.000,00
After including the javascript function I've linked you can use the same 
syntax.


Bye
|

--
gianiaz.net - web solutions
via piedo, 58 - 23020 tresivio (so) - italy
+39 347 7196482 




[jQuery] Re: Search Functionality in DataGrid



Which back end technology do you know?

Asp, Asp.net, java.. ?

- Original Message - 
From: "jazz" 

To: "jQuery (English)" 
Sent: Tuesday, July 07, 2009 3:54 AM
Subject: [jQuery] Search Functionality in DataGrid




Hi Folks,


I want search functionality in the grid..i found one link but it is in
php...but i donno php :-(   i want it in jsp..

Here is the link: http://trirand.com/jqgrid/jqgrid.html#.
in this there is a take any exampel which contains search records..it
is really very nice.
please sort out my problem..

one more link i got for grid but it does nt have the functionality of
searching

another link:http://tablesorter.com/docs/index.html#Examples

can anybody help me in this.


Regards,
Bharath


[jQuery] Re: DISABLE BUTTON AFTER 1 CLICK ->JQUERY: NOT WORKING WITH IE8



Sorry for my suggestion, I misread your point, thought you were not able to 
disable your button.


You say it works in FF, Have your tried this same code in IE 7.0 ? Does it 
works?


I can see in your code that you bind a submit event to the #node-form twice, 
why is that?


$(document).ready(function() {
   $('#node-form').submit(function (e) 
{   // <*** HERE

   var settings = Drupal.settings.block_submit;
   if (settings.block_submit_method == 'disable') {
   $('input[type=submit]', $(this)).attr('disabled', 
'true').each(function (i) {

});
   $(this).submit(function (e) 
{  // <*** HERE

  return false;
   });
   }
   return true;
  });
});

- Original Message - 
From: "Amit" 

To: "jQuery (English)" 
Sent: Monday, July 06, 2009 1:37 PM
Subject: [jQuery] Re: DISABLE BUTTON AFTER 1 CLICK ->JQUERY: NOT WORKING 
WITH IE8




Hi Cesar,

Thanks for your reply. But that isn't working. It still gives me the
same result. The form does not post. It is just that the button gets
disabled after click.
Wonder why it works properly in Firefox and Chrome but not in IE.. :(
Please help.


~Amit

On Jul 6, 2:14 pm, "Cesar Sanz"  wrote:

try

.attr('disabled', 'disabled') instead of .attr('disabled', 'true')

- Original Message -
From: "Amit" 
To: "jQuery (English)" 
Sent: Monday, July 06, 2009 10:50 AM
Subject: [jQuery] DISABLE BUTTON AFTER 1 CLICK ->JQUERY: NOT WORKING WITH

IE8

> Hello there,

> I am using Drupal forms with Jquery. I used the following code to
> disable a button after it is clicked to prevent double updates.

> $(document).ready(function() {
> $('#node-form').submit(function (e) {
> var settings = Drupal.settings.block_submit;
> if (settings.block_submit_method == 'disable') {
> $('input[type=submit]', $(this)).attr('disabled', 'true').each
> (function (i) {
> });
> $(this).submit(function (e) {
> return false;
> });
> }
> return true;
> });
> });

> Form ID should be specific to: "node-form".

> This structure works fine with Firefox and Chrome but does not work
> with IE8 / 7 (compatibility mode).
> When I click the submit button for the form in IE, it disables the
> button but the form never submits. (it behaves like an AJAX button
> where it gets disabled without the submit action ever happening)

> How do I solve this? Please help me out of this...

> Thanks,
> ~Amit






[jQuery] Re: Join several JS scripts into one big file to lower http request



Hi there,

How do you packed them?

try http://developer.yahoo.com/yui/compressor/

- Original Message - 
From: "AndyPSV" 

To: "jQuery (English)" 
Sent: Wednesday, July 01, 2009 11:33 AM
Subject: [jQuery] Join several JS scripts into one big file to lower http 
request





I've got on site a huge amount of js, 'single' script. What I want to
do is to pack them into one file.
Could somebody assist me in doing this? Tried before but something
crashed...
Here is package: http://rcdrugs.com/_done/js.zip

I've posted this question on several boards:
- 
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_24498924.html

- http://forum.webhelp.pl/viewtopic.php?p=906036#906036
- 
http://forum.php.pl/Polaczyc_wszystkie_pliki_js_w_JEDEN_wielki_t124138.html


nobody couldn't / didn't know how to help. Thanks for help. 




[jQuery] Re: DISABLE BUTTON AFTER 1 CLICK ->JQUERY: NOT WORKING WITH IE8



try

.attr('disabled', 'disabled') instead of .attr('disabled', 'true')

- Original Message - 
From: "Amit" 

To: "jQuery (English)" 
Sent: Monday, July 06, 2009 10:50 AM
Subject: [jQuery] DISABLE BUTTON AFTER 1 CLICK ->JQUERY: NOT WORKING WITH 
IE8





Hello there,

I am using Drupal forms with Jquery. I used the following code to
disable a button after it is clicked to prevent double updates.

$(document).ready(function() {
$('#node-form').submit(function (e) {
var settings = Drupal.settings.block_submit;
if (settings.block_submit_method == 'disable') {
$('input[type=submit]', $(this)).attr('disabled', 'true').each
(function (i) {
});
$(this).submit(function (e) {
return false;
});
}
return true;
});
});


Form ID should be specific to: "node-form".

This structure works fine with Firefox and Chrome but does not work
with IE8 / 7 (compatibility mode).
When I click the submit button for the form in IE, it disables the
button but the form never submits. (it behaves like an AJAX button
where it gets disabled without the submit action ever happening)

How do I solve this? Please help me out of this...


Thanks,
~Amit 




[jQuery] Re: Need help on How to load content via AJAX in jQuery



Hello.

I see you succed retrieving data using ajax,

Which is the problem?

- Original Message - 
From: "Erik R. Peterson" 

To: 
Sent: Friday, July 03, 2009 2:48 PM
Subject: [jQuery] Need help on How to load content via AJAX in jQuery




I found this script:

http://yensdesign.com/2008/12/how-to-load-content-via-ajax-in-jquery/

I got it working, but it really looks bad in IE, along with erros.

Any alternatives or sugestions?

Here is my page:  http://www.enaturalskin.com/needhelp.htm

Many thanks.

Erik


[jQuery] Re: $("#datepicker").datepicker is not a function

Make jure your datepicke script is loaded first in your browser..

You can use firebug to see if the script is laoded correctly
  - Original Message - 
  From: Charlie 
  To: jquery-en@googlegroups.com 
  Sent: Thursday, July 02, 2009 12:00 PM
  Subject: [jQuery] Re: $("#datepicker").datepicker is not a function


  if a jQuery function throws "is not a function" error it's because that 
function is not available when you call it. Available means browser hasn't 
loaded it, so either you don't have script files in correct order or a path to 
file problem

  jQueryUI site explains the order, path easy to check in browser.

  Priya wrote: 
hi i am getting this error when i was trying to use the jquery
datepicker widget.Can you please help me to solve this issue?

  


[jQuery] Re: 2 different ways of doing the same thing?



Did you test your two solutions?
Does the same thing?


- Original Message - 
From: "expresso" 

To: "jQuery (English)" 
Sent: Thursday, July 02, 2009 10:11 AM
Subject: [jQuery] 2 different ways of doing the same thing?




Would this not be 2 different ways to do the same thing?

$('input:not(:checkbox));

vs.

$('input').not(:checkbox);


[jQuery] Re: Problem accessing external iframe form values



if you know the ids of the elements you want to auto-fill you can try this

$("iframe").contents().find("#element_id").val("hello");

Slts.
- Original Message - 
From: "James" 

To: "jQuery (English)" 
Sent: Wednesday, July 01, 2009 12:17 PM
Subject: [jQuery] Re: Problem accessing external iframe form values



I believe that it's not possible, in general, as you said due to
security reasons.

On Jul 1, 12:17 am, skywalk3r  wrote:

Hi, I'm getting sick trying to solve this problem:

I have a web page A that loads another page B using an iframe (or an
object tag), the B page is an external page (it's not on my server)
and contains a form.

I want to be able to auto fill the form with pre-defined values. In
jquery i think it's impossible due to security reasons, somebody can
help me?!?!

I hope I explained the problem correctly, if you need more info just
tell me.
Thanks,


[jQuery] Re: How 2 Find Control



Hello,  suppose this markup


   
   


just do $("div#div_id input:text") to retrieve an array containing all the 
inputs and you are done


then, if you want to iterate it do

$("div#div_id input:text").each(function(){
   window.alert($(this).val());
});

Regards
- Original Message - 
From: "vipin" 

To: "jQuery (English)" 
Sent: Thursday, July 02, 2009 10:22 PM
Subject: [jQuery] How 2 Find Control




Hi all,

I am new in jquery.I have one problem.in my project i have a  and
in this div i have lots of textbox or input box (type :text). Can any
body give me some code to find these control  and get there value.

Thanks 




[jQuery] Re: Selectors question



I have not found another way to retrieve information from an iframe.

BTW, I see no problem using that sintax 

- Original Message - 
From: "smokinguns" 

To: "jQuery (English)" 
Sent: Thursday, July 02, 2009 3:07 PM
Subject: [jQuery] Selectors question




Hey all,
I'm new to jQuery and I have a  scenario:
I have a page that contains an iframe. The page in this iframe
contains  a table and the last column of every row has a textbox. Each
textbox has an unique id of the form tb_rowNum(tb_1,tb_2 etc.).  Each
row also has some hidden input elements. I'm accessing these textboxes
for processing. Right now, this is how I'm doing it:

[code]
var inputs=jQuery("#myiframe").contents().find('input[id*=tb_]');
for(x=0;x

[jQuery] Re: check/uncheck all checkboxes with specific id

Hi,

Charlie solution is very elegant

$("input[id^='chkEvent']").attr("checked","checked");

But I agree that you must use a class in your markup, so it it's the easier way

regards
  - Original Message - 
  From: Charlie 
  To: jquery-en@googlegroups.com 
  Sent: Tuesday, June 30, 2009 1:34 PM
  Subject: [jQuery] Re: check/uncheck all checkboxes with specific id


  definitely defer to experience. Question, have seen you mention attr() is 
broken,don't use it. I try to learn and absorb as much as possible from here

  Is it the performance of attr() or reliablity problem?

  Matt Kruse wrote: 
On Jun 30, 12:24 pm, "evanbu...@gmail.com" 
wrote:
  $(':checkbox.chkEvent').each(function() {
var el = $(this);
el.attr('checked', el.is(':checked') ? '' :
'checked');
  })

Avoid attr(), and try to avoid fitting every problem into a jQuery
solution...

Try this simple code:

$(':checkbox.chkEvent').each(function() {
  this.checked = !this.checked;
}

I also keep my "run" plugin handy for simple things like this:

// A General "run" function to simplify coding
$.fn.run = function(fn) {
if (typeof fn=='string') { fn = new Function(fn); }
this.each(fn);
}

Then:

$(':checkbox.chkEvent').run("this.checked = !this.checked");

Whether that's actually more efficient to write depends on the
situation ;)

Matt Kruse

  


[jQuery] Re: checkboxTree Plugin



Good to know that there is a plugin for this..!!


- Original Message - 
From: "Matt W." 

To: "jQuery (English)" 
Sent: Wednesday, July 01, 2009 8:30 AM
Subject: [jQuery] checkboxTree Plugin




Hello Everybody,

I have rewritten and posted my jquery checkboxTree plugin that I
originally put out a year ago.  Tried to add features and options
people were asking for. Information can be found here:

http://floatmargin.com/2009/jquery-checkbox-tree-plugin-new-and-improved/

The github repository can be found here:

http://github.com/magearwhig/jquery-checkboxtree

-Matt W.


[jQuery] Re: select random div



As the returned html is not yet part of the document until you append it, 
you cannot use jquery to parse

it.

You will need to parse the string returned by the server, or append to a div 
and then make all

your stuffs..


- Original Message - 
From: "zendog74" 

To: "jQuery (English)" 
Sent: Monday, June 29, 2009 10:14 PM
Subject: [jQuery] select random div




I am using the periodic updater plug-in to make an Ajax call to grab
an HTML file that has many divs in it. I want to parse the returned
HTML and display a random div in a placeholder div on the page. I am
stuck on how to select out the random div from the returned HTML. Can
someone please lend a hand on this?

$(document).ready(function() {
   $.PeriodicalUpdater({
  url : '/common/inc/contentPieces.htm',
  method: 'get',
  minTimeout: 12000,
  maxTimeout: 15000
   },
   function(data){
  //select random div to show from returned data
  var totalDivs = $(data).children('div').size();
 var rand = Math.ceil(Math.random() *
totalDivs);
 /* THIS IS WHAT I AM NOT SURE HOW TO DO
*/
  $('#contentRefresher').html($(data).children("div:eq(" +
rand + "'"));
  $('#contentRefresher').show('slide', 'slow');
  $('#contentRefresher').effect('highlight', {color: '#fffacd'},
3000);
  });
   });


Returned HTML

Div 1
This is div 1


Div 2
This is div 2


Div 3
This is div 3
 




[jQuery] Re: Upload Image



Please visit http://www.phpletter.com/Demo/AjaxFileUpload-Demo/

Regards
- Original Message - 
From: "Sri" 

To: "jQuery (English)" 
Sent: Tuesday, June 30, 2009 9:35 AM
Subject: [jQuery] Upload Image




Hi Friends,
can we  upload image from clientside using jquery.
Please give suggestions.


[jQuery] Re: new plugin, gzoom v.0.1 magnifier



Very elegant, congrats and thanks for your contribution

- Original Message - 
From: "Giovanni Battista Lenoci" 

To: 
Sent: Tuesday, June 30, 2009 8:52 AM
Subject: [jQuery] new plugin, gzoom v.0.1 magnifier




Hi, I wrote my first plugin, you can find it here:

http://lab.gianiaz.com/jquery/gzoom/

Please report any bugs or consideration about it here... but be kind... 
I'm a newbie :-)


Bye

--
gianiaz.net - web solutions
via piedo, 58 - 23020 tresivio (so) - italy
+39 347 7196482 



[jQuery] Re: ul.nav a VS. .nav li > a



".nav li a"  is very different to ".nav li > a"

in the second statement (".nav li > a") only the anchors that are direct 
descendant of "li" elements will be chosen
in the first statement (".nav li a" ) every anchor will be picked, direct or 
indirect descendant


- Original Message - 
From: "brian" 

To: 
Sent: Tuesday, June 30, 2009 11:45 AM
Subject: [jQuery] Re: ul.nav a VS. .nav li > a




I can't speak for Sizzle but, if you'll only ever have one "nav"
element on a page, you're better off using an ID than a class.

On Tue, Jun 30, 2009 at 8:03 AM, north wrote:


Hi,

yesterday I read an article about jQuery performance. In one part the
author talks about selectors and uses

.nav li a

as an example. He states that before jQuery 1.3., the selector

ul.nav a

would have been the best way to get all links in the list. In jQuery
1.3., due to the inclusion of Sizzle,

.nav li > a

"should" be the best way. He doesn't mention any speed tests though,
and only briefly explains that the reason for this is Sizzle's way of
walking through selectors from right to left.

Can anyone confirm this "theory"?

Thanks! 




[jQuery] Re: Accessing window DOM through jQuery Core - can't get it to work



Hi,

When you open a window with window.open you are creating a totaly new 
document

so, you cannot manipulate it from your first window.

Sorry.
- Original Message - 
From: "mkmanning" 

To: "jQuery (English)" 
Sent: Wednesday, June 24, 2009 10:04 PM
Subject: [jQuery] Re: Accessing window DOM through jQuery Core - can't get 
it to work




You're opening a blank window; it has no DOM to manipulate (you'd have
to resort to document.write).

On Jun 23, 4:29 pm, ieatsleepsurf 
wrote:

Goal: From window A, I want to manipulate the DOM of window B, where
window B is the result of calling window.open().

My attempts are shown below, but Window B is never updated.

winRef = window.open("","Window B");

Try 1:
$(winRef).find("body").append("mr container");

Try 2:
$(winRef).find("body").html("mr container");

Try 3:
$(winRef.document.body).append("mr container");

Try 4:
$(winRef.document.body).html("mr container");

The jQuery Core doc (http://docs.jquery.com/Core/jQuery#elements)
claims that it can wrap a window object.
Browser is FF2.0

Any tip is greatly appreciated, even if "that's impossible". 




[jQuery] Re: .get() failing



Hello,

If you want to get files from another domain different than yours, it will 
fails ever..

Security issue..


- Original Message - 
From: "jhm" 

To: "jQuery (English)" 
Sent: Sunday, June 28, 2009 9:42 AM
Subject: [jQuery] Re: .get() failing



Thank you. That explains it very well, and kind of what I expected.


On Jun 26, 12:13 pm, Zbyszek Matuszewski
 wrote:

Hi!

Try to debug your application with Firebug extension for Firefox.

You should probably get "uncaught exception: Access to restricted URI
denied" error when trying to access URL that is on other server than
the one script is working on (if it's not local file).

If that is the case it's security issue - you should receive files
from the same server as the script works from. Accessing other server
is cross site reference and AJAX doesn't allow cross site references.

There can be at least 3 solutions:
- you may use wrong address of actual site (for example scripts starts
from some.server.com when there iswww.some.server.comdomain), so you
should repair this (use relative URLs or make your server side
generate actual domain and put into script or make your client side
javascript get domain name from the actual URI)
- you may use some other server, so to do that you should write server
side code (for example with use of sockets in PHP) that will connect,
get XML and send it to your script (will work as a proxy, so the AJAX
call will be within same domain)
- you may try to make an IFRAME dynamically (hidden one) that will
load the data and then take the data from that IFRAME (very unclean
solution, but it should work, there are some well known scripts that
use similar approach to make an AJAX file uploader).

On 26 Cze, 20:19,jhm wrote:

> I posted this late last night, but got no responses. I thought maybe
> it scrolled off before anyone had a chance to see it, so I'm posting
> again. Sorry if this is bad form, I'm new to these groups...

> I'm having an issue with the $.get() method. When I request a file
> local to my site (with a relative path), everything works fine. When I
> request the same file with a full URL, the $.get() isn't successful. I
> don't know if its a security issue (requesting data from a 3rd party
> site) or maybe a timing issue, or maybe something else.

> Here's the essence of the call when it fails:

> $.get('http://files.myurl.com/myxml.xml', function
> (data) {
> alert('got it');
> }

> If I call it with just the 'myxml.xml' as the path, it works fine.

> Thanks! 




[jQuery] Re: (Validate) multiple groups of checkboxes



Hello there..

You can check the num of checked elements

$(":selected").count() 


You can do this for every group you have.

Do yo have any working sample to show?

- Original Message - 
From: "Maged Makled" 

To: "jQuery (English)" 
Sent: Monday, June 29, 2009 11:16 AM
Subject: [jQuery] (Validate) multiple groups of checkboxes




Hey All,
I have 30 groups of checkboxes and want to validate that
the user select at least one checkbox from any group meaning if he
selected one checkbox from the first group and nothing from the other
29 the form should be valid. I tried different solutions but none
worked.

Can anybody help

Thanks

-Maged Makled


[jQuery] Re: jquery tabs (ajax tabs with a form submit)



Hi,

You are posting to the wrong group.

There is a group for jquery.ui where you can get faster answers 
http://groups.google.com/group/jquery-ui?hl=en


Best Regards


- Original Message - 
From: "psycho_gamer" 

To: "jQuery (English)" 
Sent: Tuesday, June 23, 2009 5:30 PM
Subject: [jQuery] jquery tabs (ajax tabs with a form submit)




Hello,

I am incredibly new to the world of jquery.

What I am trying to do is create tabs (using the tabs plug-in) that
load dynamic content via AJAX (so it makes a call to a jsp).  What
this does is this loads a new part of a form.  What I want to do is
when the user clicks on a new tab, I also want to submit the data that
was in the original form.  I wanted to do this with one request (i.e.
the request does the save, then loads up the new content).

However, I have no idea how to do this. Any help would be greatly
appreciated.





[jQuery] Re: JQuery & Cookies



Hi there,

There is a plugin for that.. Check this out 
http://plugins.jquery.com/project/Cookie


Regards
- Original Message - 
From: "craigeves" 

To: "jQuery (English)" 
Sent: Tuesday, June 30, 2009 2:36 AM
Subject: [jQuery] JQuery & Cookies




I would like to apply a cookie to this script so that I can return to
the page at a later date and it would remember my last action. Can
anyone help? Thanks in advance.


 $(document).ready(function(){
   $(".close").click(function () {
 $("#welcome").fadeIn("slow");
  });

  $(".show").click(function () {
 $("#welcome").fadeOut("slow");
 });

   $("a.toggle").click(function () {
 $("a.toggle").toggle();
   });

 });

[jQuery] Re: Selecting the first of two td's in a tr

Great to follow this thread...

Very concise and elegant jQuery code!! thanks
  - Original Message - 
  From: Charlie 
  To: jquery-en@googlegroups.com 
  Sent: Wednesday, June 24, 2009 1:02 PM
  Subject: [jQuery] Re: Selecting the first of two td's in a tr


  actually i  learned how to add the (..., this)  from another post on this 
list

  i struggeled at first learning how to use "THIS"  when creating a selector

  I always wanted it to work like a parent child regular selector and kept 
trying a lot of things like:
  $(this "li").hide();

  or $((this)."li").hide()

  or $("(this) li").hide()

  of course none of the variations worked. Finally when find(), or children() 
sunk in it was far more intuitive. Then recently when $("selector",this) came 
up I realized it saved a bit more virtual ink. >From a chaining perspective 
it's easier to read the extra step of find() or children() and that is likely 
why don't see it in docs much


  Matthew wrote: 
Sweet, thanks Charlie...

Charlie, how did you find out about: $("td:first",this)?  In the
jquery docs i havent seen the ",this" I'm assuming that adding that
filters out the first td of each tr, I'd be interesting in knowing
more about how to filter things. Looks like I could make most of my
code way more efficient.

On Jun 24, 11:35 am, MikeyJ  wrote:
  No prob! Looks like you are real close to what Charlie just posted
that works great, except that it applies to every table on the page.
Once I added the table id it was perfect!

$("table#mytableid tr").each(function() {
  $("td:first",this).attr("align","right");

});

On Jun 24, 11:31 am, Matthew  wrote:

sorry about the error, replace "break;" with "return false;" Yeah,
ignore the last code then. Try this, I'm trying to find a way of doing
this cleanly so I guess we are both learning together haha
  $("table tr").each(function(){
 $(this).children(":first").attr("attribute","value");
  });
  On Jun 24, 11:14 am, MikeyJ  wrote:
  Looks like your first two offerings throw this error in Firebug:
"unlabeled break must be inside loop or switch"
Your last example works but it only works on the first TR and it
affects both TD's in that TR. ??
On Jun 24, 10:59 am, Matthew  wrote:
yeah haha let me re-do:
  $("table#id tr:first-child").each(function(){
   $(this).attr("attribute","value");
  });
  try that. I am thinking that the tr:first-child should return the TD
for every TR in the table. Im not sure how this will work if you have
nested tables. I'm at work so I cant spend the time to test the code
before hand.
  On Jun 24, 10:50 am, MikeyJ  wrote:
  Thx Matthew! Great explanation.
I probably should have worded one thing a bit differently...I'd like
to set this attribute for "the first TD in each TR for EVERY TR in an
entire table". I'm sure this changes things a tiny bit?
Mike
On Jun 24, 10:43 am, Matthew  wrote:
when you use this code $("tr td") it would create an array of all
those td's in the tr. So then we just need to cycle through the first
two and set the attribute then break the cycle.
  var counter = 0;
$("tr td").each(function(){
   $(this).attr("attribute","value");
   counter++;
if(counter > 1) { break; } // after the first two td's stop
the iteration through all the td's.
  });
  You can be more specific with what tr you use or you could use a 
table
with a certain class or id:
  $("table.class tr td").each(
  hope this helps.
  On Jun 24, 10:26 am, MikeyJ  wrote:
  Hi All,
I'd like to set the align attribute of only the first TD in a 
TR for
an entire table but am not sure how to address them all in one go.
Probably an Nth child thing or similar but not sure!
Thx,
Mike

  


[jQuery] Re: jquery ajax



I can't see the reason to not

- Original Message - 
From: "gigamike" 

To: "jQuery (English)" 
Sent: Wednesday, June 24, 2009 1:58 AM
Subject: [jQuery] jquery ajax




Hi,

Is it possible to call a http url for ajax query i.e.

$(document).ready(function(){
$.ajax({
   type: "GET",
   url: "http://www.domain.com/mypage.php";,
   data: "site_id=" + site_id,
   success: function(tags){
$("" + tags + "").appendTo("body");
   }
});
});

Seems like url: "http://www.domain.com/mypage.php";, is not allowed coz
it doesnt echo/display any coming from http://www.domain.com/mypage.php

Thanks in advance,

Mike


[jQuery] Re: Rond Corners Question....



Corners Plugin?

AFIK it works with the most used browsers

- Original Message - 
From: "Erik R. Peterson" 

To: 
Sent: Tuesday, June 23, 2009 12:15 PM
Subject: [jQuery] Rond Corners Question




Hi Guys!

Is the Round Corners script with Jquery worth using?  Does it really  
work with all browsers?  Does is need tweeking from the original  
install?


Any opinions out there?

Erik


[jQuery] Re: how to ask questions



Take it easy man... We all read all the posts, maybe no one knows what you 
are asking for.


But, tell me what is your question, maybe I can study it a little further..

Regards
- Original Message - 
From: "shaded" 

To: "jQuery (English)" 
Sent: Wednesday, June 24, 2009 9:10 AM
Subject: [jQuery] how to ask questions




ok , ive posted about 6 questions in this group since i joined and not
one has answered. not even an attempt.

I've seen question, both easier and more difficult that mine being
answered.  Am i asking in the wrong way? Is there something im
forgetting to include?

what can i do to make my question more likely to be answered? 




[jQuery] Re: dataset load



jQuery(document).read(...);

this just ensure all dom is completed loaded, so doesn't wait to images, etc 
to be

in the document.
You can make your ajax call here.

- Original Message - 
From: "GRaC" 

To: "jQuery (English)" 
Sent: Monday, June 22, 2009 10:10 AM
Subject: [jQuery] dataset load




My first question and a possible n00b question...
I wanna preload a asp.net dataset by firisng a webservice without
waiting for the document to complete load ... Images etc I know it
will need ajax call... Can xome someone here kindly walk me through
the steps to do this ? 




[jQuery] Re: Click events handling conflict due to prototype?


Use jQuery and not $

- Original Message - 
From: "Steve the Canuck" 
To: "jQuery (English)" 
Sent: Monday, June 22, 2009 10:34 AM
Subject: [jQuery] Re: Click events handling conflict due to prototype?



Btw... I do have a workaround - register my click event on something
outside the table, such as the body tag, and then check the original
event target.  I'd prefer to target just the list item and anchor
though if possible.

On Jun 22, 11:14 am, Steve the Canuck  wrote:
> Hi,
>
> I have a simple list inside a table
>
> 
> 
>  linkindex="18">Cancel
> 
> 
>
> I have a ready event handler for click events on the anchor:
>
> $j('.cancel_posting').click( function(e) {
> if (!confirm("Are you sure you want to cancel this booking?")) {
> e.preventDefault();
> }
> });
>
> However, this event doesn't seem to fire because the table has some
> prototype controls inside it.
>
> If I just copy the list outside the table as a test, it seems like the
> event handler works fine.
>
> I am using jquery for all my own code, but some widgets from my PHP
> framework (symfony) are built in prototype, so I've been using both to
> some extent.
>
> Any ideas about how I can rectify this?
>
> Thanks!
> Steve


[jQuery] Re: jquery-ui dialog and ajax issues updating from 1.2.6 to 1.3.2


I had the problem too..

You must to update jquery and ui too

- Original Message - 
From: "James" 
To: "jQuery (English)" 
Sent: Monday, June 22, 2009 12:18 PM
Subject: [jQuery] Re: jquery-ui dialog and ajax issues updating from 1.2.6 
to 1.3.2



When you update jQuery to 1.3+ from an older version, you also have to
update your UI library to 1.7+ because jQuery 1.3+ is not compatible
with older versions of jQuery UI.

On Jun 22, 5:25 am, Etienne Robillard 
wrote:
> Hi,
>
> I'm using jquery-ui 1.6 custom build with jquery 1.2.6 trying to
> set up a dialog window. Unfortunately I can't update to 1.3.2 since this
> would trigger some unexpected XHR-related bugs like the following:
>
> Exception ``TypeError: M.xhr is not a function'' thrown from function
> anonymous(M=Object:{12}) in
> 
>
> So I'm sticking with the 1.2.6 build, which works fine despite a
> minor/not-critical XHR issue:
>
> Exception ``TypeError: s.accepts is undefined'' thrown from function
> anonymous(s=Object:{12}) in
> 
>
> Notice that this error is reported in FireBug/Venkman, however Firefox
> doesn't seem to care and let the XMLHTTPRequest to execute successfully.
>
> The code for the dialog window is given below. I don't seem to
> understand why posted data cannot be shown on the dialog box twice.
>
> Moreover, it will display it as I want on the first $.post request but
> any additional requests triggered with a click event don't show any
> updated data on the dialog box. Venkman reports that the anonymous
> callback function manages to obtain the updated data, but still nothing
> get shown on the dialog, just an empty div... ;-)
>
> Any help or advices for debugging this issue?
>
> Best regards,
> Etienne
>
> This is the script that gets evaluated by jQuery (using $.get(...)). A
> json object is returned by the server either containing form validation
> errors or a result object that contains simple strings.
>
> 
> $(function(){
>
> $('#'+'formControlBtn').bind('click', function(){
> //send the form with a ajax request. on success,
> //return a "comment" preview.
> var formData = $('#'+'commentform').serialize();
>
> //one-liner to remove old error messages before posting a new comment
> $('p.error').each(function(){$(this).remove()});
>
> $.post('comment', formData, function(json) {
> var result = json.errordict || json.comment;
>
> if (result == json.comment) {
> // Look for the comment preview..
> // Display a pop-up window (dialog) with the comment preview
> // in HTML. By clicking on "OK" or "Save" the user has no more
> // undo chances and the comment will be made.
> var commentHTMLDialog = $('
class="ui-dialog ui-widget ui-content"><\/div>'); > > // Set a title > $(commentHTMLDialog).attr('title', 'Preview comment'); > > // Setup default dialog constructor options > $(commentHTMLDialog).dialog({ > autoOpen: true, > bgiframe: false, // must keep this for IE6? default = > 'dont care' > width: 500, > modal: true, // prevent reposting while the dialog > is enabled > dialogClass: 'generic', > height: 400, > overlay: { > backgroundColor: '#000', > opacity: 0.5 > }, > buttons: { > "It's all good, add my comment please." : function() { > $(this).dialog('close'); > }, > Cancel: function() { > $(this).dialog('close'); > } > }, > open: function() { > // Constructor to define what to do when opening > // the dialog widget > var commentHTMLBody = $("
    id='commentHTMLBody'>
"); > $(commentHTMLBody).prependTo($(commentHTMLDialog)); > for (var x in result) { > // create the "template" on the fly > $('
  • '+x+': > '+result[x]+'<\/li>').appendTo('#'+'commentHTMLBody'); > }; > > } //open > }); > > $(commentHTMLDialog).dialog('open'); > return false; > //$('#'+'commentForm').html('Thanks for your input!'); > } else { > // found some validation errors > for (var x in result) { > $('

    '+''+x+': > <\/b>'+result[x]+'<\/p>').appendTo('#'+'commentForm'); > }; > }; > }, "json"); > return false; > });}); > > > > -- > Etienne Robillard > Green Tea Hackers Club > Blog: > PGP Fingerprint: AED6 B33B B41D 5F4F A92A 2B71 874C FB27 F3A9 BDCC


  • [jQuery] Re: Had to add a few lines to 1.2.3 core file (fix IE7 and "invalid argument" for .attr method)

    
    HI!
    Last month i'd the same problemI mixed tabs with splitters and (in
    ie6) had errors in this exactly line...
    I worked with jquery v1.1.3.
    
    the link of the thread is...http://groups.google.com/group/jquery-en/
    browse_thread/thread/4dfd1f49e97ca381?hl=en
    Now I am going to prove your solution and then you comment
    
    bye!
    Cesar.
    
    
    On Apr 3, 1:40 pm, MorningZ <[EMAIL PROTECTED]> wrote:
    > I can't seem to find any talk/reference on this exact error, but in
    > the jQuery core file at line 1298 (inside the "attr" function)
    >
    > the line
    >
    > 
    > elem[ name ] = value;
    > 
    >
    > was throwing an error in IE7, preventing some other script-related
    > things from working
    >
    > Using both Visual Studio 2008 (to debug IE) and Firebug (to follow
    > along what was happening in FF)
    >
    > turns out "NaN" and "NaNpx" were respectively being passed into this
    > function from two plugins i am using ("ui.datepicker" and "clickmenu")
    >
    > Saw that value come through in FF, and the browser just ignored it
    > but when that value came down in IE7, its much worse as it throws a
    > script error  in the case of trying to "close" the Datepicker,
    > this error prevented that close action from taking place, in the case
    > of the menu, it was able to get by it and still work (but still
    > presented the yellow alert in the bottom left of IE)
    >
    > Anyways, i added a few lines to the core, so that it is now like:
    >
    > 
    > var FixedValue = "" + value;
    > if (FixedValue.length >= 3 && FixedValue.substr(0,3) == "NaN") { value
    > = ""; }
    >
    > if ( value != undefined )
    >   elem[ name ] = value;
    >
    > return elem[ name ];
    > 
    >
    > And now my menu works without throwing the error and, more
    > importantly, the DatePicker closes properly
    >
    > I guess my questions to the group are:
    > 1) Has anyone seen this error from either of these plugins in IE7?
    > 2) Think my 'fix' is low impact enough that I shouldn't worry about
    > other things getting affected?
    >
    > btw, even this super stripped down page displays the error here on IE7
    >
    > 
    > http://www.w3.org/1999/xhtml";>
    > 
    > Date Pick
    > 
    >  rel="stylesheet" type="text/css" />
    >  type="text/javascript">
    >
    > 
    > $(document).ready(function() {
    > $(".Date").datepicker();
    > });
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    
    

      1   2   >