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

2009-08-06 Thread ggerri

The Dimensions plugin might help:

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

Regards
G

On Aug 5, 6:47 pm, ZedroS  wrote:
> hi
>
> we have just found out the issue.
>
> Let's say you have
> 
>   bla
> 
>
> Like this, $('#div').outerHeigth(true) won't care about the 
> margin. In fact, in just care about the row content
>
> If you switch to
> 
>   bla
> 
> then $('#div').outerHeigth(true) will include the margin of the div
>
> I can just guess the corresponding rules...
>
> ++
>
> On Aug 5, 5:39 pm, "Cesar Sanz"  wrote:
>
>
>
> > $("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- Hide quoted 
> > >text -
>
> - Show quoted text -


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

2009-08-03 Thread ggerri

I'd suggest a simple solution here. Notepad+ (http://notepad-
plus.sourceforge.net/de/site.htm) and Firebug Plugin for FF3.5 which
has a nice Debugger incluced.

You might also want to try Amaya by w3.org (http://www.w3.org/Amaya/
Amaya.html) if you're looking for more IDE like editor than  Notepad+.


On Aug 3, 2:37 am, "lists"  wrote:
> I believe that Aptana offers jQuery support.
>
>
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>
> Behalf Of S2
> Sent: Saturday, August 01, 2009 8:21 PM
> To: jQuery (English)
> Subject: [jQuery] Looking for a Good JavaScript Editor that Supports JQuery
>
> Does anyone know of a good JavaScript editor that supports JQuery?
> Anyone sucessfully integrate JQuery into Eclipse/WTP or JSEclipse?- Hide 
> quoted text -
>
> - Show quoted text -


[jQuery] Re: selector, second to last row of table

2009-06-17 Thread ggerri

Hi

just want to share my piece of code for getting out values of rows/
cells.


$('#myTableID tr:gt(1)').each(function(){
 $(this).find('td').each(function(){
// get the cell text out with $.trim($(this).text());
 });
 });


hope that helps
Gerald


On Jun 17, 7:08 pm, theprodigy  wrote:
> I think I have it working now. It does what it's supposed to, but
> doesn't really seem to me that it would be all the effecient, should a
> table have lots of rows (unlikely, but may happen).
>
> Here is my code:
>
> $('a.moveup').click(function(event) {
>
>         //Send request to server
>         var href = $(this).attr('href');
>         $.get(href);
>
>         //Update table to show new layout
>         var $thisRow = $(this).parents('tr:first');
>         var $thisTable = $('#main_table');
>         var $rows = $('#main_table tr');
>
>         $thisRow.next().insertBefore($thisRow.prev().prev());
>         $thisRow.insertBefore( $thisRow.prev().prev().prev());
>
>         $rows.each(function(){
>                 $(this).find(".moveup").show();
>                 $(this).find(".movedown").show();
>         });
>
>         $thisTable.find("tr:nth-child(2)").find(".moveup").hide();
>         $thisTable.find("tr:last").prev().find(".movedown").hide();
>
>         return false;
>
> });
>
> Can anyone think of a more efficient way to do this?
>
> Thanks,
>
> Paul
>
> On Jun 16, 8:34 pm, RobG  wrote:
>
>
>
> > On Jun 17, 3:46 am, theprodigy  wrote:
>
> > > I've been trying for a while to alter the second to last row of a
> > > table. I've tried several ways. The number of rows is dynamic so I
> > > can't hard code a number into nth-child. I used $rowNeeded =
> > > $thisRow.parents('table:first').children().children().length - 1 to
> > > get the second to last row, but it doesn't seem like I can pass this
> > > variable into nth-child either.
>
> > > How can I select the second to last row of a table?
>
> > In browsers compliant with the W3C DOM 2 HTML specification, table
> > elements have a rows collection that contains all the rows in the
> > table.  That collection has a length attribute, so, where - table - is
> > a reference to a table element:
>
> >   var rows = table.rows;
> >   var secondLastRow = rows[rows.length - 2];
>
> > Since rows is a live collection, you can get a reference once and keep
> > it, it will dynamically updated regardless of how many rows are added
> > or removed from the table.  Note that the above will error if there
> > are less than two rows in the table, use with care.
>
> > --
> > Rob- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: border-bottom in cells fails in FF but works in IE6 - arrgghh

2009-05-28 Thread ggerri


Ok, found the solution



