[jQuery] Re: growl for jquery

2008-05-12 Thread Gordon

Interesting idea, but the notifications really could do with some kind
of close button to dismiss them early.  The real Growl has dashboard
widget style close buttons that appear on mouse over.

On May 12, 12:55 am, Rey Bango [EMAIL PROTECTED] wrote:
 Growl for jquery

 http://projects.zoulcreations.com/jquery/growl/

 Rey


[jQuery] Re: Why does this not preload an image correctly?

2008-05-12 Thread Wizzud

You could simply change it around a bit...

- create the image
- assign a load handler, with a callback to append the image to the
div and show the div
- set the image src

eg
$('img /').load(function(){
$(this).appendTo('#someDivId').parent(show);
  })
  .attr('src', $('src[0]', data).text());

NB Not all browsers like jQuery's load() as an image preloader; you
might want to check out Ariel Flesler's preload plugin?

On May 11, 11:44 pm, Giant Jam Sandwich [EMAIL PROTECTED] wrote:
 I seem to be having a problem with some code similar to the pseudo-
 code below. Assume that I am getting an XML document that has nodes
 called src that hold image source urls, and that someDivId has a
 display property of none set in the CSS.

 - - -

 $(function(){

$.get( doc.xml, function( data ) {

   $(#someDivId).append( img src=' + $(src[0], data).text()
 + ' / );
   $(#someDivId img).load(function(){
  $(#someDivId).css(display, block);
   });

}

 });

 - - -

 In my code, the DIV is displaying before the image is loaded. However,
 if I hard code the image into the HTML, give it an ID, and then attach
 the load event to that, it works just fine. Thanks!


[jQuery] Re: fastest way to edit a select

2008-05-12 Thread andrea varnier

On 9 Mag, 23:05, Wizzud [EMAIL PROTECTED] wrote:
 An alternative...

thanks Wizzud, your code is much faster than mine!!
thank you very much ^^


[jQuery] IE7, simple AJAX, and nothing!

2008-05-12 Thread Bruce MacKay

Hello folks,

I'd appreciate insight to the fault in this function which works in 
FF and Safari but not in IE7. Specifically, the returned ajax file is 
not displayed.


function fnGetEbookFile(ni){
$.ajax({
url: 'textfiles/'+ni+'.txt',
type: 'GET',
cache: false,
dataType: 'html',
timeout: 2000,
success: function(responsetxt){
$(#justlist,#tech).hide();
//alert(here  + responsetxt);
$(#stext).html(responsetxt).show();
}
});
}

As far as I can determine, the ajax call is successful - the alert 
box show the returned html - but the display within the div stext 
is not successful.  I can see the stext div in Firebug, so it is 
not as if its target doesn't exist.


Thanks,

Bruce 

[jQuery] Re: JQ Comments and Bug help

2008-05-12 Thread snoodle

test


[jQuery] Re: JQ Comments and Bug help

2008-05-12 Thread snoodle

I already am using Firebug.  I'm just learning JQ and was trying to
save some time.  resizeable.js works fine when summoned from the demo
html, but for me, the same call to .resizeable() with the same nil
arguments results in the errors I mentioned

Again, the error is below (generated by Firefox)
this.element.position is not a function
[Break on this error] var o = this.options, iniPos =
this.element.position(), el = this.element,


and here's the snippet from resizeable.js...

 start: function(e) {
304 var o = this.options, iniPos = this.element.position(), el =
this.element,
305 num = function(v) { return parseInt(v, 10) || 0; }, ie6 =
$.browser.msie  $.browser.version  7;
306 o.resizing = true;
307 o.documentScroll = { top: $(document).scrollTop(), left: $
(document).scrollLeft() };
308

In line 304 this.element is valid but the error is saying
element.position() is undefined.  Why?  I don't know.  I'm just typing
$(foo).draggable(); and don't really need to know how it's all working
underneath.  If I did, I'd go back to wrting my own framework again.
Well, that's not entirely true, but you know what I mean.




On May 11, 2:41 pm, darren [EMAIL PROTECTED] wrote:
 hi there

 I'm fairly new to jQuery / javascript as well, but when i run into
 similar problems, I can usually determine what is wrong using
 firebug.  If you aren't using it yet, get it now, as it will save you
 a lot of head scratching.  Your problem looks like you are trying to
 access a function on an object that doesn't have such a function.
 This happens to me when i think a variable is holding an object of
 some type but its really not (this is why I dont like nonstrict type
 systems).  Anways, using firebug, load your page so you can see the
 script in firebug, then add a breakpoint to a statement immediately
 preceding your problem statement.  Have the script freeze at that
 breakpoint and look at your variables.  do you see anything strange?
 something you didn't expect? an undefined variable or null
 variable perhaps?  This may sound confusing, if so, go towww.getfirebug.com
 and read about the debugger.  I promise you its worth your time to
 learn how to use it.

 good luck

 Darren

 On May 11, 1:07 pm, [EMAIL PROTECTED] wrote:



  This message was also posted in the General Discussion Group, but I'm a bit
  confused how things work around here so please forgive this newbie to the
  JQuery  world.

  It's taken me a little while, but I believe I have finally succumbed to the
  power and wonder that is... JQuery.  I have been bouncing from framework to
  framework for about 9 months, much of that time devoted to building my  
  own.  I
  was on the cusp of giving in to ExtJS at one point, but in the end,  the
  fancy widgets weren't a compelling enough force to make me commit.  As  my 
  own
  framework continued to evolve (and be rewritten) my objectives became  
  clearer,
  and one of those objectives was developing a way to deal with the  dom (and
  other things) in a terse-as-possible way - you know, keep  subclassing or
  funneling the code until it would take a line or 2 to manage  complex 
  widgets - not
  to mention the flexibility of javascript syntax to help  keep things brief.
  Given another 2 or 22 years, I think my system would  have been very close 
  to
  JQuery.

  That said, I am still a JQuery super-newbie, and although code is starting
  to happen and I'm starting to get the magic, I'm having a problem with some
  basic stuff.  Forgive me if this is not in the proper section on this  site.

  When I attempt to use the resizeable or draggable classes in jquery.ui, I
  run into errors.  When using draggable, I get a this.helper.offsetParent  
  is
  not a function. message.  For resizeable I get...
  this.element.position is not a function
  [Break on this error] var o =  this.options, iniPos =
  this.element.position(), el =this.element,

  I'm trying to drag and/or resize a simple div (whether it's created on the
  fly or in the html) all I do is add the dot-draggable() to the object and I 
  get
   the error message (in FF).  The cursor does change to the appropriate
  states (for resizeable) and obviously, from the error messages, I've made 
  it  into
  the code that should be doing the dragging and resizing.

  Can you explain what's going on?  Any help is very much  appreciated.  And
  also, thank you for creating a brilliant piece of  code.  I am hoping it 
  will
  become my framework of choice for a long time to  come.

  **Wondering what's for Dinner Tonight? Get new twists on family
  favorites at AOL Food.
  (http://food.aol.com/dinner-tonight?NCID=aolfod000301)- Hide quoted 
  text -

 - Show quoted text -


[jQuery] using jsVal for validation

2008-05-12 Thread JP

In an $.ajax option  beforsend, I want to call a function to validate
a form using jsVal script

(jsVal  is here:  http://jsval.fantastic-bits.de/  The home page shows
examples)

I tried the following:
...
 $.ajax({
 beforeSend: showRequest,
...

function showRequest(){//alert('showRequest');
var objForm = document.forms[contactForm];
validateStandard(objForm, 'error');
}

The alert will show but,  validateStandard()  is not processed.
jquery ignores this and proceeds ahead with submittal, which is
successful.

How can I correctly use a third party script like jsval to validate
the form before it is submitted by jquery ajax ?




[jQuery] Flexigrid and data format

2008-05-12 Thread xwisdom

Hello Paulo ,

Can you say why you use the row data formate [id:value, cell:
[col1,col2,col3]] instead of [{name:value},{name:value},{name:value}]?

Does anyone one have a way to get Felxigrid to with this format:
[{name:value},{name:value},{name:value}] ?


[jQuery] How to specify a frame as a link's target?

2008-05-12 Thread vimal

hi guys,

i have 2 frames in a page...
in one frame i have a button,onclicking it i want to load the
contents into another frame..

can someone help me with this


regards,
vimal


[jQuery] validate a form using jsVal script

2008-05-12 Thread JP

In an $.ajax option  beforsend, I want to call a function to validate
a form using jsVal script

(jsVal  is here:  http://jsval.fantastic-bits.de/  The home page shows
examples)

I tried the following:
...
 $.ajax({
 beforeSend: showRequest,
...

function showRequest(){//alert('showRequest');
var objForm = document.forms[contactForm];
validateStandard(objForm, 'error');
}

The alert will show but,  validateStandard()  is not processed.
jquery ignores this and proceeds ahead with submittal, which is
successful.

How can I correctly use a third party script like jsval to validate
the form before it is submitted by jquery ajax ?




[jQuery] Re: jQuery Validation Plugin

2008-05-12 Thread juro

Thank you for your answer, Joerg.

What I forgot to mention is that I am using the ajaxForm plugin on
that form and and that I have two different forms on the same page.
Would this make a difference? Unfortunately the debug:true did not
change anything, though...

juro

On May 11, 5:26 pm, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 You can set the debug-option to true to always prevent the form
 submit. That way you'll get to see the error message, ie. on the
 Firebug console, to debug the issue.

 If that doesn't help: Please provide a testpage.

 JörnOn Sun, May 11, 2008 at 1:22 PM, juro [EMAIL PROTECTED] wrote:

  Hi,
  In the documentation of the jQuery Validation Plugin, by default the
  form is not sent if invalid.

  By default, the form submission is prevented when the form is
  invalid, and submitted as normal when it is valid.

  In my case this is not true. How can I debug this?


[jQuery] drag drop post to db

2008-05-12 Thread teazer

After way too many hours wasted, I find I have to ask for help. I am a
coldFusion programmer and a neophyte at jquery.

I am trying to show and post info for a drag  drop page. I need to
show the coordinates and strokeNo and post to a database the same plus
the div of where the draggable was dropped. Hopefully this makes
sense. Thanks in advance...

test page: http://teazer.com/test.cfm

  $(document).ready(function(){

$(.drag).draggable({containment: .wrapper});

$(.drag).mousemove(
function(e){$(this).html(e.pageX +','+ e.pageY);
});

$(.drop).droppable({
accept: .drag,

drop: function(ev, ui) {
 var dragInfo =
$(this).attr(id);
$(this).append((ui.draggable).text());
$(this).append(,);
$(this).append(dragInfo);

//posting the info to the database
$(#S1).click(function(e){$.post(scripts.cfm, { coords: 
e.pageX
+','+ e.pageY, strokeNo: '1', dropLocation: '?' });});

}
});
});



[jQuery] Problem with blockUI plugin

2008-05-12 Thread ashvin

Hello ALL,

I am facing a very weird problem in IE 6.0 as the $.unblockUI()
function is NOT removing the created page block. I have searched for
solution but have not find any good solution.

Can anyone help me in this and suggest me something .. any clue .. any
hint? Why $.unblockUI() is not working in Internet Explorer 6.0+

Ashvin



[jQuery] ANNOUNCE: new YCodaSlider 2.0 beta

2008-05-12 Thread Massimiliano Balestrieri
Hello jQuery(world)!

I'm pleased to inform you that version 2 beta of YCodaSlider has been
published.

Based on coda-slider by Niall Doherty. Many thanks to Gian Carlo
Mingati: Niall Doherty's Coda-Slider is a heavily modified version of
his slideViewer.

http://maxb.net/blog/2008/05/11/ycodaslider-20/

Features:
lazy loading of image gallery.
examples plugins for dilbert feed, flickr feed.
greyboxes (iframe) into panels.


Cheers,

Massimiliano Balestrieri

http://maxb.net/blog/


[jQuery] ANNOUNCE: new YCodaSlider 2.0 beta

2008-05-12 Thread Massimiliano Balestrieri

Hello jQuery(world)!

I'm pleased to inform you that version 2 beta of YCodaSlider has been
published.

Based on coda-slider by Niall Doherty. Many thanks to Gian Carlo
Mingati: Niall Doherty’s Coda-Slider is a heavily modified version of
his slideViewer.

http://maxb.net/blog/2008/05/11/ycodaslider-20/

Features:
lazy loading of image gallery.
examples plugins for dilbert feed, flickr feed.
greyboxes (iframe) into panels.


Cheers,

Massimiliano Balestrieri

http://maxb.net/blog/





[jQuery] Re: growl for jquery

2008-05-12 Thread darren

very nice.

I could see myself going way overboard with something like this. Note
to self, less is more.

On May 11, 4:55 pm, Rey Bango [EMAIL PROTECTED] wrote:
 Growl for jquery

 http://projects.zoulcreations.com/jquery/growl/

 Rey


[jQuery] Re: IE XML Parsing problem - newb

2008-05-12 Thread Nav

On the behalf of OP, It works. Thanks.


[jQuery] How should i load the contents into a frame

2008-05-12 Thread vimal

hi guys,

i have 2 frames in a page...
in one frame i have a button,onclicking it i want to load the
contents into another frame..

can someone help me with this


regards,
vimal


[jQuery] Is there a way of counting the number of id's with the same name, and then renaming them _1, _2, _3 etc.

2008-05-12 Thread quirksmode

Hi,

I am dynamically generating html which looks like this:

div id=wrapper
pSome Content/p
/div

div id=wrapper
pSome Content/p
/div

div id=wrapper
pSome Content/p
/div

I need to write some jquery which will turn that into this:

div id=wrapper_1
pSome Content/p
/div

div id=wrapper_2
pSome Content/p
/div

div id=wrapper_3
pSome Content/p
/div

Any ideas?

Dave



[jQuery] Re: validate with form plugin

2008-05-12 Thread András Csányi
2008/5/11 Jörn Zaefferer [EMAIL PROTECTED]:

  What exactly are you trying to achieve? Currently the only thing I can
  provide is a pointer at the example you already found...

  Jörn

So,
i put here my code, and i hope you can tell me what i did wrong.

form:

form id=probaform method=post action=action.php
legendTeszt form/legend
a:input type=text name=nev id=nevbr
b:input type=text name=utonev id=utonevbr
c:input type=text name=email id=emailbr
input type=submit id=submit
/form

  $('#probaform').validate({
rules:{
  nev:required,
  utonev:required,
email:{
  required: true,
  minLegth:3,
  }
},
messages:{
  nev:Adjad meg a nevedet!,
  utonev:Adjad meg a keresztnevedet!,
  email:{
required:Adjad meg az email cimedet!,
minLength:normálisat bazdmeg...,
},
  },
submitHandler: function(form) {
$(form).ajaxSubmit({
target:'#visszajelzes',
url: 'action.php',
type: 'POST',
dataType: 'null',
  });
}
  });

This code make fantastic validation event for me, its okay. But if a
post the code, the page is reload. And there is the problem. I wont
reload the page.

If I comment few lines (down) the code is working fine (posting the
datas and not reload the page). But the validation events is missing.

So I think I'm totally confused what I have to and what I haven't to
do for a normally form.
Normally form is the next: validate the input fields and posting the
datas without page reload.

  $('#probaform').validate({
// rules:{
//   nev:required,
//   utonev:required,
// email:{
//   required: true,
//   minLegth:3,
//   }
// },
// messages:{
//   nev:Adjad meg a nevedet!,
//   utonev:Adjad meg a keresztnevedet!,
//   email:{
// required:Adjad meg az email cimedet!,
// minLength:normálisat bazdmeg...,
// },
//   },
submitHandler: function(form) {
$(form).ajaxSubmit({
target:'#visszajelzes',
url: 'action.php',
type: 'POST',
dataType: 'null',
  });
}
  });

So thanks for the help and patience again :)

And sorry my english, a little bit hunglish...

András

-- 
- -
-- Csanyi Andras -- http://sayusi.hu -- Sayusi Ando
-- Bízzál Istenben és tartsd szárazon a puskaport!.-- Cromwell


[jQuery] ANNOUNCE: new YCodaSlider 2.0 beta

2008-05-12 Thread Massimiliano Balestrieri
Hello jQuery(world)!

I'm pleased to inform you that version 2 beta of YCodaSlider has been
published.

Based on coda-slider by Niall Doherty. Many thanks to Gian Carlo
Mingati: Niall Doherty's Coda-Slider is a heavily modified version of
his slideViewer.

http://maxb.net/blog/2008/05/11/ycodaslider-20/

Features:
lazy loading of image gallery.
examples plugins for dilbert feed, flickr feed.
greyboxes (iframe) into panels.


Cheers,

Massimiliano Balestrieri

http://maxb.net/blog/

PS: sorry... but i have some problem with googlegroups (TEST 3)


[jQuery] Re: Problem with blockUI plugin

2008-05-12 Thread Mike Alsup

 I am facing a very weird problem in IE 6.0 as the $.unblockUI()
 function is NOT removing the created page block. I have searched for
 solution but have not find any good solution.

 Can anyone help me in this and suggest me something .. any clue .. any
 hint? Why $.unblockUI() is not working in Internet Explorer 6.0+

What version of blockUI are you using?  Can you post a link to the page?


[jQuery] Syntax question regarding value of currrent element being clicked.

2008-05-12 Thread Pickledegg

Heres my code:

This fires on any dropdown with the class 'ajaxdropdown': However, it
errors telling me that event.val() is not a function. How do I refer
to the current dropdown being changed, and get its value? I know $
('#idofdropdown').val() will work, but I need to use multiple
dropdowns.

$(document).ready(function(){
   $('.ajaxdropdown').change(function(event){
$('#charges').load('/new_callchargesajax.asp?
shtech=yc_name='+escape(event.val()));
});
 });

Thanks.


[jQuery] Re: Is there a way of counting the number of id's with the same name, and then renaming them _1, _2, _3 etc.

2008-05-12 Thread andrea varnier

On 12 Mag, 12:31, quirksmode [EMAIL PROTECTED] wrote:
 Hi,

 I am dynamically generating html which looks like this:

since you're generating the html dynamically, I'd suggest you do it
server side (i.e. a for loop).
if that is not possible, change div id=wrapper with div
class=wrapper, if you need the wrapper string, or simply div,
because having the same id over the page is definitely a bad thing :)
the a solution could be:

$('div').each(function(i){
var $this = $(this);
var the_id = $this.attr('class');
$this.attr('id', the_id + '_' + i)
});

this would be zero-based. change to (i+1) to have them starting with
wrapper_1.
without the class, shorter:
$('div').each(function(i){
$(this).attr('id', 'wrapper_' + i)
});

if those div's are inside something else (let's assume a div
id=container_div, you can add a context to the first selector, to
speed up the process:

$('div', '#container_div').each(function(i){
var $this = $(this);
var the_id = $this.attr('class');
$this.attr('id', the_id + '_' + i)
});


[jQuery] Re: Syntax question regarding value of currrent element being clicked.

2008-05-12 Thread Pickledegg

Sussed it:

$('this').val() does the trick!

On May 12, 12:05 pm, Pickledegg [EMAIL PROTECTED] wrote:
 Heres my code:

 This fires on any dropdown with the class 'ajaxdropdown': However, it
 errors telling me that event.val() is not a function. How do I refer
 to the current dropdown being changed, and get its value? I know $
 ('#idofdropdown').val() will work, but I need to use multiple
 dropdowns.

 $(document).ready(function(){
$('.ajaxdropdown').change(function(event){
 $('#charges').load('/new_callchargesajax.asp?
 shtech=yc_name='+escape(event.val()));
 });
  });

 Thanks.


[jQuery] Release: jQuery Validation plugin 1.3

2008-05-12 Thread Jörn Zaefferer

A new release of the validation plugin
(http://bassistance.de/jquery-plugins/jquery-plugin-validation/) is
done, now at version 1.3. This release adds five more localizations
and fixes a few bugs, eg. asdf is not a valid creditcard number
anymore.

Major improvements went into validating a form without triggering UI
feedback (http://dev.jquery.com/ticket/2215) and batch adding and
removing of rules.

The complete list of changes:

ul
liFixed invalid-form event, now only triggered when form is invalid/li
liAdded spanish (es), russian (ru), portuguese brazilian (ptbr),
turkish (tr), and polish (pl) localization/li
liAdded removeAttrs plugin to facilate adding and removing multiple
attributes/li
liAdded groups option to display a single message for multiple
elements, via groups: { arbitraryGroupName: fieldName1 fieldName2[,
fieldNameN }/li
liEnhanced rules() for adding and removing (static) rules:
rules(add, method1[, methodN]/{method1:param[, method_n:param]})
and rules(remove[, method1[, method_n]) /li
liEnhanced rules-option, accepts space-seperated string-list of
methods, eg. {birthdate: required date}  /li
liFixed checkbox group validation with inline rules: As long as the
rules are specified on the first element, the group is now properly
validated on click/li
liFixed #2473, ignoring all rules with an explicit parameter of
boolean-false, eg. required:false is the same as not specifying
required at all (it was handled as required:true so far)/li
liFixed #2424, with a modified patch from #2473: Methods returning a
dependency-mismatch don't stop other rules from being evaluated
anymore; still, success isn't applied for optional fields/li
liFixed url and email validation to not use trimmed values/li
liFixed creditcard validation to accept only digits and dashes
(asdf is not a valid creditcard number)/li
liAllow both button and input elements for cancel buttons (via
class=cancel)/li
liFixed #2215: Fixed message display to call unhighlight as part of
showing and hiding messages, no more visual side-effects while
checking an element and extracted validator.checkForm to validate a
form without UI sideeffects/li
liRewrote custom selectors (:blank, :filled, :unchecked) with
functions for compability with AIR/li
/ul

As always, feedback is welcome!

Jörn


[jQuery] Re: validate with form plugin

2008-05-12 Thread Jörn Zaefferer

This line is broken: minLegth:3,. The method is minlength and
you've got a trailing comma which screws up any non-firefox browser.
Same in your last line of ajaxSubmit dataType: 'null',.

Jörn

On Mon, May 12, 2008 at 11:20 AM, András Csányi [EMAIL PROTECTED] wrote:
 2008/5/11 Jörn Zaefferer [EMAIL PROTECTED]:

  What exactly are you trying to achieve? Currently the only thing I can
  provide is a pointer at the example you already found...

  Jörn

 So,
 i put here my code, and i hope you can tell me what i did wrong.

 form:

 form id=probaform method=post action=action.php
 legendTeszt form/legend
 a:input type=text name=nev id=nevbr
 b:input type=text name=utonev id=utonevbr
 c:input type=text name=email id=emailbr
 input type=submit id=submit
 /form

  $('#probaform').validate({
rules:{
  nev:required,
  utonev:required,
email:{
  required: true,
  minLegth:3,
  }
},
messages:{
  nev:Adjad meg a nevedet!,
  utonev:Adjad meg a keresztnevedet!,
  email:{
required:Adjad meg az email cimedet!,
minLength:normálisat bazdmeg...,
},
  },
submitHandler: function(form) {
$(form).ajaxSubmit({
target:'#visszajelzes',
url: 'action.php',
type: 'POST',
dataType: 'null',
  });
}
  });

 This code make fantastic validation event for me, its okay. But if a
 post the code, the page is reload. And there is the problem. I wont
 reload the page.

 If I comment few lines (down) the code is working fine (posting the
 datas and not reload the page). But the validation events is missing.

 So I think I'm totally confused what I have to and what I haven't to
 do for a normally form.
 Normally form is the next: validate the input fields and posting the
 datas without page reload.

  $('#probaform').validate({
 // rules:{
 //   nev:required,
 //   utonev:required,
 // email:{
 //   required: true,
 //   minLegth:3,
 //   }
 // },
 // messages:{
 //   nev:Adjad meg a nevedet!,
 //   utonev:Adjad meg a keresztnevedet!,
 //   email:{
 // required:Adjad meg az email cimedet!,
 // minLength:normálisat bazdmeg...,
 // },
 //   },
submitHandler: function(form) {
$(form).ajaxSubmit({
target:'#visszajelzes',
url: 'action.php',
type: 'POST',
dataType: 'null',
  });
}
  });

 So thanks for the help and patience again :)

 And sorry my english, a little bit hunglish...

 András

 --
 - -
 -- Csanyi Andras -- http://sayusi.hu -- Sayusi Ando
 -- Bízzál Istenben és tartsd szárazon a puskaport!.-- Cromwell



[jQuery] Re: validate a form using jsVal script

2008-05-12 Thread Jörn Zaefferer

You many want to try a jQuery based validation instead:
http://bassistance.de/jquery-plugins/jquery-plugin-validation/

Just released version 1.3. Let me know if you need help with it.

Jörn

On Mon, May 12, 2008 at 8:10 AM, JP [EMAIL PROTECTED] wrote:

 In an $.ajax option  beforsend, I want to call a function to validate
 a form using jsVal script

 (jsVal  is here:  http://jsval.fantastic-bits.de/  The home page shows
 examples)

 I tried the following:
 ...
 $.ajax({
 beforeSend: showRequest,
 ...

function showRequest(){//alert('showRequest');
var objForm = document.forms[contactForm];
validateStandard(objForm, 'error');
}

 The alert will show but,  validateStandard()  is not processed.
 jquery ignores this and proceeds ahead with submittal, which is
 successful.

 How can I correctly use a third party script like jsval to validate
 the form before it is submitted by jquery ajax ?





[jQuery] Re: JQ comments (and help with a bug?)

2008-05-12 Thread Richard D. Worth
On Sun, May 11, 2008 at 3:59 PM, snoodle [EMAIL PROTECTED] wrote:


 It's taken me a little while, but I believe I have finally succumbed
 to the power and wonder that is... JQuery.  I have been bouncing from
 framework to framework for about 9 months, much of that time devoted
 to building my own.  I was on the cusp of giving in to ExtJS at one
 point, but in the end, the fancy widgets weren't a compelling enough
 force to make me commit.  As my own framework continued to evolve (and
 be rewritten) my objectives became clearer, and one of those
 objectives was developing a way to deal with the dom in a terse-as-
 possible way - you know, keep subclassing or funneling the code until
 it would take a line or 2 to manage complex widgets.  Given another 2
 or 22 years, I think my system would have been very close to JQuery.

 That said, I am still a JQuery super-newbie, and although code is
 starting to happen and I'm starting to get the magic, I'm having a
 problem with some basic stuff.  Forgive me if this is not in the
 proper section.


This is a fine section for general jQuqery questions. If your question
relates to jQuery UI plugins (as I see yours below does), there is the UI
mailing list:

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


 When I attempt to use the resizeable or draggable classes in
 jquery.ui, I run into errors.  When using draggable, I get a
 this.helper.offsetParent is not a function. message.  For resizeable
 I get...
   this.element.position is not a function
 [Break on this error] var o = this.options, iniPos =
 this.element.position(), el =this.element,


This sounds like you don't have the latest beta version of jQuery (which
includes this method which used to be in a separate plugin - dimensions). If
you've downloaded the UI 1.5b4 zip file, it's included. It seems the
download builder on ui.jquery.com doesn't include it, so you can grab it
here:

http://dev.jquery.com/view/tags/ui/1.5b4/jquery-1.2.4b.js

- Richard

Richard D. Worth
http://rdworth.org/


[jQuery] Re: IE7, simple AJAX, and nothing!

2008-05-12 Thread andrea varnier

On 12 Mag, 12:57, Bruce MacKay [EMAIL PROTECTED] wrote:
 Hello folks,

uhm... it's kinda strange O_o
maybe this line:

  $(#justlist,#tech).hide();

is hiding something it should not?
just guessing ^^


[jQuery] Re: Is there a way of counting the number of id's with the same name, and then renaming them _1, _2, _3 etc.

2008-05-12 Thread Richard D. Worth
One minor correction to the sample code below. $(this).attr('class') should
be $(this).attr('className')

- Richard

On Mon, May 12, 2008 at 7:22 AM, andrea varnier [EMAIL PROTECTED]
wrote:


 On 12 Mag, 12:31, quirksmode [EMAIL PROTECTED] wrote:
  Hi,
 
  I am dynamically generating html which looks like this:

 since you're generating the html dynamically, I'd suggest you do it
 server side (i.e. a for loop).
 if that is not possible, change div id=wrapper with div
 class=wrapper, if you need the wrapper string, or simply div,
 because having the same id over the page is definitely a bad thing :)
 the a solution could be:

 $('div').each(function(i){
var $this = $(this);
var the_id = $this.attr('class');
$this.attr('id', the_id + '_' + i)
 });

 this would be zero-based. change to (i+1) to have them starting with
 wrapper_1.
 without the class, shorter:
 $('div').each(function(i){
$(this).attr('id', 'wrapper_' + i)
 });

 if those div's are inside something else (let's assume a div
 id=container_div, you can add a context to the first selector, to
 speed up the process:

 $('div', '#container_div').each(function(i){
var $this = $(this);
var the_id = $this.attr('class');
$this.attr('id', the_id + '_' + i)
 });


[jQuery] Re: empty class return undefined .. bug ?

2008-05-12 Thread Richard D. Worth
The name of the class attribute is className, so you want:

$('#myid').attr('className');

- Richard

Richard D. Worth
http://rdworth.org/

On Sun, May 11, 2008 at 12:48 PM, Adwin Wijaya [EMAIL PROTECTED]
wrote:


 I have code .. to check what class in every id ..

 i found that if the class=, attr will return undefined ...

 example: className =  $('#myid').attr('class');


 I use Jquery 1.2.4b from ui.jquery.com

 is it the bug or it is the correct result from attr() ?



[jQuery] Re: validate with form plugin

2008-05-12 Thread András Csányi
2008/5/12 Jörn Zaefferer [EMAIL PROTECTED]:

  This line is broken: minLegth:3,. The method is minlength and
  you've got a trailing comma which screws up any non-firefox browser.
  Same in your last line of ajaxSubmit dataType: 'null',.

  Jörn

Oh my God! I'm a luser... :(

What is the good solution for non-firefox browsers?

Thank you very much!

András
-- 
- -
-- Csanyi Andras -- http://sayusi.hu -- Sayusi Ando
-- Bízzál Istenben és tartsd szárazon a puskaport!.-- Cromwell


[jQuery] Re: IE7, simple AJAX, and nothing - fixed!

2008-05-12 Thread Bruce MacKay


Sorry folks - I was looking in the wrong place - the file being 
loaded had a malformed div tag and IE7 was responding to that.


Cheers,

Bruce

 At 11:45 p.m. 12/05/2008, you wrote:


On 12 Mag, 12:57, Bruce MacKay [EMAIL PROTECTED] wrote:
 Hello folks,

uhm... it's kinda strange O_o
maybe this line:

  $(#justlist,#tech).hide();

is hiding something it should not?
just guessing ^^




[jQuery] Re: Problem with blockUI plugin

2008-05-12 Thread ashvin

On May 12, 4:06 pm, Mike Alsup [EMAIL PROTECTED] wrote:
  I am facing a very weird problem in IE 6.0 as the $.unblockUI()
  function is NOT removing the created page block. I have searched for
  solution but have not find any good solution.

  Can anyone help me in this and suggest me something .. any clue .. any
  hint? Why $.unblockUI() is not working in Internet Explorer 6.0+

 What version of blockUI are you using?  Can you post a link to the page?


I am using blockUI's Version 2.04 (04/30/2008).

I am using 3-4 jquery plugins into one application. I am having a
login form which I am submitting using jquery form ajax. I am handling
server errors in ajax error callback function and displaing the errors
in jquery's facebox. Now I don't want the User to interact with the
window elements when there is any error i.e. jquery's facebox is
open.   So I have added a $.blockUI(); in the same error handler
function. Here I would like to tell one more thing i.e. I am also
using Element blocking feature of blockUI plugin and I am showing
the Processing .. bar in the login form are when the User click on
submit. Unblocking of Element blocking is working fine in all the
browsers i.e. the statement : $(div#login
div.container_box).unblock(); is working fine in all the browsers.

NOTE (FYI): To overlay facebox above blockUI I have increased the z-
index of the facebox to 1500.

Here I also want to unblock the window when the user click on the
Close image of the facebox (close the facebox). So in the facebox's
close handler I have added $.unblockUI(); but this function is not
unblocking the window in Internet Explorer.

I am sorry I don't have this code on any LIVE server. But I am
mentioning the sample code below. Let me know if there is any
confusion.

=== CODE
=

// post-submit error - callback
function showLoginErrResponse(responseText, statusText)
{
$(div#login div.container_box).unblock(); // working fine in
all browsers
$.facebox('h1 style=background-color:#FF; color:#fff; height:
40px; width:600px; margin:0px; padding:18px 5px 0px 5pxOops!
Something went wrong!/h1'+ responseText.responseText);
$.blockUI({message:null});  // message is null as I only want the
white background / overlay
}

Code in facebox plugin's file ...

$.facebox.close = function() {
$.unblockUI();
$(div).remove(.blockUI);
$(document).unbind('keydown.facebox')
$('#facebox').fadeOut(function() {
  $('#facebox .content').removeClass().addClass('content')
});
return false;
  }


Let me know if anything else from my end is required.

Thanks
Ashvin



[jQuery] Re: Problem with blockUI plugin

2008-05-12 Thread ashvin

On May 12, 4:06 pm, Mike Alsup [EMAIL PROTECTED] wrote:
  I am facing a very weird problem in IE 6.0 as the $.unblockUI()
  function is NOT removing the created page block. I have searched for
  solution but have not find any good solution.

  Can anyone help me in this and suggest me something .. any clue .. any
  hint? Why $.unblockUI() is not working in Internet Explorer 6.0+

 What version of blockUI are you using?  Can you post a link to the page?


I am using blockUI's Version 2.04 (04/30/2008).

I am using 3-4 jquery plugins into one application. I am having a
login form which I am submitting using jquery form ajax. I am handling
server errors in ajax error callback function and displaing the errors
in jquery's facebox. Now I don't want the User to interact with the
window elements when there is any error i.e. jquery's facebox is
open.   So I have added a $.blockUI(); in the same error handler
function. Here I would like to tell one more thing i.e. I am also
using Element blocking feature of blockUI plugin and I am showing
the Processing .. bar in the login form are when the User click on
submit. Unblocking of Element blocking is working fine in all the
browsers i.e. the statement : $(div#login
div.container_box).unblock(); is working fine in all the browsers.

NOTE (FYI): To overlay facebox above blockUI I have increased the z-
index of the facebox to 1500.

Here I also want to unblock the window when the user click on the
Close image of the facebox (close the facebox). So in the facebox's
close handler I have added $.unblockUI(); but this function is not
unblocking the window in Internet Explorer.

I am sorry I don't have this code on any LIVE server. But I am
mentioning the sample code below. Let me know if there is any
confusion.

=== CODE
=

// post-submit error - callback
function showLoginErrResponse(responseText, statusText)
{
$(div#login div.container_box).unblock(); // working fine in
all browsers
$.facebox('h1 style=background-color:#FF; color:#fff; height:
40px; width:600px; margin:0px; padding:18px 5px 0px 5pxOops!
Something went wrong!/h1'+ responseText.responseText);
$.blockUI({message:null});  // message is null as I only want the
white background / overlay
}

Code in facebox plugin's file ...

$.facebox.close = function() {
$.unblockUI();
$(div).remove(.blockUI);
$(document).unbind('keydown.facebox')
$('#facebox').fadeOut(function() {
  $('#facebox .content').removeClass().addClass('content')
});
return false;
  }


Let me know if anything else from my end is required.

Thanks
Ashvin


[jQuery] Re: jQuery TShirt

2008-05-12 Thread Jason Levine


How about a jQuery tie for those of us who need to dress up when we go to
work. ;-)
-- 
View this message in context: 
http://www.nabble.com/jQuery-TShirt-tp17129265s27240p17187162.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Problem with blockUI plugin

2008-05-12 Thread Mike Alsup

  On May 12, 4:06 pm, Mike Alsup [EMAIL PROTECTED] wrote:
I am facing a very weird problem in IE 6.0 as the $.unblockUI()
function is NOT removing the created page block. I have searched for
solution but have not find any good solution.
  
Can anyone help me in this and suggest me something .. any clue .. any
hint? Why $.unblockUI() is not working in Internet Explorer 6.0+
  
   What version of blockUI are you using?  Can you post a link to the page?


  I am using blockUI's Version 2.04 (04/30/2008).

  I am using 3-4 jquery plugins into one application. I am having a
  login form which I am submitting using jquery form ajax. I am handling
  server errors in ajax error callback function and displaing the errors
  in jquery's facebox. Now I don't want the User to interact with the
  window elements when there is any error i.e. jquery's facebox is
  open.   So I have added a $.blockUI(); in the same error handler
  function. Here I would like to tell one more thing i.e. I am also
  using Element blocking feature of blockUI plugin and I am showing
  the Processing .. bar in the login form are when the User click on
  submit. Unblocking of Element blocking is working fine in all the
  browsers i.e. the statement : $(div#login
  div.container_box).unblock(); is working fine in all the browsers.


I believe I have fixed this in v2.05:

http://malsup.com/jquery/block/jquery.blockUI.js?v2.05

Mike


[jQuery] Re: Java applet doesn't load when markup loaded via jquery

2008-05-12 Thread Dan G. Switzer, II

I've had a ton of problems using Applets on a page with jQuery in FF2
because FF does not like jQuery accessing the expando elements when the
window.onunload event runs.

I've had to revert to using an iframe to load my applets in, so that it can
be embedded in a page without jQuery. Perhaps you can do the same thing in
your tab. Just load the applet in a iframe that only displays the applet.

-Dan

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of .M.
Sent: Sunday, May 11, 2008 1:09 AM
To: jQuery (English)
Subject: [jQuery] Re: Java applet doesn't load when markup loaded via
jquery


Follow up - I can get my applet loaded and running in a jquery tab
(issue above was applet-specific) but this leads to another question -

Is there a way ui.tabs could work that allowed an applet to stay
loaded?

I've been reading up on this and it appears there is a workaround for
hiding and revealing DIVs without unloading an applet but
jquery.ui.tabs doesn't do this.

Any thoughts?



On May 10, 6:49 pm, .M. [EMAIL PROTECTED] wrote:
 Hi

 Anyone got suggestions for this?

 I'm trying to integrate this SFTPapplet(http://www.jscape.com/
 sftpapplet/) into my site. My standalone page with the object/embed
 code loads fine but if I try to load this dynamically into the page
 theappletdoesn't load.

 I have the following function linked to the onclick method of a ui.tab
 so that when you click on the tab theappletcode is loaded into page.
 Markup loads fine butappletdoesn't start.

 function loadFTP() {
 $(#fragment-3).load(/sftpapplet);

 }

 Best
   .M.



[jQuery] [validate] Re: Release: jQuery Validation plugin 1.3

2008-05-12 Thread a_claudiu

Hi,
I'm using your plugin and I like it a lot but I needed to extend it a
little bit. I wanted to display error messages for multiple input text
having the same name but different id's. Because in the plugin is
checking only the first text box matching the name I added the next
lines:

allowDuplicateNames: false, in the default settings and

// select only the first element for each name, and only those with
rules specified
if ( ((this.name in rulesCache)  (!
validator.settings.allowDuplicateNames)) || !validator.objectLength($
(this).rules()) )

instead of

// select only the first element for each name, and only those with
rules specified
if ( this.name in rulesCache || !validator.objectLength($
(this).rules()) )

I'm finding this modification useful for me and if you like it you can
introduce it also in the plugin. I have also some translations for the
romanian language if you want to add them, just tell me how to send
them.
Regards,
Claudiu


[jQuery] cross platform issues

2008-05-12 Thread Pedro fp

G'day Folks

Firstly an admission that I'm a newbiw with jQuery (so please be  
gentle).

On the site I'm working on I've so far used jQuery in two instances,  
one site wide  the other on only one page. The code on the page where  
both appear is...

script type=text/javascript
$(document).ready(function() {
$(#vector).addClass(v + Math.ceil(Math.random() * 
7));
$(#vector).removeClass(v3);
});
/script

snip /

script type=text/javascript
$(document).ready(function(){
$(#aahs).click(function () {
$(#aarf).hide(fast );
$(#aahf).show(slow );
});
$(#aars).click(function () {
$(#aahf).hide(fast );
$(#aarf).show(slow );
});
});
/script

The scripts are in two blocks because of the workings of templating in  
my preferred editor (BBEdit).
The page that code come from can be viewed here...
http://aahr.pedro.net.au/contact/

The first script should load one of a random set of images in the top  
left of the page by way of style switching. The 2nd should load one of  
two versions of a form when the visitor clicks AA Hire or AA  
Relocatables in the page body.

It all works as intended on the Mac using either Safari or Firefox but  
neither works in Internet Explorer (I'm not au fait with IE version  
numbers but the PCs that have looked at it so far are running Win XP   
Vista).

Anyone have any clues as to what the problems might be  what I can do  
about it?

Cheers, Pedro :-)

Web: http://www.pedro.net.au/ PGP Key ID:  
387CD96F
AIM: [EMAIL PROTECTED] Jabber: [EMAIL PROTECTED] Yahoo:  
pedro_fp
ICQ: 27671678   MSN: [EMAIL PROTECTED] Skype:  
pedrofp
~ 
~ 
~ 
~ 

Only a fraction of the available human labour in the world is now
needed for the production of the total amount of consumption goods
necessary for life... therefore, the number of hours per week ought to
be reduced by law, that unemployment is systematically abolished.
   Albert Einstein


[jQuery] Re: add/remove class click function

2008-05-12 Thread thekman

Hi  thanks again for your help Dave.
Do you know of a better way to do this bit?

h3div class=ctrlsa href=#span class=min/span/a/
divReviews/h3

i am using the href as i want to use a hover image, but if it is far
down the page  a user clicks on it to show/hide the content, the
browser scrolls back to the top of the page.
any ideas?


On May 12, 1:45 am, Dave Methvin [EMAIL PROTECTED] wrote:
 Ah, I think I see it, but I should have seen it earlier.

 I'm going to assume your two .click() methods are inside a .ready()
 handler or other block that doesn't execute until the markup is there.

 Remember that the .click() method sets an event handler for the
 elements matching the selector **at the time the .click() method is
 called**.

 So your handler for .min attaches to the elements that initially
 have a class of min. There aren't any elements with the class max so
 that one does nothing. That explains why the min works but the max
 doesn't.

 It looks like you're using the min and max classes to show some sort
 of image defined by css, so you probably want to keep those the way
 they are. If all your entries are initially at min, you could just
 attach a single handler with the .min and handle the toggling inside
 that one handler. If some start at min and some at max, that wouldn't
 work.

 What I would do is create another class, say minmax, and attach the
 event handler with that. Inside the handler, see if the current class
 is min or max and do the opposite.

 $('.minmax').click(function() {
   var $this = $(this);
   if ( $this.is(.max) ) {
 $this.removeClass(max).addClass(min)
.parents(.Container).children(.Content).show();
 $.cookie($this.parents(.Container).attr(id),
 'closed', { expires: -1 });
   } else {
 $this..removeClass(min).addClass(max)
.parents(.Container).children(.Content).hide();
 $.cookie($this.parents(.Container).attr(id),
'closed', { expires: 7 });
   }

 });

 Or a shorter version:

 $('.minmax').click(function() {
   var $this = $(this);
   var togv = $this.is(.max)?
  [ max, min, show, -1 ] :
  [ min, max, hide, 7 ];
   $this.removeClass(togv[0]).addClass(togv[1]).
.parents(.Container).children(.Content)[togv[2]]();
$.cookie($this.parents(.Container).attr(id),
 'closed', { expires: togv[3] });

 });

 span class=min minmax/span


[jQuery] Re: cross platform issues

2008-05-12 Thread Dave Methvin

On the script includes, try changing the script type from application/
javascript to text/javascript and see if that helps.


[jQuery] Re: Expression/Selector question...

2008-05-12 Thread baumichel

I was confronted with a similar problem a few weeks ago and solved it
by borrowing
some code from the YUI library. So I composed this little plugin:

(function($) {
$.fn.extend({
isAncestor: function(descEl) {
var ancEl = this[0];
if (ancEl.contains) {
return ancEl.contains(descEl);
} else if (ancEl.compareDocumentPosition) {
return !!(ancEl.compareDocumentPosition(descEl)  16);
} else {
while (descEl = descEl.parentNode) {
if (descEl == ancEl)
return true;
}
return false;
}
}
});
})(jQuery);

The function returns true if the first element of a jQuery object is
an ancestor of the passed element.
In your example:

$(#1).isAncestor($(#2)[0]) --- true

Hope this is helpful for someone.


On May 8, 4:21 pm, Dan G. Switzer, II [EMAIL PROTECTED]
wrote:
 Karl,

 Yeah, it's also strange that while this doesn't work:
  $(body  ul  li).filter($li[0]);

 this does:
 $(body  ul  li).not($li[0]);

 I'm a little lost by your parents example, though. Not sure exactly
 what you're trying to get (esp. since you don't show where you've
 declared $el and $parent.

 Let's say you have:

 ul
 li id=1
 Parent 1
 ul
 li id=2
 Child 1
 /li
 /ul
 /li
 /ul

 What I want to do is see if Child 1 has Parent 1 somewhere in it's
 parent path. I don't really care if Child 1 would be a child of a child of
 a child, just that at some point Parent 1 was actually in the parent path.

 So, I would expect to be able to do:

 var $p = $(#1);
 $(#2).parents($p);

 Well this does work:
 $(#2).parents(#1);

 It doesn't work for me, since the actually expression I need to check
 against a jQuery object that can't be reliable queried through a pure
 CSS-style selector.

 couldn't you do something like
 $el.parent() ?
 or $el.parent('.someclass') ?
 or $el.parents('.someclass:first') ?

 (just using class in the parents filter because not sure what you're
 after).

 As I stated, using a CSS expression doesn't work for me because I'm actually
 checking to see if another jQuery object is somewhere in the parent's tree.

 -Dan


[jQuery] Re: Syntax question regarding value of currrent element being clicked.

2008-05-12 Thread Pickledegg

Thanks andrea ;)

On May 12, 12:27 pm, Pickledegg [EMAIL PROTECTED] wrote:
 Sussed it:

 $('this').val() does the trick!

 On May 12, 12:05 pm, Pickledegg [EMAIL PROTECTED] wrote:

  Heres my code:

  This fires on any dropdown with the class 'ajaxdropdown': However, it
  errors telling me that event.val() is not a function. How do I refer
  to the current dropdown being changed, and get its value? I know $
  ('#idofdropdown').val() will work, but I need to use multiple
  dropdowns.

  $(document).ready(function(){
 $('.ajaxdropdown').change(function(event){
  $('#charges').load('/new_callchargesajax.asp?
  shtech=yc_name='+escape(event.val()));
  });
   });

  Thanks.


[jQuery] [ANNOUNCE] clueTip 0.9.7

2008-05-12 Thread Rey Bango


Karl Swedberg released clueTip plugin 0.9.7. Fixed a few bugs. 
http://plugins.jquery.com/project/cluetip


Rey



[jQuery] Re: add/remove class click function

2008-05-12 Thread thekman

fixed it, just had to add return false; to the click function.

On May 12, 3:19 pm, thekman [EMAIL PROTECTED] wrote:
 Hi  thanks again for your help Dave.
 Do you know of a better way to do this bit?

 h3div class=ctrlsa href=#span class=min/span/a/
 divReviews/h3

 i am using the href as i want to use a hover image, but if it is far
 down the page  a user clicks on it to show/hide the content, the
 browser scrolls back to the top of the page.
 any ideas?

 On May 12, 1:45 am, Dave Methvin [EMAIL PROTECTED] wrote:

  Ah, I think I see it, but I should have seen it earlier.

  I'm going to assume your two .click() methods are inside a .ready()
  handler or other block that doesn't execute until the markup is there.

  Remember that the .click() method sets an event handler for the
  elements matching the selector **at the time the .click() method is
  called**.

  So your handler for .min attaches to the elements that initially
  have a class of min. There aren't any elements with the class max so
  that one does nothing. That explains why the min works but the max
  doesn't.

  It looks like you're using the min and max classes to show some sort
  of image defined by css, so you probably want to keep those the way
  they are. If all your entries are initially at min, you could just
  attach a single handler with the .min and handle the toggling inside
  that one handler. If some start at min and some at max, that wouldn't
  work.

  What I would do is create another class, say minmax, and attach the
  event handler with that. Inside the handler, see if the current class
  is min or max and do the opposite.

  $('.minmax').click(function() {
var $this = $(this);
if ( $this.is(.max) ) {
  $this.removeClass(max).addClass(min)
 .parents(.Container).children(.Content).show();
  $.cookie($this.parents(.Container).attr(id),
  'closed', { expires: -1 });
} else {
  $this..removeClass(min).addClass(max)
 .parents(.Container).children(.Content).hide();
  $.cookie($this.parents(.Container).attr(id),
 'closed', { expires: 7 });
}

  });

  Or a shorter version:

  $('.minmax').click(function() {
var $this = $(this);
var togv = $this.is(.max)?
   [ max, min, show, -1 ] :
   [ min, max, hide, 7 ];
$this.removeClass(togv[0]).addClass(togv[1]).
 .parents(.Container).children(.Content)[togv[2]]();
 $.cookie($this.parents(.Container).attr(id),
  'closed', { expires: togv[3] });

  });

  span class=min minmax/span


[jQuery] [Validate] using metadata mulitple messages problem.

2008-05-12 Thread Dane

Hi,
This may be because I'm not totally fluent with the Validation plugin
yet but I'm having a problem figuring out how to specify messages for
each rule via metaData. It appears that an input element with 3 rules
when broken will need to summarized the reason for the break in a
generic message specified in the title attribute.

Is it possible to use metadata to specify a message for each rule like
you can using the non metadata api?

Thanks a bunch and keep up the great work!
Dane


[jQuery] Hello World problem

2008-05-12 Thread Dave

Hi all,

I am afraid that this is going to be a very simple problem, but I am
completely stuck.  I read the start of the tutorial [1], made the
hello world page[2], and the Hello World popup does not come up.  I
replaced the Link with  onclick=alert('Hello world') and that
worked.  After reading the thread at [3] I installed firebug and it
reckoned there were 6 errors [4].

This is using apache as the web server, viewing in firefox 2.0.0.14.
I have renamed jquery-1.2.3.js jquery.js and put it in the same
directory as index.html. I can view it directly.

Thank you for any help,

[1] http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery
[2]  html
 head
 script type=text/javascript src=jquery.js/script
 script type=text/javascript
 $(document).ready(function() {
   $(a).click(function() {
 alert(Hello world!);
   });
 });
 /script
 /head
 body
 a href=Link/a
 /body
 /html
[3] 
http://groups.google.com/group/jquery-en/browse_thread/thread/4a4ec70b07e1fbb5
[4] [Exception... Component is not available nsresult: 0x80040111
(NS_ERROR_NOT_AVAILABLE) location: JS frame ::
file:///C:/Program%20Files/Mozilla%20Firefox/components/nsSessionStore.js
:: sss_saveState :: line 1753 data: no]
[Break on this error] oState.session = { state: ((this._loadState ==
STATE_RUNNING) ? STATE_RUNNIN...
nsSessionStore.js (line 1753)
missing ) after argument list
[Break on this error] jQuery.attr(\n
jquery.js (line 165)
$ is not defined
[Break on this error] $(document).ready(function() {
jquery (line 6)
[Exception... Component is not available nsresult: 0x80040111
(NS_ERROR_NOT_AVAILABLE) location: JS frame ::
file:///C:/Program%20Files/Mozilla%20Firefox/components/nsSessionStore.js
:: sss_saveState :: line 1753 data: no]
[Break on this error] oState.session = { state: ((this._loadState ==
STATE_RUNNING) ? STATE_RUNNIN...
nsSessionStore.js (line 1753)
[Exception... Component is not available nsresult: 0x80040111
(NS_ERROR_NOT_AVAILABLE) location: JS frame ::
file:///C:/Program%20Files/Mozilla%20Firefox/components/nsSessionStore.js
:: sss_saveState :: line 1753 data: no]
[Break on this error] oState.session = { state: ((this._loadState ==
STATE_RUNNING) ? STATE_RUNNIN...
nsSessionStore.js (line 1753)
[Exception... Component is not available nsresult: 0x80040111
(NS_ERROR_NOT_AVAILABLE) location: JS frame ::
file:///C:/Program%20Files/Mozilla%20Firefox/components/nsSessionStore.js
:: sss_saveState :: line 1753 data: no]
[Break on this error] oState.session = { state: ((this._loadState ==
STATE_RUNNING) ? STATE_RUNNIN...
nsSessionStore.js (line 1753)


[jQuery] Re: Release: jQuery Validation plugin 1.3

2008-05-12 Thread Alexsandro_xpt

Hi Jörn Zaefferer,

I try to use your plugin in this way, take a look:
http://blog.alexsandro.com.br/aa.htm

And I try any way to validate inputs on cascate.

Eg.:
open this url http://blog.alexsandro.com.br/aa.htm click in submit.

Look!, the ballon start on first input, but if you enter a valid e-
mail on input, the ideal is the ballon jumps on the last textarea
input automatic.
Did you know?

Did have idea to fix it to handle in this way behavior?


Thz!


On 12 maio, 08:31, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 A new release of the validation plugin
 (http://bassistance.de/jquery-plugins/jquery-plugin-validation/) is
 done, now at version 1.3. This release adds five more localizations
 and fixes a few bugs, eg. asdf is not a valid creditcard number
 anymore.

 Major improvements went into validating a form without triggering UI
 feedback (http://dev.jquery.com/ticket/2215) and batch adding and
 removing of rules.

 The complete list of changes:

 ul
 liFixed invalid-form event, now only triggered when form is invalid/li
 liAdded spanish (es), russian (ru), portuguese brazilian (ptbr),
 turkish (tr), and polish (pl) localization/li
 liAdded removeAttrs plugin to facilate adding and removing multiple
 attributes/li
 liAdded groups option to display a single message for multiple
 elements, via groups: { arbitraryGroupName: fieldName1 fieldName2[,
 fieldNameN }/li
 liEnhanced rules() for adding and removing (static) rules:
 rules(add, method1[, methodN]/{method1:param[, method_n:param]})
 and rules(remove[, method1[, method_n]) /li
 liEnhanced rules-option, accepts space-seperated string-list of
 methods, eg. {birthdate: required date}  /li
 liFixed checkbox group validation with inline rules: As long as the
 rules are specified on the first element, the group is now properly
 validated on click/li
 liFixed #2473, ignoring all rules with an explicit parameter of
 boolean-false, eg. required:false is the same as not specifying
 required at all (it was handled as required:true so far)/li
 liFixed #2424, with a modified patch from #2473: Methods returning a
 dependency-mismatch don't stop other rules from being evaluated
 anymore; still, success isn't applied for optional fields/li
 liFixed url and email validation to not use trimmed values/li
 liFixed creditcard validation to accept only digits and dashes
 (asdf is not a valid creditcard number)/li
 liAllow both button and input elements for cancel buttons (via
 class=cancel)/li
 liFixed #2215: Fixed message display to call unhighlight as part of
 showing and hiding messages, no more visual side-effects while
 checking an element and extracted validator.checkForm to validate a
 form without UI sideeffects/li
 liRewrote custom selectors (:blank, :filled, :unchecked) with
 functions for compability with AIR/li
 /ul

 As always, feedback is welcome!

 Jörn


[jQuery] Re: Hello World problem

2008-05-12 Thread Karl Swedberg


Hi Dave,

that's an odd one.

I just copied/pasted your html and tested it with no issues. Could  
there be something in your httpd.conf or .htaccess file that is  
interfering with it? Just a guess. Wish I could be of more help, but  
maybe that will point you in a productive direction.


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On May 12, 2008, at 11:19 AM, Dave wrote:



Hi all,

I am afraid that this is going to be a very simple problem, but I am
completely stuck.  I read the start of the tutorial [1], made the
hello world page[2], and the Hello World popup does not come up.  I
replaced the Link with  onclick=alert('Hello world') and that
worked.  After reading the thread at [3] I installed firebug and it
reckoned there were 6 errors [4].

This is using apache as the web server, viewing in firefox 2.0.0.14.
I have renamed jquery-1.2.3.js jquery.js and put it in the same
directory as index.html. I can view it directly.

Thank you for any help,

[1] http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery
[2]  html
head
script type=text/javascript src=jquery.js/script
script type=text/javascript
$(document).ready(function() {
  $(a).click(function() {
alert(Hello world!);
  });
});
/script
/head
body
a href=Link/a
/body
/html
[3] 
http://groups.google.com/group/jquery-en/browse_thread/thread/4a4ec70b07e1fbb5
[4] [Exception... Component is not available nsresult: 0x80040111
(NS_ERROR_NOT_AVAILABLE) location: JS frame ::
file:///C:/Program%20Files/Mozilla%20Firefox/components/nsSessionStore.js
:: sss_saveState :: line 1753 data: no]
[Break on this error] oState.session = { state: ((this._loadState ==
STATE_RUNNING) ? STATE_RUNNIN...
nsSessionStore.js (line 1753)
missing ) after argument list
[Break on this error] jQuery.attr(\n
jquery.js (line 165)
$ is not defined
[Break on this error] $(document).ready(function() {
jquery (line 6)
[Exception... Component is not available nsresult: 0x80040111
(NS_ERROR_NOT_AVAILABLE) location: JS frame ::
file:///C:/Program%20Files/Mozilla%20Firefox/components/nsSessionStore.js
:: sss_saveState :: line 1753 data: no]
[Break on this error] oState.session = { state: ((this._loadState ==
STATE_RUNNING) ? STATE_RUNNIN...
nsSessionStore.js (line 1753)
[Exception... Component is not available nsresult: 0x80040111
(NS_ERROR_NOT_AVAILABLE) location: JS frame ::
file:///C:/Program%20Files/Mozilla%20Firefox/components/nsSessionStore.js
:: sss_saveState :: line 1753 data: no]
[Break on this error] oState.session = { state: ((this._loadState ==
STATE_RUNNING) ? STATE_RUNNIN...
nsSessionStore.js (line 1753)
[Exception... Component is not available nsresult: 0x80040111
(NS_ERROR_NOT_AVAILABLE) location: JS frame ::
file:///C:/Program%20Files/Mozilla%20Firefox/components/nsSessionStore.js
:: sss_saveState :: line 1753 data: no]
[Break on this error] oState.session = { state: ((this._loadState ==
STATE_RUNNING) ? STATE_RUNNIN...
nsSessionStore.js (line 1753)




[jQuery] Re: validate a form using jsVal script

2008-05-12 Thread JP

your website says jquery.delegate.js - special event delegation,
required but I don't see that in the download...



On May 12, 4:40 am, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 You many want to try a jQuery based validation 
 instead:http://bassistance.de/jquery-plugins/jquery-plugin-validation/

 Just released version 1.3. Let me know if you need help with it.

 Jörn

 On Mon, May 12, 2008 at 8:10 AM, JP [EMAIL PROTECTED] wrote:

  In an $.ajax option  beforsend, I want to call a function to validate
  a form using jsVal script

  (jsVal  is here:  http://jsval.fantastic-bits.de/ The home page shows
  examples)

  I tried the following:
  ...
  $.ajax({
  beforeSend: showRequest,
  ...

 function showRequest(){//alert('showRequest');
 var objForm = document.forms[contactForm];
 validateStandard(objForm, 'error');
 }

  The alert will show but,  validateStandard()  is not processed.
  jquery ignores this and proceeds ahead with submittal, which is
  successful.

  How can I correctly use a third party script like jsval to validate
  the form before it is submitted by jquery ajax ?


[jQuery] Superfish superfish.js + prototype.js + scriptaculous.js

2008-05-12 Thread rui gomes

Hi,
I´m using the superfish vertical menu with an ajax (scriptaculous
+prototype) application and the superfish was working just fine,
before add this application.

Now, when i do a mouseover the 2st level menu, just appears and
disappears !??

here´s the link:
http://marteleira.com

[code]
link href=css/global.css rel=stylesheet type=text/css /
link rel=stylesheet type=text/css href=css/vertical.css
media=screen
script type=text/javascript src=js/jquery-1.2.3.js/script
script type=text/javascript src=js/hoverIntent.js/script
script type=text/javascript src=js/bgiframe.js/script
script type=text/javascript src=js/superfish.js/script
script src=js/lib/prototype.js type=text/javascript/script
script src=js/src/scriptaculous.js type=text/javascript/script
script type=text/javascript
function highlightCalendarCell(element) {
$(element).style.border = '1px solid #d91a84';
}

function resetCalendarCell(element) {
$(element).style.border = '1px solid #2C2C2C';
}

function startCalendar(month, year) {
new Ajax.Updater('calendarInternal', 'rpc.php', {method: 'post',
postBody: 'action=startCalendarmonth='+month+'year='+year+''});
}

function showEventForm(day) {
$('evtDay').value = day;
$('evtMonth').value = $F('ccMonth');
$('evtYear').value = $F('ccYear');

displayEvents(day, $F('ccMonth'), $F('ccYear'));

if(Element.visible('addEventForm')) {
// do nothing.
} else {
Element.show('addEventForm');
}
}

function displayEvents(day, month, year) {
new Ajax.Updater('eventList', 'rpc.php', {method: 'post', 
postBody:
'action=listEventsd='+day+'m='+month+'y='+year+''});
if(Element.visible('eventList')) {
// do nothing, its already visble.
} else {
setTimeout(Element.show('eventList'), 300);
}
}

function addEvent(day, month, year, body) {
if(day  month  year  body) {
// alert('Add Event\nDay: '+day+'\nMonth: 
'+month+'\nYear: '+year
+'\nBody: '+body);
new Ajax.Request('rpc.php', {method: 'post', postBody:
'action=addEventd='+day+'m='+month+'y='+year+'body='+body+'',
onSuccess: highlightEvent(day)});
$('evtBody').value = '';
} else {
alert('There was an unexpected script error.\nPlease 
ensure that
you have not altered parts of it.');
}

// highlightEvent(day);
} // addEvent.

function highlightEvent(day) {
Element.hide('addEventForm');
$('calendarDay_'+day+'').style.background = '#?= $eventColor 
?';
}

function showLoginBox() {
Element.show('loginBox');
}

function showCP() {
Element.show('cpBox');
}

}
/script
script type=text/javascript
!--
$(document).ready(function(){
$(.nav)
.superfish({
animation : { opacity:show,height:show}
})
});
//--
/script
[/code]

Regards,
ps - it´s very urgent! and thanks!


[jQuery] Re: Checkbox confusion

2008-05-12 Thread Chris Cotton
Wow!! that worked!!! thanks

Next question. . .Why? I am not seeing the flaw in the logic of my broken
and obviously  less elegant solution.

And how did you get away with not having to use event.preventDefault()  ???
Also i don't understand why var item = $(this).parent().text(); returns
what I want and not bChecklist.

Teach, oh wise friend. Teach indeedafter a week of playing with jquery I
must have missed a key concept or 3.

On Thu, May 8, 2008 at 1:43 AM, Wizzud [EMAIL PROTECTED] wrote:


 Try this...

  $(#bChecklist input:checkbox).click(function(event){
  var item = $(this).parent().text();
  alert ( (this.checked ? '' : 'Un') + 'Checked = ' + item);
});


 On May 8, 1:38 am, mr4d [EMAIL PROTECTED] wrote:
  Hi all,
 
  Can't quite get the  the following functionality to work:
 
  1. when I click on an un-checked checkbox, I want the box to be
  checked AND to raise an alert showing the text of the item which has
  just been checked.
 
  2. Similarly if the user unchecks the box I want to raise an
  unchecked alert and  then have the box unchecked.
 
   I have been trying to do this for about an hour but the behavior is:
 
   a. I am getting the Checked alert for clicks on both checked
  and unchecked checkboxes
   b. Once the user checks a box I get the Checked alert but the
  box never actually gets checked.
 
  The code is:
 
  $(#bChecklist  li).click(function(event){
 var item = $(this).text();
 // get the label value
 
 if ($(this).not(':checked')){
 event.preventDefault();
 alert ('Checking = '+ item)
 this.checked = true; // my attempt to
  force an unchecked box to be true
   // after
  using event.preventDefault
   }
 else if ($(this).is(':checked')) {
 event.preventDefault();
 alert ('UnChecking = '+item)
 }
   });
 
  form id=myForm name=myForm action=/cm/BaB/create/
  method=post
 
  .
 
  div class=row id=div2
 
  fieldset id=bundleFields !-- Add dynamically --
  legend id=bundleLegend Bundle Task/legend
 ul class=bChecklist id=bChecklist
 
  lilabel for=o1input id=o1 name=o1
 type=checkbox
  class=bundleItem /MYTHINGY 1/label/li
 
  lilabel for=o2input id=o2 name=o2
 type=checkbox
  class=bundleItem /MYTHINGY 2/label/li
 
  lilabel for=o3input id=o3 name=o3
 type=checkbox
  class=bundleItem /MYTHINGY 3/label/li
 
 /ul
  /fieldset
  /divbr clear=all/
  /form
 
  Not quite sure what I am doing wrong.  .



[jQuery] Question about validation

2008-05-12 Thread Eridius


This is the thing i need to be able to do trying to use the Validation 1.2
plug.  Basically i want to be able to undisabled a button if the validation
fails.  Now i just disable the button on click which works fine but i don't
see anything in the documentation on being able to trigger a function on a
failed validation, only on a successful validation.  is this possible?
-- 
View this message in context: 
http://www.nabble.com/Question-about-validation-tp17189880s27240p17189880.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Ajax Load Question

2008-05-12 Thread Chris

Hello,
I am trying to create a dynamic daily calendar (see image
http://img107.imageshack.us/img107/8425/picture7gv1.png) that when the
user hits next or last the calendar will slide out/in to the next
week of days.  I have looked at this ajax load plugin (http://
www.andreacfm.com/index.cfm/jquery-plug-ins/ajax-content) is this what
I should use?  How do I use the slide in/out effect with the plugin,
I've used it on its on before.
Thank you for any help!
-Chris


[jQuery] Re: Checkbox confusion

2008-05-12 Thread Wizzud

Firstly, you were placing a click handler on the LI, not on the INPUT
(the checkbox), so inside the click handler 'this' refers to the
relevant LI whose checkbox has been clicked.
That's fine for retrieving the text, but the LI doesn't know whether
the checkbox is checked or not (as a result of being clicked), so
testing the 'checked' property of the LI is not going to tell you
anything about the state of the contained checkbox.
My solution simply places the click handler on the INPUT (the
checkbox) itself, then retrieves the text from the parent LI. Because
the click handler is attached to the INPUT, 'this' refers to the
clicked checkbox, and I can test the 'checked' property. The text
retrieval from parent() only works because all the checkboxes are
immediate children of the LI holding the desired text. If more
elements were placed between the LI(s) and the checkbox(es) then
obviously parent() would have to be changed to something else.

You don't need preventDefault() unless you want to stop what would
normally happen happening - if you see what I mean. In your case, you
are not trying to prevent the checkbox being checked/unchecked when
clicked, simply record whether it has become checked/unchecked as a
result of being clicked - so you don't want to prevent the natural
behaviour of the browser. Hence no need to preventDefault().

On May 12, 5:30 pm, Chris Cotton [EMAIL PROTECTED] wrote:
 Wow!! that worked!!! thanks

 Next question. . .Why? I am not seeing the flaw in the logic of my broken
 and obviously  less elegant solution.

 And how did you get away with not having to use event.preventDefault()  ???
 Also i don't understand why var item = $(this).parent().text(); returns
 what I want and not bChecklist.

 Teach, oh wise friend. Teach indeedafter a week of playing with jquery I
 must have missed a key concept or 3.

 On Thu, May 8, 2008 at 1:43 AM, Wizzud [EMAIL PROTECTED] wrote:

  Try this...

   $(#bChecklist input:checkbox).click(function(event){
   var item = $(this).parent().text();
   alert ( (this.checked ? '' : 'Un') + 'Checked = ' + item);
 });

  On May 8, 1:38 am, mr4d [EMAIL PROTECTED] wrote:
   Hi all,

   Can't quite get the  the following functionality to work:

   1. when I click on an un-checked checkbox, I want the box to be
   checked AND to raise an alert showing the text of the item which has
   just been checked.

   2. Similarly if the user unchecks the box I want to raise an
   unchecked alert and  then have the box unchecked.

I have been trying to do this for about an hour but the behavior is:

a. I am getting the Checked alert for clicks on both checked
   and unchecked checkboxes
b. Once the user checks a box I get the Checked alert but the
   box never actually gets checked.

   The code is:

   $(#bChecklist  li).click(function(event){
  var item = $(this).text();
  // get the label value

  if ($(this).not(':checked')){
  event.preventDefault();
  alert ('Checking = '+ item)
  this.checked = true; // my attempt to
   force an unchecked box to be true
// after
   using event.preventDefault
}
  else if ($(this).is(':checked')) {
  event.preventDefault();
  alert ('UnChecking = '+item)
  }
});

   form id=myForm name=myForm action=/cm/BaB/create/
   method=post

   .

   div class=row id=div2

   fieldset id=bundleFields !-- Add dynamically --
   legend id=bundleLegend Bundle Task/legend
  ul class=bChecklist id=bChecklist

   lilabel for=o1input id=o1 name=o1
  type=checkbox
   class=bundleItem /MYTHINGY 1/label/li

   lilabel for=o2input id=o2 name=o2
  type=checkbox
   class=bundleItem /MYTHINGY 2/label/li

   lilabel for=o3input id=o3 name=o3
  type=checkbox
   class=bundleItem /MYTHINGY 3/label/li

  /ul
   /fieldset
   /divbr clear=all/
   /form

   Not quite sure what I am doing wrong.  .


[jQuery] Re: [treeview] newbie

2008-05-12 Thread macsig

Thanks Mike, I appreciate your help

On May 10, 8:55 pm, Michael Geary [EMAIL PROTECTED] wrote:
 It's fairly common for a syntax error message to give you the correct
 location of the error but not tell you what the actual error really is. In
 this case, it's missing {}.

 ...
 $j(#example).treeview({
 collapsed: true
 });
 ...

 -Mike

  Hello, I have just downloaded thetreeviewplugin and it
  looks like fine

  var $j = jQuery.noConflict();
  $j(document).ready(function(){
  $j(#example).treeview();
});

  but when I try to load the tree with some options

  var $j = jQuery.noConflict();
  $j(document).ready(function(){
  $j(#example).treeview(
 collapsed: true
 );
});

  I have the error below:

  missing ) after argument list
  [Break on this error] collapsed: true\n

  but I don't see any missing )

  Where am I wrong ???

  Moreover. is there a option list available somewhere online ?


[jQuery] jquery Lightbox Problem

2008-05-12 Thread [EMAIL PROTECTED]

Hi All,

I've recently uploaded a website http://www.treetment.co.uk and I have
used the jQuery Lightbox plugin to scroll through the portfolio
pictures.

I have tested the site locally and uploaded to 
http://www.ajtrichards.co.uk/clients/treetment/
and they both work fine.

However, when you try to use the Lightbox on treetment.co.uk it just
displays the picture in the browser not the lightbox and I have no
idea why!!

Can someone have a look to cast a fresh pair of eyes to see if they
can spot a mistake!!

Thanks
Alex.


[jQuery] Re: Problem whith ie 7 and slideDown

2008-05-12 Thread uppe
Hi,

I just wanted to let you know that I also am experiencing this. I've
yet to find a solution for the problem, but I'm in the process of
finding out. If anyone else has a good solution, or know if it is
fixed in the upcoming release, please let us know.

On 11 Apr, 22:45, nerohc [EMAIL PROTECTED] wrote:
 Hi, i hae the following code:

 $(document).ready(function(){
         $('#txtSearch').attr('value', 'Enter Search tags for skills or
 functions').focus(function(){
                 $(this).attr('value', '');
                 showSearchBox();
         })

 });

 function showSearchBox(){
         $('#searchBox').slideDown();

 }

 function hideSearchBox(){
         $('#searchBox').slideUp();
         $('#txtSearch').attr('value', 'Enter Search tags for skills or
 functions');

 }

 function showMessagesBox(){
         $('#messagesBox').slideDown();

 }

 function hideMessagesBox(){
         $('#messagesBox').slideUp();

 }

 this is the HTML:

 body
         div id=header
                 table width=100% cellpadding=0 cellspacing=0
                         tr
                                 tdimg src=/img/logo.gif/td
                                 td align=center
                                         span id=settingssettings/span
                                         span id=logoutlogout/spanbr
                                         span id=messagesa 
 href=javascript: void 0;
 onclick=showMessagesBox();MESSAGES(13)/a/span
                                 /td
                         /tr
                 /table
         /div
         div id=searchInputinput type=text id=txtSearch size=40//
 div
         div id=messagesBox
                 a href=javascript: void: 0 
 onclick=hideMessagesBox();Close/a
         /div
         div id=searchBox
                 table width=100%
                         tr
                                 td
                                         table
                                                 tr
                                                         tdCurrent/Last Job 
 Company/td
                                                         tdinput 
 type=text id=lastJobCompany//td
                                                 /tr
                                                 tr
                                                         tdCurrent/Last Job 
 Title/td
                                                         tdinput 
 type=text id=lastJobTitle//td
                                                 /tr
                                         /table

                                         table
                                                 tr
                                                         tdMin. Base Pay/td
                                                         td
                                                                 select 
 id=basePayTime
                                                                         
 option value=yearlyYearly
                                                                 /select
                                                                 select 
 id=basePayMoney
                                                                         
 option value=3-45000$30,000-45,000
                                                                 /select
                                                         /td
                                                         tr
                                                                 td
                                                                         Work 
 Type
                                                                 /td
                                                                 td
                                                                         
 input type=checkbox value=full
 id=chkJobTypeFulllabel for=chkJobTypeFullFull-time/label
                                                                         
 input type=checkbox value=contract
 id=chkJobTypeContracrlabel for=chkJobTypeContracrContract/
 label
                                                                 /td
                                                         /tr
                                                         tr
                                                                 
 tdEducation/td
                                                                 td
                                                                         
 select id=educationSelect
                                                                               
   option4 Year Degree
                                                                         
 /select
                                                                 /td
                                                         /tr
                                                         tr
                                                                 
 tdLocation/td
             

[jQuery] Learning JQuery Chapter 6 XML parsing

2008-05-12 Thread JQuery

I could see the content of the d.xml file (alert('data: ' + data), but
I could not see the alert('inside each function').  I think jquery did
not recognize d.xml is an xml file.

Any idea?
Thanks

$(document).ready(function() {
  $('#letter-d .button').click(function() {
$.get('d.xml', function(data) {
  alert('data: ' + data);
  $('#dictionary').empty();
  $(data).find('[EMAIL PROTECTED]').each(function() {
var $entry = $(this);

alert('inside each function');

var html = 'div class=entry';
html += 'h3 class=term' + $entry.attr('term') + '/h3';
html += 'div class=part' + $entry.attr('part') + '/div';
html += 'div class=definition'
html += $entry.find('definition').text();
var $quote = $entry.find('quote');
if ($quote.length) {
  html += 'div class=quote';
  $quote.find('line').each(function() {
html += 'div class=quote-line' + $(this).text() + '/
div';
  });
  if ($quote.attr('author')) {
html += 'div class=quote-author' +
$quote.attr('author') + '/div';
  }
  html += '/div';
}
html += '/div';
html += '/div';
$('#dictionary').append($(html));
  });
});
  });
});

Content of d.xml file
?xml version=1.0 encoding=UTF-8?
entries
  entry term=DANCE part=v.i.
definition
  To leap about to the sound of tittering music, preferably with
arms about your neighbor's wife or daughter.  There are many kinds of
dances, but all those requiring the participation of the two sexes
have two characteristics in common:  they are conspicuously innocent,
and warmly loved by the vicious.
/definition
  /entry
  entry term=DAY part=n.
definition
  A period of twenty-four hours, mostly misspent.  This period is
divided into two parts, the day proper and the night, or day improper
![CDATA[mdash;]] the former devoted to sins of business, the latter
consecrated to the other sort.  These two kinds of social activity
overlap.
/definition
  /entry
  entry term=DEBT part=n.
definition
  An ingenious substitute for the chain and whip of the slave-
driver.
/definition
quote author=Barlow S. Vode
  lineAs, pent in an aquarium, the troutlet/line
  lineSwims round and round his tank to find an outlet,/line
  linePressing his nose against the glass that holds him,/line
  lineNor ever sees the prison that enfolds him;/line
  lineSo the poor debtor, seeing naught around him,/line
  lineYet feels the narrow limits that impound him,/line
  lineGrieves at his debt and studies to evade it,/line
  lineAnd finds at last he might as well have paid it./line
/quote
  /entry
  entry term=DEFAME part=v.t.
definition
  To lie about another.  To tell the truth about another.
/definition
  /entry
  entry term=DEFENCELESS part=adj.
definition
  Unable to attack.
/definition
  /entry
  entry term=DELIBERATION part=n.
definition
  The act of examining one's bread to determine which side it is
buttered on.
/definition
  /entry
  entry term=DELUSION part=n.
definition
  The father of a most respectable family, comprising Enthusiasm,
Affection, Self-denial, Faith, Hope, Charity and many other goodly
sons and daughters.
/definition
quote author=Mumfrey Mappel
  lineAll hail, Delusion!  Were it not for thee/line
  lineThe world turned topsy-turvy we should see;/line
  lineFor Vice, respectable with cleanly fancies,/line
  lineWould fly abandoned Virtue's gross advances./line
/quote
  /entry
  entry term=DENTIST part=n.
definition
  A prestidigitator who, putting metal into your mouth, pulls
coins out of your pocket.
/definition
  /entry
  entry term=DIE part=n.
definition
  The singular of dice.  We seldom hear the word, because there
is a prohibitory proverb, Never say die.  At long intervals,
however, some one says:  The die is cast, which is not true, for it
is cut.  The word is found in an immortal couplet by that eminent poet
and domestic economist, Senator Depew:
/definition
quote
  lineA cube of cheese no larger than a die/line
  lineMay bait the trap to catch a nibbling mie./line
/quote
  /entry
  entry term=DIPLOMACY part=n.
definition
  The patriotic art of lying for one's country.
/definition
  /entry
  entry term=DISTANCE part=n.
definition
  The only thing that the rich are willing for the poor to call
theirs, and keep.
/definition
  /entry
/entries


[jQuery] Re: Learning JQuery Chapter 6 XML parsing

2008-05-12 Thread Karl Swedberg


Hi,

There was a problem with the particular version of jQuery that was  
bundled with the downloadable code from the Packt website.


Take a look at the companion site for a working version:

http://book.learningjquery.com/2509_06_code/dictionary.html


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On May 12, 2008, at 1:58 PM, JQuery wrote:



I could see the content of the d.xml file (alert('data: ' + data), but
I could not see the alert('inside each function').  I think jquery did
not recognize d.xml is an xml file.

Any idea?
Thanks

$(document).ready(function() {
 $('#letter-d .button').click(function() {
   $.get('d.xml', function(data) {
 alert('data: ' + data);
 $('#dictionary').empty();
 $(data).find('[EMAIL PROTECTED]').each(function() {
   var $entry = $(this);

   alert('inside each function');

   var html = 'div class=entry';
   html += 'h3 class=term' + $entry.attr('term') + '/h3';
   html += 'div class=part' + $entry.attr('part') + '/div';
   html += 'div class=definition'
   html += $entry.find('definition').text();
   var $quote = $entry.find('quote');
   if ($quote.length) {
 html += 'div class=quote';
 $quote.find('line').each(function() {
   html += 'div class=quote-line' + $(this).text() + '/
div';
 });
 if ($quote.attr('author')) {
   html += 'div class=quote-author' +
$quote.attr('author') + '/div';
 }
 html += '/div';
   }
   html += '/div';
   html += '/div';
   $('#dictionary').append($(html));
 });
   });
 });
});

Content of d.xml file
?xml version=1.0 encoding=UTF-8?
entries
 entry term=DANCE part=v.i.
   definition
 To leap about to the sound of tittering music, preferably with
arms about your neighbor's wife or daughter.  There are many kinds of
dances, but all those requiring the participation of the two sexes
have two characteristics in common:  they are conspicuously innocent,
and warmly loved by the vicious.
   /definition
 /entry
 entry term=DAY part=n.
   definition
 A period of twenty-four hours, mostly misspent.  This period is
divided into two parts, the day proper and the night, or day improper
![CDATA[mdash;]] the former devoted to sins of business, the latter
consecrated to the other sort.  These two kinds of social activity
overlap.
   /definition
 /entry
 entry term=DEBT part=n.
   definition
 An ingenious substitute for the chain and whip of the slave-
driver.
   /definition
   quote author=Barlow S. Vode
 lineAs, pent in an aquarium, the troutlet/line
 lineSwims round and round his tank to find an outlet,/line
 linePressing his nose against the glass that holds him,/line
 lineNor ever sees the prison that enfolds him;/line
 lineSo the poor debtor, seeing naught around him,/line
 lineYet feels the narrow limits that impound him,/line
 lineGrieves at his debt and studies to evade it,/line
 lineAnd finds at last he might as well have paid it./line
   /quote
 /entry
 entry term=DEFAME part=v.t.
   definition
 To lie about another.  To tell the truth about another.
   /definition
 /entry
 entry term=DEFENCELESS part=adj.
   definition
 Unable to attack.
   /definition
 /entry
 entry term=DELIBERATION part=n.
   definition
 The act of examining one's bread to determine which side it is
buttered on.
   /definition
 /entry
 entry term=DELUSION part=n.
   definition
 The father of a most respectable family, comprising Enthusiasm,
Affection, Self-denial, Faith, Hope, Charity and many other goodly
sons and daughters.
   /definition
   quote author=Mumfrey Mappel
 lineAll hail, Delusion!  Were it not for thee/line
 lineThe world turned topsy-turvy we should see;/line
 lineFor Vice, respectable with cleanly fancies,/line
 lineWould fly abandoned Virtue's gross advances./line
   /quote
 /entry
 entry term=DENTIST part=n.
   definition
 A prestidigitator who, putting metal into your mouth, pulls
coins out of your pocket.
   /definition
 /entry
 entry term=DIE part=n.
   definition
 The singular of dice.  We seldom hear the word, because there
is a prohibitory proverb, Never say die.  At long intervals,
however, some one says:  The die is cast, which is not true, for it
is cut.  The word is found in an immortal couplet by that eminent poet
and domestic economist, Senator Depew:
   /definition
   quote
 lineA cube of cheese no larger than a die/line
 lineMay bait the trap to catch a nibbling mie./line
   /quote
 /entry
 entry term=DIPLOMACY part=n.
   definition
 The patriotic art of lying for one's country.
   /definition
 /entry
 entry term=DISTANCE part=n.
   definition
 The only thing that the rich are willing for the poor to call
theirs, and keep.
   /definition
 /entry
/entries




[jQuery] Re: jquery Lightbox Problem

2008-05-12 Thread Hilmar Kolbe
Seems like the file on the live-site is broken:

http://treetment.co.uk/js/jquery.lightbox.js

2008/5/12 [EMAIL PROTECTED] [EMAIL PROTECTED]:


 Hi All,

 I've recently uploaded a website http://www.treetment.co.uk and I have
 used the jQuery Lightbox plugin to scroll through the portfolio
 pictures.

 I have tested the site locally and uploaded to
 http://www.ajtrichards.co.uk/clients/treetment/
 and they both work fine.

 However, when you try to use the Lightbox on treetment.co.uk it just
 displays the picture in the browser not the lightbox and I have no
 idea why!!

 Can someone have a look to cast a fresh pair of eyes to see if they
 can spot a mistake!!

 Thanks
 Alex.



[jQuery] Re: Learning JQuery Chapter 6 XML parsing

2008-05-12 Thread JQuery

I tried to get around that by
$(data).ready(function(){

 });
 but still could not access the xml data.


On May 12, 10:58 am, JQuery [EMAIL PROTECTED] wrote:
 I could see the content of the d.xml file (alert('data: ' + data), but
 I could not see the alert('inside each function').  I think jquery did
 not recognize d.xml is an xml file.

 Any idea?
 Thanks

 $(document).ready(function() {
   $('#letter-d .button').click(function() {
 $.get('d.xml', function(data) {
   alert('data: ' + data);
   $('#dictionary').empty();
   $(data).find('[EMAIL PROTECTED]').each(function() {
 var $entry = $(this);

 alert('inside each function');

 var html = 'div class=entry';
 html += 'h3 class=term' + $entry.attr('term') + '/h3';
 html += 'div class=part' + $entry.attr('part') + '/div';
 html += 'div class=definition'
 html += $entry.find('definition').text();
 var $quote = $entry.find('quote');
 if ($quote.length) {
   html += 'div class=quote';
   $quote.find('line').each(function() {
 html += 'div class=quote-line' + $(this).text() + '/
 div';
   });
   if ($quote.attr('author')) {
 html += 'div class=quote-author' +
 $quote.attr('author') + '/div';
   }
   html += '/div';
 }
 html += '/div';
 html += '/div';
 $('#dictionary').append($(html));
   });
 });
   });

 });

 Content of d.xml file
 ?xml version=1.0 encoding=UTF-8?
 entries
   entry term=DANCE part=v.i.
 definition
   To leap about to the sound of tittering music, preferably with
 arms about your neighbor's wife or daughter.  There are many kinds of
 dances, but all those requiring the participation of the two sexes
 have two characteristics in common:  they are conspicuously innocent,
 and warmly loved by the vicious.
 /definition
   /entry
   entry term=DAY part=n.
 definition
   A period of twenty-four hours, mostly misspent.  This period is
 divided into two parts, the day proper and the night, or day improper
 ![CDATA[mdash;]] the former devoted to sins of business, the latter
 consecrated to the other sort.  These two kinds of social activity
 overlap.
 /definition
   /entry
   entry term=DEBT part=n.
 definition
   An ingenious substitute for the chain and whip of the slave-
 driver.
 /definition
 quote author=Barlow S. Vode
   lineAs, pent in an aquarium, the troutlet/line
   lineSwims round and round his tank to find an outlet,/line
   linePressing his nose against the glass that holds him,/line
   lineNor ever sees the prison that enfolds him;/line
   lineSo the poor debtor, seeing naught around him,/line
   lineYet feels the narrow limits that impound him,/line
   lineGrieves at his debt and studies to evade it,/line
   lineAnd finds at last he might as well have paid it./line
 /quote
   /entry
   entry term=DEFAME part=v.t.
 definition
   To lie about another.  To tell the truth about another.
 /definition
   /entry
   entry term=DEFENCELESS part=adj.
 definition
   Unable to attack.
 /definition
   /entry
   entry term=DELIBERATION part=n.
 definition
   The act of examining one's bread to determine which side it is
 buttered on.
 /definition
   /entry
   entry term=DELUSION part=n.
 definition
   The father of a most respectable family, comprising Enthusiasm,
 Affection, Self-denial, Faith, Hope, Charity and many other goodly
 sons and daughters.
 /definition
 quote author=Mumfrey Mappel
   lineAll hail, Delusion!  Were it not for thee/line
   lineThe world turned topsy-turvy we should see;/line
   lineFor Vice, respectable with cleanly fancies,/line
   lineWould fly abandoned Virtue's gross advances./line
 /quote
   /entry
   entry term=DENTIST part=n.
 definition
   A prestidigitator who, putting metal into your mouth, pulls
 coins out of your pocket.
 /definition
   /entry
   entry term=DIE part=n.
 definition
   The singular of dice.  We seldom hear the word, because there
 is a prohibitory proverb, Never say die.  At long intervals,
 however, some one says:  The die is cast, which is not true, for it
 is cut.  The word is found in an immortal couplet by that eminent poet
 and domestic economist, Senator Depew:
 /definition
 quote
   lineA cube of cheese no larger than a die/line
   lineMay bait the trap to catch a nibbling mie./line
 /quote
   /entry
   entry term=DIPLOMACY part=n.
 definition
   The patriotic art of lying for one's country.
 /definition
   /entry
   entry term=DISTANCE part=n.
 definition
   The only thing that the rich are willing for the poor to call
 theirs, and keep.
 /definition
   /entry
 /entries


[jQuery] Re: Question about validation

2008-05-12 Thread Jörn Zaefferer

There is a event triggered for invalid forms, see
http://docs.jquery.com/Plugins/Validation/validate#options

A usage example is here:
http://jquery.bassistance.de/validate/demo/marketo/mktSignup.js

$(form).bind(invalid-form.validate, function(e, validator) {
var errors = validator.numberOfInvalids();
if (errors) {
var message = errors == 1
? 'You missed 1 field. It has been highlighted 
below'
: 'You missed ' + errors + ' fields.  They have 
been highlighted below';
$(div.error span).html(message);
$(div.error).show();
} else {
$(div.error).hide();
}
}).validate({
//focusInvalid: false,
//focusCleanup: true,
onkeyup: false,
submitHandler: function() {
$(div.error).hide();
alert(submit! use link below to go to the other step);
},
messages: {
password2: {
required:  ,
equalTo: Please enter the same password as 
above  
},
email: {
required:  ,
email: Please enter a valid email address, 
example: [EMAIL PROTECTED],
remote: jQuery.format({0} is already taken, 
please enter a
different address.)
}
},
debug:true
});

Jörn


[jQuery] Re: validate a form using jsVal script

2008-05-12 Thread Jörn Zaefferer

That is now bundled. Where did you find the note? I thought I removed them..

Jörn

On Mon, May 12, 2008 at 5:40 PM, JP [EMAIL PROTECTED] wrote:

  your website says jquery.delegate.js - special event delegation,
  required but I don't see that in the download...



  On May 12, 4:40 am, Jörn Zaefferer [EMAIL PROTECTED]
  wrote:

  You many want to try a jQuery based validation 
  instead:http://bassistance.de/jquery-plugins/jquery-plugin-validation/
  
   Just released version 1.3. Let me know if you need help with it.
  
   Jörn
  


  On Mon, May 12, 2008 at 8:10 AM, JP [EMAIL PROTECTED] wrote:
  
In an $.ajax option  beforsend, I want to call a function to validate
a form using jsVal script
  
(jsVal  is here:  http://jsval.fantastic-bits.de/ The home page shows
examples)
  
I tried the following:
...
$.ajax({
beforeSend: showRequest,
...
  
   function showRequest(){//alert('showRequest');
   var objForm = document.forms[contactForm];
   validateStandard(objForm, 'error');
   }
  
The alert will show but,  validateStandard()  is not processed.
jquery ignores this and proceeds ahead with submittal, which is
successful.
  
How can I correctly use a third party script like jsval to validate
the form before it is submitted by jquery ajax ?



[jQuery] Re: validate() and multiple forms that arrive via ajax

2008-05-12 Thread pedalpete

I've been having similar issues, and your solution really helped, but
i think it introduced another problem.

if I retrieve the same form again, so loaded the form a second time
via ajax, the form tries to validate, but then submits anyway. Kinda
strange.

My code looks like this
[ code]
 function validateEmpAJAX(){

$('#addEmpForm').validate({
currentForm : $('#addEmpForm'),
submitHandler: function(){
var options = {
target:'#addEmpForm',   // target element(s) to be
updated with server response
beforesubmit: showRequestaddEmp,
success: showResponseaddEmp
};



$('#addEmpForm').livequery('submit', function() {

$(this).ajaxSubmit(options);
return false;
});
}
});
function showRequestaddEmp(formData, jqForm, options) {

var queryString = $.param(formData);



 $(form#addEmpForm).html(loading);

}

function showResponseaddEmp(options)  {
$.ajax({
type: POST,
url: processes/getEmployees2.php,
data: uid=+newuid+refresh=u2,
success: function(response){
$(.employees).append(response);
$(#addEmpForm).fadeOut(slow);
}
});

}

[/code]

I've tried .livequery and unbinding items, but it doesn't seem to
work.


[jQuery] Re: [validate] Re: Release: jQuery Validation plugin 1.3

2008-05-12 Thread Jörn Zaefferer

Translations are always welcome, please mail them directly to me,
preferably UTF-8 encoded.

About the allowDuplicateNames modification: Could you create a ticket
for that? http://dev.jquery.com/newticket

Thanks
Jörn

On Mon, May 12, 2008 at 3:22 PM, a_claudiu [EMAIL PROTECTED] wrote:

  Hi,
  I'm using your plugin and I like it a lot but I needed to extend it a
  little bit. I wanted to display error messages for multiple input text
  having the same name but different id's. Because in the plugin is
  checking only the first text box matching the name I added the next
  lines:

  allowDuplicateNames: false, in the default settings and

  // select only the first element for each name, and only those with
  rules specified
  if ( ((this.name in rulesCache)  (!
  validator.settings.allowDuplicateNames)) || !validator.objectLength($
  (this).rules()) )

  instead of

  // select only the first element for each name, and only those with
  rules specified
  if ( this.name in rulesCache || !validator.objectLength($
  (this).rules()) )

  I'm finding this modification useful for me and if you like it you can
  introduce it also in the plugin. I have also some translations for the
  romanian language if you want to add them, just tell me how to send
  them.
  Regards,
  Claudiu



[jQuery] Re: Release: jQuery Validation plugin 1.3

2008-05-12 Thread Jörn Zaefferer

You could use the success-option, passing a callback, as a hook to
trigger validator.focusInvalid(). Something like this:

var validator = $(...).validate({
  // other options
  ...,
  success: function() {
validator.focusInvalid();
  }
});

Jörn

On Mon, May 12, 2008 at 5:23 PM, Alexsandro_xpt [EMAIL PROTECTED] wrote:

  Hi Jörn Zaefferer,

  I try to use your plugin in this way, take a look:
  http://blog.alexsandro.com.br/aa.htm

  And I try any way to validate inputs on cascate.

  Eg.:
  open this url http://blog.alexsandro.com.br/aa.htm click in submit.

  Look!, the ballon start on first input, but if you enter a valid e-
  mail on input, the ideal is the ballon jumps on the last textarea
  input automatic.
  Did you know?

  Did have idea to fix it to handle in this way behavior?


  Thz!


  On 12 maio, 08:31, Jörn Zaefferer [EMAIL PROTECTED]
  wrote:


  A new release of the validation plugin
   (http://bassistance.de/jquery-plugins/jquery-plugin-validation/) is
   done, now at version 1.3. This release adds five more localizations
   and fixes a few bugs, eg. asdf is not a valid creditcard number
   anymore.
  
   Major improvements went into validating a form without triggering UI
   feedback (http://dev.jquery.com/ticket/2215) and batch adding and
   removing of rules.
  
   The complete list of changes:
  
   ul
   liFixed invalid-form event, now only triggered when form is invalid/li
   liAdded spanish (es), russian (ru), portuguese brazilian (ptbr),
   turkish (tr), and polish (pl) localization/li
   liAdded removeAttrs plugin to facilate adding and removing multiple
   attributes/li
   liAdded groups option to display a single message for multiple
   elements, via groups: { arbitraryGroupName: fieldName1 fieldName2[,
   fieldNameN }/li
   liEnhanced rules() for adding and removing (static) rules:
   rules(add, method1[, methodN]/{method1:param[, method_n:param]})
   and rules(remove[, method1[, method_n]) /li
   liEnhanced rules-option, accepts space-seperated string-list of
   methods, eg. {birthdate: required date}  /li
   liFixed checkbox group validation with inline rules: As long as the
   rules are specified on the first element, the group is now properly
   validated on click/li
   liFixed #2473, ignoring all rules with an explicit parameter of
   boolean-false, eg. required:false is the same as not specifying
   required at all (it was handled as required:true so far)/li
   liFixed #2424, with a modified patch from #2473: Methods returning a
   dependency-mismatch don't stop other rules from being evaluated
   anymore; still, success isn't applied for optional fields/li
   liFixed url and email validation to not use trimmed values/li
   liFixed creditcard validation to accept only digits and dashes
   (asdf is not a valid creditcard number)/li
   liAllow both button and input elements for cancel buttons (via
   class=cancel)/li
   liFixed #2215: Fixed message display to call unhighlight as part of
   showing and hiding messages, no more visual side-effects while
   checking an element and extracted validator.checkForm to validate a
   form without UI sideeffects/li
   liRewrote custom selectors (:blank, :filled, :unchecked) with
   functions for compability with AIR/li
   /ul
  
   As always, feedback is welcome!
  
   Jörn



[jQuery] [Validate] Question about Validate plugin metadata option

2008-05-12 Thread Dane

Hi,

Not sure if my last post ended up having validate in the subject. So
appologies for this repost.

This may be because I'm not totally fluent with the Validation plugin
yet but I'm having a problem figuring out how to specify messages for
each rule via metadata. It appears that an input element with 3 rules
when broken will need to summarized the reason for the break in a
generic message specified in the title attribute.

Is it possible to use metadata to specify a message for each rule
like
you can using the non metadata api?


Thanks a bunch and keep up the great work!
Dane


[jQuery] Re: [Validate] using metadata mulitple messages problem.

2008-05-12 Thread Jörn Zaefferer

No, currently there is no support for multiple messages via metadata.
You could change the default messages to fit, but that won't give you
custom messages for each field, unless you add custom methods.

Jörn

On Mon, May 12, 2008 at 4:59 PM, Dane [EMAIL PROTECTED] wrote:

  Hi,
  This may be because I'm not totally fluent with the Validation plugin
  yet but I'm having a problem figuring out how to specify messages for
  each rule via metaData. It appears that an input element with 3 rules
  when broken will need to summarized the reason for the break in a
  generic message specified in the title attribute.

  Is it possible to use metadata to specify a message for each rule like
  you can using the non metadata api?

  Thanks a bunch and keep up the great work!
  Dane



[jQuery] Re: empty class return undefined .. bug ?

2008-05-12 Thread Ariel Flesler

No Richard, that's a bug on jQuery.attr, undefined is returned instead
of ''.
'class' works as well as 'className'.

I hope this gets revised, it's one of the fixes of on this ticket:
  http://dev.jquery.com/ticket/2548

Cheers

--
Ariel Flesler
http://flesler.blogspot.com

On 12 mayo, 09:01, Richard D. Worth [EMAIL PROTECTED] wrote:
 The name of the class attribute is className, so you want:

 $('#myid').attr('className');

 - Richard

 Richard D. Worthhttp://rdworth.org/

 On Sun, May 11, 2008 at 12:48 PM, Adwin Wijaya [EMAIL PROTECTED]
 wrote:





  I have code .. to check what class in every id ..

  i found that if the class=, attr will return undefined ...

  example: className =  $('#myid').attr('class');

  I use Jquery 1.2.4b from ui.jquery.com

  is it the bug or it is the correct result from attr() ?- Ocultar texto de 
  la cita -

 - Mostrar texto de la cita -


[jQuery] Re: Is there a way of counting the number of id's with the same name, and then renaming them _1, _2, _3 etc.

2008-05-12 Thread Ariel Flesler

 $(this).attr('class') should be $(this).attr('className')

Not necessarily :)

--
Ariel Flesler
http://flesler.blogspot.com


On 12 mayo, 08:58, Richard D. Worth [EMAIL PROTECTED] wrote:
 One minor correction to the sample code below. $(this).attr('class') should
 be $(this).attr('className')

 - Richard

 On Mon, May 12, 2008 at 7:22 AM, andrea varnier [EMAIL PROTECTED]
 wrote:





  On 12 Mag, 12:31, quirksmode [EMAIL PROTECTED] wrote:
   Hi,

   I am dynamically generating html which looks like this:

  since you're generating the html dynamically, I'd suggest you do it
  server side (i.e. a for loop).
  if that is not possible, change div id=wrapper with div
  class=wrapper, if you need the wrapper string, or simply div,
  because having the same id over the page is definitely a bad thing :)
  the a solution could be:

  $('div').each(function(i){
     var $this = $(this);
     var the_id = $this.attr('class');
     $this.attr('id', the_id + '_' + i)
  });

  this would be zero-based. change to (i+1) to have them starting with
  wrapper_1.
  without the class, shorter:
  $('div').each(function(i){
     $(this).attr('id', 'wrapper_' + i)
  });

  if those div's are inside something else (let's assume a div
  id=container_div, you can add a context to the first selector, to
  speed up the process:

  $('div', '#container_div').each(function(i){
     var $this = $(this);
     var the_id = $this.attr('class');
     $this.attr('id', the_id + '_' + i)
  });- Ocultar texto de la cita -

 - Mostrar texto de la cita -


[jQuery] Re: Is there a way of counting the number of id's with the same name, and then renaming them _1, _2, _3 etc.

2008-05-12 Thread Hamish Campbell

Even though you can't use the id selector directly, you can still use
the id as an attribute selector (works in IE7 anyway).

$(document).ready(function(){
   $('div[id=wrapper]').each(
  function(i){
 $(this).attr('id', $(this).attr('id')+'_'+(i+1))
  }
   );
});


On May 13, 8:16 am, Ariel Flesler [EMAIL PROTECTED] wrote:
  $(this).attr('class') should be $(this).attr('className')

 Not necessarily :)

 --
 Ariel Fleslerhttp://flesler.blogspot.com

 On 12 mayo, 08:58, Richard D. Worth [EMAIL PROTECTED] wrote:



  One minor correction to the sample code below. $(this).attr('class') should
  be $(this).attr('className')

  - Richard

  On Mon, May 12, 2008 at 7:22 AM, andrea varnier [EMAIL PROTECTED]
  wrote:

   On 12 Mag, 12:31, quirksmode [EMAIL PROTECTED] wrote:
Hi,

I am dynamically generating html which looks like this:

   since you're generating the html dynamically, I'd suggest you do it
   server side (i.e. a for loop).
   if that is not possible, change div id=wrapper with div
   class=wrapper, if you need the wrapper string, or simply div,
   because having the same id over the page is definitely a bad thing :)
   the a solution could be:

   $('div').each(function(i){
      var $this = $(this);
      var the_id = $this.attr('class');
      $this.attr('id', the_id + '_' + i)
   });

   this would be zero-based. change to (i+1) to have them starting with
   wrapper_1.
   without the class, shorter:
   $('div').each(function(i){
      $(this).attr('id', 'wrapper_' + i)
   });

   if those div's are inside something else (let's assume a div
   id=container_div, you can add a context to the first selector, to
   speed up the process:

   $('div', '#container_div').each(function(i){
      var $this = $(this);
      var the_id = $this.attr('class');
      $this.attr('id', the_id + '_' + i)
   });- Ocultar texto de la cita -

  - Mostrar texto de la cita -- Hide quoted text -

 - Show quoted text -


[jQuery] IE7 blocked content popup

2008-05-12 Thread shnicolau

I'm currently working in a tiny demo.
No server, nothing, executed locally (from the hard drive).

The results is the classical msg:

To help protect your security, Internet Explorer has restricted this
file from showing active content that could access your computer.
To allow the blocked content to execute, right-click on the
information bar and select Allow Blocked Content.

Someone find a way to avoid this popup?



[jQuery] Release: jQuery No Spam plugin v1.3

2008-05-12 Thread Mike Branski

Finally pushed v1.3 of my No Spam jQuery plugin out the door over the
weekend. For those unfamiliar, it takes an obfuscated e-mail address
and turns it into a human-readable one. It's meant to be light and
easy to use, and I've updated the PHP companion function for it so
they're compatible, making it even easier.

The biggest update with this release is the much-request support for e-
mail addresses containing multiple dots (.), so enjoy! (Please note
that this release is not back-wards compatible as it now uses two
forward slashes for the @ sign!)

http://www.leftrightdesigns.com/library/jquery/nospam/

Thanks to those who have contributed feedback thus far!

Mike Branski


[jQuery] example or demo of rotating css background image?

2008-05-12 Thread Toph

Is anyone aware of a working example of using jQuery to display a
random css background image from a set of images?


[jQuery] Re: IE7 blocked content popup

2008-05-12 Thread Jeffrey Kretz

Tools -- Internet Options -- Advanced -- Security -- Allow active
content to run in files on My Computer.

The reason why this is turned off, is if you download malicious content and
it executes, it could compromise your PC.

Your other option is to use Firefox.

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of shnicolau
Sent: Monday, May 12, 2008 1:44 PM
To: jQuery (English)
Subject: [jQuery] IE7 blocked content popup


I'm currently working in a tiny demo.
No server, nothing, executed locally (from the hard drive).

The results is the classical msg:

To help protect your security, Internet Explorer has restricted this
file from showing active content that could access your computer.
To allow the blocked content to execute, right-click on the
information bar and select Allow Blocked Content.

Someone find a way to avoid this popup?




[jQuery] [SITE] ShareThis

2008-05-12 Thread Rey Bango


ShareThis uses jQuery

http://sharethis.com/

Rey...


[jQuery] Re: jquery Lightbox Problem

2008-05-12 Thread [EMAIL PROTECTED]

Hi All!

I have found out why the lightbox doesnt work on the live site.

The site is hosted on Micro$oft Office Small Business site and it
reads each file thats uploaded and strips any potentially malicious
JS code. It must ready the jquery file and lightbox file and think
it's malicious for some reason!!!

Regards,
Alex.

On May 12, 7:37 pm, Hilmar Kolbe [EMAIL PROTECTED] wrote:
 Seems like the file on the live-site is broken:

 http://treetment.co.uk/js/jquery.lightbox.js

 2008/5/12 [EMAIL PROTECTED] [EMAIL PROTECTED]:

  Hi All,

  I've recently uploaded a websitehttp://www.treetment.co.ukand I have
  used the jQuery Lightbox plugin to scroll through the portfolio
  pictures.

  I have tested the site locally and uploaded to
 http://www.ajtrichards.co.uk/clients/treetment/
  and they both work fine.

  However, when you try to use the Lightbox on treetment.co.uk it just
  displays the picture in the browser not the lightbox and I have no
  idea why!!

  Can someone have a look to cast a fresh pair of eyes to see if they
  can spot a mistake!!

  Thanks
  Alex.


[jQuery] Re: validate a form using jsVal script

2008-05-12 Thread JP

on the bottom of this page

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

I did get jsVal working, it needs to be used with validating by
complete form instead of individual fields



On May 12, 12:16 pm, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 That is now bundled. Where did you find the note? I thought I removed them..

 Jörn

 On Mon, May 12, 2008 at 5:40 PM, JP [EMAIL PROTECTED] wrote:

   your website says jquery.delegate.js - special event delegation,
   required but I don't see that in the download...

   On May 12, 4:40 am, Jörn Zaefferer [EMAIL PROTECTED]
   wrote:

   You many want to try a jQuery based validation 
   instead:http://bassistance.de/jquery-plugins/jquery-plugin-validation/

Just released version 1.3. Let me know if you need help with it.

Jörn

   On Mon, May 12, 2008 at 8:10 AM, JP [EMAIL PROTECTED] wrote:

 In an $.ajax option  beforsend, I want to call a function to validate
 a form using jsVal script

 (jsVal  is here:  http://jsval.fantastic-bits.de/The home page shows
 examples)

 I tried the following:
 ...
 $.ajax({
 beforeSend: showRequest,
 ...

function showRequest(){//alert('showRequest');
var objForm = document.forms[contactForm];
validateStandard(objForm, 'error');
}

 The alert will show but,  validateStandard()  is not processed.
 jquery ignores this and proceeds ahead with submittal, which is
 successful.

 How can I correctly use a third party script like jsval to validate
 the form before it is submitted by jquery ajax ?


[jQuery] FlexiGrid plugin json help

2008-05-12 Thread Bryancan

I am using the flexigrid plugin from http://webplicity.net/flexigrid/.
I have my codebehind generating a json result in the format expected
until I call the url as a struts action in my portlet... This wraps
the output with an unexpected div tag which makes the grid not
render. I've used fiddler to get the result from the background page
and made a static page that works great as long as I remove the DIV
tag from around the json text.

My request is how could I have the function ignore any html tags and
only parse out the json result?

Thanks,
Bryancan


[jQuery] Re: Is there a way of counting the number of id's with the same name, and then renaming them _1, _2, _3 etc.

2008-05-12 Thread Ariel Flesler

That's BAD html!! don't insist! :)

Just kidding.. you should switch over to classes or you'll eventually
face quirk after quirk.

--
Ariel Flesler
http://flesler.blogspot.com

On 12 mayo, 17:52, Hamish Campbell [EMAIL PROTECTED] wrote:
 Even though you can't use the id selector directly, you can still use
 the id as an attribute selector (works in IE7 anyway).

 $(document).ready(function(){
    $('div[id=wrapper]').each(
       function(i){
          $(this).attr('id', $(this).attr('id')+'_'+(i+1))
       }
    );

 });

 On May 13, 8:16 am, Ariel Flesler [EMAIL PROTECTED] wrote:



   $(this).attr('class') should be $(this).attr('className')

  Not necessarily :)

  --
  Ariel Fleslerhttp://flesler.blogspot.com

  On 12 mayo, 08:58, Richard D. Worth [EMAIL PROTECTED] wrote:

   One minor correction to the sample code below. $(this).attr('class') 
   should
   be $(this).attr('className')

   - Richard

   On Mon, May 12, 2008 at 7:22 AM, andrea varnier [EMAIL PROTECTED]
   wrote:

On 12 Mag, 12:31, quirksmode [EMAIL PROTECTED] wrote:
 Hi,

 I am dynamically generating html which looks like this:

since you're generating the html dynamically, I'd suggest you do it
server side (i.e. a for loop).
if that is not possible, change div id=wrapper with div
class=wrapper, if you need the wrapper string, or simply div,
because having the same id over the page is definitely a bad thing :)
the a solution could be:

$('div').each(function(i){
   var $this = $(this);
   var the_id = $this.attr('class');
   $this.attr('id', the_id + '_' + i)
});

this would be zero-based. change to (i+1) to have them starting with
wrapper_1.
without the class, shorter:
$('div').each(function(i){
   $(this).attr('id', 'wrapper_' + i)
});

if those div's are inside something else (let's assume a div
id=container_div, you can add a context to the first selector, to
speed up the process:

$('div', '#container_div').each(function(i){
   var $this = $(this);
   var the_id = $this.attr('class');
   $this.attr('id', the_id + '_' + i)
});- Ocultar texto de la cita -

   - Mostrar texto de la cita -- Hide quoted text -

  - Show quoted text -- Ocultar texto de la cita -

 - Mostrar texto de la cita -


[jQuery] Re: Dynamic Software causing many script loads, how would one handle this?

2008-05-12 Thread Carl Von Stetten

Lee,

Do the various plugins at least use the same jQuery version?  If so, can 
you modify the plugin-specific JS file to load the required jQuery 
scripts only if they haven't already been loaded?  You will at least 
need to make sure that the jQuery.js (or jQuery.min.js or 
jQuery.pack.js) is loaded by the CMS main page.  Then you might try 
something like this (this example specifically checks to see if jqModal 
and tablesorter are loaded):

$.ajaxSetup({async:false}); // temporarily make ajax synchronous so your 
script
// doesn't start executing code before 
required scripts
// are loaded.
if(!$.jqm){ // test to see if the jqModal jqm()
// function doesn't exist yet
$.getScript(relative path/jqModal.min.js);
}
if(!$.tablesorter){ // test to see if the tablesorter()
// function doesn't exist yet
$.getScript(relative path/jquery.tablesorter.min.js);
}
$.ajaxSetup({async:true)};  // restore ajax to asynchrounous mode



Lee O wrote:
 I have an application that has many plugins, all of which have jquery 
 scripts. Now, i imagine there are ways to program an javascript 
 aggregator of some sort, but i imagine this is a very common problem 
 with plugin based web-apps, so i was curious if jquery had any ways to 
 handle this.

 To reiterate with an example: If you have a CMS that is plugin based, 
 with 20 plugins, and each plugin has its own js file to run its own, 
 plugin specific, jquery code from. You cannot(/and should not have 
 to/) manually combine them together (ignoring the aggregator aspect 
 for now), so are there any other options? Having 20+ script calls on 
 one page is a bit overkill heh..

 Any thoughts on this subject?

 Thanks,
 -- 
 Lee Olayvar
 http://www.leeolayvar.com 


[jQuery] FAQ for 'How do I disable enable an element'

2008-05-12 Thread AllenH

Is this FAQ correct:
http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_disable.2Fenable_an_element.3F

The example code given for the FAQ is:

 // Disable #x
 $(#x).attr(disabled,disabled);
 // Enable #x
 $(#x).removeAttr(disabled);

but I tried this:

 // Disable #x
 $(#x).attr(disabled,true);
 // Enable #x
 $(#x).attr(disabled,false);

and it seems to work fine. I prefer this approach because it is easier
to chain together several commands, like this:

(function($){
  $.fn.mydisabled = function(trueorfalse) {
return this.attr('disabled', trueorfalse)
  .css('background-color',  trueorfalse ? '#CCC' : '#FFF')
  .css('color',  trueorfalse ? '#333' : '#000')
  .css('opacity', trueorfalse ? 0.5 : 1.0);
  }
})(jQuery);

$(#x).mydisabled(true);

The documentation page for attr [1] shows the
attr(disabled,disabled) style but does not mention using true or
false for the attribute value.

[1] http://docs.jquery.com/Attributes/attr

So I'm wondering if setting boolean attributes, like disabled and
readonly, to true or false is correct or is this deprecated behavior
that might be removed in a future release?

Thanks

Allen



[jQuery] how i can access classes in my div?

2008-05-12 Thread Luciano

how i can access classes in my div?
example:

$(#box1.bloc-top).click(function () {
  $(.bloc-center).slideToggle(slow);
});

$(#box2.bloc-top).click(function () {
  $(.bloc-center).slideToggle(slow);
});

$(#box3.bloc-top).click(function () {
  $(.bloc-center).slideToggle(slow);
});


div id=box1 class=box
 bloc-topcontent top/bloc-top
 bloc-centercontent slideToggle/bloc-center
/div

div id=box2 class=box
 bloc-topcontent top/bloc-top
 bloc-centercontent slideToggle/bloc-center
/div

etc..
i tryed this it but no success


[jQuery] Re: how i can access classes in my div?

2008-05-12 Thread Luciano

hdfsuahd it`s ok ok..
i forgot space..#box2. bloc-top

On 12 maio, 20:35, Luciano [EMAIL PROTECTED] wrote:
 how i can access classes in my div?
 example:

 $(#box1.bloc-top).click(function () {
   $(.bloc-center).slideToggle(slow);

 });

 $(#box2.bloc-top).click(function () {
   $(.bloc-center).slideToggle(slow);

 });

 $(#box3.bloc-top).click(function () {
   $(.bloc-center).slideToggle(slow);

 });

 div id=box1 class=box
  bloc-topcontent top/bloc-top
  bloc-centercontent slideToggle/bloc-center
 /div

 div id=box2 class=box
  bloc-topcontent top/bloc-top
  bloc-centercontent slideToggle/bloc-center
 /div

 etc..
 i tryed this it but no success


[jQuery] Re: Learning JQuery Chapter 6 XML parsing

2008-05-12 Thread Karl Swedberg


Here it is:

http://book.learningjquery.com/scripts/jquery.1.1.3.js

After going through the book and checking out the code examples, it  
would be a good idea to upgrade to the latest jQuery (1.2.3, soon to  
be 1.2.4). Quite a bit has changed -- for the better. See links to  
version release notes at http://book.learningjquery.com/



--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On May 12, 2008, at 8:07 PM, JQuery wrote:



Karl,
 I downloaded the code from http://book.learningjquery.com/2509_06_code/
but still nothing displayed when I clicked button D.
I noticed that the code was referenced to script src=../scripts/
jquery.1.1.3.js type=text/javascript/script.  I googled query.
1.1.3.js but couldn't find any result.  I downloaded query-1.1.3.js
(noted the dash, query-1 not query.1) but could not see data after
clicking the button.  Since I just begin to learn jquery, could you
point out what the issue is?  Could you send me jquery.1.1.3.js?

Thanks for your help.

On May 12, 10:58 am, JQuery [EMAIL PROTECTED] wrote:
I could see the content of the d.xml file (alert('data: ' + data),  
but
I could not see the alert('inside each function').  I think jquery  
did

not recognize d.xml is an xml file.

Any idea?
Thanks

$(document).ready(function() {
 $('#letter-d .button').click(function() {
   $.get('d.xml', function(data) {
 alert('data: ' + data);
 $('#dictionary').empty();
 $(data).find('[EMAIL PROTECTED]').each(function() {
   var $entry = $(this);

   alert('inside each function');

   var html = 'div class=entry';
   html += 'h3 class=term' + $entry.attr('term') + '/h3';
   html += 'div class=part' + $entry.attr('part') + '/div';
   html += 'div class=definition'
   html += $entry.find('definition').text();
   var $quote = $entry.find('quote');
   if ($quote.length) {
 html += 'div class=quote';
 $quote.find('line').each(function() {
   html += 'div class=quote-line' + $(this).text() + '/
div';
 });
 if ($quote.attr('author')) {
   html += 'div class=quote-author' +
$quote.attr('author') + '/div';
 }
 html += '/div';
   }
   html += '/div';
   html += '/div';
   $('#dictionary').append($(html));
 });
   });
 });

});

Content of d.xml file
?xml version=1.0 encoding=UTF-8?
entries
 entry term=DANCE part=v.i.
   definition
 To leap about to the sound of tittering music, preferably with
arms about your neighbor's wife or daughter.  There are many kinds of
dances, but all those requiring the participation of the two sexes
have two characteristics in common:  they are conspicuously innocent,
and warmly loved by the vicious.
   /definition
 /entry
 entry term=DAY part=n.
   definition
 A period of twenty-four hours, mostly misspent.  This period is
divided into two parts, the day proper and the night, or day improper
![CDATA[mdash;]] the former devoted to sins of business, the  
latter

consecrated to the other sort.  These two kinds of social activity
overlap.
   /definition
 /entry
 entry term=DEBT part=n.
   definition
 An ingenious substitute for the chain and whip of the slave-
driver.
   /definition
   quote author=Barlow S. Vode
 lineAs, pent in an aquarium, the troutlet/line
 lineSwims round and round his tank to find an outlet,/line
 linePressing his nose against the glass that holds him,/line
 lineNor ever sees the prison that enfolds him;/line
 lineSo the poor debtor, seeing naught around him,/line
 lineYet feels the narrow limits that impound him,/line
 lineGrieves at his debt and studies to evade it,/line
 lineAnd finds at last he might as well have paid it./line
   /quote
 /entry
 entry term=DEFAME part=v.t.
   definition
 To lie about another.  To tell the truth about another.
   /definition
 /entry
 entry term=DEFENCELESS part=adj.
   definition
 Unable to attack.
   /definition
 /entry
 entry term=DELIBERATION part=n.
   definition
 The act of examining one's bread to determine which side it is
buttered on.
   /definition
 /entry
 entry term=DELUSION part=n.
   definition
 The father of a most respectable family, comprising Enthusiasm,
Affection, Self-denial, Faith, Hope, Charity and many other goodly
sons and daughters.
   /definition
   quote author=Mumfrey Mappel
 lineAll hail, Delusion!  Were it not for thee/line
 lineThe world turned topsy-turvy we should see;/line
 lineFor Vice, respectable with cleanly fancies,/line
 lineWould fly abandoned Virtue's gross advances./line
   /quote
 /entry
 entry term=DENTIST part=n.
   definition
 A prestidigitator who, putting metal into your mouth, pulls
coins out of your pocket.
   /definition
 /entry
 entry term=DIE part=n.
   definition
 The singular of dice.  We seldom hear the word, because there
is a prohibitory proverb, Never say die.  At long intervals,
however, some one says:  The die 

[jQuery] Re: how i can access classes in my div?

2008-05-12 Thread darren

you could even use commas in your selector so that you aren't
repeating your statements.

On May 12, 5:51 pm, Luciano [EMAIL PROTECTED] wrote:
 hdfsuahd it`s ok ok..
 i forgot space..#box2. bloc-top

 On 12 maio, 20:35, Luciano [EMAIL PROTECTED] wrote:

  how i can access classes in my div?
  example:

  $(#box1.bloc-top).click(function () {
$(.bloc-center).slideToggle(slow);

  });

  $(#box2.bloc-top).click(function () {
$(.bloc-center).slideToggle(slow);

  });

  $(#box3.bloc-top).click(function () {
$(.bloc-center).slideToggle(slow);

  });

  div id=box1 class=box
   bloc-topcontent top/bloc-top
   bloc-centercontent slideToggle/bloc-center
  /div

  div id=box2 class=box
   bloc-topcontent top/bloc-top
   bloc-centercontent slideToggle/bloc-center
  /div

  etc..
  i tryed this it but no success


[jQuery] How to do a document.getElementById(mytextbo).select() in jquery?

2008-05-12 Thread eric . advincula

I've been searching and i'm not quite sure how to do it.  Anyone else
know how? Thanks


[jQuery] Re: How to do a document.getElementById(mytextbo).select() in jquery?

2008-05-12 Thread Karl Rudd

$(#mytextbo)[0].select();

jQuery(selectorString), or the shortcut $(selectorString), always
return an array like object. To run the select() on it you have to
access one of the raw elements it contains, hence the [0], which
retrieves the first element in the array.

Karl Rudd

On Tue, May 13, 2008 at 12:19 PM,  [EMAIL PROTECTED] wrote:

  I've been searching and i'm not quite sure how to do it.  Anyone else
  know how? Thanks


[jQuery] Re: FAQ for 'How do I disable enable an element'

2008-05-12 Thread Karl Rudd

As fair as I'm aware, in JavaScript, the boolean values are the
correct values for getting and setting the boolean attributes, like
disabled and readonly. When the HTML is parsed those accessing
those attributes will return either 'true', 'false' or 'undefined'.

The attr(disabled,disabled) works because a string (or any object)
is considered to be == true (but not === true)

Karl Rudd

On Tue, May 13, 2008 at 9:21 AM, AllenH [EMAIL PROTECTED] wrote:

  Is this FAQ correct:
  
 http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_disable.2Fenable_an_element.3F

  The example code given for the FAQ is:

   // Disable #x
   $(#x).attr(disabled,disabled);
   // Enable #x
   $(#x).removeAttr(disabled);

  but I tried this:

   // Disable #x
   $(#x).attr(disabled,true);
   // Enable #x
   $(#x).attr(disabled,false);

  and it seems to work fine. I prefer this approach because it is easier
  to chain together several commands, like this:

  (function($){
   $.fn.mydisabled = function(trueorfalse) {
 return this.attr('disabled', trueorfalse)
   .css('background-color',  trueorfalse ? '#CCC' : '#FFF')
   .css('color',  trueorfalse ? '#333' : '#000')
   .css('opacity', trueorfalse ? 0.5 : 1.0);
   }
  })(jQuery);

  $(#x).mydisabled(true);

  The documentation page for attr [1] shows the
  attr(disabled,disabled) style but does not mention using true or
  false for the attribute value.

  [1] http://docs.jquery.com/Attributes/attr

  So I'm wondering if setting boolean attributes, like disabled and
  readonly, to true or false is correct or is this deprecated behavior
  that might be removed in a future release?

  Thanks

  Allen




[jQuery] Encoding image upload through ajax POST

2008-05-12 Thread hubbs

I have set up a form that uses the $.ajax function using POST.  Part
of my form is an image upload dialog, using the standard file upload
input box.  The problem is, the upload is not working, and I think it
has to do with the encoding.  When I upload it with ajax, it just
sends through the path to the file on my local computer.  But if I use
normal form POST, without ajax, it will send the image contents
through (I can see all the data that was sent, with ajax it is not
there.)  So, what I need to know is, for something like this, so I
need to be encoding that somehow?


[jQuery] Re: Encoding image upload through ajax POST

2008-05-12 Thread Karl Rudd

You can't actually do file upload via AJAX, it's a security feature,
it can be faked though.

Try this plugin:
  http://plugins.jquery.com/project/form

Karl Rudd

On Tue, May 13, 2008 at 1:38 PM, hubbs [EMAIL PROTECTED] wrote:

  I have set up a form that uses the $.ajax function using POST.  Part
  of my form is an image upload dialog, using the standard file upload
  input box.  The problem is, the upload is not working, and I think it
  has to do with the encoding.  When I upload it with ajax, it just
  sends through the path to the file on my local computer.  But if I use
  normal form POST, without ajax, it will send the image contents
  through (I can see all the data that was sent, with ajax it is not
  there.)  So, what I need to know is, for something like this, so I
  need to be encoding that somehow?



[jQuery] how can a landing page verify that the user has logged in?

2008-05-12 Thread puma

Hi,

I just created a webpage that requires a username and password to be
submitted in order for the user to proceed to another section of the
site.

My questions is how can the landing page (the page the user is
redirected to after submitting the correct information) verify that
the user has logged in??? If he/she hasn't how can I redirect the user
to the login page???

Can this be done with javascript itself??? or do in need to connect to
some sort of external database???

Thanks

- puma


[jQuery] Re: FAQ for 'How do I disable enable an element'

2008-05-12 Thread AllenH

OK, thanks. The FAQ and doc page made me think I was using an approach
that wasn't officially supported. I'll stick with the approach of
using true and false -- that results in cleaner code in my experience
so far.

Allen

On May 12, 4:49 pm, Karl Rudd [EMAIL PROTECTED] wrote:
 As fair as I'm aware, in JavaScript, the boolean values are the
 correct values for getting and setting the boolean attributes, like
 disabled and readonly. When the HTML is parsed those accessing
 those attributes will return either 'true', 'false' or 'undefined'.

 The attr(disabled,disabled) works because a string (or any object)
 is considered to be == true (but not === true)

 Karl Rudd

 On Tue, May 13, 2008 at 9:21 AM, AllenH [EMAIL PROTECTED] wrote:

   Is this FAQ correct:
   http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_disable.2F...

   The example code given for the FAQ is:

    // Disable #x
    $(#x).attr(disabled,disabled);
    // Enable #x
    $(#x).removeAttr(disabled);

   but I tried this:

    // Disable #x
    $(#x).attr(disabled,true);
    // Enable #x
    $(#x).attr(disabled,false);

   and it seems to work fine. I prefer this approach because it is easier
   to chain together several commands, like this:

   (function($){
    $.fn.mydisabled = function(trueorfalse) {
      return this.attr('disabled', trueorfalse)
        .css('background-color',  trueorfalse ? '#CCC' : '#FFF')
        .css('color',  trueorfalse ? '#333' : '#000')
        .css('opacity', trueorfalse ? 0.5 : 1.0);
    }
   })(jQuery);

   $(#x).mydisabled(true);

   The documentation page for attr [1] shows the
   attr(disabled,disabled) style but does not mention using true or
   false for the attribute value.

   [1]http://docs.jquery.com/Attributes/attr

   So I'm wondering if setting boolean attributes, like disabled and
   readonly, to true or false is correct or is this deprecated behavior
   that might be removed in a future release?

   Thanks

   Allen


[jQuery] Re: validate a form using jsVal script

2008-05-12 Thread JP

It's also referenced here in the source code of the demo

http://docs.jquery.com/Plugins/Validation


On May 12, 3:12 pm, JP [EMAIL PROTECTED] wrote:
 on the bottom of this page

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

 I did get jsVal working, it needs to be used with validating by
 complete form instead of individual fields

 On May 12, 12:16 pm, Jörn Zaefferer [EMAIL PROTECTED]
 wrote:

  That is now bundled. Where did you find the note? I thought I removed them..

  Jörn

  On Mon, May 12, 2008 at 5:40 PM, JP [EMAIL PROTECTED] wrote:

your website says jquery.delegate.js - special event delegation,
required but I don't see that in the download...

On May 12, 4:40 am, Jörn Zaefferer [EMAIL PROTECTED]
wrote:

You many want to try a jQuery based validation 
instead:http://bassistance.de/jquery-plugins/jquery-plugin-validation/

 Just released version 1.3. Let me know if you need help with it.

 Jörn

On Mon, May 12, 2008 at 8:10 AM, JP [EMAIL PROTECTED] wrote:

  In an $.ajax option  beforsend, I want to call a function to validate
  a form using jsVal script

  (jsVal  is here:  http://jsval.fantastic-bits.de/Thehome page shows
  examples)

  I tried the following:
  ...
  $.ajax({
  beforeSend: showRequest,
  ...

 function showRequest(){//alert('showRequest');
 var objForm = document.forms[contactForm];
 validateStandard(objForm, 'error');
 }

  The alert will show but,  validateStandard()  is not processed.
  jquery ignores this and proceeds ahead with submittal, which is
  successful.

  How can I correctly use a third party script like jsval to validate
  the form before it is submitted by jquery ajax ?


[jQuery] Re: how i can access classes in my div?

2008-05-12 Thread Luciano

how i could do it`s commands?

On 12 maio, 22:35, darren [EMAIL PROTECTED] wrote:
 you could even use commas in your selector so that you aren't
 repeating your statements.

 On May 12, 5:51 pm, Luciano [EMAIL PROTECTED] wrote:

  hdfsuahd it`s ok ok..
  i forgot space..#box2. bloc-top

  On 12 maio, 20:35, Luciano [EMAIL PROTECTED] wrote:

   how i can access classes in my div?
   example:

   $(#box1.bloc-top).click(function () {
 $(.bloc-center).slideToggle(slow);

   });

   $(#box2.bloc-top).click(function () {
 $(.bloc-center).slideToggle(slow);

   });

   $(#box3.bloc-top).click(function () {
 $(.bloc-center).slideToggle(slow);

   });

   div id=box1 class=box
bloc-topcontent top/bloc-top
bloc-centercontent slideToggle/bloc-center
   /div

   div id=box2 class=box
bloc-topcontent top/bloc-top
bloc-centercontent slideToggle/bloc-center
   /div

   etc..
   i tryed this it but no success


[jQuery] Re: Encoding image upload through ajax POST

2008-05-12 Thread hubbs

I see.

Is there a way that I can still use ajax post, but submit that to an
iframe?  Or is the only way to do it is by using a normal form?

On May 12, 8:44 pm, Karl Rudd [EMAIL PROTECTED] wrote:
 You can't actually do file upload via AJAX, it's a security feature,
 it can be faked though.

 Try this plugin:
  http://plugins.jquery.com/project/form

 Karl Rudd

 On Tue, May 13, 2008 at 1:38 PM, hubbs [EMAIL PROTECTED] wrote:

   I have set up a form that uses the $.ajax function using POST.  Part
   of my form is an image upload dialog, using the standard file upload
   input box.  The problem is, the upload is not working, and I think it
   has to do with the encoding.  When I upload it with ajax, it just
   sends through the path to the file on my local computer.  But if I use
   normal form POST, without ajax, it will send the image contents
   through (I can see all the data that was sent, with ajax it is not
   there.)  So, what I need to know is, for something like this, so I
   need to be encoding that somehow?


[jQuery] editable grid?

2008-05-12 Thread Shawn


Think I'm out of luck here, but I'm looking for a grid system that has 
bells and whistles similar to flexigrid 
(http://webplicity.net/flexigrid/), but with the ability to edit the 
cell contents.  Some cells would be simple text, while others would need 
to be look up lists (select tags are fine)...


Anything out there like that?  Or do I need to grab jEditable and build 
my own?


Thanks.

Shawn

(ps  I've asked the list a few months ago, but am hoping something has 
changed tween now and then )


  1   2   >