[jQuery] ANNOUCE: idTabs plugin released!

2007-06-16 Thread Sean Catchpole


Phew, I finally finished getting the bugs out, so it's ready for
release. What you say? Why it's idTabs of course. =P

idTabs: http://www.sunsean.com/idTabs/

I made this plugin because I wanted a lightweight tabs plugin that
would allow me to hide and show anything with an id. I opened the
design up a little bit, so that any DOM structure can be used. Klaus's
Tabs are still more feature rich, so this is not intended to be a
replacement by any means, only different.

Let me know what you think. =)

~Sean


[jQuery] Re: Dealing with Non existent nodes

2007-06-16 Thread RobG



On Jun 17, 4:06 pm, RobG <[EMAIL PROTECTED]> wrote:
[...]
> alert('The document title is: ' + o.title);

Of course that should be   o.text


--
Rob



[jQuery] Re: Dealing with Non existent nodes

2007-06-16 Thread RobG


On Jun 17, 2:52 pm, "Scottus " <[EMAIL PROTECTED]> wrote:
> I am using
>
> var title = document.getElementsByTagName('title').item(0).innerHTML;
>
> to get the content of a pages title tag.
>
> But if the page has no title tag I get
>
> "Error: document.getElementsByTagName("title").item(0) has no properties"
>
> and the script craps out.
>
> any ideas about how to deal with this ?

An HTML document without a title element is invalid.  Christopher has
given you a jQuery answer, a generic answer is that if you try to get
a property of an object that doesn't exist your script will error.  If
you want a belt & braces approach, try something like:

 var o;
 if ( document &&
  document.getElementsByTagName &&
  (o = document.getElementsByTagName('title')[0]) &&
  (typeof o.text == 'string') )
  {
alert('The document title is: ' + o.title);
  }

Or if you like being a little more risque, try:

  alert( document.title );


--
Rob



[jQuery] Re: Dealing with Non existent nodes

2007-06-16 Thread Christopher Jordan


Why wouldn't you use something like this:

$("title").val();

Chris

Scottus wrote:


I am using

var title = document.getElementsByTagName('title').item(0).innerHTML;

to get the content of a pages title tag.

But if the page has no title tag I get

"Error: document.getElementsByTagName("title").item(0) has no properties"

and the script craps out.

any ideas about how to deal with this ?



--
http://cjordan.us



[jQuery] Dealing with Non existent nodes

2007-06-16 Thread Scottus


I am using

var title = document.getElementsByTagName('title').item(0).innerHTML;

to get the content of a pages title tag.

But if the page has no title tag I get

"Error: document.getElementsByTagName("title").item(0) has no properties"

and the script craps out.

any ideas about how to deal with this ?


[jQuery] Re: Reading a querystring .... Thanks

2007-06-16 Thread Bruce MacKay


Thanks Eric - just the direction I needed.

Cheers/Bruce


At 01:26 p.m. 17/06/2007, you wrote:


You can access the current URL from javascript via window.location

Maybe try parsing window.location.href or window.location.search ?

--Erik


On 6/16/07, Bruce MacKay <[EMAIL PROTECTED]> wrote:


Hi folks,

I'm working on a site that, by default, has a RHS sidebar.  I want to
be able to selective hide that sidebar based on the value of a querystring.

More specifically, there are times when I need the "whole" page to
display a large table, so when I submit a post or call to the server
from the page to generate/load the table, I intending adding a
querystring variable that, when the page is refreshed and the table
is about to be loaded, jQuery will hide the sidebar (i.e. display:none;)

Is this possible?  I cannot find any examples in the tutorial section
of the site or find previous posts in this list's archives.

Of course, I can achieve what I'm seeking by having server-side
conditional includes based on a querystring value, but I'd like to do
this the jQuery way if possible.

Thanks/Bruce





[jQuery] Re: Form Element Collection

2007-06-16 Thread Ⓙⓐⓚⓔ

I haven't a clue what $F does, but unserialize is the opposite of serialize

jQuery.fn.unserialize = function(search){
   var items = search.split('&');
   for (var i = 0; i < items.length; i++) {
   var parts = items[i].split(/=/);
   this.filter('[EMAIL PROTECTED]'+ parts[0] +']').val(parts[1])
   };
   return this
}




On 6/16/07, Mike Alsup <[EMAIL PROTECTED]> wrote:



John,

The form plugin has a method called fieldValue which is a getter and
is comparable to $F.  Currently the plugin has no complementary setter
method.

Mike


On 6/16/07, John Farrar <[EMAIL PROTECTED]> wrote:
>
> Does anyone have a way to pull individual form elements via a common
> request simular to how they use $F() in prototypt? I would like to be
> able to set/get any form element value via this scope using the
> element ID. (Currently select boxes don't work the same as an input
> element to my perception.)
>
>





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Re: How is "height" calculated?

2007-06-16 Thread Fred Janon
Great trick! I didn't think that absolute positioning would reset its
values! Hopefully that works across browsers!

Thanks Klaus and Rick!

Fred