table{  border-spacing: 0; }
   .top { border-top: 1px solid #000; color:#F0F; }
   .bottom { border-bottom: 1px solid #000; color:#F0F }   


thanks :-)

ps. check out the IE-Tab plugin for FF!



ggerri wrote:
> 
> Hi there
> 
> I know it must be simple but I'm just stuck here :,(
> 
> I have to ad a line between some rows, but not for the first col.
> 
> the table has:
> 
> table { border-collapse: collapse }
> 
> that is fix and I can not change it.
> 
> the following sample code draws the lines nicely in IE6 but in FF there's
> just nothing (also used color here, to see if the selectors are right):
> 
> 
> 
> Unbenanntes Dokument
> 
> 
>  table{ border-collapse: collapse; }
>  .top { border-top: 1px solid #000; color:#F0F }
>  .bottom { border-bottom: 1px solid #000; color:#F0F }   
>   
> 
> $(function()
> { 
>var vTRs =  $('[name=TABLE_1] tr').length;
>$('[name=TABLE_1] tr').each(function(i){
> switch (i) {
> case 2:
>
> $(this).find('td:gt(0)').addClass('bottom');
>   break;
> case 3:
>   // thought that might 
> help with collapse..
>   // 
> $(this).find('td:gt(0)').addClass('top'); break;
>   }
>   });
> }
>);
>
> 
> 
>   
> 
>   aaa
>   
>   
> 
> 
>   bbb
>   
>   
> 
> 
>   ccc
>   
>   
> 
> 
>   ddd
>   
>   
> 
>   
> 
> 
> 
> simple enough right? :confused:
> 
> Funny thing: When I do it without jquery and assign the classes right to
> the TDs, it works fine in both browsers...
> 
> Pleaaase enlighten me :confused::working:
> 
> Thanks a lot :-)
> Gerald
> 

-- 
View this message in context: 
http://www.nabble.com/border-bottom-in-cells-fails-in-FF-but-works-in-IE6---arrgghh-tp23756705s27240p23757235.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] border-bottom in cells fails in FF but works in IE6 - arrgghh

2009-05-28 Thread ggerri


Hi there

I know it must be simple but I'm just stuck here :,(

I have to ad a line between some rows, but not for the first col.

the table has:

table { border-collapse: collapse }

that is fix and I can not change it.

the following sample code draws the lines nicely in IE6 but in FF there's
just nothing (also used color here, to see if the selectors are right):



Unbenanntes Dokument


   table{ border-collapse: collapse; }
   .top { border-top: 1px solid #000; color:#F0F }
   .bottom { border-bottom: 1px solid #000; color:#F0F }   


$(function()
  { 
 var vTRs =  $('[name=TABLE_1] tr').length;
 $('[name=TABLE_1] tr').each(function(i){
  switch (i) {
  case 2:
 
$(this).find('td:gt(0)').addClass('bottom');
break;
  case 3:
// thought that might 
help with collapse..
// 
$(this).find('td:gt(0)').addClass('top'); break;
}
});
  }
 );
   



  
aaa


  
  
bbb


  
  
ccc


  
  
ddd


  




simple enough right? :confused:

Funny thing: When I do it without jquery and assign the classes right to the
TDs, it works fine in both browsers...

Any one not as dumb as me? :-D:working:

Thanks a lot :-)
Gerald
-- 
View this message in context: 
http://www.nabble.com/border-bottom-in-cells-fails-in-FF-but-works-in-IE6---arrgghh-tp23756705s27240p23756705.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Any jquery plugin to help in displaying popups (divs above everything)?

2009-05-11 Thread ggerri


what you need is:

http://jqueryui.com/demos/dialog/

Regards
Gerald


sandee...@adpsconsulting.com wrote:
> 
> 
> I am having to display some popup divs (some divs which appear when
> user clicks something) in my project. Now, I am facing numerous issues
> relating to positioning of the divs, making the div appear over
> everything etc. etc.  in different browsers. This has become a serious
> problem. I badly need a plugin if available. I have seen the thickbox
> plugin but that is not ecaxtly what I want. I want the plugin to be
> positioned wherever I want and the background should not deactivate.
> Please help me with anything you know.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Any-jquery-plugin-to-help-in-displaying-popups-%28divs-above--everything%29--tp23480947s27240p23483024.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: UI Dialog: how to remove the title and the X?

2009-04-03 Thread ggerri

Solved! Thanks a lot Richard for your time and help :-)

Would be nice to have two more dialog options title y/n, closer (x) y/
n in a future release- what do you think?

Take care and regards from sunny Switzerland
Gerald

On Apr 2, 6:08 pm, "Richard D. Worth"  wrote:
> You can hide it with css:
>
> .ui-dialog-titlebar { display: none; }
>
> If you want to scope it to a specific class of dialogs, rather than all
> dialogs, you can combine with the dialogClass option:
>
> http://docs.jquery.com/UI/Dialog#option-dialogClass
>
> .message .ui-dialog-titlebar { display: none; }
> ...
> $("#dialog").dialog({ dialogClass: "message" });
>
> Finally, if you really want to remove the elements, rather than just hide
> with css:
>
> $("#dialog").dialog().parents(".ui-dialog").find(".ui-dialog-titlebar").remove();
>
> Note: there's a separate list for jQuery UI plugins:
>
> http://groups.google.com/group/jquery-ui
>
> should you have any further questions.
>
> - Richard
>
> On Thu, Apr 2, 2009 at 11:47 AM, ggerri  wrote:
>
> > Hi there
>
> > want to show a 'please wait' dialog with UI dialog, but cant figure
> > out how to remove the title and the X (close dialog) as the dialog
> > should auto-close after the content is loaded...
>
> > Pleeaaas... ;-)
>
> > thanks :-)
> > Gerald


[jQuery] Re: UI Dialog: how to remove the title and the X?

2009-04-03 Thread ggerri

thanks Brian, already checked the options, couldnt find this one...

