[jQuery] [SITE] www.velikibrat.co.yu

2008-03-04 Thread Dragan Krstic
The new season of Serbian Big Brother started and they made new site that
uses jquery. I found pngfix, round corners and more

-- 
Dragan Krstić krdr
http://krdr.ebloggy.com/


[jQuery] Creating multiple elements with different containers?

2008-03-04 Thread Shawn


I have a slight problem with one of my plugins.  I'm taking a table, and 
parsing it to create divs containing the header/footer and fixed 
columns.  These are all put into a containing DIV and then the 
containing DIV wraps the table. (that's the end result, not the actual 
process...).  Now it turns out I need to do this to a second table on 
the same page.


The problem is that I'm making references to the various divs by class 
name.  So when I create the second instance, the first gets modified.  I 
suspect I need to apply a context element in here
(i.e. $(.myclass, container); ).  But thought I'd check here first to 
see how others are handling this type of thing.  Would I need to create 
a container object in my plugin?  Something like


var container = $(this).parent();

??

Are there better options?

Sorry if this is kinda vague - I don't have the code in front of me at 
the moment


Shawn


[jQuery] absolute position inside inline element (opera)

2008-03-04 Thread Rick

So iam working on a new version of my plugin jquery-roundcorners-
canvas (http://meerbox.nl/?page_id=4) and i want to support rounding
inline elements.

Everything works fine in ie7 and firefox but not in opera. Opera just
doesnt absolute position a element inside a inline element. I have no
idea why. Maby a bug in opera?

I have made a page which shows what the problem is: http://meerbox.nl/opera.html
Any help would be appreciated :)


[jQuery] passing form data to $.ajax

2008-03-04 Thread andrea varnier

hi :)
I'm wondering is there a way to pass form data to $.ajax()?
let's say I want to upload a file, what is the correct way?
passing the content of the input type=file this way
$('#myInput').val()
doesn't work.
How is that done?
thank you
andrea


[jQuery] jCarousel: how to animate after ajax update ?

2008-03-04 Thread Alexandre Plennevaux

Hi,

I 'm using jcarousel to display the list of clicked elements,
providing some kind of history.


I would like to visually show when the history has been updated the
latest click, by, say, highlighting briefly the new element.

Anybody knows how to do that?


Thank you,
-- 
Alexandre


[jQuery] Re: trying to create scrolling div inside jcarousel

2008-03-04 Thread pixeline

I'm not sure but you should make sure your inside div have less or
equal height than the jcarousel clip div

(in css file it's the
.jcarousel-clip-horizontal {
height: 13px;
})

On 20 fév, 22:22, Jack Killpatrick [EMAIL PROTECTED] wrote:
 Wondering if anyone can help me with this...

 I have a page usingjcarouselkind of like how this page is using it:

 http://www.jobberbase.com/

 I have HTML content in each of the slides. In some of my slides, I
 don't have control over how much HTML will be present in them, so I want
 to be able to show a vertical scrollbar as needed. I tried wrapping my
 slide content in a div with style=overflow:auto;, but when I do that,
 it seems to interfere with an overflow:hidden thatjcarouselrelies on
 to prevent the content of each slide from showing to the left and right
 of the main viewing area when the slides are, um, slid.

 Basically, by adding the div in the slide and setting overflow:auto on
 the div, when I slide the slides, they appear outside of the main
 control (to either the left or the right).

 Anyone know how to accomplish what I need to do? I haven't been able to
 find any carousel examples that show vertically scrollable content in a
 slide.

 Thanks,
 Jack


[jQuery] Form Plugin: files not supported ?

2008-03-04 Thread debussy007


Hi,

I try to submit my form with the Form plugin using ajax, 

but it seems that when I add a file in the form, I get a JS error. 

Aren't files supported by the plugin ?

Thank you for any info !
-- 
View this message in context: 
http://www.nabble.com/Form-Plugin%3A-files-not-supported---tp15825190s27240p15825190.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Firefox constantly loading _ normal or not ?

2008-03-04 Thread pixeline

Hi!

my app uses a few ajax calls, mainly $('container').load( )  calls.

The ajax call performs successfully but the browser displays its
rotating logo (upper right) as it is continuing loading.

anyone knows if this is normal or is this a bug in my app ?

I tried setting a very obvious ajax parameters but they do not get
triggered so i assume there is no timeout

$.ajaxSetup({
  timeout: 1000,
  error: function(a,e){alert(ajax error: + a+ \n+e)}
});

any advise would be welcome

Thank you,
alexandre


[jQuery] Re: Form Plugin: files not supported ?

2008-03-04 Thread Mike Alsup

Yes, they are supported.  What kind of error are you getting?


  I try to submit my form with the Form plugin using ajax,

  but it seems that when I add a file in the form, I get a JS error.

  Aren't files supported by the plugin ?

  Thank you for any info !


[jQuery] Re: passing form data to $.ajax

2008-03-04 Thread Mike Alsup

You cannot upload files with ajax.  Use the form plugin for that functionality.


  I'm wondering is there a way to pass form data to $.ajax()?
  let's say I want to upload a file, what is the correct way?
  passing the content of the input type=file this way
  $('#myInput').val()
  doesn't work.
  How is that done?
  thank you
  andrea



[jQuery] Re: absolute position inside inline element (opera)

2008-03-04 Thread Klaus Hartl

On Mar 4, 10:56 am, Rick [EMAIL PROTECTED] wrote:
 So iam working on a new version of my plugin jquery-roundcorners-
 canvas (http://meerbox.nl/?page_id=4) and i want to support rounding
 inline elements.

 Everything works fine in ie7 and firefox but not in opera. Opera just
 doesnt absolute position a element inside a inline element. I have no
 idea why. Maby a bug in opera?

 I have made a page which shows what the problem 
 is:http://meerbox.nl/opera.html
 Any help would be appreciated :)

Have you tried to set that element's display to inline-block in
Opera?


--Klaus


[jQuery] Re: Form Plugin: files not supported ?

2008-03-04 Thread debussy007


I have the following error (on firebug console):

line 304
form.submit();
form.submit is not a function

The thrid parameter of the error callback says SyntaxError: syntax error

I can't see what I'm doing wrong,
a submit without picture of the same form is working, but once I add a
picture in the form I have this error.



malsup wrote:
 
 
 Yes, they are supported.  What kind of error are you getting?
 
 
  I try to submit my form with the Form plugin using ajax,

  but it seems that when I add a file in the form, I get a JS error.

  Aren't files supported by the plugin ?

  Thank you for any info !
 
 

-- 
View this message in context: 
http://www.nabble.com/Form-Plugin%3A-files-not-supported---tp15825190s27240p15826152.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Form Plugin: files not supported ?

2008-03-04 Thread Mike Alsup

Do you have an input with the name submit.  Try renaming that element.

Mike


On Tue, Mar 4, 2008 at 7:30 AM, debussy007 [EMAIL PROTECTED] wrote:


  I have the following error (on firebug console):

  line 304
  form.submit();
  form.submit is not a function

  The thrid parameter of the error callback says SyntaxError: syntax error


[jQuery] .html() callback?

2008-03-04 Thread alexanmtz

Hi everyone,

Like a lot of methods of jQuery, why the .html() doesnt have a
callback?

I need that some javascript load when the dom change with .html()
(append and others too), and some events are attached with the new
elements created by this method. What happens is that sometimes they
are attached and other times not. I thing its due the fact that I
execute this code:

$('#div').html(stuffVar);
$.getScript('newEvents.js');

This work sometimes. I would need one way to accomplish this task like
this:

$(#div').html(stuffVar,function(){
$.getScript('newEvents.js');
});

This way, we would have sure that the html is updated and so we can
load the script to attach events.

Anyone has idea???
thanks,

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


[jQuery] Re: adding a loading image to a mouse pointer

2008-03-04 Thread Ryszard

kris,

fantasitc, thanks for the quick reply, i'll try it out today.

regs
.r99

On 04/03/2008, Karl Swedberg [EMAIL PROTECTED] wrote:

  Hi there,

  Do you want the loading image to follow the mouse as the mouse moves?
  if so, you can set its top and left css properties on mousemove.
  Something like this:

  $('body').mousemove(function(event) {
$('#loading-image').css({
  top: (event.pageY + 10) + 'px',
  left: (event.pageX + 10) + 'px'
});
  });

  You might need to look into ways to avoid CPU spikes because the
  mousemove event can be processor-intensive. But this is a good start.

  Oh, one more thing: make sure that loading image is set to position:
  absolute; in the stylesheet, so that it can freely move around.


  --Karl
  _

 Karl Swedberg
  www.englishrules.com
  www.learningjquery.com




  On Mar 3, 2008, at 9:32 AM, ryszard99 wrote:

  
   hi there,
  
   i've just started doing jquery stuff and am interested in how i can
   add a loading image that will follow the mouse pointer, pretty much
   exactly how cluetip does it.  actually i'm using cluetip in my site
   and would like to replicate the loading image functionality..
  
   if someone could point a n00b in the right direction i'd appreciate
   it.
  
   regs
   .r99




[jQuery] Re: Superfish animation problem in ie

2008-03-04 Thread slooodge

Hi Joel,

thanks for your reply!

 This is strange: everything works fine for me in all browsers (except
 that in IE6 the bottom nav doesn't show above the iframe generated by
 the bgIframe plugin - it is a white with the word 'false' in it)

Yes, this is the problem I meant. Do think it is more of a css or
jQuery problem?

 I noticed you are including hoverIntent twice. It is also within the
 bgIframe JS file.

Thanks, I did not know that it was included in bgiframe -
unfortunately it did not solve the problem...

Thanks again for all your supportI really really appreaciate it!

Hannes


[jQuery] how to get the size of the image file before user upload it.

2008-03-04 Thread Xinhao Zheng

hi all,

is there a way to do this that can work both under ie and FF.thanks 
in advance.

George


[jQuery] Putting each character of a string into an array

2008-03-04 Thread SyLon

What will be the best to put each character of a string into an array,
like so:
str = abcdefg = arr[0]=a, arr[1]=b, arr[6]=g and so on.
Thanks, Leon.




[jQuery] Convert one select with optgroups to two dynamic selects - approach advice

2008-03-04 Thread mjpg

I have written code to replace a form select with optgroups to two
dynamic selects. The optgroups create the options in the first select.
The second select is populated dynamically from the chosen optgroup in
the first select.

The reason for this approach is to allow the dynamic selects to
degrade to a usable long select with optgroups.

Having gotten the basic code to work, I decided to replace the
original (optgroup) select, so that the form would be submitted with
the same id/name/data.

However, once I did this, as the optgroups have been replaced - they
are no longer available to read from and the dynamic select is broken.

So - what is the best approach to storing the original optgroup
options so I can read them on each change of the group select?

I guess I can clone the select and hide, but that seems clunky.

Note - I'm new to this and the JS code below will seem poor to most of
you.

Thanks


HTML: ##

form name=form1 method=post action=
select id=courses
option value=Please select/option
optgroup label=General Courses
option value=Effective Communication/option
option value=Equalities Training for 
Managers/option
option value=Loss and Bereavement)/option
/optgroup
optgroup label=Practice Learning
option value=Managing Practice Learning/option
option value=Support and Development 
Sessions/option
option value=First Aid at Work/option
/optgroup
optgroup label=New Starters
option value=Welcome Day/option
option value=Fair Selection and Recruitment/option
option value=Supervision Skills/option
/optgroup
/select
/form

JS: ##

// File converts an optgroup select into two dynamic selects

// config
var targetSelectID = courses;  // id of select to change
var groupFirstOption  = Select a topic  // Text to show in first
option of groups select

