[jQuery] Re: Unknown pseudo-class or pseudo-element 'odd'.

2009-11-20 Thread pierre
I'm seing the same behaviour on FF3.5.5 Windows with the example page
above or with my test page (I'm using :visible selector). I also use
jquery 1.3.2.
I actually get it on the document page on jquery.com:

Warning: Unknown pseudo-class or pseudo-element 'visible'.
Source File: http://docs.jquery.com/Selectors/visible
Line: 0


[jQuery] Re: Maybe Jquery ? Bug with firefox 3.5

2009-09-07 Thread Pierre Bellan
Hello,

I'll restart this subject because our problem still exists.

Deactivate the jquery solve the problem, so we think that's maybe a link
between the javascripts we have in our website.

In the following page : http://www.lequipe.fr/Experts/index.html, we can
trigger the rerender event by change the content of a div via the link on
LES DERNIERS POST
LES + COMMENTES

We find that if we remove the javascript's code of googlesyndication , the
rerender dissapears.
But in the Home page, the same procedure doesn't had the same result and we
had to remove another block that contain a document.write('

> Hi all,
>
> I don't know if it's a bug in jquery but some of you can have encounter the
> same problem with their website.
>
> Recently, we had changed our website ( http://www.lequipe.fr ) using the
> jquery 1.3.2 version.
>
> With the last version of Firefox ( 3.5.2 ), the site is render twice during
> the loading.
> We can't isolate which element can produce this problem and it happens only
> with the firefox 3.5 ( not in 3.7pre or 3.0.12, not in ie, etc... )
> We load some js from external source ( facebook, googlesyndication, etc...
> )
>
> If someone would have a clue on this problem, i would appreciate him.
>
> Thanks
>
> Pierre
>


[jQuery] Re: sending form’s button’s value

2009-08-20 Thread Pierre Bellan
Hello,

i don't use this method to send my datas, but in my opinion, the value of
the element of type button is not get by the serialize method.
If you want to send the value of the button click, you can add that after
the serialize.
As you have a method by button, this works ;)

data:
$(this).closest('#REQUESTFORM').serialize()+'&respond='+$(this).attr('value'),

Maybe val() works on button too, but i'm not sure

Pierre

2009/8/19 efet 

>
> User's data posted once user click either of buttons with same
> name="respond" different values "Confirm" and "Ignore". My problem
> here, button's values are not posted when I use jquery as in the
> following codes. Is there a way to fix this?
>
>
>$("[name='respond']").live('click', function() {
>$.ajax({
>type: "POST",
>data: $(this).closest
> ('#REQUESTFORM').serialize(),
>url: "content/requests/index.cs.asp?
> Process=RespondRequests",
>success: function(output) {
>alert(output);
>//$(this).closest('#REQUESTFORM').html
> (output);
>},
>error: function(xhr){
>alert('Request Status: ' +
> xhr.status + ' Status Text: ' + xhr.statusText + ' ' +
> xhr.responseText);
>}
>
>});
>});
>
>
>
> name="REQUESTID" value="<%=objRequests("REQUESTID")%>">
> name="BYID" value="<%=objRequests("BYID")%>">
> name="TOID" value="<%=objRequests("TOID")%>">
> name="respond" value="Confirm" class="btn_confirm" />
> name="respond" value="Ignore" class="btn_ignore" />
>
>


[jQuery] Maybe Jquery ? Bug with firefox 3.5

2009-08-19 Thread Pierre Bellan
Hi all,

I don't know if it's a bug in jquery but some of you can have encounter the
same problem with their website.

Recently, we had changed our website ( http://www.lequipe.fr ) using the
jquery 1.3.2 version.

With the last version of Firefox ( 3.5.2 ), the site is render twice during
the loading.
We can't isolate which element can produce this problem and it happens only
with the firefox 3.5 ( not in 3.7pre or 3.0.12, not in ie, etc... )
We load some js from external source ( facebook, googlesyndication, etc... )

If someone would have a clue on this problem, i would appreciate him.

Thanks

Pierre


[jQuery] Re: Question about 'ready' event

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

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

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

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

Pierre

2009/6/12 Bernad 

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


[jQuery] Re: remove one element in an array

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

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

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

2009/6/12 fabrice.regnier 

>
> Hi all,
>
> When i click once on a button, i create one picture on the fly. And so
> on. It works ok.
>
> Then, using livequery, when i click on one of the all created
> pictures, i would like to see it removed. But it appears that only the
> first pic is removed (since all have the same name).
>
> What is my mistake ?
>
> regards,
>
> f.
>
> 
>
> $("#IdButton").click( function() {
>  var pic=" images/icone_ko_small.png\"/>"
>  $(this).before(pic);
> });
>
> $("#IdPicture").livequery('click', function(event) {
>$(this).remove();
> });
>
> 
>
> 
>


[jQuery] Re: click function on anchor element

2009-06-11 Thread Pierre Bellan
Hi,
I think that is because of the alert function.
It needs a string and maybe for an anchor object, jquery introduces a
toString method.

With the console of firebug, there are no differences between anchor and
images

Pierre


2009/6/11 bensan...@gmail.com 

>
> Hi all,
>
> I'm confused as to why when I have:
>
> $('a').click(function(){
> alert(this);
> return false;
> });
>
> the alert displays the URL defined in the href attribute, and not an
> object.
>
> Yet, if i call like say an image, it returns the object.
>
> Thanks
> ben
>


[jQuery] Re: notify/update client when change on the server

2009-06-11 Thread Pierre Bellan
Hi,
I don't think so.
Because the web is based on a client/server disconnected architecture, after
sending content, the server forgot the client.
The client must send request to know if there are updates.

To do this in a more efficient way, you must reduce the process time on
server.
For example, you can store a value on text-plain file to indicate if an
update is necessary. In this way, your database wouldn't blow up if your are
20 peoples on your chat room

Pierre


2009/6/11 ch2450 

>
> Hi all,
>
> I'm trying to implement a simple chatting website.
> For now what the code does is checking every 10 seconds if there are
> new posts stored in the database (newer than the last check, 10
> seconds ago).
> Is there a more efficient way than doing this with a timer??? for
> example, is there some kind of event listener attached to the server
> that would notify the client whenever the db is updated?
> Thanks for your help,
> Clem.
>


[jQuery] Re: Need to move selection from one box to another box

2009-06-10 Thread Pierre Bellan
Nowadays, the web is "2.0", so you can use a drag and drop system, which is
more ergonomic for your users.

Check the jquery-ui project ( http://jqueryui.com/ ), there are some example
that correspond exactly to your problem.

Pierre


2009/6/10 webspee...@gmail.com 

>
> Hey all.
>
> I'm looking to create a screen where there's a box on the left and a
> box on the right. The left box contains names which can be moved to
> the box on the right.
>
> Between the two boxes will be two buttons, one labeled ">>" to move
> from left to right and the other labeled "<<" to move from the right
> to the left.
>
> I've seen this many times but need to create one myself.
>
> At first I was thinking of using selection lists with a size of 20 to
> give it height and also set the width. Then, when a selection is
> highlighted, the user can click the buttons in the middle to move the
> selection from one box to the other. Using a selection list gives me
> access to each individual selection and on the click of the button, I
> can remove that selection from one list and append it to the other.
>
> The problem with this approach is that the grayed out scrollbar is
> visible. So, I was thinking of using a textarea and that is what
> brought me here. Does anyone know of such a tool before I try
> reinventing it?


[jQuery] Re: :eq versus eq()

2009-06-10 Thread Pierre Bellan
With the traversing method, you can match a set of elements then select, for
example, the third one
$('.myclass,#myid').eq(2)

I didn't use the traversing method but i think that is one of possible usage

Pierre

2009/6/10 Maujor 

>
>
> According jQuery documentation  [1][2]
> :eq returns Array  and eq() returns one jQuery object.
> What does means "Array "? It is a single element?
> By the other hand eq() => "Reduce the set of matched elements to a single
> element."
> So, both returns a single element and it seems to me that there isn't any
> difference between :eq and eq().
> Is one faster than the other?
> Why are there two sintaxes to achieve the same task? Or am I missing
> sometghing?
>
> [1] http://docs.jquery.com/Selectors
> [2] http://docs.jquery.com/Traversing
>
> -
> Maurício Samy Silva
> --
> View this message in context:
> http://www.nabble.com/%3Aeq-versus-eq%28%29-tp23962849s27240p23962849.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


[jQuery] Re: Removing Single Option from Select

2009-03-27 Thread Pierre Bellan
Hi,
you select your select :

$('#myselect');

then u find the option with the value -1 :

$('#myselect').find('option[value=-1]')
or
$('#myselect option[value="-1"]');

finally you removed it
$('#myselect option[value="-1"]').remove();

Pierre

2009/3/27 iceangel89 

>
> How can i remove a single option (with value -1, if possible) from a
> select?


[jQuery] Re: wait end of slideUp()

2009-02-14 Thread FCY-Pierre


Hi,

The slideUp effect has a callback function.
It was called when the animation is complete.

So, this code should works

$('#myDiv').slideUp('slow',function(){$('myTopDiv').addClass('myclass');});

pierre

Alain Roger a écrit :

Hi,

i have 2 divs (one on the top and one below).
when user click on top div, the bottom div is SlidingUp slowy and the 
top div class should change.
this works well, but to make it perfect i would like to be sure that 
my bottom div is completly slided Up before to change class of my top div.


how can i do that ?
thx

--
Alain
---
Windows XP x64 SP2 / Fedora 10 KDE 4.2
PostgreSQL 8.3.5 / MS SQL server 2005
Apache 2.2.10
PHP 5.2.6
C# 2005-2008





[jQuery] Re: The last script on ready function

2008-11-25 Thread Pierre Bellan
I'm not sure of that.

In the doc of the ready event, it says

Please ensure you have no code in your  onload event handler,
otherwise $(document).ready() may not fire.


Rodney Dangerfield  - "I looked up my family tree and found out I was the
sap."

2008/11/25 ricardobeat <[EMAIL PROTECTED]>

>
> You can also run it on page load (as opposed to DOM ready):
>
> $(window).load(function(){
>
>   // scripts to run after page load here
>
> });
>
> - ricardo
>
> On Nov 25, 8:08 am, "Pierre Bellan" <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > Put it at the very bottom of your page.
> > $(document).ready are executed in LILO order.
> >
> > I think that's the only thing it which always works.
> >
> > Pierre
> >
> > Rodney Dangerfield  - "I looked up my family tree and found out I was the
> > sap."
> >
> > 2008/11/25 MarcelloP <[EMAIL PROTECTED]>
> >
> >
> >
> > > Hi all!
> > > Please, I'm in the need to run a script at the very end of a page
> > > loading. Actually my page runs several script in $(document).ready
> > > function, so I know that these are queued to run one after the others
> > > when the page is loaded. But I must run a single script as the last of
> > > all, how can I do a such things?
> >
> > > Thanks in advance
> >
> > > Marcello
>


[jQuery] Re: find table rows that contains text

2008-11-25 Thread Pierre Bellan
Hi,
I think you must use the filter function.
I made this little test :

var mySearch = '63';
$('table tr:contains("'+mySearch+'")').filter(function(){
if ($.trim($(this).text()) == mySearch ) {
return true;
}
else{
return false;
}
});

The text() method removes all html tags, very useful here. The trim()
function was a jquery addon, very useful too

Pierre

Samuel Goldwyn  - "I'm willing to admit that I may not always be right, but
I am never wrong."

2008/11/25 Sridhar <[EMAIL PROTECTED]>

>
> Hi,
>
>   I am trying to get a reference to a table row that contains an
> exact match of a text. But I am getting more than one row. can you
> please help me? Following is the html table structure and the jquery
> script.
> -- html
> 
>   
>   063
>   
>   
>   63
>   
> 
>
> -- script
> var rows = $('table tr:contains(' + "'" + '63' + "'" + ')');
>
> as you can see, both the rows contain text 63. But I want to get the
> reference to second row since that contains the exact match. How would
> I do that?
>
> Thanks,
> sridhar.
>


[jQuery] Re: Doing Ajax call to a page that requires authentication

2008-11-25 Thread Pierre Bellan
Hi,
If the authentification is form-based, then the login credentials is passed
by GET or POST.
So you just have to add it to your ajax request

see the data option.

$.ajax({
   type: "POST",
   url: "some.php",
   data: "name=John&location=Boston",
   success: function(msg){
 alert( "Data Saved: " + msg );
   }
 });


If the authentification is based on .htaccess, you can use username/password
option

Pierre

W. C. Fields  - "I cook with wine, sometimes I even add it to the food."

2008/11/25 TheBlueSky <[EMAIL PROTECTED]>

>
> Hi everyone,
> How can I send login credentials with jQuery Ajax request (get(), post
> () or ajax()) when the page I'm requesting is asking for them before
> permitting the access.
> Note here that I'm not talking here about form-based authentication.
> Thanks in advance.
>


[jQuery] Re: The last script on ready function

2008-11-25 Thread Pierre Bellan
Hi,

Put it at the very bottom of your page.
$(document).ready are executed in LILO order.

I think that's the only thing it which always works.

Pierre

Rodney Dangerfield  - "I looked up my family tree and found out I was the
sap."

2008/11/25 MarcelloP <[EMAIL PROTECTED]>

>
> Hi all!
> Please, I'm in the need to run a script at the very end of a page
> loading. Actually my page runs several script in $(document).ready
> function, so I know that these are queued to run one after the others
> when the page is loaded. But I must run a single script as the last of
> all, how can I do a such things?
>
> Thanks in advance
>
> Marcello


[jQuery] Re: set default action for all links

2008-11-21 Thread Pierre Bellan
Hi,

I don't know what lightbox is but it's not important.
Like you said, you just need an selector for all links.

$('a').click(function(){
myUrl = $(this).attr('href');
openLightbox(myUrl);
});

I think this code works, but i have not test it.

Pierre

Yogi Berra  - "I never said most of the things I said."

2008/11/21 EC <[EMAIL PROTECTED]>

>
> Hi, i would like to know if is possible to set a default action for
> all href in a page...
>
> I know i can use selectors to find all href but i don't know what to
> put in function.
>
> I just would like that all link open in a lightbox...
>
> Someone can help me?
>
> Thanks
>


[jQuery] Re: NEWB ALERT: Why when calling a pre-existing function from .click() is it executed on page load?

2008-11-21 Thread Pierre Bellan
Hi,

In your code, i think you call the function. You only need to put the name
of the function.
The code you wrote execute the function quickSearch then put the result as
the name of the function to bind to click

Like this :
$("#qSearchBut").click(quickSearch);

Pierre

Lily Tomlin  - "The trouble with the rat race is that even if you win,
you're still a rat."

2008/11/21 .mini.moke <[EMAIL PROTECTED]>

>
>
> Hi there,
>
> I'm pretty new to JQuery.  I have a couple of elements that need to call
> the
> same function so my code looks like this:
>
> $("#qSearchBut").click(quickSearch());
>
> Pretty simple I thought.  But this call executes the quickSearch() function
> on page load.  What fundamental thing am I overlooking?
>
> Thanks in advance
>
> Amanda
> --
> View this message in context:
> http://www.nabble.com/NEWB-ALERT%3A-Why-when-calling-a-pre-existing-function-from-.click%28%29-is-it-executed-on-page-load--tp20622218s27240p20622218.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


[jQuery] Re: How to add html do a div properly? (html(), val(), or text() ?)

2008-11-19 Thread Pierre Bellan
Hello,

val() is for the form element ( input, select ), to get/set the value

html() is what i use to add small html inside an element.
I use the append method when the html to add is huge.

i have never used the text() method. I understand that the text() method is
like a php:strip_tags function for getting the value and php:html_entities
for setting.

Pierre

Fred Allen  - "An associate producer is the only guy in Hollywood who will
associate with a producer."

2008/11/19 ginko100 <[EMAIL PROTECTED]>

>
> Hello,
>
> what's the difference between:
> html();
> val();
> text();
>
> what's the best way to add html to a div??
>
> thanks.
>


[jQuery] Re: Rounding numbers

2008-11-19 Thread Pierre Bellan
Hi,

In javascript, you have the Math object. This is the perfect solution for
your problem

Bye
Pierre

Lily Tomlin  - "The trouble with the rat race is that even if you win,
you're still a rat."

2008/11/19 less than zero <[EMAIL PROTECTED]>

>
>
> Hi,
>
> Is there any way to round the value of a variable to the next decimal
> place?
> For the project I'm working on I need to round up the figure regardless of
> whether it is nearer to the lower value. e.g. 3. would become 4.
>
> Thanks for your help,
>
> R
> --
> View this message in context:
> http://www.nabble.com/Rounding-numbers-tp20583299s27240p20583299.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


[jQuery] Re: newbies question

2008-11-19 Thread Pierre Bellan
Hi,

With regular expressions you can simplify it :

For example,

if ( test1.match(/^[a-z]8$/) ) {
}

Pierre

Lily Tomlin  - "The trouble with the rat race is that even if you win,
you're still a rat."

2008/11/19 Alfredo Alessandrini <[EMAIL PROTECTED]>

>
> Hi,
>
>
> Can I simplify this if statement?
>
>
>  if (test1 == 'a8' || test1 == 'b8' || test1 == 'c8' || test1 == 'd8'
> ..
>
>
> I must select some values, the first is a letter and the second is a
> number (always the number 8: a8, b8, c8, d8, ecc..)
>
>
> Thaks in advance,
>
> Alfredo
>


[jQuery] Re: Tool tip advice

2008-02-22 Thread Pierre

You can try Simple Tooltip, for create simple and unobtrusive
tooltips :

http://www.pierrebertet.net/projects/jquery_simpletooltip/

It detects window borders, and has no limitations for design and
structure, because any element can be a tooltip.

The documentation is only in french for the moment, sorry :/


On 22 fév, 15:44, tlphipps <[EMAIL PROTECTED]> wrote:
> Are you asking for a plugin recommendation?  If so, I know the tooltip
> plugin (http://plugins.jquery.com/project/tooltip) detects the browser
> border and avoids it.
>
> On Feb 21, 3:08 pm, Mark <[EMAIL PROTECTED]> wrote:
>
> > Hey all,
>
> > the design team here has a grid/table layout, with each image in a
> > cell causing a tooltip style popup. Ok so, no worried so far, BUT, for
> > the last column, the tool tip flips it's orientation so it doesn't
> > display over the page border.
>
> > So image a 2x4 table, which images in each cell. Each image will have
> > the mouse over event to trigger the tooltip.
>
> > The tool tip itself has graphical borders with live text, just to make
> > things easier. I'm going to make the assumption that the tooltip
> > doesn't float, or folow the mouse, but rather it's in a fixed
> > position, which is relevent to the cell that has the image.
>
> > Any recommendations?


[jQuery] load a page, then use ajax to load html + script inside that page

2007-12-26 Thread Pierre

Hello all

I have a problem that has been discussed several times on this list,
but I could not find a satisfactory solution yet.

I created a regular html page. I have a onclick event which triggers
an ajax call. This ajax call runs a very simple php script on my
server, which returns some html as well as a little jquery call that
uses the preceding html. The problem is that the javascript is
evaluated before the html is loaded into the DOM, and it can't find
the html id it is supposed to manipulate.

Here is a simplified version of my code
page:

.
.

button

function displayAjax(data)
{
  $("#button").after(data);
}
$("#button").click(function(){
  $.post('ajax.php', '',function(data){displayAjax(data);});
});




ajax.php:
result

function test()
{
  alert($("#result").length);
}
test();
');
?>

So the problem is that the javascript is evaluated before #result
exists in the DOM.


Now I know that I can move my test function from ajax.php to the page
initiating the ajax call, but it doesn't really make sense, as this
piece of javascript is very specific to the html defined in ajax.php.

I also saw that some people on the list worked around that by using a
setTimeout, but honestly I'd rather not do that.

So, if someone knows how to do that the right way, please let me know.
Also, if what I am trying to do is downright impossible, let me know
too please.

Happy Holidays!!

Pierre


[jQuery] Re: jquery.com down?

2007-12-26 Thread Pierre

Seems like database issue (got a database timeout error when trying to
access the wiki). Worked the second time after a while tho

On Dec 26, 11:23 am, traunic <[EMAIL PROTECTED]> wrote:
> getting timeouts when attempting to go tohttp://jquery.com/