On 6/17/07, Rick <[EMAIL PROTECTED]> wrote:
>
>
> I think its not calculated, but just the value from css
> (elm.style.height). The Dimensions plugin does calculate it
> (innerHeight, outerHeight -> elm.offsetHeight).
>
> On 16 jun, 16:49, "Fred Janon" <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I am trying to understand how the height of an element is calculated in
> > jQuery. I don't understand how the height can be calculated especially
> when
> > the element is hidden with display:none.
> >
> > Thanks
> >
> > Fred
>
>


[jQuery] Could anyone send me a copy of Catfish Advert Plugin 1.3

2007-06-16 Thread phpletter

Hi there
   Could anyone send me a copy of Catfish Advert Plugin 1.3. its
official site is offline now.
thanks in advance.
Logan
from www.phplette.com



[jQuery] Re: Form Element Collection

2007-06-16 Thread Mike Alsup


John,

The form plugin has a method called fieldValue which is a getter and
is comparable to $F.  Currently the plugin has no complementary setter
method.

Mike


On 6/16/07, John Farrar <[EMAIL PROTECTED]> wrote:


Does anyone have a way to pull individual form elements via a common
request simular to how they use $F() in prototypt? I would like to be
able to set/get any form element value via this scope using the
element ID. (Currently select boxes don't work the same as an input
element to my perception.)




[jQuery] Re: Form plugin, filling results into the fields

2007-06-16 Thread Mike Alsup


No, the form plugin does not do anything with the server response
(other than pass it to your callback).  What exactly is it that you
need to do?

Mike


I'm not sure if I understand it right, does the form plugin move the
results back into the form fileds after the call succeeds? If yes how
has the results look like? If no, what's the best solution?

O. Wyss




[jQuery] Re: Form plugin parameter passing

2007-06-16 Thread Mike Alsup


O,

You can add parameters using the beforeSubmit callback:

$('#myForm').ajaxSubmit({
   beforeSubmit: function(a, $f, o) {
   a.push({name: 'mode', value: '1'});
   }
});

Mike


On 6/16/07, wyo <[EMAIL PROTECTED]> wrote:


Is it possible to pass additional parameters to the AJAX call? On my
page I have a get value (e.g. mode=1) which I'd like to pass to the
called server function. Or do I have to store the value in a hidden
input field so it's passed with the other fields?

O. Wyss




[jQuery] Re: Reading a querystring to determine an action - possible?

2007-06-16 Thread Erik Beeson


You can access the current URL from javascript via window.location

Maybe try parsing window.location.href or window.location.search ?

--Erik


On 6/16/07, Bruce MacKay <[EMAIL PROTECTED]> wrote:


Hi folks,

I'm working on a site that, by default, has a RHS sidebar.  I want to
be able to selective hide that sidebar based on the value of a querystring.

More specifically, there are times when I need the "whole" page to
display a large table, so when I submit a post or call to the server
from the page to generate/load the table, I intending adding a
querystring variable that, when the page is refreshed and the table
is about to be loaded, jQuery will hide the sidebar (i.e. display:none;)

Is this possible?  I cannot find any examples in the tutorial section
of the site or find previous posts in this list's archives.

Of course, I can achieve what I'm seeking by having server-side
conditional includes based on a querystring value, but I'd like to do
this the jQuery way if possible.

Thanks/Bruce




[jQuery] Re: Plugin redesign option

2007-06-16 Thread Rey Bango


Hi Alexandre,

I really believe that that depends on how Luke's code fits into your 
plans. If his code is easy to modify and maintain, then extending it 
might make sense. Otherwise, it might be best to evaluate what he's done 
and refactor code that might need improvement. Whether his code is great 
or not, I still think that if you're going to create a new plugin based 
on his code, you'll be in a great position to re-evaluate things and 
perhaps improve on existing functionality.


Again, its a matter of looking at his code to see where its at.

Rey...

Alexandre Plennevaux wrote:

Hello friends,
 
i would like to redevelop my jqUploader plugin, rebuilding it around 
Luke Lutman's jquery Flash plugin. Doing so i guess mine becomes more of 
an extension than a standalone plugin.
 
Hence, i would like to ask how to best articulate the two: in other 
words, should i just "use" Luke's plugin in my code, or can i really 
extend it (via .extend() or a similar built-in command in jquery) ?
 
 
Thanks for any advise on this,
 
Alexandre
 


Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.472 / Base de données virus: 269.8.17/850 - Date: 
15/06/2007 11:31




--
BrightLight Development, LLC.
954-775- (o)
954-600-2726 (c)
[EMAIL PROTECTED]
http://www.iambright.com


[jQuery] Reading a querystring to determine an action - possible?

2007-06-16 Thread Bruce MacKay


Hi folks,

I'm working on a site that, by default, has a RHS sidebar.  I want to 
be able to selective hide that sidebar based on the value of a querystring.


More specifically, there are times when I need the "whole" page to 
display a large table, so when I submit a post or call to the server 
from the page to generate/load the table, I intending adding a 
querystring variable that, when the page is refreshed and the table 
is about to be loaded, jQuery will hide the sidebar (i.e. display:none;)


Is this possible?  I cannot find any examples in the tutorial section 
of the site or find previous posts in this list's archives.


Of course, I can achieve what I'm seeking by having server-side 
conditional includes based on a querystring value, but I'd like to do 
this the jQuery way if possible.


Thanks/Bruce



[jQuery] Plugin redesign option

2007-06-16 Thread Alexandre Plennevaux
Hello friends,
 