function populateSelect(chosenValueStr) {
var chosenValue = Number(chosenValueStr);

// Get the optgroup options
var chosenOptions = $('#'+targetSelectID+' optgroup:eq('+chosenValue
+') option');
var arrayLength = $(chosenOptions).length;  // for debugging
var newOptionsHTML='option value=Please select ['+chosenValue+']
LENGTH ['+arrayLength+']/option'; // for debugging

chosenOptions.each( function() {
optionsText = $(this).html();
newOptionsHTML+='option 
value='+optionsText+''+optionsText+'/
option';
});

$('#'+targetSelectID).empty();
$('#'+targetSelectID).append(newOptionsHTML);
}

$(document).ready(function(){
// Get the optgroup labels
var groups = $('#'+targetSelectID+' optgroup');

// create the select for this
var groupsHTML = 'select id=groups
onChange=populateSelect(this.options[selectedIndex].value)';
groupsHTML+='option value='+groupFirstOption+'/option';

var n=0; // counter
groups.each( function() {
optionText = $(this).attr(label);
groupsHTML+='option value='+n+''+optionText+'/option';
n++;
});

groupsHTML += '/select';

// get the first set of choices
var chosenOptions = $('#'+targetSelectID+' optgroup:eq(0) option');

//var optionsHTML='option value=Please select a course/option';

var optionsHTML='';

chosenOptions.each( function() {
optionsText = $(this).html();
optionsHTML+='option value='+optionsText+''+optionsText+'/
option';
});

// clear the original select and add in the new
$('#'+targetSelectID).empty();
$('#'+targetSelectID).append(optionsHTML);

// add in the group select and set to first choice
$('#'+targetSelectID).before(groupsHTML);
$('#groups option:first-child').attr(selected,selected);

});



[jQuery] Re: how many Jquery books are there?

2008-03-04 Thread JuergenRiemer

there is a book called jQuery reference I think

On Mar 3, 7:50 am, [EMAIL PROTECTED] wrote:
 As far as i know there r 'Learning Jquery' and 'Jquery In Action'.and else?


[jQuery] Re: slideUp, slideDown artifacts

2008-03-04 Thread pallzoltan

try this:

put the following code in your css:

* {
 margin: 0;
 padding: 0;
}

if it doesnt jump anymore (although your layout might break), you know
where your problem is :)

On Feb 27, 6:44 pm, Josh Nathanson [EMAIL PROTECTED] wrote:
 Hey Dan,

 Take a look at this page in IE6 - -click the red link Read final clearance
 return policy -- you'll see the nasty 
 artifacts:http://www.igigi.com/plus-size-clothing/Plus-Size-Final-Clearance.html

 The code uses slideToggle:

 $(document).ready(function() {
  var blk = $(#clearpol), lnk = $(#clearpol_link);
  blk.hide();
  lnk.click(function() {
   blk.is(:visible)
? lnk.text('Read Final Clearance Return Policy')
: lnk.text('Hide Final Clearance Return Policy');
   blk.slideToggle();
  });

 });

 -- Josh

 - Original Message -
 From: Dan G. Switzer, II [EMAIL PROTECTED]
 To: jquery-en@googlegroups.com
 Sent: Wednesday, February 27, 2008 5:32 AM
 Subject: [jQuery] Re: slideUp, slideDown artifacts

 yes me too, its good in FF but bad in IE7 and IE6

 I'm using jQuery v.1.2.3

  If you can post a simple working example of code with the problem, I'll
  look
  to see if there's a work around. I was doing a lot of examination of the
  fx
  library over the weekend and I think I might have an idea of the root
  cause.

  -Dan


[jQuery] Re: how to get the size of the image file before user upload it.

2008-03-04 Thread Shawn


I don't know of any reliable way to do so.

But if I were to speculate a bit

If you were to use JS to create an img object and set it's src to the 
local path to the image file.  Then use the .ready() method on that 
object, you *might* be able to extract the height/width, put those into 
 form elements, then submit your form (thereby uploading the file AND 
the dimensions).


But that is pure speculation.  I haven't done it.  Yet I don't see any 
reason that wouldn't work (then again I haven't gone to be yet since 
this time yesterday morning sighs).


HTH

Shawn

Xinhao Zheng wrote:

hi all,

is there a way to do this that can work both under ie and FF.thanks 
in advance.


George


[jQuery] Re: Putting each character of a string into an array

2008-03-04 Thread Mike Alsup

var arr = abcdefg.split();

On Tue, Mar 4, 2008 at 8:25 AM, SyLon [EMAIL PROTECTED] wrote:

  What will be the best to put each character of a string into an array,
  like so:
  str = abcdefg = arr[0]=a, arr[1]=b, arr[6]=g and so on.
  Thanks, Leon.





[jQuery] Re: how to get the size of the image file before user upload it.

2008-03-04 Thread Diego A.

Good point Shawn, BUT that won't (or at least shouldn't) work on
modern browsers due to security reasons, so it's not a reliable
solution.

The only *real way* is with a Java Applet (and maybe Flash).

On Mar 4, 1:58 pm, Shawn [EMAIL PROTECTED] wrote:
 I don't know of any reliable way to do so.

 But if I were to speculate a bit

 If you were to use JS to create an img object and set it's src to the
 local path to the image file.  Then use the .ready() method on that
 object, you *might* be able to extract the height/width, put those into
   form elements, then submit your form (thereby uploading the file AND
 the dimensions).

 But that is pure speculation.  I haven't done it.  Yet I don't see any
 reason that wouldn't work (then again I haven't gone to be yet since
 this time yesterday morning sighs).

 HTH

 Shawn

 Xinhao Zheng wrote:
  hi all,

  is there a way to do this that can work both under ie and FF.thanks
  in advance.

  George


[jQuery] cycle plugin problem

2008-03-04 Thread Diego A.

Hi all, (and Hopefully Mike Alsup)

I have not been able to use the cycle plugin and it's driving me
insane.

The error message (in firebug):
this.domManip is not a function

I know the error originates from this line on the cycle plugin...
opts.before[0].apply(e0, [e0, e0, opts, true]);
I have checked that:
- e0 is the first element in the $slides array.
- opts.before is an array with 2 functions