On Apr 2, 5:58 pm, brian  wrote:
> http://docs.jquery.com/UI/Dialog#options
>
> On Thu, Apr 2, 2009 at 11:47 AM, ggerri  wrote:
>
> > Hi there
>
> > want to show a 'please wait' dialog with UI dialog, but cant figure
> > out how to remove the title and the X (close dialog) as the dialog
> > should auto-close after the content is loaded...
>
> > Pleeaaas... ;-)
>
> > thanks :-)
> > Gerald


[jQuery] UI Dialog: how to remove the title and the X?

2009-04-02 Thread ggerri

Hi there

want to show a 'please wait' dialog with UI dialog, but cant figure
out how to remove the title and the X (close dialog) as the dialog
should auto-close after the content is loaded...

Pleeaaas... ;-)

thanks :-)
Gerald


[jQuery] blockUI + SSL: $.blockUI() triggers "This page contains secure and non secure items" popup in IE6

2009-04-02 Thread ggerri

Hi there

we just changed to SSL here in our office and now I have a problem
with blockUI:

as soon as I put $.blockUI() in my code, IE6 throws this world famous
annoying popup before showing my page:

"This page contains secure and non secure items"

and this, even I have this warning disabled in the IE6 setting
(trusted zone intranet + advanced settings).

removing the line: everything works fine.

I think the problem could be in blockUI working with iframe.

Any solution for that? Until then, I have to do without blockUI :-(

Thanks
Gerald



[jQuery] Re: whats wrong with my custom selector :readonly (IE6 sucks)

2009-03-16 Thread ggerri


Hi Ricardo

sorry for the late reply, was away for the weekend :-)

thanks again for the explenation and the links =)

take care and have a good week :-)

Gerald