i would like to redevelop my jqUploader plugin, rebuilding it around Luke 
Lutman's jquery Flash plugin. Doing so i guess mine becomes more of an 
extension than a standalone plugin.
 
Hence, i would like to ask how to best articulate the two: in other words, 
should i just "use" Luke's plugin in my code, or can i really extend it (via 
.extend() or a similar built-in command in jquery) ?
 
 
Thanks for any advise on this,
 
Alexandre
 

Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.472 / Base de données virus: 269.8.17/850 - Date: 15/06/2007 11:31
 


[jQuery] Re: using spin button in a scrolling parent

2007-06-16 Thread orix

Hi George,

Thank You for the great plugin, I'm just a happy user! and thank you
also to all the jquery team, of course :))

I don't have a live website yet that I can show you, but I put up a
simple example at:

www.motivus.pt/spin

While I was doing this, I noticed also that your plugin won't account
for the container's border also - try changing the border to 20px. I
guess you could use the dimensions plugin to do the math on the mouse
coordinates, maybe you could get better results.

Best regards,
Carlos



On Jun 14, 8:21 pm, George <[EMAIL PROTECTED]> wrote:
> Very good orix, thanks for that. Always good to hear of people using
> it.
>
> It's been some time since I wrote the spinbutton plugin and it could
> do with an update to deduce the positioning better.
> Hopefully I'll find a moment to take a look at your code. Do you have
> a url where I could see your fix working? (and to see the context in
> which the problem occurred)
>
> Kind regards,
> George
>
> George.jquery[at]softwareunity.com
>
> On Jun 14, 3:42 pm, orix <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I'm using the spinButton plugin (http://www.softwareunity.com/sandbox/
> > jqueryspinbtn/) on input elements which have a parent div with
> > "overflow:auto". whenever this parent div has enough content so that
> > the scroll bars show up and you scroll down to use a spinbButton, the
> > plugin won't work properly - you can only use the up arrow.
>
> > This is because the calculation of the mouse coordinates gets messed
> > up with the parent's div scrollTop value. I made some changes to the
> > plugin to solve this. It's very specific to this kind of situation,
> > but I hope it'll help others with the same problem.
>
> > My idea is to pass a reference of the parent element which will have
> > some scroll and have the plugin take that into account.
>
> > somewhere in this.spinCfg initialization add this line:
>
> >  scroller: cfg && cfg.scroller ?
> > document.getElementById(cfg.scroller) : null,
>
> > in the mousemove function, after
>
> > var x = e.pageX || e.x;
> > var y = e.pageY || e.y;
>
> > add
> > // account for scroll amount of parent element
> > if (this.spinCfg.scroller) y+= this.spinCfg.scroller.scrollTop;
>
> > in your html file just add a reference to your element in the options
> > array:
>
> > var myOptions   = {min: 0,max: 100,step: 1,
> > scroller:"myScroller"};
> > $(".mySpin").SpinButton(myOptions);
>
> > yes, I used "document.getElementById" instead of jquery... I couldn't
> > get it to pass a reference of the object and work properly. maybe some
> > of you can suggest something.
>
> > Tested in Firefox2.0.0.4(win), IE6(win) and IE7(win)



[jQuery] Form Element Collection

2007-06-16 Thread John Farrar

Does anyone have a way to pull individual form elements via a common
request simular to how they use $F() in prototypt? I would like to be
able to set/get any form element value via this scope using the
element ID. (Currently select boxes don't work the same as an input
element to my perception.)



[jQuery] Re: Insert table row next to last row

2007-06-16 Thread Brad Perkins

That was easy!

Thanks

On Jun 16, 4:44 pm, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
> use a tfoot for your table and append to the tbody instead of the table.
>
> 
> 
> 
> Header 1
> Header 2
> Header 3
> 
> 
> **
> 
> Footer 1
> Footer 2
> Footer 3
> 
> **
> 
> 
> Cell data 1
> Cell data 2
> Cell data 3
> 
> 
> Cell data 4
> Cell data 5
> Cell data 6
> 
> 
> Cell data 7
> Cell data 8
> Cell data 9
> 
> 
> 
>
> On 6/16/07, Brad Perkins <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'm hoping this is just a simple selector question.
>
> > I currently have this code which inserts a row at the end of a table.
> > $('').appendTo("#my_table").html(rowcells);
>
> > I need to add a footer row to the same table. Is there a simple
> > modification to the the above code so that it would insert a row above
> > the last table row?
>
> --
> Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ



[jQuery] Re: How is "height" calculated?

2007-06-16 Thread Rick

I think its not calculated, but just the value from css
(elm.style.height). The Dimensions plugin does calculate it
(innerHeight, outerHeight -> elm.offsetHeight).

On 16 jun, 16:49, "Fred Janon" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am trying to understand how the height of an element is calculated in
> jQuery. I don't understand how the height can be calculated especially when
> the element is hidden with display:none.
>
> Thanks
>
> Fred



[jQuery] Re: Insert table row next to last row

2007-06-16 Thread Ⓙⓐⓚⓔ

use a tfoot for your table and append to the tbody instead of the table.




Header 1
Header 2
Header 3


**

Footer 1
Footer 2
Footer 3

**


Cell data 1
Cell data 2
Cell data 3