The error actually happens on this line in jQuery:
return this.domManip(arguments, false, false, function(elem){
...within the fn.before(...) method.

Can anyone help / clarify what might be wrong?

Thanks in advance!
Diego A.


[jQuery] Re: assign to outerhtml

2008-03-04 Thread pihentagy

Thanks for the answer.

After the second search in the docs, I've realized the replaceWith
function

http://docs.jquery.com/Manipulation/replaceWith

So outerHTML setter's jquery equivalent is replaceWith

$.ajax({
  url:'blabla'
  success: function(result) {
$('theid').replaceWith(result)
  }
})

I'm not sure how about the id paranoia you used Jeffrey. Have you
sucked with it, or is it just defensiveness?


On Mar 3, 10:59 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote:
 I had to do something similar, and this is how I solved it.

 $.ajax({url:'blabla',success:process});

 function process(results)
 {
 var id = 'therowid';
 var origRow = $('#'+id);
 var newRow = $(results).insertAfter(origRow);
 origRow.remove();
 newRow.attr('id',id);

 }

 So long as results was a string of properly formed TR html, this would
 insert a new row after the current one, then remove the current one.

 Of course, this would only work if you don't have a bunch events wired up
 the row or its children.

 JK

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On

 Behalf Of pihentagy
 Sent: Monday, March 03, 2008 1:41 PM
 To: jQuery (English)
 Subject: [jQuery] assign to outerhtml

 Hi all!

 I'd like to update a tr tag of a table with an ajax call.
 The problem is that outerhtml is an IE specific attribute, and I have
 the row style defined in the tr tag.
 Is there a cross-browser solution to update a single row of a table
 either with some cross-browser outerhtml script or without using
 outerhtml?
 So here just getting the outerhtml is not enough, I'd like to use it
 as an lvalue.

 Since I'm a beginner in jquery, can I have a minimal but complete
 example? (I have some difficulties with the ajax functions)

 thanks
 Gergo


[jQuery] Browser Open User Authentication Dialog using jQuery in test environment

2008-03-04 Thread wuiler

Browser Open User Authentication Dialog using jQuery in test
environment, example in local machine (localhost), however this
behaviour isn't present on the production environment.


[jQuery] Re: Half star rating plugin won't work with jQuery 1.2.3

2008-03-04 Thread Diego A.

I have been thinking about this for a few days now, but I haven't had
the time to do it.

The problem with what you're trying to achieve is that you're looking
for something to *display* the data, whereas my implementation of the
plugin focuses on semantic form integration.

Perhaps the way forward is to add the ability to display decimal
points and accept the input of whole numbers (and at a push, .5s).

How are you going to use this?

On Mar 1, 5:46 pm, AsymF [EMAIL PROTECTED] wrote:
 I am now working on the jQuery Star Rating Plugin v1.1 by Diego 
 A.,http://www.fyneworks.com, [EMAIL PROTECTED]

 I have gotten it working and added the ability to remove the cancel
 button by adding the following before the line for(n in groups){:
 if (settings.nocancel) {
 $(div.cancel:has(a[title=' + settings.cancel + '])).remove();

 }

 I also added nocancel: false to the settings at the beginning of the
 script.

 Now if I could figure out how to get it to show incremental stars for
 ratings such as 3.2 or 4.6 it would be perfect for my purposes. Any
 ideas on implementing this? Like I said, I can see it done in the
 plugin ratings on the jQuery site but don't know which segment of code
 does that feature.

 On Feb 29, 5:52 pm, AsymF [EMAIL PROTECTED] wrote:

  I would just use the one on the jQuery site if it weren't for the fact
  that it relies on a form. The position on the page I want to show the
  star rating already has another form so to use that one would mean
  putting a form inside a form which causes problems.

  On Feb 29, 3:19 pm, chrismarx [EMAIL PROTECTED] wrote:

   is that the same on as here:  http://examples.learningjquery.com/rating/
   ?
   i remember making several changes, let me know if thats the same one-

   On Feb 29, 1:16 pm, AsymF [EMAIL PROTECTED] wrote:

I got this one to work:
Star Rating Plugin v1.1 -http://www.fyneworks.com/jquery/star-rating/

But the half star plugin won't work with 
1.2.3:http://www.learningjquery.com/2007/05/half-star-rating-plugin

Does anyone know a fix? The stars all appear grayed out and hover also
doesn't work.


[jQuery] Re: Half star rating plugin won't work with jQuery 1.2.3

2008-03-04 Thread Diego A.

That's because the .lt and .gt methods were removed in jQuery 1.2.
See:
http://www.learningjquery.com/2007/09/upgrading-to-jquery-12
http://docs.jquery.com/Release:jQuery_1.2

On Feb 29, 10:41 pm, AsymF [EMAIL PROTECTED] wrote:
 I tried using that one, too. Doesn't work at all. All the stars are
 grayed out after the code executes no matter what I set curvalute to
 and clicking them does absolutely nothing. I even inserted alerts()
 into the code to see when the click fired. Nothing showed up.

 On Feb 29, 3:19 pm, chrismarx [EMAIL PROTECTED] wrote:

  is that the same on as here:  http://examples.learningjquery.com/rating/
  ?
  i remember making several changes, let me know if thats the same one-

  On Feb 29, 1:16 pm, AsymF [EMAIL PROTECTED] wrote:

   I got this one to work:
   Star Rating Plugin v1.1 -http://www.fyneworks.com/jquery/star-rating/

   But the half star plugin won't work with 
   1.2.3:http://www.learningjquery.com/2007/05/half-star-rating-plugin

   Does anyone know a fix? The stars all appear grayed out and hover also
   doesn't work.


[jQuery] Re: cycle plugin problem

2008-03-04 Thread Mike Alsup

Diego, can you post a link?


  I have not been able to use the cycle plugin and it's driving me
  insane.

  The error message (in firebug):
  this.domManip is not a function


[jQuery] Re: cycle plugin problem

2008-03-04 Thread Diego A.

Hi Mike,

Thank you so much for your prompt reply. Here is the link:
http://thewayfarers.com.temp.ourhelmcp.com/

The site is in its earliest stages of development so please ignore the
mess. The slideshow in question is on the bottomr right hand corner of
the frontpage and here is the code I used to start it:

// Cycle
$('#slideshow').cycle({ fx: 'fade' });

PS.: If you're wondering, the rather large @.js file is a compilation
of jQuery + plugins + my own code, uncompressed and with all comments,
which I use during development. I had the same problem with the
'packed' version...

PPS.: Using jQuery 1.2.3 Rev 4663

PPPS.: There's no hurry so don't put yourself out...

On Mar 4, 2:19 pm, Mike Alsup [EMAIL PROTECTED] wrote:
 Diego, can you post a link?





   I have not been able to use the cycle plugin and it's driving me
   insane.

   The error message (in firebug):
   this.domManip is not a function


[jQuery] Accessibility

2008-03-04 Thread David Bolter

Hi all,

We want to help make it easier for people to write accessible jQuery
applications. We are very encouraged by Paul's recent work making some
widgets keyboard controllable and to see the earlier ARIA plugin from
Chris Hoffman. Still, there is a lot to do!

If you are interested in being a part of making jQuery UI more
accessible, John has created a google group:
http://groups.google.com/group/jquery-a11y

Please join the effort!

cheers,
Colin Clark and David Bolter




[jQuery] Re: absolute position inside inline element (opera)

2008-03-04 Thread Olaf Bosch


Rick schrieb:


I have made a page which shows what the problem is: http://meerbox.nl/opera.html
Any help would be appreciated :)


This are not good coded ;)

b id=inldiv id=absAbove/divInline element/b

In B have not a DIV, try a SPAN or EM or what ever are inline!


--
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de/
http://ohorn.info/
http://www.akitafreund.de/
---


[jQuery] Re: How do I make an inline anchor link slowly scroll down?

2008-03-04 Thread Ariel Flesler

Glad it works now.

Ariel Flesler

On 3 mar, 18:32, Ariel Flesler [EMAIL PROTECTED] wrote:
 Olaf ? What the... ???

 Now you are not including jQuery.ScrollTo... how do you expect it to
 work ?
 Add the plugin and it works...

 Cheers
 Ariel Flesler

 On 3 mar, 15:52, Michael Ray [EMAIL PROTECTED] wrote:



  Thank Olaf for finding that spelling error!

  Ok, so I fixed that spelling error (what a shameful mistake i know), but it
  still does not want to work! I have simplified the code even further to just
  affect all inline links on the page:

  Here is the code

  script type=text/javascript
    $(document).ready(function(){
      $.localScroll();
    });
  /script

  and here is the html

  h1 id=Conta href=#testTHIS IS A TEST/a/h1
  ...
  ...
  ...
  a name=testThis is where it should go/a

  here is the page.

 http://66.199.224.168/calendar

  This seriously boggles my mind.

  -Mike R

  On Mon, Mar 3, 2008 at 6:41 AM, Ariel Flesler [EMAIL PROTECTED] wrote:

   Ohhh man... I got crazy, mumbling to myself what the heck!.
   After 10 minutes of going thru pretty much everything, I realized you
   wrote:
   script type=text/javescript... javEscript.. fix that and it will
   work.

   @olaf
    The call to the plugin is done ok. LocalScroll has to be called on
   containers, not the actual links.

   Cheers.
   Ariel Flesler

   On Mar 3, 5:06 am, Olaf Bosch [EMAIL PROTECTED] wrote:
Michael Ray schrieb:

 Thanks for pointing me in the right direction. I am tryign to use
 LocalScroll but it doesn't want to work. I included '
   jquery.scrollTo.js' and
 'jquery.localscroll-1.2.4.js' in my head

You bind the click on a h1, this have not a HREF, try this:

h1a id=Cont href=#testTHIS IS A TEST/a/h1

--
Viele Grüße, Olaf

---
[EMAIL PROTECTED]://olaf-
   bosch.de/http://ohorn.info/http://www.akitafreund.de/
 Ocultar texto de la cita -

  - Mostrar texto de la cita -- Ocultar texto de la cita -

 - Mostrar texto de la cita -


[jQuery] query attribute names, not values?

2008-03-04 Thread dan j


Hi,

I've been using the following JQuery code to generate striped table rows:

$(.zebra tr:odd).addClass(odd);

However, we're use a CMS  each time a user edits a page that employs this
code, the CMS appears to be adding a nasty jquery-related attribute to each
table row that has a class value of 'odd'. For example:

tr class=odd jquery1201791561172=13 jquery1202395579096=12
jquery1202723035398=10 jquery1202723075859=10 jquery1202747552558=10
jquery1203356118865=8 jquery1203433854906=6 jquery1204552517328=4
jquery1204553546546=4

Obviously our preferred solution would be to fix our CMS, but until that's
done is there a way in JQuery to apply a regular expression test on all
attribute names (not values) to remove all such offending attributes?

Thanks.
-- 
View this message in context: 
http://www.nabble.com/query-attribute-names%2C-not-values--tp15828998s27240p15828998.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] ui-slider

2008-03-04 Thread Michael Stuhr


i know they're still in beta, but does anyone else see that setting the 
startValue is broken ?

As a workaround i tried:
$j('#slider').slider( moveTo, fontsize); where fontsize definately != 
undefined or worse.

So is it simply broken ?

micha



[jQuery] Re: why jQuery?

2008-03-04 Thread ratbeard

You can add jQuery to your Rails project like you could to any server
technology.  The reason people say rails and proto/script go together
is in Rails you can write 'RJS' templates which is ruby code that gets
compiled into proto/script javascript code, allowing you to add
javascript effects to your page without learning javascript.  As such,
proto/script comes bundled with rails.

Here was an article that was influential to me picking jQuery:
http://jquery.com/blog/2006/08/20/why-jquerys-philosophy-is-better/
Its been awhile since I've used proto/script, and I'm sure its made a
ton of progress, but once you go jQuery, you never go back ;)


[jQuery] Re: adding a loading image to a mouse pointer

2008-03-04 Thread jaredmellentine

You could always use CSS to set the cursor property to 'wait'.

#myelement {
  cursor: wait;
}

Or use jQuery to set it

$('#myelement').css('cursor', 'wait');



On Mar 3, 7:32 am, ryszard99 [EMAIL PROTECTED] wrote:
 hi there,

 i've just started doing jquery stuff and am interested in how i can
 add a loading image that will follow the mouse pointer, pretty much
 exactly how cluetip does it.  actually i'm using cluetip in my site
 and would like to replicate the loading image functionality..

 if someone could point a n00b in the right direction i'd appreciate
 it.

 regs
 .r99


[jQuery] Re: Stop Image Download when img is gone

2008-03-04 Thread dysfunct

Bumping because I'm still interested.


[jQuery] Re: Event Bubbling - Not!

2008-03-04 Thread skube

That seems to work - sort of...

$(#main).bind(mouseleave, function(event) {
alert(event.target.id);
});

But I'm still having problems...when I use event.target.id the results
are inconsistent surprisingly in Firefox and not IE.

Also, it is worth noting I needed to use the latest jQuery release
1.2.3.


On Mar 3, 5:25 pm, Benjamin Sterling
[EMAIL PROTECTED] wrote:
 skube, try *mouseleave*  instead, that one take bubbling into account.

 On 3/3/08, skube [EMAIL PROTECTED] wrote:





  I am a little confused about event bubbling. Say for example I have
  the following bit of HTML:

  code
  div id=main
  div id=one
  one
  /div
  div id=two
  two
  /div
  /div
  /code

  when I try:
  code
  $(#main).mouseout(function() {
  alert('test');
  });
  /code

  The alert gets fired even when mousing in/out of divs one/two, but
  while still staying within the main div.

  How do I fire the alert only if I mouseout of everything (including
  main), not just out of one and into two?

 --
 Benjamin 
 Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.comhttp://www.benjaminsterling.com


[jQuery] Re: .html() callback?

2008-03-04 Thread Scott González

.html() doesn't have a callback because it is synchronous, so any code
executed after the .html() call will definitely occur after the html
is set.

I'm not sure why you're having any problems, but the problem is
probably in your code.  You'll get better responses by posting a test
page.


On Mar 4, 8:10 am, alexanmtz [EMAIL PROTECTED] wrote:
 Hi everyone,

 Like a lot of methods of jQuery, why the .html() doesnt have a
 callback?

 I need that some javascript load when the dom change with .html()
 (append and others too), and some events are attached with the new
 elements created by this method. What happens is that sometimes they
 are attached and other times not. I thing its due the fact that I
 execute this code:

 $('#div').html(stuffVar);
 $.getScript('newEvents.js');

 This work sometimes. I would need one way to accomplish this task like
 this:

 $(#div').html(stuffVar,function(){
 $.getScript('newEvents.js');

 });

 This way, we would have sure that the html is updated and so we can
 load the script to attach events.

 Anyone has idea???
 thanks,

 Alexandre Magno
 Web Developerhttp://blog.alexandremagno.net


[jQuery] Re: cycle plugin problem

2008-03-04 Thread Mike Alsup

It looks like you've got competing versions of the metadata plugin
loaded.  The current one, and then later in the file some sort of
ancient one under the comment:

// MODIFIER FOR METADATA PLUGIN

Cycle is borking because the call to retrieve metadata is returning a
full jQuery object.

Mike



On Tue, Mar 4, 2008 at 9:49 AM, Diego A. [EMAIL PROTECTED] wrote:

  Hi Mike,

  Thank you so much for your prompt reply. Here is the link:
  http://thewayfarers.com.temp.ourhelmcp.com/

  The site is in its earliest stages of development so please ignore the
  mess. The slideshow in question is on the bottomr right hand corner of
  the frontpage and here is the code I used to start it:

  // Cycle
  $('#slideshow').cycle({ fx: 'fade' });

  PS.: If you're wondering, the rather large @.js file is a compilation
  of jQuery + plugins + my own code, uncompressed and with all comments,
  which I use during development. I had the same problem with the
  'packed' version...

  PPS.: Using jQuery 1.2.3 Rev 4663

  PPPS.: There's no hurry so don't put yourself out...



  On Mar 4, 2:19 pm, Mike Alsup [EMAIL PROTECTED] wrote:
   Diego, can you post a link?
  
  
  
  
  
 I have not been able to use the cycle plugin and it's driving me
 insane.
  
 The error message (in firebug):
 this.domManip is not a function



[jQuery] Re: how to get the size of the image file before user upload it.

2008-03-04 Thread Rick

swfupload can do that :)

On 4 mrt, 04:25, Xinhao Zheng [EMAIL PROTECTED] wrote:
 hi all,

 is there a way to do this that can work both under ie and FF.thanks
 in advance.

 George


[jQuery] Re: absolute position inside inline element (opera)

2008-03-04 Thread Olaf Bosch


Rick schrieb:


I have made a page which shows what the problem is: http://meerbox.nl/opera.html
Any help would be appreciated :)


Opera must have a left or right, i try

  #abs {
  position:absolute;
  height:20px;
  top:-20px;
left:0;
  border:1px solid white;
  zoom:1;
  }

and as work for me


--
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de/
http://ohorn.info/
http://www.akitafreund.de/
---


[jQuery] Re: absolute position inside inline element (opera)

2008-03-04 Thread weepy

have you seen cornerz ?



On 4 Mar, 16:35, Olaf Bosch [EMAIL PROTECTED] wrote:
 Rick schrieb:

  I have made a page which shows what the problem 
  is:http://meerbox.nl/opera.html
  Any help would be appreciated :)

 Opera must have a left or right, i try

   #abs {
   position:absolute;
   height:20px;
   top:-20px;
  left:0;
   border:1px solid white;
   zoom:1;
   }

 and as work for me

 --
 Viele Grüße, Olaf

 ---
 [EMAIL PROTECTED]://olaf-bosch.de/http://ohorn.info/http://www.akitafreund.de/
 ---