ricardobeat wrote:
> 
> 
> You're welcome!
> 
> 'readOnly' is the DOM property, not the attribute - these are (to some
> extent) separate things. It's in the HTML4 and DOM Level 1 specs:
> 
> http://www.w3.org/TR/2000/WD-DOM-Level-1-2929/level-one-html.html#ID-6043025
> http://www.w3.org/TR/1998/REC-html40-19980424/interact/forms.html#adef-readonly
> 
> cheers,
> - ricardo
> 
> On Mar 13, 5:00 am, ggerri  wrote:
>> Thanks a lot Ricardo :handshake:
>>
>> That both worked =)
>>
>> But I have to admit that I dont know why .readOnly works.:confused:
>> couldnt
>> find anything like that in the docs and thought that you always have to
>> select attributes with [..] or .attr(..) Is this an officially working
>> function?
>>
>> Thanks :-)
>> Gerald
>>
>>
>>
>> ricardobeat wrote:
>>
>> > You're returning the object you created, so that will always be true.
>> > Return the .length property and it shoud work:
>>
>> > $.extend($.expr[':'],{
>> >     readonly: function(a) {
>> >         return !!$(a).filter('[readonly="true"],
>> > [readonly=""]').length;
>> >     }
>> > });
>>
>> > But a simpler/faster/safer alternative is the DOM property 'readOnly',
>> > which seems to work fine on all major browsers:
>>
>> > $.extend($.expr[':'],{
>> >     readonly: function(a) {
>> >         return !!a.readOnly;
>> >     }
>> > });
>>
>> > You have to use !! to enforce returning a boolean value.
>>
>> > cheers,
>> > - ricardo
>> > On Mar 12, 9:30 am, ggerri  wrote:
>> >> Hi there
>> >> jQuery 1.3 has problems with handling the readonly attribute (already
>> >> filed
>> >> a ticket but I'm a bit stuck here with my project).  
>>
>> >> When you want to select  readonly inputs, you have to use
>> [readonly=""]
>> >> in
>> >> Firefox and [readonly="true"] in IE6...
>>
>> >> ( because the DOM looks like that after
>> ".attr('readonly','readonly');":
>> >>  FF: 
>> >>  IE6:  )
>>
>> >> So I tried to extend :
>>
>> >> $.extend($.expr[':'],{ readonly: function(a) {
>> >>                                 return $(a).filter('[readonly="true"],
>> >> [readonly=""]');
>> >>                                                                      
>>    
>> >>                             }
>> >>                                               });
>>
>> >> But:
>>
>> >>  $(':text:readonly').addClass('gtest');
>>
>> >> doesnt care about the custom selector and just choses all :text
>> fields.
>> >> :,(
>>
>> >> what's wrong with my extendtion? :confused:
>>
>> >> thanks a lot guys:handshake:
>> >> Gerald
>>
>> >> ps.  $(':text').not("[readonly='true'], [readonly=''],
>> >> [readonly='readonly']") works fine in both browsers selecting all
>> input
>> >> fields which are not readonly but using a working :readonly would be
>> more
>> >> elegant right?
>>
>> >> --
>> >> View this message in
>> >>
>> context:http://www.nabble.com/whats-wrong-with-my-custom-selector-%3Areadonly...
>> >> Sent from the jQuery General Discussion mailing list archive at
>> >> Nabble.com.
>>
>> --
>> View this message in
>> context:http://www.nabble.com/whats-wrong-with-my-custom-selector-%3Areadonly...
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/whats-wrong-with-my-custom-selector-%3Areadonly-%28IE6-sucks%29-tp22475325s27240p22534599.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: whats wrong with my custom selector :readonly (IE6 sucks)

2009-03-13 Thread ggerri


works in IE6 but not in FF3... thats the problem. these stuff used to work
fine in 1.2.6 but since 1.3.2 jquery is not handling 'readonly' properly
anymore. guess this got messed up in the process of removing all the browser
sniffing from jquery...

at least i have a working woraround now :-)

thanks and take care
Gerald



MorningZ wrote:
> 
> 
> also to note
> 
> $("input[readonly]") should also work as that sector says "give me all
> inputs that have the attribute read only", and it doesn't matter what
> the value is, just that it's there
> 
> 
> On Mar 13, 4:00 am, ggerri  wrote:
>> Thanks a lot Ricardo :handshake:
>>
>> That both worked =)
>>
>> But I have to admit that I dont know why .readOnly works.:confused:
>> couldnt
>> find anything like that in the docs and thought that you always have to
>> select attributes with [..] or .attr(..) Is this an officially working
>> function?
>>
>> Thanks :-)
>> Gerald
>>
>>
>>
>> ricardobeat wrote:
>>
>> > You're returning the object you created, so that will always be true.
>> > Return the .length property and it shoud work:
>>
>> > $.extend($.expr[':'],{
>> >     readonly: function(a) {
>> >         return !!$(a).filter('[readonly="true"],
>> > [readonly=""]').length;
>> >     }
>> > });
>>
>> > But a simpler/faster/safer alternative is the DOM property 'readOnly',
>> > which seems to work fine on all major browsers:
>>
>> > $.extend($.expr[':'],{
>> >     readonly: function(a) {
>> >         return !!a.readOnly;
>> >     }
>> > });
>>
>> > You have to use !! to enforce returning a boolean value.
>>
>> > cheers,
>> > - ricardo
>> > On Mar 12, 9:30 am, ggerri  wrote:
>> >> Hi there
>> >> jQuery 1.3 has problems with handling the readonly attribute (already
>> >> filed
>> >> a ticket but I'm a bit stuck here with my project).  
>>
>> >> When you want to select  readonly inputs, you have to use
>> [readonly=""]
>> >> in
>> >> Firefox and [readonly="true"] in IE6...
>>
>> >> ( because the DOM looks like that after
>> ".attr('readonly','readonly');":
>> >>  FF: 
>> >>  IE6:  )
>>
>> >> So I tried to extend :
>>
>> >> $.extend($.expr[':'],{ readonly: function(a) {
>> >>                                 return $(a).filter('[readonly="true"],
>> >> [readonly=""]');
>> >>                                                                      
>>    
>> >>                             }
>> >>                                               });
>>
>> >> But:
>>
>> >>  $(':text:readonly').addClass('gtest');
>>
>> >> doesnt care about the custom selector and just choses all :text
>> fields.
>> >> :,(
>>
>> >> what's wrong with my extendtion? :confused:
>>
>> >> thanks a lot guys:handshake:
>> >> Gerald
>>
>> >> ps.  $(':text').not("[readonly='true'], [readonly=''],
>> >> [readonly='readonly']") works fine in both browsers selecting all
>> input
>> >> fields which are not readonly but using a working :readonly would be
>> more
>> >> elegant right?
>>
>> >> --
>> >> View this message in
>> >>
>> context:http://www.nabble.com/whats-wrong-with-my-custom-selector-%3Areadonly...
>> >> Sent from the jQuery General Discussion mailing list archive at
>> >> Nabble.com.
>>
>> --
>> View this message in
>> context:http://www.nabble.com/whats-wrong-with-my-custom-selector-%3Areadonly...
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/whats-wrong-with-my-custom-selector-%3Areadonly-%28IE6-sucks%29-tp22475325s27240p22497444.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: whats wrong with my custom selector :readonly (IE6 sucks)

2009-03-13 Thread ggerri


Thanks a lot Ricardo :handshake:

That both worked =)

But I have to admit that I dont know why .readOnly works.:confused: couldnt
find anything like that in the docs and thought that you always have to
select attributes with [..] or .attr(..) Is this an officially working
function?

Thanks :-)
Gerald



ricardobeat wrote:
> 
> 
> You're returning the object you created, so that will always be true.
> Return the .length property and it shoud work:
> 
> $.extend($.expr[':'],{
> readonly: function(a) {
> return !!$(a).filter('[readonly="true"],
> [readonly=""]').length;
> }
> });
> 
> But a simpler/faster/safer alternative is the DOM property 'readOnly',
> which seems to work fine on all major browsers:
> 
> $.extend($.expr[':'],{
> readonly: function(a) {
> return !!a.readOnly;
> }
> });
> 
> You have to use !! to enforce returning a boolean value.
> 
> cheers,
> - ricardo
> On Mar 12, 9:30 am, ggerri  wrote:
>> Hi there
>> jQuery 1.3 has problems with handling the readonly attribute (already
>> filed
>> a ticket but I'm a bit stuck here with my project).  
>>
>> When you want to select  readonly inputs, you have to use [readonly=""]
>> in
>> Firefox and [readonly="true"] in IE6...
>>
>> ( because the DOM looks like that after ".attr('readonly','readonly');":
>>  FF: 
>>  IE6:  )
>>
>> So I tried to extend :
>>
>> $.extend($.expr[':'],{ readonly: function(a) {
>>                                 return $(a).filter('[readonly="true"],
>> [readonly=""]');
>>                                                                          
>>                             }
>>                                               });
>>
>> But:
>>
>>  $(':text:readonly').addClass('gtest');
>>
>> doesnt care about the custom selector and just choses all :text fields.
>> :,(
>>
>> what's wrong with my extendtion? :confused:
>>
>> thanks a lot guys:handshake:
>> Gerald
>>
>> ps.  $(':text').not("[readonly='true'], [readonly=''],
>> [readonly='readonly']") works fine in both browsers selecting all input
>> fields which are not readonly but using a working :readonly would be more
>> elegant right?
>>
>> --
>> View this message in
>> context:http://www.nabble.com/whats-wrong-with-my-custom-selector-%3Areadonly...
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/whats-wrong-with-my-custom-selector-%3Areadonly-%28IE6-sucks%29-tp22475325s27240p22491760.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: not works on IE

2009-03-12 Thread ggerri


cool its working now for you.

i still get the error in IE6 though...

check out http://dev.jquery.com/ticket/3821

you might want to write directly to
http://bassistance.de/jquery-plugins/jquery-plugin-validation/

maybe your special characters in messages_fr.js like "numéro de carte de
crédit" cause problems...
try to use html substitution instead.

good luck


Tanguy JACQUET wrote:
> 
> I made some change about my css file and it's looks good on firefox but
> it's
> not perfect on IE7.
> 
> I think it's fine for me.
> 
> 2009/3/12 ggerri 
> 
>>
>>
>> Happy that it works now. about the css, open your site with ff3 and click
>> the
>> button and your layout gets messed up (see pic).
>> http://www.nabble.com/file/p22476904/ffcss.jpg
>>
>> just insert a  above your form.
>>
>> on submit, call you validation checks and if there happens to be an error
>> just write the message into the errorBox with
>> $('#errorBox').append(yourErrorMessage);
>>
>> CSS could be
>>
>> #errorBox
>> {
>> border: 1px solid #A25965;
>> height: auto;
>> width: 90%;
>> padding: 4px;
>> background: #F8F0F1;
>> text-align: left;
>>
>> }
>>
>> Have fun :-D
>> Gerald
>>
>>
>> Tanguy JACQUET wrote:
>> >
>> > Thanks a lot for answered about IE.
>> >
>> > It's fix and seems ok.
>> >
>> > But i don't understand what you said about CSS probleme and i don't
>> know
>> > how
>> > to implemente the message box.
>> >
>> > 2009/3/12 ggerri 
>> >
>> >>
>> >>
>> >> Hi
>> >>
>> >> sorry only had time for quick look and it seems that you also have a
>> css
>> >> problem (FF3).maybe you want to try and remove the lables with the
>> error
>> >> messages. make a  (Messagebox) above or below the form and write
>> >> your
>> >> error messages to this box.
>> >>
>> >> And in IE6, hmm, try to remove the last comma after Dont_Cadres:
>> >> "required"
>> >>
>> >>Activite: "required",
>> >>Nombre_de_Salaries: "required",
>> >>Dont_Cadres: "required",
>> >>
>> >> regards
>> >> Gerald
>> >>
>> >>
>> >>
>> >> Mediacom87 wrote:
>> >> >
>> >> >
>> >> > Hi, i've a pb to do working the valdation plugin on IE.
>> >> >
>> >> > My form :
>> >> http://finassurouest.mediacom87.com/devis-pour-entreprise.php
>> >> >
>> >> > I do'nt understand what i mystake in my code.
>> >> >
>> >> > Thanks
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/not-works-on-IE-tp22474370s27240p22475519.html
>> >> Sent from the jQuery General Discussion mailing list archive at
>> >> Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> > Cordialement,
>> >
>> > Tanguy JACQUET
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/not-works-on-IE-tp22474370s27240p22476904.html
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com.
>>
>>
> 
> 
> -- 
> Cordialement,
> 
> Tanguy JACQUET
> 
> 

-- 
View this message in context: 
http://www.nabble.com/not-works-on-IE-tp22474370s27240p22478227.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: not works on IE

2009-03-12 Thread ggerri


Happy that it works now. about the css, open your site with ff3 and click the
button and your layout gets messed up (see pic).
http://www.nabble.com/file/p22476904/ffcss.jpg 

just insert a  above your form.

on submit, call you validation checks and if there happens to be an error
just write the message into the errorBox with
$('#errorBox').append(yourErrorMessage);

CSS could be

#errorBox
{
border: 1px solid #A25965;
height: auto;
width: 90%;
padding: 4px;
background: #F8F0F1;
text-align: left;

}

Have fun :-D
Gerald


Tanguy JACQUET wrote:
> 
> Thanks a lot for answered about IE.
> 
> It's fix and seems ok.
> 
> But i don't understand what you said about CSS probleme and i don't know
> how
> to implemente the message box.
> 
> 2009/3/12 ggerri 
> 
>>
>>
>> Hi
>>
>> sorry only had time for quick look and it seems that you also have a css
>> problem (FF3).maybe you want to try and remove the lables with the error
>> messages. make a  (Messagebox) above or below the form and write
>> your
>> error messages to this box.
>>
>> And in IE6, hmm, try to remove the last comma after Dont_Cadres:
>> "required"
>>
>>Activite: "required",
>>Nombre_de_Salaries: "required",
>>Dont_Cadres: "required",
>>
>> regards
>> Gerald
>>
>>
>>
>> Mediacom87 wrote:
>> >
>> >
>> > Hi, i've a pb to do working the valdation plugin on IE.
>> >
>> > My form : 
>> http://finassurouest.mediacom87.com/devis-pour-entreprise.php
>> >
>> > I do'nt understand what i mystake in my code.
>> >
>> > Thanks
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/not-works-on-IE-tp22474370s27240p22475519.html
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com.
>>
>>
> 
> 
> -- 
> Cordialement,
> 
> Tanguy JACQUET
> 
> 

-- 
View this message in context: 
http://www.nabble.com/not-works-on-IE-tp22474370s27240p22476904.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: not works on IE

2009-03-12 Thread ggerri


Hi

sorry only had time for quick look and it seems that you have a css problem
rather than a jquery one. try to remove the lables with the error messages.
make a  (Messagebox) above or below the form and write your error
messages to this box.

regards
Gerald



Mediacom87 wrote:
> 
> 
> Hi, i've a pb to do working the valdation plugin on IE.
> 
> My form :  http://finassurouest.mediacom87.com/devis-pour-entreprise.php
> 
> I do'nt understand what i mystake in my code.
> 
> Thanks
> 
> 

-- 
View this message in context: 
http://www.nabble.com/not-works-on-IE-tp22474370s27240p22475519.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] whats wrong with my custom selector :readonly (IE6 sucks)

2009-03-12 Thread ggerri


Hi there
jQuery 1.3 has problems with handling the readonly attribute (already filed
a ticket but I'm a bit stuck here with my project).  

When you want to select  readonly inputs, you have to use [readonly=""] in
Firefox and [readonly="true"] in IE6...

( because the DOM looks like that after ".attr('readonly','readonly');":
 FF:  
 IE6:  )

So I tried to extend :

$.extend($.expr[':'],{ readonly: function(a) {
return $(a).filter('[readonly="true"],
[readonly=""]');

  }
  });

But:

 $(':text:readonly').addClass('gtest');

doesnt care about the custom selector and just choses all :text fields. :,(

what's wrong with my extendtion? :confused:

thanks a lot guys:handshake:
Gerald

ps.  $(':text').not("[readonly='true'], [readonly=''],
[readonly='readonly']") works fine in both browsers selecting all input
fields which are not readonly but using a working :readonly would be more
elegant right?



-- 
View this message in context: 
http://www.nabble.com/whats-wrong-with-my-custom-selector-%3Areadonly-%28IE6-sucks%29-tp22475325s27240p22475325.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Simple one: difference between varXy.find(':text') and $(varXy).find(':text')

2009-03-06 Thread ggerri

Wick, Rick, Ricardo :-)

Thanks a lot for you help, time and explanations guys! You've
enlightened me first thing in the morning!

Cheers from Switzerland and take care
Gerald


On Mar 5, 6:36 pm, wick  wrote:
> Cool. By the way, regarding your question about determining the
> javascript processing time, something like this is helpful:
>
> http://jdev.blogsome.com/2006/08/18/compact-script-to-calculate-scrip...
>
> On Mar 5, 12:02 pm, "Rick Faircloth"  wrote:
>
> > Oh, you're absolutely right, wick... I was just careless in my coding.
> > Thanks for pointing that out and correcting the example...for my sake
> > and, especially for GGerri's!
>
> > Rick
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>
> > Behalf Of wick
> > Sent: Thursday, March 05, 2009 11:58 AM
> > To: jQuery (English)
> > Subject: [jQuery] Re: Simple one: difference between varXy.find(':text') and
> > $(varXy).find(':text')
>
> > Rick, as far as I can tell there is something wrong with two of the code
> > examples you provided.
>
> > var mySet = '$(mySet)';   ...this sets the mySet variable to a string
> > that *looks* like a jQuery selector, but your quotes make it into a useless
> > string.
> > $('mySet').find(':text')...    ...this selector looks for a "mySet"
> > HTML object (which does not exist), again, because of the way you have the
> > quotes. It doesn't use the mySet variable reference at all.
>
> > To answer GGerri's question..
>
> > var mySet = $('tr>td:nth-child(2n)');  ...assigns a jQuery object to the
> > mySet variable.
> > mySet.find(':text')   ...takes your jQuery object & applies find() to
> > it.
> > $(mySet).find(':text')   ...takes your jQuery object, runs it through
> > the jQuery selector engine again, & applies find().
>
> > Both ways work okay, but the 2nd way isn't the best because running a jQuery
> > object through the selector engine again serves no purpose that I'm aware
> > of. Normally you'd use the 2nd example only if mySet was a DOM object
> > reference, not a jQuery object reference.
>
> > Regarding GGerri's question about the "this" variable - in jQuery, "this"
> > refers to a DOM object so you always need to wrap it with the jQuery $(...)
> > selector if you're going to use jQuery methods on it.
>
> > A useful variable naming convention I've seen is to prefix any jQuery object
> > variables with a dollar sign. It's an easy reminder that the variable is
> > already a jQuery object. In other words:
>
> > var $mySet = $('div h1 a');  "$mySet" becomes a jQuery object
> > $mySet.show(300,function() {
> >   $(this).fadeIn(); ..."this" is a DOM object, so you need to wrap it with
> > the jQuery selector });
>
> > Hope that helps!
>
> > -Wickhttp://www.CarComplaints.com
>
> > On Mar 5, 7:58 am, "Rick Faircloth"  wrote:
> > > Hi, Rayn :handshake: :o)
>
> > > I think, for shorthand notation (some say for readability, but I think
> > > otherwise), some set var's (variables) to represent pieces of code, for
> > instance:
>
> > > var mySet = '$(mySet)'
>
> > > and then use it as:
>
> > > mySet.find(':text')...
>
> > > Written in "longhand", it would be:
>
> > > $('mySet').find(':text')...
>
> > > When trying to read someone else's code, where this shorthand is use
> > > extensively, I just find it hard to decipher, since I have to trace
> > > all the var's down to find out what they stand for...
>
> > > Someone please correct me if I'm wrong...
>
> > > Rick
>
> > > -Original Message-
> > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com]
> > > On Behalf Of ggerri
> > > Sent: Thursday, March 05, 2009 7:31 AM
> > > To: jquery-en@googlegroups.com
> > > Subject: [jQuery] Re: Simple one: difference between
> > > varXy.find(':text') and $(varXy).find(':text')
>
> > > Thanks Ryan :handshake:
>
> > > so  mySet.find(':text').each(...) would be right and
> > > $(mySet).find(':text').each(...) not? :confused:
>
> > > In examples I often see (within an each function): $(this).something
> > > but also this.something

[jQuery] Re: Simple one: difference between varXy.find(':text') and $(varXy).find(':text')

2009-03-05 Thread ggerri


Thanks Ryan :handshake:

so  mySet.find(':text').each(...) would be right and 
$(mySet).find(':text').each(...) not? :confused:

In examples I often see (within an each function): $(this).something but
also this.something

Still dont get the difference of use :,(

G




ryan.joyce...@googlemail.com wrote:
> 
> 
> mySet is an object or variable, $(mySet) will try to get an element
> using the contents of mySet as the selector.
> 
> On Mar 5, 10:04 am, ggerri  wrote:
>> Hi there
>>
>> thats an easy one for you ;-)
>>
>> if i do:
>>
>> var mySet = $('tr>td:nth-child(2n)');
>>
>> how do I use mySet? What's the difference between
>>
>> mySet.find(':text')
>>
>> and
>>
>> $(mySet).find(':text')
>>
>> Thanks :-))
>> GGerri
>>
>> --
>> View this message in
>> context:http://www.nabble.com/Simple-one%3A-difference-between-varXy.find%28%...
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Simple-one%3A-difference-between-varXy.find%28%27%3Atext%27%29-and-%24%28varXy%29.find%28%27%3Atext%27%29-tp22348597s27240p22350689.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Simple one: difference between varXy.find(':text') and $(varXy).find(':text')

2009-03-05 Thread ggerri


Hi there
 
thats an easy one for you ;-)
 
if i do:
 
var mySet = $('tr>td:nth-child(2n)');
 
how do I use mySet? What's the difference between
 
mySet.find(':text')
 
and
 
$(mySet).find(':text')
 
 
Thanks :-))
GGerri
 
-- 
View this message in context: 
http://www.nabble.com/Simple-one%3A-difference-between-varXy.find%28%27%3Atext%27%29-and-%24%28varXy%29.find%28%27%3Atext%27%29-tp22348597s27240p22348597.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] $('#tab1 tr:gt(0)>td').filter(':nth-child(2n+1)') select also 1st td in row - aargghh

2009-02-26 Thread ggerri

Hi guys

this drives me crazy.

why does this also select the first td in each a row?

 $('#tab1 tr:gt(0)>td').filter(':nth-child(2n+1)')

Please give me a hint :-)

Thanks a lot
Gerald


[jQuery] is there something like $('.myClass').contains('val1 or val2 or val3')?

2009-02-23 Thread ggerri

Hi guys

is there a way to use logical operators in jQuery e.g. with
'contains'?

thanks


[jQuery] Re: Simulate BackSpace key

2009-01-11 Thread ggerri

Hi

I've done something similar with the Tab. Maybe that helps. You'll
need the FIELDS Plugin for that:

$("#PG1_L02-4-5")
.bind('keydown',function(e) {
  switch(e.keyCode) {
case 9:  // tab
  if(e.shiftKey) {
 $(this)
 .movePrev()
 .movePrev();
  }
  else {
 $(this)
 .moveNext()
 .moveNext();
  }
  break;
  };
});

Regards
Gerald

On Jan 9, 12:17 pm, RSol  wrote:
> I write WYSWYG editor and use to editing 'div' tag with .attr
> ('contentEditable','true')
>
> On 9 янв, 08:23, "jQuery Lover"  wrote:
>
>
>
> > Here is how to simulate a backspace in javascript:
>
> >   getElementById('yourTextBox').Select(TextBox1.SelectionStart - 1, 1)
> >   getElementById('yourTextBox').SelectedText = "
>
> > jQuery HowTo Resource  -  http://jquery-howto.blogspot.com- Hide quoted 
> > text -
>
> - Show quoted text -


[jQuery] How to trigger an event for a SELECT after removing an entry??

2008-12-22 Thread ggerri

Hi Gurus

I have a generated dropdown list with years and an onChange event.
Sometimes the select field has a value '(All)' as first entry. I want
to remove this entry and trigger the DOM Level 0 Event.

This would be my page:





$(function() {

  //works but cant trigger event for select
  $('option:contains(Alle)').remove();

  // should be something like this, but this doesnt work
  $('select:has(option:contains(All))').filter('option:contains
(All)').remove().end().trigger('change');

});







(All)
2008
2009
2010
2011
2012
2013
2014





Really ned some hints here :-)

thanks guys
ggerri


[jQuery] Re: SWF chart problem

2008-12-12 Thread ggerri

Hi Sumpa

dont really get your coding, but maybe I got your problem right ;-)
this one would work for me:



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


Untitled Document


  $(function() {
 test('#abc');
  });
  function test(myID) {
alert($(myID).text());

  }





bla bla bla




Hope that helps.
ggerri


On Dec 10, 11:08 pm, sumpa  wrote:
> please someone can help me about that ?
>
> On 10 Dez., 15:26, sumpa  wrote:
>
>
>
> >  function updateChart(xml,oid){
> >       //var chart=document.my_chart;   is working
> >       var chart1=$(oid);    / is not wokring . how to get the
> > object properly
> >                                    /// document.all[oid] istt working
> > also in ff3 
>
> >       spinning_wheel = true;
> >       mode = "reset";
> >       chart1.Update_XML( xml, spinning_wheel, mode );
> >    }
>
> > need help plz :-)- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: how to check if a form has changed

2008-12-03 Thread ggerri

Hi Sridhar

you could do something like

 var vFlag;

 $('input').bind('change', function() { vFlag = 'X';});


Then you can check with window.onbeforeunload mentioned earlier if
things have changed and react accordingly.

Regards
Gerald

On Dec 2, 4:46 pm, "Web Specialist" <[EMAIL PROTECTED]> wrote:
> Try this
>
> http://www.4guysfromrolla.com/demos/OnBeforeUnloadDemo3.htm
>
> Cheers
> Marco Antonio
>
> On 12/2/08, Sridhar <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi,
>
> >     we are trying to give a feedback to the user if the user has
> > changed some values in the form and tries to close the form with out
> > saving the changes. is there a plug-in that can check this? or do I
> > have to loop-through each control and check if the value has changed
> > by comparing the value with the stored value in a hidden variable? If
> > there is a standard way to do this, please let me know. we are using
> > asp.net to create the forms
>
> > Thanks,
> > sridhar.- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: can you simplify this selector? easy for you...

2008-11-17 Thread ggerri


Karl & Rick

thanks a lot for your help and sorry for late reply - I was down with a flu
:-(

Karl's version with the each loop works fine. Lisaraël's solution is a bit
simpler and works as col 1 is not input ready and all 'odd' td should get a
binding.

Thanks though for teaching me another way :handshake:

Take care
GGerri :-)


Karl Swedberg-2 wrote:
> 
> On Nov 12, 2008, at 11:13 AM, Rik Lomas wrote:
> 
>>
>> Following on from Karl, how about:
>>
>> $('#PG1_L03-table td:nth-child(2n+3)').slice(0, 4).find('input')
> 
> 
> That won't work either, unless the table has only one row. Would have  
> to do something like this instead:
> 
>  $('#PG1_L03-table tr').each(function() {
>  $('td:nth-child(2n+3):lt(4)', this).find('input')
>  });
> 
> 
> 
> 
> Cheers,
> --Karl
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/can-you-simplify-this-selector--easy-for-you...-tp20459678s27240p20542808.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: can you simplify this selector? easy for you...

2008-11-17 Thread ggerri


Hi Lisaraël

thanks for your help and sorry for late reply - I was down with a flu :-(

the odd idea was a great idea and it works perfectly :clap: It would also
select the first td, but this is not a problem as its not input ready.

thanks again
GGerri


Lisaraël wrote:
> 
> 
> $('#PG1_L03-table td:nth-child(odd) input') ? (untested too)
> 
> 

-- 
View this message in context: 
http://www.nabble.com/can-you-simplify-this-selector--easy-for-you...-tp20459678s27240p20542570.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] can you simplify this selector? easy for you...

2008-11-12 Thread ggerri


Hi Gurus

have the following selector and wonder how this could be simplified?
:confused:

$('#PG1_L03-table td:nth-child(3) input, #PG1_L03-table td:nth-child(5)
input, #PG1_L03-table td:nth-child(7) input, #PG1_L03-table td:nth-child(9)
input').bind..

need to bind an event to all input fields of col 3, 5, 7 and 9 but only for
table PG1_L03-table.

Any help appreciated :handshake:
-- 
View this message in context: 
http://www.nabble.com/can-you-simplify-this-selector--easy-for-you...-tp20459678s27240p20459678.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.