Cell data 4
Cell data 5
Cell data 6


Cell data 7
Cell data 8
Cell data 9






On 6/16/07, Brad Perkins <[EMAIL PROTECTED]> wrote:



I'm hoping this is just a simple selector question.

I currently have this code which inserts a row at the end of a table.
$('').appendTo("#my_table").html(rowcells);

I need to add a footer row to the same table. Is there a simple
modification to the the above code so that it would insert a row above
the last table row?





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Insert table row next to last row

2007-06-16 Thread Brad Perkins

I'm hoping this is just a simple selector question.

I currently have this code which inserts a row at the end of a table.
$('').appendTo("#my_table").html(rowcells);

I need to add a footer row to the same table. Is there a simple
modification to the the above code so that it would insert a row above
the last table row?



[jQuery] Re: How is "height" calculated?

2007-06-16 Thread Klaus Hartl


Fred Janon wrote:

Hi,
 
I am trying to understand how the height of an element is calculated in 
jQuery. I don't understand how the height can be calculated especially 
when the element is hidden with display:none.
 
Thanks
 
Fred
 


Fred,

if the particular element is hidden, it is absolutely positioned while 
invisible (and the parent element its context), instead of "display: 
none", and the height can then be calculated. Thereafter these styles 
are resetted.


There is one issue: If not the element itself but some parent element is 
hidden via setting display to none, you won't get the correct height. 
Its just to expensive to use the above described technique for some 
parent element.




--Klaus


[jQuery] Re: getting the (computed) background-color

2007-06-16 Thread Rick

I'am not sure, but this one may be faster:

// get the background color
var current_p = $(this);
var bg = "transparent";
while(bg == "transparent") {
bg = current_p.parent().css('background-color');
current_p = current_p.parent();
}

On 16 jun, 23:10, Fil <[EMAIL PROTECTED]> wrote:
> To retrieve the computed bgcolor of an element I had to do this:
>
> var bgcolor = jQuery(this).css('backgroundColor');
> if (bgcolor == 'transparent') {
> jQuery(this)
> .parents()
> .each(function(){
> var bg = jQuery(this).css('backgroundColor');
> if (bg != 'transparent'
> && bgcolor == 'transparent')
> bgcolor = bg;
> });
>
> }
>
> I hated it: is there not already a plugin doing this (and probably
> doing it better)?
>
> -- Fil



[jQuery] getting the (computed) background-color

2007-06-16 Thread Fil


To retrieve the computed bgcolor of an element I had to do this:

var bgcolor = jQuery(this).css('backgroundColor');
if (bgcolor == 'transparent') {
jQuery(this)
.parents()
.each(function(){
var bg = jQuery(this).css('backgroundColor');
if (bg != 'transparent'
&& bgcolor == 'transparent')
bgcolor = bg;
});
}


I hated it: is there not already a plugin doing this (and probably
doing it better)?

-- Fil


[jQuery] Form plugin, filling results into the fields

2007-06-16 Thread wyo

I'm not sure if I understand it right, does the form plugin move the
results back into the form fileds after the call succeeds? If yes how
has the results look like? If no, what's the best solution?

O. Wyss



[jQuery] Form plugin parameter passing

2007-06-16 Thread wyo

Is it possible to pass additional parameters to the AJAX call? On my
page I have a get value (e.g. mode=1) which I'd like to pass to the
called server function. Or do I have to store the value in a hidden
input field so it's passed with the other fields?

O. Wyss



[jQuery] Carousel / Sliding Images / Glider

2007-06-16 Thread Arne-Kolja Bachstein
Hi there,

 

does anyone know a plugin that can slide images ltr/rtl as an endless
animation? Or does anyone know how to implement this with an animate() call
or something like this? I don't get it just using the animate thing. and I
have not yet tried to create a plugin, because I do not know how to handle
animations.

 

Greetings,

 

Arne

 

 



[jQuery] Re: encodeURIComponent localized for custom encoding

2007-06-16 Thread Ⓙⓐⓚⓔ

form plugin uses the same encoding that ajax will use... it's ajax... with
the 2 lines to override it should work...

I would like to see a live page, I can peek at the headers with firebug to
see what is actually being sent (in the headers) but to see what is actually
sent you need to add a little logging...
do you have a live demo? are you serving everything in iso8859??

Perhaps we should take the testing off the main jQuery list!



On 6/16/07, oscar esp <[EMAIL PROTECTED]> wrote:



I have tested using FORM Plugin.

Then It doesn't work by post either get.

Sumary:

test done with the patch.

using ajax call:
-works by get
-doesn't work by post

using ajaxForms:
-doesn't work by post
-doesn't work by get.


Any other suggestion ake?

Thanks for your help.





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Re: Safari 3 and onload

2007-06-16 Thread Ⓙⓐⓚⓔ

I've used this a a test to see when things load... quite different loading
times!!


http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>
http://www.w3.org/1999/xhtml"; xml:lang="en">


blackout