[jQuery] onbeforeunload

2008-03-04 Thread Jack Bates

Is there any support for the onbeforeunload event in jQuery?

I contribute to an open source records management application which
employs jQuery. Some of our usability feedback has been that users
loose
because they don't realize they must submit a form before navigating
to
another page. Sounds silly, but I guess it's easy to click one of the
links on our edit page while in the middle of completing the long
form.

I was inspired by Gmail, which warns that your message hasn't been
sent
when you navigate away from the message composition page. I want to
present a similar warning to our users, but have encountered problems:

Apparently others have tried to achieve the same result with jQuery
and
also encountered problems:
http://groups.google.com/group/jquery-en/browse_thread/thread/3cfcb3a37660292c

I guess it's not possible, when the user navigates away, to display a
JavaScript prompt and either cancel the action, save the form or allow
the action to proceed, based on the user's feedback, since this would
enable JavaScript to keep the user on a page indefinitely.

However I also gather some browsers support an onbeforeunload event;
that returning a string from an onbeforeunload event handler causes a
confirmation dialog to be displayed with that message and options to
proceed or cancel; and that this is what Gmail uses:
http://www.boutell.com/newfaq/creating/disableclose.html

Unfortunately I can't seem to get jQuery to handle onbeforeunload. I
tried:

$(window).bind('beforeunload', function (event) { return 'Are you
sure?' })

- and -

$(window).bind('beforeunload', function (event) { event.returnValue =
'Are you sure?' })

- but neither worked. The following does work for me:

window.onbeforeunload = function () { return 'Are you sure?' }

I gather others have had similar experience:

http://groups.google.com/group/jquery-en/browse_thread/thread/24002d2e3f22b2cf

http://groups.google.com/group/jquery-en/browse_thread/thread/ece8bed4087b6082

So my question is: is there support in jQuery for onbeforeunload which
I'm missing or misusing, or is there a reason that jQuery doesn't
support onbeforeunload?

Thanks and best wishes, Jack


[jQuery] [validate] with balloons, how too?

2008-03-04 Thread Alexsandro_xpt

Hello all,


I can't do a validate within balloons.

I really have the balloons created with div tags.

Take a look

http://blog.alexsandro.com.br/aa.htm

This sample is a simple balloons fired on focus events.

Now using bassistance validation(http://bassistance.de/jquery-plugins/
jquery-plugin-validation/) I wish make this works!

I alredy try using this:

$(#fteste).validate({
rules:{
T1:{
required: true
},
S1:{
required: true
}
},
messages:{
T1: {
required: Enter a username,
},
S1: {
required: Provide a text,
}
},
errorPlacement:function(error, element){
error.appendTo ( element.parent() );
}
});

but not sucess, :(

I thing that errorPlacement is a key for my solution, but, how can I
take the messages into the balloon?


Someone can help-me?
Thz!!


[jQuery] Re: ANNOUNCE: No Spam plugin

2008-03-04 Thread Mike Branski

Hi Bill,

Glad you like it! I had planned to re-work how it handles obfuscating
the @ and . characters for situations like you mentioned. I'm also
going to look into modifying it to accept query strings (e.g.,
mailto:[EMAIL PROTECTED]).

Thanks for the feedback. I'll give you credit in the source if I use
your code.

Best,
Mike Branski

On Mar 3, 4:33 pm, Bill [EMAIL PROTECTED] wrote:
 Hi  Mike

 On Jan 23, 9:39 am, Mike Branski [EMAIL PROTECTED] wrote:

  This jQuery plugin turns an obfuscated e-mail address into a human-
  readable one. It's lightweight and accepts multiple filtering levels
  for additional security.

 Thanks for the plugin.  Works great for me!

 I did run into a problem with email addresses that have more than one
 dot (period) in them.  For example, my/name/my/domain/com gets
 rendered as [EMAIL PROTECTED] when it should be
 [EMAIL PROTECTED]

 I made a small change in the encoding convention by using a double
 slash (//) to represent the @.  Single slashes (/) represent the
 dots.  So my example is now encoded as my/name//my/domain/com.

 Another thing that I noticed is if there are several single slashes in
 the obfuscated email address, only the first one gets substituted with
 a dot because the replace() function is not executing globally.

 So to put this together, I changed the common code sequence:
 .replace('/', '@').replace('/', '.')
 to:
 .replace('//', '@').replace(/\//g, '.')

 This replaces the singly occurring double slash with an @, then
 replaces all single slashes with a dot.

 Cheers,
 Bill

 I


[jQuery] help with a strategy?

2008-03-04 Thread charlie

Hi all, the application I'm attempting to write couldn't be simpler:
I want to display rows of data, retrieved from a database and allow
people to edit or delete those rows and add new rows.  Backend is PHP,
but I'd prefer to keep that out of the picture.  So far I'm passing my
rows successfully to jquery and have the loop ready to go, but I'm not
sure how to proceed.

Here's my dilemma:  what's the best strategy for keeping the HTML out
of my Javascript as much as possible?  The whole point of this
excercise has been to try to extricate as much PHP as possible from
the display logic, but just subbing in javascript is obviously pretty
pointless.

One strategy I'm toying with is having an HTML empty row in the
normal layout that's hidden and get's cloned for both existing and new
records.  Is this a common technique?  Are there better ones?  I'm
trying not to re-invent the wheel here!

TIA, Charles


[jQuery] Checkboxes not working with .toggle()

2008-03-04 Thread Michael Ray
I am using a checkbox to enable/disable a fieldset of input fields in a
form. This toggle worls great, but the checkbox itself won't change it's
state at all.

Here is the code:

   $(#checkBox1).toggle(
   function () {
   this.attr(checked, checked);
   $(#secondaryOwner input).attr(disabled,);
   $(#secondaryOwner select).attr(disabled,);
   this.attr(checked, checked);
   $(#secondaryOwner).css(color,#000);
   },
   function () {
   $(#secondaryOwner input).attr(disabled,disabled);
   $(#secondaryOwner select).attr(disabled,disabled);
   this.attr(checked, );
   $(#secondaryOwner).css(color,#999);
   }
   );

Here is the HTML (though I dont think this is really the source of the
problem):

fieldset id='secondaryOwner'
legend
label for='checkBox1'Secondary Owner/label
input type='checkbox' name='secondaryOwnercheckBox'
value=secondaryOwnercheck class='checkBox' id='checkBox1' /
/legend

div id='secondaryOwnerpersonal'
label for='secondaryOwnerFirstName'First Name/label
input type='text' name='secondaryOwnerFirstName'
id='secondaryOwnerFirstName' value='' /

label for='secondaryOwnerMI'Middle Initial/label
input type='text' name='secondaryOwnerMI' id='secondaryOwnerMI'
value=' ' /
label for='secondaryOwnerLastName'Last Name/label
input type='text' name='secondaryOwnerLastName'
id='secondaryOwnerLastName' value=' ' /
/div
div id='secondaryOwnerbusiness' style='display: none;'
label for='secondaryOwnerName'Name/label
input type='text' name='secondaryOwnerName' id='secondaryOwnerName'
value=' ' /
/div

label for='secondaryOwnerSSN' id='so_SSN'SSN /label
label for='secondaryOwnerSSN' id='so_Fein' style='display: none;'Fein
Number/label
input type='text' name='secondaryOwnerSSN' id='secondaryOwnerSSN'
value=' ' /

div id='so_individualInfo'
label for='secondaryOwnerLicense'Driver's License # /label
input type='text' name='secondaryOwnerLicense'
id='secondaryOwnerLicense' value=' ' /
label for='secondaryOwnerDOB'DOB (mm/dd/)/label
input type='text' name='secondaryOwnerDOB' id='secondaryOwnerDOB'
value=' ' /
label for='secondaryOwnerSex'Gender/label

select name='secondaryOwnerSex' id='secondaryOwnerSex'
option value='1'Male/option
option value='2'Female/option
/select
/div
/fieldset


[jQuery] Re: How do I make an inline anchor link slowly scroll down?

2008-03-04 Thread Michael Ray
Yes thank you so much for your assistance.

On Tue, Mar 4, 2008 at 9:12 AM, Ariel Flesler [EMAIL PROTECTED] wrote:


 Glad it works now.

 Ariel Flesler

 On 3 mar, 18:32, Ariel Flesler [EMAIL PROTECTED] wrote:
  Olaf ? What the... ???
 
  Now you are not including jQuery.ScrollTo... how do you expect it to
  work ?
  Add the plugin and it works...
 
  Cheers
  Ariel Flesler
 
  On 3 mar, 15:52, Michael Ray [EMAIL PROTECTED] wrote:
 
 
 
   Thank Olaf for finding that spelling error!
 
   Ok, so I fixed that spelling error (what a shameful mistake i know),
 but it
   still does not want to work! I have simplified the code even further
 to just
   affect all inline links on the page:
 
   Here is the code
 
   script type=text/javascript
 $(document).ready(function(){
   $.localScroll();
 });
   /script
 
   and here is the html
 
   h1 id=Conta href=#testTHIS IS A TEST/a/h1
   ...
   ...
   ...
   a name=testThis is where it should go/a
 
   here is the page.
 
  http://66.199.224.168/calendar
 
   This seriously boggles my mind.
 
   -Mike R
 
   On Mon, Mar 3, 2008 at 6:41 AM, Ariel Flesler [EMAIL PROTECTED]
 wrote:
 
Ohhh man... I got crazy, mumbling to myself what the heck!.
After 10 minutes of going thru pretty much everything, I realized
 you
wrote:
script type=text/javescript... javEscript.. fix that and it will
work.
 
@olaf
 The call to the plugin is done ok. LocalScroll has to be called on
containers, not the actual links.
 
Cheers.
Ariel Flesler
 
On Mar 3, 5:06 am, Olaf Bosch [EMAIL PROTECTED] wrote:
 Michael Ray schrieb:
 
  Thanks for pointing me in the right direction. I am tryign to
 use
  LocalScroll but it doesn't want to work. I included '
jquery.scrollTo.js' and
  'jquery.localscroll-1.2.4.js' in my head
 
 You bind the click on a h1, this have not a HREF, try this:
 
 h1a id=Cont href=#testTHIS IS A TEST/a/h1
 
 --
 Viele Grüße, Olaf
 
 ---
 [EMAIL PROTECTED]://olaf-
bosch.de/http://ohorn.info/http://www.akitafreund.de/
  Ocultar texto de la cita -
 
   - Mostrar texto de la cita -- Ocultar texto de la cita -
 
  - Mostrar texto de la cita -



[jQuery] Re: absolute position inside inline element (opera)

2008-03-04 Thread Rick

I have uploaded the real thing.

http://www.meerbox.nl/corner/example2.html (check the bottom of the
page)

download:

http://www.meerbox.nl/corner.zip

i have tried al sort of things, but cant get it to work in opera. What
you sayed did work work on the test page but not in the real thing :(

On 4 mrt, 17:35, Olaf Bosch [EMAIL PROTECTED] wrote:
 Rick schrieb:

  I have made a page which shows what the problem 
  is:http://meerbox.nl/opera.html
  Any help would be appreciated :)

 Opera must have a left or right, i try

   #abs {
   position:absolute;
   height:20px;
   top:-20px;
  left:0;
   border:1px solid white;
   zoom:1;
   }

 and as work for me

 --
 Viele Grüße, Olaf

 ---
 [EMAIL PROTECTED]://olaf-bosch.de/http://ohorn.info/http://www.akitafreund.de/
 ---


[jQuery] Re: ANNOUNCE: No Spam plugin

2008-03-04 Thread Rick

Great work Mike !

On 23 jan, 18:39, Mike Branski [EMAIL PROTECTED] wrote:
 This jQuery plugin turns an obfuscated e-mail address into a human-
 readable one. It's lightweight and accepts multiple filtering levels
 for additional security.



[jQuery] Re: absolute position inside inline element (opera)

2008-03-04 Thread Rick

Yes, nice plugin :)

On 4 mrt, 18:02, weepy [EMAIL PROTECTED] wrote:
 have you seen cornerz ?


[jQuery] jQuery Tutorial at IBM

2008-03-04 Thread Jake McGraw

http://www.ibm.com/developerworks/web/library/wa-aj-overhaul1/index.html?ca=drs-

Developer Works drops jQuery Ajax + ThickBox tutorial. Part one posted today.

- jake


[jQuery] Re: how to get the size of the image file before user upload it.

2008-03-04 Thread Alexandre Plennevaux

which means... via Flash.

On Tue, Mar 4, 2008 at 5:57 PM, Rick [EMAIL PROTECTED] wrote:

  swfupload can do that :)



  On 4 mrt, 04:25, Xinhao Zheng [EMAIL PROTECTED] wrote:
   hi all,
  
   is there a way to do this that can work both under ie and FF.thanks
   in advance.
  
   George




-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Re: Full size Calendar

2008-03-04 Thread 1Marc

I have not seen one.  There are a few commercial solutions, but I have
yet to see a good open source implementation.

On Feb 29, 11:13 pm, waf771 [EMAIL PROTECTED] wrote:
 Has anyone developed a full size calendar, like a day planer etc.
 Similar to google calendar???


[jQuery] Re: adding a loading image to a mouse pointer

2008-03-04 Thread Michael Ray
inho, using CSS would be the better way

On Tue, Mar 4, 2008 at 8:46 AM, jaredmellentine [EMAIL PROTECTED]
wrote:


 You could always use CSS to set the cursor property to 'wait'.

 #myelement {
  cursor: wait;
 }

 Or use jQuery to set it

 $('#myelement').css('cursor', 'wait');



 On Mar 3, 7:32 am, ryszard99 [EMAIL PROTECTED] wrote:
  hi there,
 
  i've just started doing jquery stuff and am interested in how i can
  add a loading image that will follow the mouse pointer, pretty much
  exactly how cluetip does it.  actually i'm using cluetip in my site
  and would like to replicate the loading image functionality..
 
  if someone could point a n00b in the right direction i'd appreciate
  it.
 
  regs
  .r99



[jQuery] Re: Checkboxes not working with .toggle()

2008-03-04 Thread Michael Ray
Nevermind, I figured out the issue.

I was going about this all wrong, assigning a .toggle() function to a
checkbox. What I SHOULD have done is assign a .click() function to the
checkbox and then have it check to see whether the box is checked or not:


$(#checkBox1).click(function(){
if($(this).is(:checked) ) {
$(#secondaryOwner input:not(#checkBox1)).attr(disabled,);
$(#secondaryOwner select).attr(disabled,);
$(#secondaryOwner).css(color,#000);
} else {
$(#secondaryOwner
input:not(#checkBox1)).attr(disabled,disabled);
$(#secondaryOwner select).attr(disabled,disabled);
$(#secondaryOwner).css(color,#999);
}
});




On Tue, Mar 4, 2008 at 10:42 AM, Michael Ray [EMAIL PROTECTED]
wrote:

 I am using a checkbox to enable/disable a fieldset of input fields in a
 form. This toggle worls great, but the checkbox itself won't change it's
 state at all.

 Here is the code:

 $(#checkBox1).toggle(
function () {
 this.attr(checked, checked);
$(#secondaryOwner input).attr(disabled,);
 $(#secondaryOwner select).attr(disabled,);
this.attr(checked, checked);
 $(#secondaryOwner).css(color,#000);
},
 function () {
$(#secondaryOwner input).attr(disabled,disabled);
 $(#secondaryOwner select).attr(disabled,disabled);
this.attr(checked, );
 $(#secondaryOwner).css(color,#999);
}
 );

 Here is the HTML (though I dont think this is really the source of the
 problem):

 fieldset id='secondaryOwner'
 legend
 label for='checkBox1'Secondary Owner/label
 input type='checkbox' name='secondaryOwnercheckBox'
 value=secondaryOwnercheck class='checkBox' id='checkBox1' /
 /legend

 div id='secondaryOwnerpersonal'
 label for='secondaryOwnerFirstName'First Name/label
 input type='text' name='secondaryOwnerFirstName'
 id='secondaryOwnerFirstName' value='' /

 label for='secondaryOwnerMI'Middle Initial/label
 input type='text' name='secondaryOwnerMI' id='secondaryOwnerMI'
 value=' ' /
 label for='secondaryOwnerLastName'Last Name/label
 input type='text' name='secondaryOwnerLastName'
 id='secondaryOwnerLastName' value=' ' /
 /div
 div id='secondaryOwnerbusiness' style='display: none;'
 label for='secondaryOwnerName'Name/label
 input type='text' name='secondaryOwnerName'
 id='secondaryOwnerName' value=' ' /
 /div

 label for='secondaryOwnerSSN' id='so_SSN'SSN /label
 label for='secondaryOwnerSSN' id='so_Fein' style='display:
 none;'Fein Number/label
 input type='text' name='secondaryOwnerSSN' id='secondaryOwnerSSN'
 value=' ' /

 div id='so_individualInfo'
 label for='secondaryOwnerLicense'Driver's License # /label
 input type='text' name='secondaryOwnerLicense'
 id='secondaryOwnerLicense' value=' ' /
 label for='secondaryOwnerDOB'DOB (mm/dd/)/label
 input type='text' name='secondaryOwnerDOB' id='secondaryOwnerDOB'
 value=' ' /
 label for='secondaryOwnerSex'Gender/label

 select name='secondaryOwnerSex' id='secondaryOwnerSex'
 option value='1'Male/option
 option value='2'Female/option
 /select
 /div
 /fieldset






[jQuery] Re: how to get the size of the image file before user upload it.

2008-03-04 Thread Uwe C. Schroeder


Does swfupload work on all platforms/browsers? Last time I tried a flash-based 
uploader it crashed FF (linux) every time.

Uwe


On Tuesday 04 March 2008, Rick wrote:
 swfupload can do that :)

 On 4 mrt, 04:25, Xinhao Zheng [EMAIL PROTECTED] wrote:
  hi all,
 
  is there a way to do this that can work both under ie and FF.thanks
  in advance.
 
  George




[jQuery] Evaluation ajax response data

2008-03-04 Thread rpupkin77

Hi, I have a simple ajax app that returns a dataType of text with a
string of either yes or no.

The script works fine, but for some reason, when I try to use an if/
else statement to evealutae the response, it always return false.

in the following example, my code will alert yes but the if
statement acts as if the data variable is not equal to it, even when
it is

For example:
var d = page.php?params;

$.ajax({
type: GET,
url: /ajax/processEmail.php,
data: d,
dataType: text,
success: function(theData, msg){

alert(theData);

if(theData==yes)
{
do this;
}
else
{
do this;
}

});

any ideas?


[jQuery] Re: absolute position inside inline element (opera)

2008-03-04 Thread Olaf Bosch


Rick schrieb:


i have tried al sort of things, but cant get it to work in opera. What
you sayed did work work on the test page but not in the real thing :(


Hm, your real thing used padding left and right, Opera ignorier this.
Can you give the Opera

left: 0 - padding-left;
right:0 + padding-right;

I think this are the way to go

@weepy
YES, i have ;)

--
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de/
http://ohorn.info/
http://www.akitafreund.de/
---


[jQuery] Re: EqualTo but only if checkbox is checked

2008-03-04 Thread Scott González

Right now, the easiest way to accomplish this is to use parameter or
class based validation and dynamically change the parameter/class when
the checkbox is checked (see http://tinyurl.com/2f6dsn for a previous
explanation I've given on this).

Also, you may want to check out the second step of the Marketo demo
(http://jquery.bassistance.de/validate/demo/marketo/) for an example
of address validation.

On Mar 3, 11:13 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 How can I compare 2 text fields only if a certain checkbox is
 checked?  Can you do something like this?

 billingAddress: {
 required: true
 minlength: 5
 equalTo: #shippingAddress  function(element) {
 return jQuery(#comparefields).is(:checked);

 },

 I'm not sure if this is possible or how to form this correctly.  I
 assume you'd be able to do this in an equalto along with specifying
 which field to compare to.


[jQuery] jCarousel

2008-03-04 Thread eNeRgIa

Hi, I'm trying to implement your plugin on a page with MULTIPLE
carousels; I'd like to use a syntax like:

jQuery(.carousel).jcarousel({

with a CLASS selector rather than an ID one. What about it? Is it
possible or not using the latest release of the plugin? Actually it
seem not...thanks in advance for your work, see you

Dario


[jQuery] Re: Creating multiple elements with different containers?

2008-03-04 Thread Richard D. Worth
On Tue, Mar 4, 2008 at 3:24 AM, Shawn [EMAIL PROTECTED] wrote:


 I have a slight problem with one of my plugins.  I'm taking a table, and
 parsing it to create divs containing the header/footer and fixed
 columns.  These are all put into a containing DIV and then the
 containing DIV wraps the table. (that's the end result, not the actual
 process...).  Now it turns out I need to do this to a second table on
 the same page.

 The problem is that I'm making references to the various divs by class
 name.  So when I create the second instance, the first gets modified.  I
 suspect I need to apply a context element in here
 (i.e. $(.myclass, container); ).  But thought I'd check here first to
 see how others are handling this type of thing.  Would I need to create
 a container object in my plugin?  Something like

 var container = $(this).parent();


That looks like a fine way to go. Another option (though perhaps not any
better) would be to give that container an id, and do your selectors like:

$(#container1 .myclass)

- Richard

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


[jQuery] Re: onbeforeunload

2008-03-04 Thread MorningZ

Why not just use the working javascript method of doing so?

and if you are new to the event, it's a very tricky-to-implement event
with little to no customization of what you can do with it


[jQuery] Ajax Request Help

2008-03-04 Thread crazyryan

Hey

Could anyone guide me in the right direction on this:

I want something like: http://www.retailmenot.com/view/amazon.com

The part, 'Did this coupon work for you'

I want that, so when yes or no is clicked, the new percentage is
brought back.

Someone said I need to do:
Onclick on worked button, send url to php script via ajax that adds +1
to the database and then use mysql and stuff on the php script to
return the value of percentage.

However, I'm kinda new to this stuff so .. Can anyone do the
javascript bit and I'll do the PHP page?

Thanks, help much appreicated.


[jQuery] Re: EqualTo but only if checkbox is checked

2008-03-04 Thread Scott González

An idea for a more robust solution is to modify equalTo() to accept:
- DOMElement
- jQuery object (first element will be used)
- jQuery selector (first element found by selector will be used)
- function (returns DOMElement, jQuery object or value)

However, this only addresses part of your problem.  The real problem
is that you don't even want to use equalTo if the checkbox is
unchecked, but you're still specifying it as a rule.  So far, there
hasn't been a good solution for this, which is why I have suggested
dynamically changing your validation rules through parameters/classes.

There are plans to make it easier to modify the rules dynamically
through script, but that won't be available until 1.3 or 2.0.


On Mar 3, 11:13 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 How can I compare 2 text fields only if a certain checkbox is
 checked?  Can you do something like this?

 billingAddress: {
 required: true
 minlength: 5
 equalTo: #shippingAddress  function(element) {
 return jQuery(#comparefields).is(:checked);

 },

 I'm not sure if this is possible or how to form this correctly.  I
 assume you'd be able to do this in an equalto along with specifying
 which field to compare to.


[jQuery] Re: absolute position inside inline element (opera)

2008-03-04 Thread Rick

 Hm, your real thing used padding left and right, Opera ignorier this.
 Can you give the Opera

 left: 0 - padding-left;
 right:0 + padding-right;

 I think this are the way to go


It already does that?


[jQuery] Re: absolute position inside inline element (opera)

2008-03-04 Thread Rick

try this:

-start opera
-go to http://www.meerbox.nl/corner/example2.html
-go to the bottom of the page
-hit F5
-now just press enter after clicking on the url bar

weird :s


[jQuery] Plugin Authoring Help pt 2

2008-03-04 Thread Leanan

Ok, I'm really trying to wrap my head around this, and it's irritating
me.  I've checked out the following pages:

http://docs.jquery.com/Plugins/Authoring
http://www.learningjquery.com/2007/10/a-plugin-development-pattern

And they help some but there's one problem I'm running into.

I have:

$.fn.myPlugin = function(options) {
  $.myPlugin.defaults = $.extend($.myPlugin.defaults, options);
  return(this);
};

$.myPlugin = {
  defaults: {
def1: 'default1',
def2: 'default2',
...
defx: 'defaultx'
  },

  myFunc: function() {
var options = $.myPlugin.defaults;
//do something here, anything really
  },

  myFunc2: function() {
  var options = $.myPlugin.defaults;
  //do something here, again, anything
  }
};

Now, I want to do something like this:

jQuery().myPlugin({def1: 'other_def1', def2: 'other_def2'}).myFunc();

Can I?

Because it's not working.  It tells me that jQuery().myPlugin({def1:
'other_def1', def2: 'other_def2'}) is not a function.

However, if I change it so that myFunc is $.fn.myFunc = function()
{ }, then I can, but I have to do it as:

jQuery().myPlugin({def1: 'other_def1', def2:
'other_def2'}).myPlugin.myFunc();

Which I don't like.

None of the tutorials or documentation I can find is clear on this
point, though they do refer to the functions in $.myPlugin as being
user-accessable... and they are, but only if I do $.myPlugin.myFunc.
I can't chain.  And I want to be able to do that.


[jQuery] Re: Ajax Request Help

2008-03-04 Thread Hamish Campbell

So if your php page (called submitVote.php) takes form vars
(integer) couponID and (bit) vote and it returns the new
percentage (eg 15%), and the percentage value lives in a div called
votePercentage, and you have two buttons called 'voteYes' and
'voteNo':

$('document').ready(function(){
$('#voteYes').click(function(){
$('#votePercentage').load(submitVote.php, { couponID: 1,
vote: 1})
});
$('#voteNo').click(function(){
$('#votePercentage').load(submitVote.php, { couponID: 1,
vote: 0})
});
});

On Mar 5, 7:41 am, crazyryan [EMAIL PROTECTED] wrote:
 Hey

 Could anyone guide me in the right direction on this:

 I want something like:http://www.retailmenot.com/view/amazon.com

 The part, 'Did this coupon work for you'

 I want that, so when yes or no is clicked, the new percentage is
 brought back.

 Someone said I need to do:
 Onclick on worked button, send url to php script via ajax that adds +1
 to the database and then use mysql and stuff on the php script to
 return the value of percentage.

 However, I'm kinda new to this stuff so .. Can anyone do the
 javascript bit and I'll do the PHP page?

 Thanks, help much appreicated.


[jQuery] Dynamically generated HTML and effects on CSS

2008-03-04 Thread [EMAIL PROTECTED]

Hello all,

I'd like to share some problem i'm facing.

I'm using facebox, inside it I display my own 'upload progress' div.
the progress div should be localized to RTL (left to right) and not
LTR, so i've added direction:rtl to the proper div.

what facebox does, is take the target div (the progressbar div), embed
it in html, then attach it to body and show it.

now the problem:
the progress div doesn't get displayed in RTL.

my troubleshooting:
- tried adding dir=rtl, direction:rtl to everything
- tried removeing with EditCSS (web developer plugin) all of the CSS
- tried looking at the mode: standard compliance mode
- the css comes as text/css
- deleted cache
- tried in IE, Safari too.
none of the above worked.

and some wierd behaviour: when i load FF webdeveloper plugin, and go
to 'edit css' suddenly everything renders correctly.

i have to conclude that the browser doesn't apply CSS to new
dynamically generated html content... is that true? and whats going on
here?



thanks.


[jQuery] Re: Half star rating plugin won't work with jQuery 1.2.3

2008-03-04 Thread Diego A.

I have an idea to make this work (for display purposes only), and I
will do my best to implement it in the next couple of days (weeks
tops). I'm sorry I can't do it right now - hope that's OK.

I'll post back here... (and in the official project page in the jQuery
plugins website)

On Mar 4, 5:32 pm, AsymF [EMAIL PROTECTED] wrote:
 I am really just looking for way to display the data, not to worry
 about graceful degradation without JavaScript enabled. I had a serious
 issue with people using proxies to submit thousands of votes for
 irrelevant ratings so now all ratings have to fetch a key in advance
 using an AJAX callback to the server (based in part on another
 tutorial I found on the jQuery site). If JavaScript is gone I just
 show a list of stars so that visitors can see the rating even if they
 can't vote.

 However, I would like to be able to display incremental stars such
 that if I have a rating of 3.75, then 3 stars and 75% of a 4th star
 will be shown with the rest grayed out.

 On Mar 4, 9:27 am, Diego A. [EMAIL PROTECTED] wrote:

  I have been thinking about this for a few days now, but I haven't had
  the time to do it.

  The problem with what you're trying to achieve is that you're looking
  for something to *display* the data, whereas my implementation of the
  plugin focuses on semantic form integration.

  Perhaps the way forward is to add the ability to display decimal
  points and accept the input of whole numbers (and at a push, .5s).

  How are you going to use this?

  On Mar 1, 5:46 pm, AsymF [EMAIL PROTECTED] wrote:

   I am now working on the jQuery Star Rating Plugin v1.1 by Diego 
   A.,http://www.fyneworks.com, [EMAIL PROTECTED]

   I have gotten it working and added the ability to remove the cancel
   button by adding the following before the line for(n in groups){:
   if (settings.nocancel) {
   $(div.cancel:has(a[title=' + settings.cancel + '])).remove();

   }

   I also added nocancel: false to the settings at the beginning of the
   script.

   Now if I could figure out how to get it to show incremental stars for
   ratings such as 3.2 or 4.6 it would be perfect for my purposes. Any
   ideas on implementing this? Like I said, I can see it done in the
   plugin ratings on the jQuery site but don't know which segment of code
   does that feature.

   On Feb 29, 5:52 pm, AsymF [EMAIL PROTECTED] wrote:

I would just use the one on the jQuery site if it weren't for the fact
that it relies on a form. The position on the page I want to show the
star rating already has another form so to use that one would mean
putting a form inside a form which causes problems.

On Feb 29, 3:19 pm, chrismarx [EMAIL PROTECTED] wrote:

 is that the same on as here:  
 http://examples.learningjquery.com/rating/
 ?
 i remember making several changes, let me know if thats the same one-

 On Feb 29, 1:16 pm, AsymF [EMAIL PROTECTED] wrote:

  I got this one to work:
  Star Rating Plugin v1.1 
  -http://www.fyneworks.com/jquery/star-rating/

  But the half star plugin won't work with 
  1.2.3:http://www.learningjquery.com/2007/05/half-star-rating-plugin

  Does anyone know a fix? The stars all appear grayed out and hover 
  also
  doesn't work.


[jQuery] Re: cycle plugin problem

2008-03-04 Thread Diego A.

AH! I'll be able to sort it out from here...
THANK YOU!

On Mar 4, 3:11 pm, Mike Alsup [EMAIL PROTECTED] wrote:
 It looks like you've got competing versions of the metadata plugin
 loaded.  The current one, and then later in the file some sort of
 ancient one under the comment:

 // MODIFIER FOR METADATA PLUGIN

 Cycle is borking because the call to retrieve metadata is returning a
 full jQuery object.

 Mike

 On Tue, Mar 4, 2008 at 9:49 AM, Diego A. [EMAIL PROTECTED] wrote:

   Hi Mike,

   Thank you so much for your prompt reply. Here is the link:
   http://thewayfarers.com.temp.ourhelmcp.com/

   The site is in its earliest stages of development so please ignore the
   mess. The slideshow in question is on the bottomr right hand corner of
   the frontpage and here is the code I used to start it:

   // Cycle
   $('#slideshow').cycle({ fx: 'fade' });

   PS.: If you're wondering, the rather large @.js file is a compilation
   of jQuery + plugins + my own code, uncompressed and with all comments,
   which I use during development. I had the same problem with the
   'packed' version...

   PPS.: Using jQuery 1.2.3 Rev 4663

   PPPS.: There's no hurry so don't put yourself out...

   On Mar 4, 2:19 pm, Mike Alsup [EMAIL PROTECTED] wrote:
Diego, can you post a link?

  I have not been able to use the cycle plugin and it's driving me
  insane.

  The error message (in firebug):
  this.domManip is not a function


[jQuery] Re: EqualTo but only if checkbox is checked

2008-03-04 Thread Scott González

There is now a planned solution for adding dependency checks to all
validation methods.  See http://dev.jquery.com/ticket/2456 for more
details.

On Mar 3, 11:13 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 How can I compare 2 text fields only if a certain checkbox is
 checked?  Can you do something like this?

 billingAddress: {
 required: true
 minlength: 5
 equalTo: #shippingAddress  function(element) {
 return jQuery(#comparefields).is(:checked);

 },

 I'm not sure if this is possible or how to form this correctly.  I
 assume you'd be able to do this in an equalto along with specifying
 which field to compare to.


[jQuery] multiple clicks needed to submit form with form plugin

2008-03-04 Thread pedalpete

This is a bit strange as it happens on only one form on my site which
uses many forms with the form plugin.

The form appears on the page via an ajax call (like most of my forms),
and when the user submits the form it is submitted and the response
returned via ajax call.

When the user clicks submit the first time, nothing happens. If you
click again, the form gets submitted.

When I have validate attached to the form, it takes three clicks to
get the form to submit.

As far as I can tell, this form is no different from any other forms
on my site.
Anyone seen this kind of behavior before?

I've included the validate code commented out as the issue occurs with
the code as well as without.

[code]
$(.addEmp).livequery('click', function(event) {

var posTop = event.pageY-130;
var posLeft = event.pageX-130;
var formID = #addEmpForm;
$(formID).css({ position: 'absolute', top: posTop, left: 
posLeft });
$(formID).fadeIn(slow).html(loading);
$.ajax({
type: POST,
url: addEmp.php,
data: cid=+cid,
success: function(response){
$(formID).html(response);
 addEmpAJAX();
// $(formID).validate();
cancelForm(formID);

}
});
});



function addEmpAJAX(){
var options2={
target:   '#addEmpForm',   // target element(s) to be updated
with server response
beforeSubmit:  showRequestAddEmp,
success:showResponseAddEmp
}

   // $('#addEmpForm').validate({
//  submitHandler: function(form){
$(#addEmpForm).submit(function() {
$(this).ajaxForm(options2);
return false;
   // })
// }
});


function showRequestAddEmp(formData, jqForm, options) {
// formData is an array; here we use $.param to convert it to a
string to display it
// but the form plugin does this for you automatically when it
submits the data
var queryString = $.param(formData);

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


function showResponseAddEmp(options)  {


$.ajax({

type: POST,
url: processes/getEmployees.php,
data: cid=+cid,
success: function(response){
$(.employees).html(response);
$(#addEmpForm).fadeOut(slow);
}

});
};
};

[/ code]


[jQuery] Re: Context Menu plugin - id of clicked element

2008-03-04 Thread Benster

Hi Dan,

Many thanks for the reply, thats been a great help.  Finally got it
working!

Heres some sample code for anyone else interested.

Regards, Ben.

script language=javascript charset=utf-8
$(document).ready(function() {

 $('span.demo1').contextMenu('myMenu1', {
  bindings: {
'1': function (trigger, target){
  alert('Trigger was '+t.id+'\nAction was Open');
},
'2': function(t) {
  alert('Trigger was '+t.id+'\nAction was Email');
},
'3': function(t) {
  alert('Trigger was '+t.id+'\nAction was Save');
},
'4': function(t) {
  alert('Trigger was '+t.id+'\nAction was Delete');
}
  }
});

});


/script
div class=contextMenu id=myMenu1
  ul
li id=1a href=#Test 1/a/li
li id=2a href=#Test 2/a/li
li id=3a href=#Test 3/a/li
li id=4a href=#Test 4/a/li
  /ul
/div

p span class=demo1 id=demo1_yellowbRIGHT CLICK FOR DEMO/b/
span

span class=demo1 id=demo1_green1 style=background-
color:lightgreenbTHIS WORKS TOO/b/span

span class=demo1 id=demo1_green2 style=background-
color:lightgreenbTHIS WORKS TOO/b/span
span class=demo1 id=demo1_green3 style=background-
color:lightgreenbTHIS WORKS TOO/b/span
span class=demo1 id=demo1_green4 style=background-
color:lightgreenbTHIS WORKS TOO/b/span
span class=demo1 id=demo1_green5 style=background-
color:lightgreenbTHIS WORKS TOO/b/span
span class=demo1 id=demo1_green6 style=background-
color:lightgreenbTHIS WORKS TOO/b/span


On Mar 3, 2:55 pm, Dan G. Switzer, II [EMAIL PROTECTED]
wrote:
 Benster,



 Im new to jquery and im struggling with hopefully a simple question!

 Im using theContextMenuplugin-
 http://www.trendskitchens.co.nz/jquery/contextmenu/
 which allows you to generate a right-clickmenu.  All works fine,
 however im now trying to pass in the id of the item that has been
 clicked upon.

 Im listing several images on a page, and offering the right-clickmenu
 for each.  I need to pass in the id of the image which has been
 clicked.  Each image has a div with a unique id.

 The documentation mentions bindings which i think is what im after,
 but have no idea how to display the function pairs.  Here is the
 description from the docs -

 An object containing id:function pairs. The supplied function is the
 action to be performed when the associated item is clicked. The
 element that triggered the currentmenuis passed to this handler as
 the first parameter.

 Can anyone advise me on how to proceed?

 It's been a while since I've used that plug-in for a project, but it is the
 bindings option you're looking for:

 $(#attachTo).contextMenu(#menuDiv, {
 bindings : {
 a.cm_item : function (trigger, target){
 // trigger is the #attachTo element
 console.log(trigger);
 // target should be the a.cm_item element
 console.log(target);
 }
 }

 });

 The above should attach a click event to every a class=cm_item / tag
 found in thecontextmenu. The target argument should be a reference to
 this DOM element.

 -Dan


[jQuery] Re: help with a strategy?

2008-03-04 Thread MorningZ

I've been coding a lot of data table stuff recently and i have been
following the pattern of what the plugin inGrid does:

which is have an empty table like:

table id=Replace_Table
thead
 tr
   thData Column/th
   thUse in Email Body/th
   thTest Value/th
 /tr
/thead
tbody/tbody
/table


And using the $.getJSON method, i call my server side script (in my
case, ASP.NET, but that's irrelevant) and return a user defined class
converted to JSON

this object has 3 properties
- (.HasError) First is a boolean whether the call was successful or
not (after running business rules, etc)
- (.Message) Second is a string message if needed
- (.Data) A generic object that could be whatever one desires, in
the case of the data table stuff, it'll be the html of the tr's and
a pager row if needed

So the code to call it would be like

$.getJSON(
 SomeHandler.ashx,
 { Mode: TableData },
 function(json) {
  if (json.HasError) {
   alert(json.Message);
  }
  else {
   $(#Replace_Table  tbody).html(json.Data);
  }
 }
);



Not saying this is the best overall way, but it surely has been
working fine for me, and it keeps my JavaScript free of html  :-)


[jQuery] Re: Using jQuery without ready()

2008-03-04 Thread fetis

 I guess the question is: what are you trying to gain by NOT wrapping
 it in document.ready?
I'm using jQuery for styling some elements, like first menu item,
selected item etc. When I run script right after this items it look
like they already have such style. When I move script in ready event
then element loaded and only after style is applied. It's visible.
That is my problem.


[jQuery] Re: with balloons, how too?

2008-03-04 Thread Alexsandro_xpt

Now I change that for validation behavior.

Saw here http://blog.alexsandro.com.br/aa.htm

But I need a help yet..


Thanks


[jQuery] Re: Using jQuery without ready()

2008-03-04 Thread MorningZ

A good trick for that is to hide the content you are manipulating, and
then for the last line of the Ready() event, do a .show() and now
the only thing the user will see is styled and complete elements

I think what people are trying to get through to you, and i
wholeheartedly agree, is that it wouldn't necessarily be best
practice to do what you point out in your first post, and if you are
learning to use jQuery, why not do so in the way it was designed and
used most widespread





On Mar 4, 4:19 pm, fetis [EMAIL PROTECTED] wrote:
  I guess the question is: what are you trying to gain by NOT wrapping
  it in document.ready?

 I'm using jQuery for styling some elements, like first menu item,
 selected item etc. When I run script right after this items it look
 like they already have such style. When I move script in ready event
 then element loaded and only after style is applied. It's visible.
 That is my problem.


[jQuery] How to serialize only part of a form?

2008-03-04 Thread [EMAIL PROTECTED]

Hi,

If I have a table row

tr id=row1
   tdinput type=text name=text1 id=text1 value=/td
   tdinput type=text name=text2 id=text2 value=/td
   tdinput type=text name=text3 id=text3 value=/td
/tr

how would I serialize the name value pairs in the row with id row1?
I would like my the result string to have
text1=somevaltext2=somenewvaltext3=someotherval.  Note there are
many other rows with input fields in my table and each row has a
unique id.

Thanks for your feedback, - Dave


[jQuery] Re: Can't get started on Getting Started :)

2008-03-04 Thread kenny



On Mar 3, 4:19 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote:
 Assuming the line breaks aren't the cause, ensure you have a correct path to
 your jquery script file.

Oops. :) Actual filename was jquery-1.2.3.js or something, not
jquery.js.

And now I have the FireFox debug tool installed and it shows $ as
undefined when I load against the wrong jq filename.

Thx!

kenny


[jQuery] Moving select box options up and down

2008-03-04 Thread Diddly Doo

I wonder if anyone has some sample code or plugin for moving select
box options up and down using jQuery. Similar to this:

http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256C5F00602363

Thanks!


[jQuery] Execute JavaScript that is added to the page by AJAX?

2008-03-04 Thread Jonny

Basically, I have a JavaScript function (let's call the function
displayDiv) that ends up writing a div to the page.  If
displayDiv is called within a table cell, the div will be added
and displayed in that table cell.  Now, what I'm trying to accomplish
is replicating this behaviour with an AJAX function (let's call the
function callAJAX) that returns HTML containing displayDiv and
adding the code to a specific location in the page.  I have tried
this, problem is that the JavaScript returned from callAJAX was not
executed.

I then did some research and tried a few things:


   1. I tried parsing out the JavaScript (displayDiv) from the
returned HTML (callAJAX) and adding it to the head tag, which in
theory, should be executed.  This approach did not work for me because
displayDiv writes a div to the page and from the head it would
not know where to write the div.



   2. I have tried parsing out the JavaScript (displayDiv) from the
returned HTML (callAJAX) and executing it with EVAL() but this would
not work because the AJAX function would not know where to write the
div created within the displayDiv function.

I guess what I'm hoping for is some magical piece of code that would
tell the browser to parse the page again and execute the JavaScript
that was added to the page by the AJAX function.



I am posting this on behalf of a friend who is to busy today :)  If
anyone can tell me if this is even possible, and if so, where to go
next, that would be most excellent!

Many thanks,

- Jonny


[jQuery] Re: Can I use jQuery to superimpose one image over part of another?

2008-03-04 Thread [EMAIL PROTECTED]

Hi Karl, Thanks for the reply but when the page initially loads, there
is no image3 in the DIV

div id=imageDisplay align=center
img id=backside name=backside alt= width=200
src=image1.gif /
img id=frontside name=frontside alt= width=200
src=image2.gif /
/div

so wouldn't I have to add it to the DOM somehow? - Dave


On Mar 3, 9:03 pm, Karl Swedberg [EMAIL PROTECTED] wrote:
 Hi Dave,

 You could easily make this happen with CSS alone, or am I missing  
 something?

 #imageDisplay {
         position: relative;
         width: 200px;
         overflow: hidden;

 }

 #image3 {  /* give it whatever id you want */
         position: absolute;
         left: 100px;

 }

 --Karl
 _
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Mar 3, 2008, at 4:44 PM, [EMAIL PROTECTED] wrote:





  Hi,

  Let's say I have this HTML

  div id=imageDisplay align=center
         img id=backside name=backside alt= width=200
  src=image1.gif /
         img id=frontside name=frontside alt= width=200
  src=image2.gif /
  /div

  and then I have another image, image3.gif.  I would like to layer
  image3.gif 100 pixels from the left most coordinate of image1.gif so
  that it appears on top of the other two images.  The parent DIV,
  imageDisplay, is relatively positioned.  Is there a way, using
  jQuery, to do what I'm asking that works in both IE and Firefox, don't
  care about the other browsers for now.

  Thanks, - Dave- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Plugin Help

2008-03-04 Thread Scott González

On Mar 3, 9:25 am, Leanan [EMAIL PROTECTED] wrote:
 Hmmm, ok.

 So with that setup, I (as a user) could do
 $.myAwesomePlugin.startRockin?  I notice you have the options stuff
 under simply $.fn.myAwesomePlugin.  So what if I wanted to call
 startRockin and set defaults, too?  Does
 $.myAwesomePlugin.startRockin(options_go_here) do it? Or do I have to
 do $.myAwesomePlugin(options_here), then
 $.myAwesomePlugin.startRockin?

In the Learning jQuery article, there's an example in the section
titled Provide public access to secondary functions as applicable.
What gets passed to your secondary/utility functions is completely
dependent on what the functions need.  If they need access to the
options, pass the options, if they don't, then don't.

Also, note that Mike's examples use $.fn.plugin.secondary, while my
example uses $.plugin.secondary.  This comes down to personal
preference, so choose whichever you like better.

It will be unlikely for a user to call a secondary function out of
context if it requires information about the options, so the scenario
you're asking about is unusual.  If you have a specific example in
mind, feel free to explain it.

Also, note that you wouldn't do:
$.myAwesomePlugin(options_here)
as you've written above, but rather:
$(selector).myAwesomePlugin(options_here)

 I've been reading these two articles over and over, and I've kind of
 got it (I think) but one or two things I still don't quite grasp.  The
 articles are:

 http://docs.jquery.com/Plugins/Authoring
 http://www.learningjquery.com/2007/10/a-plugin-development-pattern

 I rather like the second article, it seems failry straightforward.  My
 only complaint is that it doesn't show any example calls at the end
 when all the code is put together.  And that is where I keep getting
 hung up.

The only thing not shown at the end of the article is how you would
call one of the secondary functions from outside of the plugin.  This
is because it's pretty uncommon.  For one use case, check out
http://docs.jquery.com/Types#Proxy_Pattern

 For my example:

 I have my plugin that looks more or less like what I have in my intial
 post.  When I try to call $.myAwesomePlugin.startRockin, firebug tells
 me that $.myAwesomePlugin.startRockin has no properties.  From reading
 the second article, it looks like maybe I want to do
 $.fn.myAwesomePlugin.startRockin.  Which is great, but I have a few
 different functions that use the same defaults/options, and I really
 don't want to reproduce the options = $.extend code.

 If someone could kindly tell me what I'm missing or getting mixed up
 I'd greatly appreciate it.  I know I'm close.

Again, this all comes down to what your specific functions are doing.
Are you actually trying to create multiple methods (methods = $().x();
functions = $.x();) or multiple functions that one method uses?


[jQuery] Re: How to serialize only part of a form?

2008-03-04 Thread Mike Alsup

var data = $('#row1').serialize();


  If I have a table row

  tr id=row1
tdinput type=text name=text1 id=text1 value=/td
tdinput type=text name=text2 id=text2 value=/td
tdinput type=text name=text3 id=text3 value=/td
  /tr

  how would I serialize the name value pairs in the row with id row1?
  I would like my the result string to have
  text1=somevaltext2=somenewvaltext3=someotherval.  Note there are
  many other rows with input fields in my table and each row has a
  unique id.


[jQuery] Re: how to get the size of the image file before user upload it.

2008-03-04 Thread Jeffrey Kretz

I do not believe this can be done javascript alone.

I know of four ways to determine the size of the image:

1. Using a Flash-based uploader, such as SWFUpload.
2. On the server are the post has been received and the stream deserialized.
3. Using an ActiveX component in javascript (IE only - yuck)
   new ActiveXObject(Scripting.FileSystemObject); 
4. Using a Java servelet (though I don't know much about how this would
work).

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Uwe C. Schroeder
Sent: Tuesday, March 04, 2008 9:21 AM
To: jquery-en@googlegroups.com
Cc: Rick
Subject: [jQuery] Re: how to get the size of the image file before user
upload it.



Does swfupload work on all platforms/browsers? Last time I tried a
flash-based 
uploader it crashed FF (linux) every time.

Uwe


On Tuesday 04 March 2008, Rick wrote:
 swfupload can do that :)

 On 4 mrt, 04:25, Xinhao Zheng [EMAIL PROTECTED] wrote:
  hi all,
 
  is there a way to do this that can work both under ie and FF.thanks
  in advance.
 
  George





[jQuery] Re: Creating multiple elements with different containers?

2008-03-04 Thread Shawn


Thanks Richard.

I had the opportunity to look at the code, and I have a bit of work 
ahead of me.  Turns out the plugin is using IDs rather than classes.  So 
If I'm going to have more than one on a page, the IDs need to go...


But, the same core problem still exists regardless.  Time to hunker down 
and getterdone...


Shawn

Richard D. Worth wrote:
On Tue, Mar 4, 2008 at 3:24 AM, Shawn [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:



I have a slight problem with one of my plugins.  I'm taking a table, and
parsing it to create divs containing the header/footer and fixed
columns.  These are all put into a containing DIV and then the
containing DIV wraps the table. (that's the end result, not the actual
process...).  Now it turns out I need to do this to a second table on
the same page.

The problem is that I'm making references to the various divs by class
name.  So when I create the second instance, the first gets modified.  I
suspect I need to apply a context element in here
(i.e. $(.myclass, container); ).  But thought I'd check here first to
see how others are handling this type of thing.  Would I need to create
a container object in my plugin?  Something like

var container = $(this).parent();


That looks like a fine way to go. Another option (though perhaps not any 
better) would be to give that container an id, and do your selectors like:


$(#container1 .myclass)

- Richard

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



[jQuery] Re: Form Plugin: files not supported ?

2008-03-04 Thread debussy007


Thank you ! 
Indeed the submit button had has as name attribute submit, what is wrong
with that ?
Since I renamed it, it works !

I have also a last related question, if you do not mind.
I submit my form 11 times, once for the member registration data, 
then for each member's picture (10 in total)

That way, I am able to show the progression, it looks like this:

Submitting Data - Completed
Uploading Pic 1 - Completed
Uploading Pic 2 - Processing
Uploading Pic 3 - Pending
Uploading Pic 4 - Pending
Uploading Pic 5 - Pending
[...]
Uploading Pic 10 - Pending

I display this in a thickbox modal pop-up.

But Mozilla Firefox is getting very slow and sometimes it says not
responding for some seconds, very annoying for the users.
Also the ventilation of my computer is working hard.

(Notice I submit each time the whole form with all the images, 11 in total:
data + 10 pics,
Maybe it is the fact that I upload 11 times 10 pictures from the form ?)

Can you help me ?



malsup wrote:
 
 
 Do you have an input with the name submit.  Try renaming that element.
 
 Mike
 
 
 On Tue, Mar 4, 2008 at 7:30 AM, debussy007 [EMAIL PROTECTED] wrote:


  I have the following error (on firebug console):

  line 304
  form.submit();
  form.submit is not a function

  The thrid parameter of the error callback says SyntaxError: syntax
 error
 
 

-- 
View this message in context: 
http://www.nabble.com/Form-Plugin%3A-files-not-supported---tp15825190s27240p15834346.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: jquery treeview async doubt

2008-03-04 Thread Jörn Zaefferer


Thomas Hill schrieb:
Hah! My first publication. Definately a start. Btw, Jörn, I found a 
bug where if you add a child node that has long(ish) text, the text 
attempts to wrap unnsuccessfuly and the span gets placed to the bottom 
right of the plus sign. In order to fix this, I put in some code to 
measure the node treeview is about to add, and compare it to the 
parent node's width. If it's bigger, expand the parent node a bit. 
This only happens in ie (of course :C ) -  here's the code.
 


if($.browser.msie) {
 if(($(current).width() + 15)  $(parent).width()) {
  $(parent).width($(current).width() + 15);
 }
}

I put it before if(this.children  this.children.length) { in the 
load function. It's not a perfect fix, I still have it rarely but for 
other reasons I think, and I'm not sure why yet. Thought you might 
appreciate this.


Sure do, thanks. I'm currently really swamped at work, could you create 
a ticket with that? Makes sure it doesn't get lost.


Thanks
Jörn


[jQuery] [ANNOUNCE] Jonathan Snook Live on UStream.tv

2008-03-04 Thread Rey Bango


Jonathan Snook will be conducting a live chat tomorrow (3/5/08) at 
10:00am EST (15:00 GMT) via UStream. Here are the details:


* Location: http://www.ustream.tv/channel/snookca
* Date/Time: 3/5/08 at 10:00am EST (15:00 GMT)
* Topic: QA relating to Jonathan's development work with Adobe AIR, and 
questions regarding JavaScript, frameworks (PHP or JavaScript), or about 
freelancing.


If you're not familiar with Jonathan, he is one of the top client-side 
veterans around having published books, articles and contributed to many 
projects. He's also the lead for the Snitter project, a Twitter client 
developed in JavaScript using jQuery and Adobe AIR.


This is definitely a good opportunity to pick the brain of one of the 
top professionals around.


[jQuery] Test - Please disregard

2008-03-04 Thread Rey Bango


Test email.


[jQuery] [ANNOUNCE] Jonathan Snook Live on UStream.tv

2008-03-04 Thread Rey Bango


Jonathan Snook will be conducting a live chat tomorrow (3/5/08) at 
10:00am EST (15:00 GMT) via UStream. Here are the details:


* Location: http://www.ustream.tv/channel/snookca
* Date/Time: 3/5/08 at 10:00am EST (15:00 GMT)
* Topic: QA relating to Jonathan's development work with Adobe AIR, and 
questions regarding JavaScript, frameworks (PHP or JavaScript), or about 
freelancing.


If you're not familiar with Jonathan, he is one of the top client-side 
veterans around having published books, articles and contributed to many 
projects. He's also the lead for the Snitter project, a Twitter client 
developed in JavaScript using jQuery and Adobe AIR.


This is definitely a good opportunity to pick the brain of one of the 
top professionals around.




[jQuery] jQuery.Plugin, first release.

2008-03-04 Thread Ariel Flesler

Hi,

   First release of jQuery.Plugin, that's the name, it is used to lazy
load plugins. The file is only fetched with the first call to the
plugin.

It's still a bit untested (I'd love some help). I have a small them
that I used for my own testing, but it's not good enough to expose, so
no demo for now.

So.. it's not a demo what I'm asking to be tried, but the code in a
real case. If you don't want or don't know how to help/test. You can
just give me your opinion on the idea, and maybe something you'd like
it to do.

Project Page: http://plugins.jquery.com/project/Plugin

Cheers

Ariel Flesler


[jQuery] Re: Moving select box options up and down

2008-03-04 Thread Matt Kruse

On Mar 4, 5:44 pm, Diddly Doo [EMAIL PROTECTED] wrote:
 I wonder if anyone has some sample code or plugin for moving select
 box options up and down using jQuery. Similar to this:
 http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256C5F006...

I haven't jQuery-ized it yet, but my lib has some advantages over the
link above and could be easily made into a jQuery plugin with a small
amount of effort:
http://www.javascripttoolbox.com/lib/selectbox/

Matt Kruse


[jQuery] Re: jQuery.Plugin, first release.

2008-03-04 Thread Ariel Flesler

I added a paste with an example, to show the syntax, I promise a real
demo soon :)

Link: http://flesler.pastebin.com/f3e105964

Ariel Flesler

On 5 mar, 00:44, Ariel Flesler [EMAIL PROTECTED] wrote:
 Hi,

    First release of jQuery.Plugin, that's the name, it is used to lazy
 load plugins. The file is only fetched with the first call to the
 plugin.

 It's still a bit untested (I'd love some help). I have a small them
 that I used for my own testing, but it's not good enough to expose, so
 no demo for now.

 So.. it's not a demo what I'm asking to be tried, but the code in a
 real case. If you don't want or don't know how to help/test. You can
 just give me your opinion on the idea, and maybe something you'd like
 it to do.

 Project Page:http://plugins.jquery.com/project/Plugin

 Cheers

 Ariel Flesler


[jQuery] Re: Plugin Authoring Help pt 2

2008-03-04 Thread Mike Alsup

If you want to use two different functions in the chain then you need
to define two plugin functions:

// wrap it all in a closure so you can share private data easily
(function() {

$.fn.myPlugin1 = function(options) {
var myOptions = $.extend(defaults, options);
// do stuff
};

$.fn.myPlugin2 = function(options) {
var myOptions = $.extend(defaults, options);
// do stuff
};

var defaults = {
   def1: 'default1',
   def2: 'default2',
   ...
   defx: 'defaultx'
};

})();



On Tue, Mar 4, 2008 at 2:09 PM, Leanan [EMAIL PROTECTED] wrote:

  Ok, I'm really trying to wrap my head around this, and it's irritating
  me.  I've checked out the following pages:

  http://docs.jquery.com/Plugins/Authoring
  http://www.learningjquery.com/2007/10/a-plugin-development-pattern

  And they help some but there's one problem I'm running into.

  I have:

  $.fn.myPlugin = function(options) {
   $.myPlugin.defaults = $.extend($.myPlugin.defaults, options);
   return(this);
  };

  $.myPlugin = {
   defaults: {
 def1: 'default1',
 def2: 'default2',
 ...
 defx: 'defaultx'
   },

   myFunc: function() {
 var options = $.myPlugin.defaults;
 //do something here, anything really
   },

   myFunc2: function() {
   var options = $.myPlugin.defaults;
   //do something here, again, anything
   }
  };

  Now, I want to do something like this:

  jQuery().myPlugin({def1: 'other_def1', def2: 'other_def2'}).myFunc();

  Can I?

  Because it's not working.  It tells me that jQuery().myPlugin({def1:
  'other_def1', def2: 'other_def2'}) is not a function.

  However, if I change it so that myFunc is $.fn.myFunc = function()
  { }, then I can, but I have to do it as:

  jQuery().myPlugin({def1: 'other_def1', def2:
  'other_def2'}).myPlugin.myFunc();

  Which I don't like.

  None of the tutorials or documentation I can find is clear on this
  point, though they do refer to the functions in $.myPlugin as being
  user-accessable... and they are, but only if I do $.myPlugin.myFunc.
  I can't chain.  And I want to be able to do that.



  1   2   >