console.time('a');
var blackout = $('
') .prependTo($('html')); $(function(){ console.timeEnd('a'); console.time('b'); blackout.css('background-color','gray').debug('grayed') }); $(window).load(function() { console.timeEnd('b'); blackout.fadeOut("slow",function(){blackout.remove()}).debug('done') }); la la la http://www.visualjquery.com/images/arrow-forward_16.gif"; border="20" /> http://banners.wunderground.com/banner/smalltemptr/US/CA/San_Francisco.gif"; /> http://mystatus.skype.com/balloon/jakecigar"; /> On 6/16/07, Erik Beeson <[EMAIL PROTECTED]> wrote: $(document).ready(...) is when the dom and scripts are ready. $(window).load(...) is when the layout has been calculated and all images have been loaded. What other events might be useful? --Erik On 6/15/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote: > very interesting! > > what is loaded to you? loaded to me means the dom & scripts are ready... > not when images are loaded or the after css & layout is processed. perhaps > we should have more events in jQuery to deal with the different times. > > > On 6/15/07, Bil Corry <[EMAIL PROTECTED]> wrote: > > > > Via Ajaxian, interesting browser behavior: > > > > - > > Safari does not fire onload at the same time as other browsers. With most > browsers, they will wait until the page is loaded, all images and > stylesheets and scripts have run, and the page has been displayed before > they fire onload. Safari does not. > > > > In Safari, it seems onload fires before the page has been displayed, > before layout has been calculated, before any costly reflows have taken > place. It fires before images have completed loading (this can also happen > in rare cases in Opera, but Safari seems to do it everywhere), meaning that > a substantial part of the load time is not included. > > > > > > - > > > > > > - Bil > > > > > > > > > > -- > Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ

[jQuery] Re: ANNOUNCE: Please Welcome New jQuery Team Member Glen Lipka

2007-06-16 Thread Glen Lipka

Doing the handshake all on your own?  If you do that too often you will go
blind.

Punchline to a good jQuery joke:
"So then the Priest said, "I thought that's what slideDown() was for!!"

Glen


On 6/16/07, Klaus Hartl <[EMAIL PROTECTED]> wrote:



Karl Swedberg wrote:
> Glen,
>
> I'm thrilled that you've officially joined the cult ... ummm ... I mean
> ... team.
> As a member of the welcoming committee, I'm pleased to announce that we
> have sent you some /fabulous/ membership prizes via carrier pigeon,
> including an upside-down flower pot, a 10% discount coupon for any DEVO
> 8-track tape (while supplies last),  and a 5-page, 4-color instructional
> brochure detailing the secret jQuery Team handshake.

Hey, i didn't get that ;-)

I had to learn the handshake all alone...


--Klaus



[jQuery] How is "height" calculated?

2007-06-16 Thread Fred Janon
Hi,

I am trying to understand how the height of an element is calculated in
jQuery. I don't understand how the height can be calculated especially when
the element is hidden with display:none.

Thanks

Fred


[jQuery] Re: Printer Friendly Form Field Replacements

2007-06-16 Thread R. Rajesh Jeba Anbiah

On Jun 16, 2:34 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Here you go:
>
> http://rcs-comp.com/code_examples/jquery_form_print/
  

   Code is nice, but I'm wondering--why not doing it with CSS (form
fields with flat look)

--
  
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/



[jQuery] jQuery & CakePHP (Was Re: Validate RC2 Preview: Remember The Milk Signup)

2007-06-16 Thread R. Rajesh Jeba Anbiah

On Jun 16, 7:20 pm, "Tane Piper" <[EMAIL PROTECTED]>
wrote:
> This is fantastic.  A few of us in #cakephp are strong jQuery
> advocates and we discussed this very thing as we want 'DRY'
> conventions.  We were thinking of a helper, but if it can be done as a
> helper, or at the core that would be fantastic.
>
> Can't wait to see this in action.
  

   Having been trolling about this  for time in IRC and group , I found no interest for it.

   I still prefer it to be unobtrusive (instead of helpers or
something) but with a option to dump JSON validation rules. My patch
is quite simple--it dumps the validation array from form helper.

--
  
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/



[jQuery] Re: ANNOUNCE: Please Welcome New jQuery Team Member Glen Lipka

2007-06-16 Thread Klaus Hartl


Karl Swedberg wrote:

Glen,

I'm thrilled that you've officially joined the cult ... ummm ... I mean 
... team.
As a member of the welcoming committee, I'm pleased to announce that we 
have sent you some /fabulous/ membership prizes via carrier pigeon, 
including an upside-down flower pot, a 10% discount coupon for any DEVO 
8-track tape (while supplies last),  and a 5-page, 4-color instructional 
brochure detailing the secret jQuery Team handshake.


Hey, i didn't get that ;-)

I had to learn the handshake all alone...


--Klaus


[jQuery] Re: ANNOUNCE: Please Welcome New jQuery Team Member Glen Lipka

2007-06-16 Thread Klaus Hartl


Glen Lipka wrote:

I want to thank all the little people.  (Under 5 ft tall).

Seriously, I have been involved in alot of 'communities' in the last 
decade and every single one was a complete pain in the ass.
This is the very first one that I actually enjoy.  I think its a 
testament to how easy jQuery is to TEACH. 

Sometimes we emphasize how easy it is to learn, but I find the ease of 
showing someone else how to use it to be even more powerful.


Anyway, I am having a blast with jQuery, using it and teaching it.  I 
hope everyone else is too.


Glen



Welcome Glen! Great stuff!


[jQuery] Re: Validate RC2 Preview: Remember The Milk Signup

2007-06-16 Thread Tane Piper

This is fantastic.  A few of us in #cakephp are strong jQuery
advocates and we discussed this very thing as we want 'DRY'
conventions.  We were thinking of a helper, but if it can be done as a
helper, or at the core that would be fantastic.

Can't wait to see this in action.


On 6/16/07, R. Rajesh Jeba Anbiah <[EMAIL PROTECTED]> wrote:


On Jun 14, 12:27 am, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> R.RajeshJebaAnbiahwrote:
> > On Jun 13, 9:45 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> >> R.RajeshJebaAnbiahwrote:>FWIW, it's no way related to the plugin,
but I have patched CakePHP
>
> >>> to dump the validation rules in JSON
;
> >>> I think, this will help to have only one rule.
>
> >> Thanks. With that it shouldn't be difficult to dump rules that work
with
> >> the validation plugin.
>
> >The idea was impressed by validation plugin. But, I found that the
> > validation rules of CakePHP differs to the one of validation plugin;
> > with the JSON dumping, it would be easier to achieve the same result
> > in jQuery.
>
> I guess that scenario can be found at every serverside validation
> framework. Considering that it is impossible to provide a common
> denominator for all of those, an adapter seems to be the better idea.
> There should be always some kind of required-method.
   

To be honest, having inspired by validation plugin, I thought of
hacking an adopter for it. But, later I found that it's too un-
intuitive to try to bend CakePHP rules for validation plugins; it will
be just easy to dump CakePHP rules in JSON and write a simple jQuery
code to do the validation. This way, one can just follow the CakePHP
validation code and translate it to jQuery easily. The simple code, I
came up with for CakePHP rules (not complete) is:
//Logic: Extract validation rule which is in JSON from class attribute
// on blur of input elements, validate--on error append error div
$('div.input').each(function () {
var m = /validation:{(.*)}/.exec($(this).attr('class'));
if (m[1]) {
$('input', $(this)).blur(function () {
var validation = eval('({' + m[1] + '})');
$(this).siblings('div.error-message').remove();
if (!validation['allowEmpty'] && !$(this).val()) {
$(this).parent().append(''
+ validation['message'] + '').fadeIn();
}
});
}
});

--
  
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/





--
Tane Piper
http://digitalspaghetti.tooum.net

This email is: [ ] blogable [ x ] ask first [ ] private


[jQuery] Re: url encoding for GET

2007-06-16 Thread Mike Alsup


Your $.ajax example is not correct. This line:

   data:"url="+url,num="+num,

does not make sense and I'm surprised it's not throwing an error.  Try
changing it to:

   data:{url:url,num:num},

Mike


On 6/16/07, joomlafreak <[EMAIL PROTECTED]> wrote:


I wonder if this is normal

I am sending a url to server in query string.

If I use $.get, like this
$.get(queryfile,{url:url,num:num},function(output){
...
});

the url is encoded as it is sent. BUT if I use
$.ajax({
type:"GET",
url:queryfile,
data:"url="+url,num="+num,
success:function(output){

}
})

the url as it is sent is not encoded.

Am doing something basic wrong here??




[jQuery] Re: @mike: blockUI fix

2007-06-16 Thread Gilles (Webunity)

Cool! I'll be going to try and rebuild my administration site using
blockUI (with ajax forms) instead of my own submodal (which is not so
widely tested off course). I'll keep you posted

Gilles



[jQuery] Re: Validate RC2 Preview: Remember The Milk Signup

2007-06-16 Thread R. Rajesh Jeba Anbiah

On Jun 14, 12:27 am, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> R.RajeshJebaAnbiahwrote:
> > On Jun 13, 9:45 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> >> R.RajeshJebaAnbiahwrote:>FWIW, it's no way related to the plugin, but 
> >> I have patched CakePHP
>
> >>> to dump the validation rules in JSON 
> >>> ;
> >>> I think, this will help to have only one rule.
>
> >> Thanks. With that it shouldn't be difficult to dump rules that work with
> >> the validation plugin.
>
> >The idea was impressed by validation plugin. But, I found that the
> > validation rules of CakePHP differs to the one of validation plugin;
> > with the JSON dumping, it would be easier to achieve the same result
> > in jQuery.
>
> I guess that scenario can be found at every serverside validation
> framework. Considering that it is impossible to provide a common
> denominator for all of those, an adapter seems to be the better idea.
> There should be always some kind of required-method.
   

To be honest, having inspired by validation plugin, I thought of
hacking an adopter for it. But, later I found that it's too un-
intuitive to try to bend CakePHP rules for validation plugins; it will
be just easy to dump CakePHP rules in JSON and write a simple jQuery
code to do the validation. This way, one can just follow the CakePHP
validation code and translate it to jQuery easily. The simple code, I
came up with for CakePHP rules (not complete) is:
//Logic: Extract validation rule which is in JSON from class attribute
// on blur of input elements, validate--on error append error div
$('div.input').each(function () {
var m = /validation:{(.*)}/.exec($(this).attr('class'));
if (m[1]) {
$('input', $(this)).blur(function () {
var validation = eval('({' + m[1] + '})');
$(this).siblings('div.error-message').remove();
if (!validation['allowEmpty'] && !$(this).val()) {
$(this).parent().append(''
+ validation['message'] + '').fadeIn();
}
});
}
});

--
  
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/



[jQuery] Re: encodeURIComponent localized for custom encoding

2007-06-16 Thread oscar esp

I have tested using FORM Plugin.

Then It doesn't work by post either get.

Sumary:

test done with the patch.

using ajax call:
-works by get
-doesn't work by post

using ajaxForms:
-doesn't work by post
-doesn't work by get.


Any other suggestion ake?

Thanks for your help.



[jQuery] Re: CNN and Apple Choose Prototype. Why?

2007-06-16 Thread R. Rajesh Jeba Anbiah

On Jun 14, 10:17 pm, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> Well stated Rey.
> These are steps that I believe will help jQuery be adopted by the
> mainstream audiences.
>1. A plugin repository that is completely coordinated.
  

   I have shared my humble suggestion on SVN repo structure long time
ago and been totally ignored.

--
  
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/



[jQuery] Re: encodeURIComponent localized for custom encoding

2007-06-16 Thread oscar esp

I have added but the problem persist using "post" method. :-(

On 15 jun, 21:37, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
> there is supposed to be a space before the word charset. Not sure if that's
> causing the problem... keep testing!
>
> jQuery.ajaxSetup({contentType: "application/x-www-form-urlencoded;
> charset=iso-8859-1"})
>
> On 6/15/07, oscar esp <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
>
> > Hi I have test this code:
>
> >     jQuery.ajaxSetup({contentType: "application/x-www-form-
> > urlencoded;charset=iso-8859-1"})
> >     jQuery.pair = function(f,v) {return escape(f) + "=" + escape(v)};
> >     var url = "test2.asp"
> >     pars= "text2=áéíáéáa"
> >                 jQuery.ajax({
> >                         type: "get",
> >                         url: url,
> >                         data: pars,
> >                         async: false,
> >                         dataType: "html"
> >         });
>
> > Works fine. I get áéíáéáa
>
> > However: type:"post" seems that doesn't work I get "áÃ(c)í  Ã§
> > áÃ(c)áa"
> > We can fix it ¿?
>
> > Tomorrow I will try with plugin Form.
>
> > Just to keep it in mind: Your jQuery branch is standar 1.2+patch
> > UTF8¿?
>
> > PD:Thanks for your help!!! For me this issue is a critical, and to
> > mantain my current project too.. because I decide to use jquery and
> > teacher begins to be scare..
>
> > On 14 jun, 20:00, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
> > > $.pair = function(f,v) {return escape(f) + "=" + escape(v)};
>
> > > is the key, otherwise you would have the standard utf behaviour
>
> > > On 6/14/07, oscar esp <[EMAIL PROTECTED]> wrote:
>
> > > > Hi I have been on holidays and I have not time to test it.
>
> > > > In order to keep in mind:
> > > > I need to dowload from your brach. I am using jquery 1.2 .. Then If I
> > > > take the jquery from your brach it is a standar jquery 1.2 + your
> > > > modifications for enconding?
> > > > I am worry ... to be sure that are the same versión that I am using.
>
> > > > Then:
> > > > 1- set set ajaxSetup:
> > > > ajaxSetup({contentType: "application/x-www-form-urlencoded;
> > > > charset=iso-8859-1"})
>
> > > > 2- After that all params of ajaxCall like:
> > > > jQuery.ajax({
> > > > type: "POST",
> > > > url: url,
> > > > data: param,
> > > > async: false,
> > > > dataType: "html"
> > > > };
>
> > > > Params will be in iso-8859-1¿?
>
> > > > On 10 jun, 19:53, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
> > > > > keep me posted!! You may also need :
>
> > > > > ajaxSetup({contentType: "application/x-www-form-urlencoded;
> > > > charset= > > > > charset you want to call it>"})
>
> > > > > On 6/10/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:
>
> > > > > > Oscar,
>
> > > > > > you can play with the jQuery from my branch (not released, and
> > just to
> > > > try
> > > > > > it... no guarantees!!)
>
> > > > > >http://jqueryjs.googlecode.com/svn/branches/jake-dev/dist/
>
> > > > > > On 6/10/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:
>
> > > > > > > oops! that's on the googlegroups site.
>
> > > > > > > On 6/10/07, Ⓙⓐⓚⓔ < [EMAIL PROTECTED]> wrote:
>
> > > > > > > > $.pair = function(f,v) {return escape(f) + "=" + escape(v)};
>
> > > > > > > > and all your 'get' parameters use the new encoding. If you
> > care to
> > > > > > > > test... I'll save up a full version on the
>
> > > > > > > > escape is brain dead , as it won't work with the full range of
> > > > UTF...
> > > > > > > > but the classic hi-ascii chars seem to work.. I tested with a
> > ö
> > > > (only)
>
> > > > > > > > On 6/10/07, oscar esp < [EMAIL PROTECTED]> wrote:
>
> > > > > > > > > You are the man :-P
>
> > > > > > > > > In order to use it. then I only need add the js ¿? or I
> > need
> > > > to
> > > > > > > > > call a extra code!!!
>
> > > > > > > > > On 10 jun, 18:44, "Ⓙⓐⓚⓔ" < [EMAIL PROTECTED] > wrote:
> > > > > > > > > > Hey Oscar, You were the reason I wrote this patch!!! Plus
> > I
> > > > had no
> > > > > > > > > beautiful
> > > > > > > > > > way to do non-utf encoding
>
> > > > > > > > > > A couple people came up with other solutions, but I like
> > mine
> > > > > > > > > best, and it
> > > > > > > > > > shrinks the jQuery size a few bytes.
>
> > > > > > > > > > On 6/10/07, oscar esp <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > > > Hi I have a problem realted with charsets as you know.
>
> > > > > > > > > > > Could I use this code in order to fix my problem?
>
> > > > > > > > > > > On 10 jun, 06:00, "Ⓙⓐⓚⓔ" < [EMAIL PROTECTED]> wrote:
> > > > > > > > > > > >http://dev.jquery.com/ticket/1289
>
> > > > > > > > > > > > On 6/9/07, Brandon Aaron < [EMAIL PROTECTED]>
> > wrote:
>
> > > > > > > > > > > > > Be sure to add this to trac.
>
> > > > > > > > > > > > > --
> > > > > > > > > > > > > Brandon Aaron
>
> > > > > > > > > > > > > On 6/9/07, Ⓙⓐⓚⓔ < [EMAIL PROTECTED] > wrote:
>
> > > > > > > > > > > > > > I also added to the patch renaming the parameter
> > 'xml'
> > > > and
> > > > > > > > > sometimes
> > > > > > > > > > > 'r'
> > > > > > > > > > > > > > to 'xhr'. I

[jQuery] Re: ANNOUNCE: Please Welcome New jQuery Team Member Glen Lipka

2007-06-16 Thread Alexandre Plennevaux
indeed, beyond the natural kindness that natures gave to each of us jquerians, 
the friendliness around this community is in good proportions due to how easy 
it is to help others, since jquery is not 54657+ commands.
Believe me, i know what i'm talking about: in comparison look at flash, from 
actionscript 1 to actionscript 3 , it has become Nasa-level engineering. 
Suffering here...
 
 
more seriously, Glen,  I read your profile and i think i stand around the same 
area as you on the Axis that goes from developer to ergonomy freak to designer. 
If you need assistance or dev power in what jquery demo you will be creating, 
let me know, i'd love to help.
 
thanks
 
Alexandre
 

   _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Glen 
Lipka
Sent: samedi 16 juin 2007 1:48
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: ANNOUNCE: Please Welcome New jQuery Team Member Glen Lipka


I want to thank all the little people.  (Under 5 ft tall).

Seriously, I have been involved in alot of 'communities' in the last decade and 
every single one was a complete pain in the ass.
This is the very first one that I actually enjoy.  I think its a testament to 
how easy jQuery is to TEACH.  

Sometimes we emphasize how easy it is to learn, but I find the ease of showing 
someone else how to use it to be even more powerful. 

Anyway, I am having a blast with jQuery, using it and teaching it.  I hope 
everyone else is too.

Glen





On 6/15/07, Ⓙⓐⓚⓔ mailto:[EMAIL PROTECTED]" [EMAIL PROTECTED]> 
wrote: 

Great news! It's always good to hear from Glen! He comes to jQuery from a 
different place than most of us geeks! 


-- 
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ 







Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.472 / Base de données virus: 269.8.17/850 - Date: 15/06/2007 11:31
 


[jQuery] url encoding for GET

2007-06-16 Thread joomlafreak

I wonder if this is normal

I am sending a url to server in query string.

If I use $.get, like this
$.get(queryfile,{url:url,num:num},function(output){
...
});

the url is encoded as it is sent. BUT if I use
$.ajax({
type:"GET",
url:queryfile,
data:"url="+url,num="+num,
success:function(output){

}
})

the url as it is sent is not encoded.

Am doing something basic wrong here??



[jQuery] Re: Safari 3 and onload

2007-06-16 Thread Erik Beeson

$(document).ready(...) is when the dom and scripts are ready.
$(window).load(...) is when the layout has been calculated and all
images have been loaded. What other events might be useful?

--Erik


On 6/15/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:

very interesting!

what is loaded to you? loaded to me means the dom & scripts are  ready...
not when  images are loaded or the after css & layout  is processed. perhaps
we should have more events in jQuery to deal with the different times.


On 6/15/07, Bil Corry <[EMAIL PROTECTED]> wrote:
>
> Via Ajaxian, interesting browser behavior:
>
> -
> Safari does not fire onload at the same time as other browsers. With most
browsers, they will wait until the page is loaded, all images and
stylesheets and scripts have run, and the page has been displayed before
they fire onload. Safari does not.
>
> In Safari, it seems onload fires before the page has been displayed,
before layout has been calculated, before any costly reflows have taken
place. It fires before images have completed loading (this can also happen
in rare cases in Opera, but Safari seems to do it everywhere), meaning that
a substantial part of the load time is not included.
>
> 
> -
>
>
> - Bil
>
>
>



--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Re: ANNOUNCE: Please Welcome New jQuery Team Member Glen Lipka

2007-06-16 Thread Erik Beeson


On 6/15/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:

and a 5-page, 4-color instructional brochure detailing the secret jQuery Team 
handshake.


Which isn't so secret anymore since it was recently leaked onto youtube:
http://www.youtube.com/watch?v=vVge3CiE5uU

--Erik