[jQuery] Re: missing background-image

2009-09-12 Thread Macsig

http://localhost:3000/images/sub/undefined.png

but I don't understand why.

Thanks

On Sep 12, 11:19 pm, Scott Haneda  wrote:
> Look at the network panel in firebugs or activity monitor in Safari.  
> See what URL is being requested for the images. You can then see where  
> there error in your path is.
>
> --
> Scott
> Iphone says hello.
>
> On Sep 12, 2009, at 11:10 PM, macsig  wrote:
>
>
>
>
>
> > Hello guys,
> > I have a series of divs (all with the same CSS class) and I'm trying
> > to add dynamically a background image to each one (each div needs a
> > different image) so here my code
>
> > $('.panel').css({'background-image' : 'url(../images/sub/'+ $
> > (this).attr("id") +'.png)'});
>
> > but unfortunately my divs don't have any background; however if I
> > hardcode a image, for instance
>
> > $('.panel').css({'background-image' : 'url(../images/sub/bg1.png)'});
>
> > every div has the (same) background.
>
> > Finally if I print out the image path for each div
>
> > $('.panel').each(function(){
> > alert('url(../images/sub/'+ $(this).attr("id") +'.png)'});
> > });
>
> > the path looks fine.
>
> > Am I missing something???
>
> > THANKS
>
> > Sig


[jQuery] Re: missing background-image

2009-09-12 Thread Scott Haneda


Look at the network panel in firebugs or activity monitor in Safari.  
See what URL is being requested for the images. You can then see where  
there error in your path is.


--
Scott
Iphone says hello.

On Sep 12, 2009, at 11:10 PM, macsig  wrote:



Hello guys,
I have a series of divs (all with the same CSS class) and I'm trying
to add dynamically a background image to each one (each div needs a
different image) so here my code

$('.panel').css({'background-image' : 'url(../images/sub/'+ $
(this).attr("id") +'.png)'});

but unfortunately my divs don't have any background; however if I
hardcode a image, for instance

$('.panel').css({'background-image' : 'url(../images/sub/bg1.png)'});

every div has the (same) background.

Finally if I print out the image path for each div

$('.panel').each(function(){
alert('url(../images/sub/'+ $(this).attr("id") +'.png)'});
});

the path looks fine.


Am I missing something???

THANKS

Sig


[jQuery] missing background-image

2009-09-12 Thread macsig

Hello guys,
I have a series of divs (all with the same CSS class) and I'm trying
to add dynamically a background image to each one (each div needs a
different image) so here my code

$('.panel').css({'background-image' : 'url(../images/sub/'+ $
(this).attr("id") +'.png)'});

but unfortunately my divs don't have any background; however if I
hardcode a image, for instance

$('.panel').css({'background-image' : 'url(../images/sub/bg1.png)'});

every div has the (same) background.

Finally if I print out the image path for each div

 $('.panel').each(function(){
alert('url(../images/sub/'+ $(this).attr("id") +'.png)'});
});

the path looks fine.


Am I missing something???

THANKS

Sig


[jQuery] Re: select element "change" event doesn't bubble - does jQuery try to fix that?

2009-09-12 Thread Mike McNally

On Sat, Sep 12, 2009 at 11:30 PM, Karl Swedberg  wrote:
>
> On Sep 12, 2009, at 12:57 PM, Mike McNally wrote:
>
> According to MSDN documentation, the "change" event from "select"
> elements doesn't bubble, and that claim is borne out by my own
> empirical observations.  Is there some trick I can pull so that I can
> handle those events from a container element via jQuery?
>
> not really. you might be able to get away with using click, but no
> guarantees.

Thanks - I ended up just binding the handler to the element itself. I
only had a small number of input fields in this particular case
anyway.

I really don't like IE.



-- 
Turtle, turtle, on the ground,
Pink and shiny, turn around.


[jQuery] Re: select element "change" event doesn't bubble - does jQuery try to fix that?

2009-09-12 Thread Karl Swedberg


On Sep 12, 2009, at 12:57 PM, Mike McNally wrote:



According to MSDN documentation, the "change" event from "select"
elements doesn't bubble, and that claim is borne out by my own
empirical observations.  Is there some trick I can pull so that I can
handle those events from a container element via jQuery?


not really. you might be able to get away with using click, but no  
guarantees.




--Karl


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





[jQuery] Re: jquery resistance at work - advice? OR mvc in js, needed?

2009-09-12 Thread Steven Yang
Hi
I am a java guy myself.
from what i know some famous java framework has adopted dojo as their
default support for their client side tech. And the Struts2 used to include
dojo as their native support, now as a plugin i think.

I an understand why your java guy is always mvc this mvc that. Its almost
what we talk about when it comes to design.

I think it really depends on why you need MVC on your javascript side.
If your client side need to be run in different environment. for example,
browser (online, offline with gears), or in AIR with the same code. Then MVC
is probably what you have to consider.
I am not too familiar with dojo, only used it for a while when i wasnt good
at javascript, but hated the complicated API.
I personally really like ExtJS's way of doing things, even though i use
jQuery now.^^

I think the main reason(as far as i can think of) for doing MVC is when you
are in a situation where your client side(javascript) does not know where
your data is coming from and the format will change. ie. JSON, XML, or even
plain text.

here is just my opinion
correct my if i am wrong on anything


On Sun, Sep 13, 2009 at 9:59 AM, mattkime  wrote:

>
> My new employer produces a web app which relies on Dojo. I haven't
> been impressed with their use of Dojo and am hoping they'll let me
> introduce them to jQuery. There is considerable resistance. The
> project architect is java guy so it frequently seems like we're
> talking two different languages when we discuss js frameworks. I'm all
> "DOM this, and cross-browser that" and he's all "widget this and mvc
> that"
>
> Which has me thinking - have any of you seen a reason to implement a
> MVC layer in your js?
>
> Its my impression that MVC tries to solve a problem that js doesn't
> particularly have.
>
> thanks,
> matt
>
> p.s. sorry if this is a little off topic, but i wanted to get opinions
> from fellow jQuery users.


[jQuery] How can I get IE developer tools to display xmlHTTPRequests as in Firebug?

2009-09-12 Thread Rick Faircloth
Is it possible?

 

Thanks,

 

Rick

 


---

"Those who hammer their guns into plows will plow for those who do not."  -
Thomas Jefferson

 



[jQuery] jquery resistance at work - advice? OR mvc in js, needed?

2009-09-12 Thread mattkime

My new employer produces a web app which relies on Dojo. I haven't
been impressed with their use of Dojo and am hoping they'll let me
introduce them to jQuery. There is considerable resistance. The
project architect is java guy so it frequently seems like we're
talking two different languages when we discuss js frameworks. I'm all
"DOM this, and cross-browser that" and he's all "widget this and mvc
that"

Which has me thinking - have any of you seen a reason to implement a
MVC layer in your js?

Its my impression that MVC tries to solve a problem that js doesn't
particularly have.

thanks,
matt

p.s. sorry if this is a little off topic, but i wanted to get opinions
from fellow jQuery users.


[jQuery] Re: jquery form plugin upload problem

2009-09-12 Thread Jack Killpatrick
Thanks, Mike, it magically started working for me. I must have had 
something else cheesed ;-)


Appreciate your response, it seems to be working nicely now.

- Jack

Mike Alsup wrote:

I'm using the latest version of the jquery form plugin (from MAlsup) for
file uploading. The upload works: the server call happens, the file data
makes it there and the server returns a value, in this case just a
number (as plain text). I've been unable to get that returned value to
show up in the success function. Maybe someone knows what I'm missing.



Can you post a link?

  




[jQuery] Re: $(this).css({"color" : "red"})

2009-09-12 Thread Charlie Griefer
All 3 of the samples I pasted above (the pastebin links) work in FF3.5 (on
OS X)

On Sat, Sep 12, 2009 at 5:07 PM, Matthew Rolph wrote:

> it's still not working right so i'm getting safari and seeing if that works
> out
>
>
> On Sat, Sep 12, 2009 at 1:10 PM, jhm  wrote:
>
>>
>> The code on that page doesn't match the code in your file. Yours is
>> missing the curly brackets:
>>
>>$("p.blue").css("color" : "red");
>>
>> should be
>>
>>$("p.blue").css({"color" : "red"});
>>
>> Any syntax error like that will stop the script dead.
>>
>>
>> On Sep 12, 9:58 am, Matthew Rolph  wrote:
>> > http://testingspot.hostcell.net/sandbox/tests/css.jquery.test.html
>> > it somehow doesn't work at all not even the css
>> > does it matter where the style and scripts are in the of the document
>> >
>> > On 9/12/09, Mike Alsup  wrote:
>> >
>> >
>> >
>> > >> see that code in the subj.? i'm using FF 3.5, and no matter what i
>> > >> do, .css won't work!! any help?
>> >
>> > > Maybe "this" isn't what you think it is.  Can you post some code or a
>> > > link?
>>
>
>


-- 
I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] ui Datepicker - only show days I want

2009-09-12 Thread Info

does anyone know the syntax to only show days I want int he
datepicker, for example I want to show a calendar but only show the
following dates, 09/11/09, 09/25/09, 10/01/09 ??


[jQuery] Re: $(this).css({"color" : "red"})

2009-09-12 Thread Matthew Rolph
it's still not working right so i'm getting safari and seeing if that works
out

On Sat, Sep 12, 2009 at 1:10 PM, jhm  wrote:

>
> The code on that page doesn't match the code in your file. Yours is
> missing the curly brackets:
>
>$("p.blue").css("color" : "red");
>
> should be
>
>$("p.blue").css({"color" : "red"});
>
> Any syntax error like that will stop the script dead.
>
>
> On Sep 12, 9:58 am, Matthew Rolph  wrote:
> > http://testingspot.hostcell.net/sandbox/tests/css.jquery.test.html
> > it somehow doesn't work at all not even the css
> > does it matter where the style and scripts are in the of the document
> >
> > On 9/12/09, Mike Alsup  wrote:
> >
> >
> >
> > >> see that code in the subj.? i'm using FF 3.5, and no matter what i
> > >> do, .css won't work!! any help?
> >
> > > Maybe "this" isn't what you think it is.  Can you post some code or a
> > > link?
>


[jQuery] Ajax - Help with events

2009-09-12 Thread Will D
Hey guys, I've read this and I'm still struggling.
http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F


I have a table that sits inside a div with an id of events. And I have the
following functions that work on the content that resides inside the table:

*Tooltip function*
$(document).ready(function(){$('.links2 a, .links2 a .linkbook, .links2 a
.linkdownlo, a.thumbimg, #upcoming-link, #previous, #event-date-th a,
#event-info a, #bet-info a, .event-info, #tab2
.title').tooltip({delay:0,showURL:false,positionLeft:true});});

*Cluetip function*
$(document).ready(function(){$('a.event-info').cluetip({waitImage:true,activation:'click',width:320,arrows:true,dropShadow:true,hoverIntent:false,sticky:true,mouseOutClose:false,closePosition:'title',closeText:''});});

I don't think event delegation would work as a new table of contents is
pulled in each time and the above functions targets items that are inside
the table. I'm pulling in the new tables via .load().

Any advice / newb friendly guides would be much appreciated.

Thanks,

Will


[jQuery] Re: Suggestions on file upload with image cropping

2009-09-12 Thread Scott Haneda


Anyone; can I get some love :)

--  
Scott

Iphone says hello.

On Sep 11, 2009, at 2:24 PM, Scott Haneda  wrote:



I have been poking around at the various file upload solutions.   
Wondered what people here had to say about which are the best.


I am looking for single file upload, to image crop.  I would like to  
use jCrop, so anyone that has experience implementing that with it,  
let me know what you chose.


About my only criteria is going to be that I will want to style the  
upload input element, so that may not even be Jquery related, and  
just the usual CSS tricks.  From there, I suspect I just pass some  
ajax mafic on it, and the params get passed along.


I looked at uploadify http://www.uploadify.com/ and while I am sure  
it is a great tool, I am not looking to use a flash based plugin.   
Also, in looking over their docs, it appears to me they are trying  
to cater to being the end all of upload plug-ins.  I am hoping to  
find something pretty lean, and just doing the bare minimum of file  
uploads, with perhaps a progress bar.


If anyone knows of implementations with the apache upload status  
module, that would be even better.


Thanks for any suggestions, I thought I would ask since I am sure  
many of you have been down this road before.


* I have done server side file uploads using GD to scale, crop,  
compress, and effect an image, so I am not too worried about the  
server side of this, I should be able to handle that as long as I  
can pass the upload, and pass x, y, w, and h from the crop.


Thank you
--
Scott * If you contact me off list replace talklists@ with scott@ *



[jQuery] Re: Why would this code cause this error in IE?

2009-09-12 Thread MorningZ

Wow, that code could be a LOT easier

var Validations = {
   streetNumber: true,
   streetName: true,
   city: true,
   state: true,
   bedrooms: true,
   fullBaths: true,
   rent: true,
   securityDeposit: true,
   AllValid = function() {
return this.streetNumber &&
this.streetName &&
this.city &&
this.state &&
this.bedrooms &&
this.fullBaths &&
this.rent &&
this.securityDeposit
   }
};


$('#streetNumber').livequery('blur', function() {

 if (this.value.length == 0)
{ $('#' + this.id + '_requiredError').fadeIn(250);
  $(this).css('backgroundColor', '#ffeaea');
 IsValid.streetNumber = false;
  }
 else
{ $('#' + this.id + '_requiredError').fadeOut(250);
  $(this).css('backgroundColor', '#fff');
 IsValid.streetNumber = true;
   }
  ValidateForm();

});


and whenever you need to ask "are all valid"... Validations.AllValid
will tell you true or false

That code for the validation could be cleaned up a lot more too, but
for sake of helping the original issue of not stomping on IE's issues

And you're using strings for boolean checks all over the place, use
boolean values it's less typing  :-)



On Sep 12, 1:56 pm, "Rick Faircloth"  wrote:
> Well...just fyi in case anyone is interested, here is the solution.
>
> IE doesn't like global variables (I think it just applies to global
> variables
> and not local variables) that have the same name as element ID's.
>
> A blog I read on this suggested adding "var" + variableName; as the
> solution, which,
> after initial testing, works fine:
>
> $(document).ready(function() {
>
>    var streetNumber;
>    var streetName;
>    var city;
>    var state;
>    var bedrooms;
>    var fullBaths;
>    var rent;
>    var securityDeposit;
>
>    streetNumber          = 'valid';
>    streetName            = 'valid';
>    city                  = 'valid';
>    state                 = 'valid';
>    bedrooms              = 'valid';
>    fullBaths             = 'valid';
>    rent                  = 'valid';
>    securityDeposit       = 'valid';
>
> });
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>
> Behalf Of Rick Faircloth
> Sent: Saturday, September 12, 2009 12:29 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Why would this code cause this error in IE?
>
> Well...they're for form validation purposes.
>
> Those variables are the form fields that I am validating.
> I initially set them to valid (for updates), then as a user works with the
> form fields,
> upon blur of each field, I run a function which scans all fields that are
> being validated to see if they are all still valid.
>
> If they are, then the submit button is enabled.  If any of the fields are
> invalid, the submit button remains or becomes disabled.
>
> Here's the code that does that:
>
> function ValidateForm() {
>
>      if  (   streetNumber      ==  'valid'
>          &&  streetName        ==  'valid'
>          &&  city              ==  'valid'
>          &&  state             ==  'valid'
>          &&  bedrooms          ==  'valid'
>          &&  fullBaths         ==  'valid'
>          &&  rent              ==  'valid'
>          &&  securityDeposit   ==  'valid')
>
>          { $('#addButton').removeAttr('disabled');
>            $('.validationError:visible').fadeOut(250);      }
>    else
>          { $('#addButton').attr('disabled', 'disabled');
>            $('.validationError').fadeIn(250);               };
>
> };
>
> And, for an example of how an individual field is being validated:
>
> $('#streetNumber').livequery('blur', function() {
>
>      if     (this.value.length == 0)
>             { $('#' + this.id + '_requiredError').fadeIn(250);
>               $(this).css('backgroundColor', '#ffeaea');
>               streetNumber = 'invalid'; }
>      else
>             { $('#' + this.id + '_requiredError').fadeOut(250);
>               $(this).css('backgroundColor', '#fff');
>               streetNumber = 'valid'; };
>
>               ValidateForm();
>
> });
>
> This works well, except for IE not liking the variable without "var"...
>
> And, for my edification, why are global variables frowned upon?
>
> Suggestions?
>
> Thanks,
>
> Rick
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of Mike McNally
> Sent: Saturday, September 12, 2009 11:53 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Why would this code cause this error in IE?
>
> Yes, that's correct.  It would probably help to know what it is that
> those (apparently global) variables are, or rather where it is that
> they come from (and, from curiosity, why the page would set things up
> that way - global variables are as ugly in web pages as they are in
> any other programming domain).
>
> On Sat, 

[jQuery] Re: event coordination problem

2009-09-12 Thread jhm

Not sure how this helps, and in fact I'm pretty much already doing
that. The problem is that if the focus is in the field, when the
button is clicked I get the blur event only and not the click event on
the button.

If you try the code in the OP, you'll see this happening. Remember to
click into the text box before clicking on the button.

I need the click event for sure. I could live without the blur event
in this situation, but I'd also like to understand the dynamics of
what is happening for the future.

Jim



On Sep 12, 10:39 am, "Rick Faircloth" 
wrote:
> How about setting the field to "invalid" to start with and
> force the user to blur the field for a validation routine
> to declare it valid.
>
> Rick
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>
> Behalf Of jhm
> Sent: Saturday, September 12, 2009 1:04 PM
> To: jQuery (English)
> Subject: [jQuery] event coordination problem
>
> Hi-
>
> In a form, I'm trying to validate a field when they move off it. But
> this causes a problem when the field has the focus and they click a
> button to process the form. In this case, only the field's blur event
> (or change event) gets fired and nothing for the button click event.
>
> Seems like a reasonable thing to want to do, so I figure I'm missing
> something in they way I've coded this. Any suggestions?
>
>  Here's the very simple code that exhibits the behavior:
>
> 
>     
>     
>
>         $(document).ready( function() {
>                 $('#id1').blur( function() {
>                         alert('blur in id1');
>                 });
>
>                 $('#id2').click( function() {
>                         alert('click in id2');
>                 });
>         });
>         
> 
>
> 
> 
>         
>         
> 


[jQuery] SimpleModal Contact Form and Sidebar

2009-09-12 Thread Trent

How can I embed SimpleModal Contact Form 
http://www.ericmmartin.com/projects/simplemodal/
in the sidebar, whose position is fixed on the scrolling map.
No reference as in the example from the author:
Demo

a picture button.gif

Code sidebar:


Menu takes the following form:
http://www.askdev.ru/uploads/4aa/b616/4b612e/large.gif


[jQuery] Re: Jquery Modal Dialog

2009-09-12 Thread samma89

yeah..there is a way..add a div to footer or anywhere you want to use
as the handle.after that write this in the draggable code " handle:
'div's id or class'.thats it.



[jQuery] Re: Why would this code cause this error in IE?

2009-09-12 Thread Rick Faircloth

Well...just fyi in case anyone is interested, here is the solution.

IE doesn't like global variables (I think it just applies to global
variables
and not local variables) that have the same name as element ID's.

A blog I read on this suggested adding "var" + variableName; as the
solution, which,
after initial testing, works fine:

$(document).ready(function() {

   var streetNumber;
   var streetName;
   var city;
   var state;
   var bedrooms;
   var fullBaths;
   var rent;
   var securityDeposit;

   streetNumber  = 'valid';
   streetName= 'valid';
   city  = 'valid';
   state = 'valid';
   bedrooms  = 'valid';
   fullBaths = 'valid';
   rent  = 'valid';
   securityDeposit   = 'valid';

});

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Rick Faircloth
Sent: Saturday, September 12, 2009 12:29 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Why would this code cause this error in IE?


Well...they're for form validation purposes.

Those variables are the form fields that I am validating.
I initially set them to valid (for updates), then as a user works with the
form fields,
upon blur of each field, I run a function which scans all fields that are
being validated to see if they are all still valid.

If they are, then the submit button is enabled.  If any of the fields are
invalid, the submit button remains or becomes disabled.

Here's the code that does that:

function ValidateForm() {

 if  (   streetNumber  ==  'valid'
 &&  streetName==  'valid'
 &&  city  ==  'valid'
 &&  state ==  'valid'
 &&  bedrooms  ==  'valid'
 &&  fullBaths ==  'valid'
 &&  rent  ==  'valid'
 &&  securityDeposit   ==  'valid')

 { $('#addButton').removeAttr('disabled');
   $('.validationError:visible').fadeOut(250);  }
   else
 { $('#addButton').attr('disabled', 'disabled');
   $('.validationError').fadeIn(250);   };

};

And, for an example of how an individual field is being validated:

$('#streetNumber').livequery('blur', function() {

 if (this.value.length == 0)
{ $('#' + this.id + '_requiredError').fadeIn(250);
  $(this).css('backgroundColor', '#ffeaea');
  streetNumber = 'invalid'; }
 else
{ $('#' + this.id + '_requiredError').fadeOut(250);
  $(this).css('backgroundColor', '#fff');
  streetNumber = 'valid'; };

  ValidateForm();

});


This works well, except for IE not liking the variable without "var"...

And, for my edification, why are global variables frowned upon?

Suggestions?

Thanks,

Rick




-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Mike McNally
Sent: Saturday, September 12, 2009 11:53 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Why would this code cause this error in IE?


Yes, that's correct.  It would probably help to know what it is that
those (apparently global) variables are, or rather where it is that
they come from (and, from curiosity, why the page would set things up
that way - global variables are as ugly in web pages as they are in
any other programming domain).


On Sat, Sep 12, 2009 at 10:47 AM, Rick Faircloth
 wrote:
>
> Hmmm...that could explain the sudden error I just now received
> running that code that "city is not defined" and "state is not defined",
> etc.,
> when validation tries to run.
>
> I guess using "var" causes the variable to be local within that piece of
> code
> instead of applicable there and in other pieces of code that references
> those variables?
>
> Rick
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of Mike McNally
> Sent: Saturday, September 12, 2009 9:12 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Why would this code cause this error in IE?
>
>
> Well, putting "var" before the variables will probably make IE happy,
> but it also makes the function useless.
>
>
> On Sat, Sep 12, 2009 at 7:12 AM, Rick Faircloth
>  wrote:
>> That did it…seems to satisfy IE that way, too.
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Rick
>>
>>
>>
>> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>> Behalf Of Dhruva Sagar
>> Sent: Saturday, September 12, 2009 6:06 AM
>> To: jquery-en@googlegroups.com
>> Subject: [jQuery] Re: Why would this code cause this error in IE?
>>
>>
>>
>> You should use the keyword 'var' before each variable.
>>
>> Thanks & Regards,
>> Dhruva Sagar.

[jQuery] Re: event coordination problem

2009-09-12 Thread Rick Faircloth

How about setting the field to "invalid" to start with and
force the user to blur the field for a validation routine
to declare it valid.

Rick

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of jhm
Sent: Saturday, September 12, 2009 1:04 PM
To: jQuery (English)
Subject: [jQuery] event coordination problem


Hi-

In a form, I'm trying to validate a field when they move off it. But
this causes a problem when the field has the focus and they click a
button to process the form. In this case, only the field's blur event
(or change event) gets fired and nothing for the button click event.

Seems like a reasonable thing to want to do, so I figure I'm missing
something in they way I've coded this. Any suggestions?

 Here's the very simple code that exhibits the behavior:





$(document).ready( function() {
$('#id1').blur( function() {
alert('blur in id1');
});

$('#id2').click( function() {
alert('click in id2');
});
});












[jQuery] Re: $(this).css({"color" : "red"})

2009-09-12 Thread jhm

The code on that page doesn't match the code in your file. Yours is
missing the curly brackets:

$("p.blue").css("color" : "red");

should be

$("p.blue").css({"color" : "red"});

Any syntax error like that will stop the script dead.


On Sep 12, 9:58 am, Matthew Rolph  wrote:
> http://testingspot.hostcell.net/sandbox/tests/css.jquery.test.html
> it somehow doesn't work at all not even the css
> does it matter where the style and scripts are in the of the document
>
> On 9/12/09, Mike Alsup  wrote:
>
>
>
> >> see that code in the subj.? i'm using FF 3.5, and no matter what i
> >> do, .css won't work!! any help?
>
> > Maybe "this" isn't what you think it is.  Can you post some code or a
> > link?


[jQuery] Re: $(this).css({"color" : "red"})

2009-09-12 Thread Charlie Griefer
as does this:

http://pastebin.com/m58a02ab3

On Sat, Sep 12, 2009 at 10:05 AM, Charlie Griefer  wrote:

> These both work for me:
>
> http://pastebin.com/m3701f681
> http://pastebin.com/m62f8b24b
>
>
>
> On Sat, Sep 12, 2009 at 9:58 AM, Matthew Rolph wrote:
>
>>
>> http://testingspot.hostcell.net/sandbox/tests/css.jquery.test.html
>> it somehow doesn't work at all not even the css
>> does it matter where the style and scripts are in the of the document
>>
>> On 9/12/09, Mike Alsup  wrote:
>> >
>> >> see that code in the subj.? i'm using FF 3.5, and no matter what i
>> >> do, .css won't work!! any help?
>> >
>> > Maybe "this" isn't what you think it is.  Can you post some code or a
>> > link?
>>
>
>
>
> --
> I have failed as much as I have succeeded. But I love my life. I love my
> wife. And I wish you my kind of success.
>



-- 
I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] Re: $(this).css({"color" : "red"})

2009-09-12 Thread Charlie Griefer
These both work for me:

http://pastebin.com/m3701f681
http://pastebin.com/m62f8b24b


On Sat, Sep 12, 2009 at 9:58 AM, Matthew Rolph wrote:

>
> http://testingspot.hostcell.net/sandbox/tests/css.jquery.test.html
> it somehow doesn't work at all not even the css
> does it matter where the style and scripts are in the of the document
>
> On 9/12/09, Mike Alsup  wrote:
> >
> >> see that code in the subj.? i'm using FF 3.5, and no matter what i
> >> do, .css won't work!! any help?
> >
> > Maybe "this" isn't what you think it is.  Can you post some code or a
> > link?
>



-- 
I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] event coordination problem

2009-09-12 Thread jhm

Hi-

In a form, I'm trying to validate a field when they move off it. But
this causes a problem when the field has the focus and they click a
button to process the form. In this case, only the field's blur event
(or change event) gets fired and nothing for the button click event.

Seems like a reasonable thing to want to do, so I figure I'm missing
something in they way I've coded this. Any suggestions?

 Here's the very simple code that exhibits the behavior:





$(document).ready( function() {
$('#id1').blur( function() {
alert('blur in id1');
});

$('#id2').click( function() {
alert('click in id2');
});
});










[jQuery] Re: $(this).css({"color" : "red"})

2009-09-12 Thread Matthew Rolph

http://testingspot.hostcell.net/sandbox/tests/css.jquery.test.html
it somehow doesn't work at all not even the css
does it matter where the style and scripts are in the of the document

On 9/12/09, Mike Alsup  wrote:
>
>> see that code in the subj.? i'm using FF 3.5, and no matter what i
>> do, .css won't work!! any help?
>
> Maybe "this" isn't what you think it is.  Can you post some code or a
> link?


[jQuery] select element "change" event doesn't bubble - does jQuery try to fix that?

2009-09-12 Thread Mike McNally

According to MSDN documentation, the "change" event from "select"
elements doesn't bubble, and that claim is borne out by my own
empirical observations.  Is there some trick I can pull so that I can
handle those events from a container element via jQuery?


-- 
Turtle, turtle, on the ground,
Pink and shiny, turn around.


[jQuery] using "fadeTo" (opacity effect) in IE7 makes things look absolutely awful

2009-09-12 Thread Mike McNally

Probably because the transparent PNG support in IE7 is so weak, using
a "fadeTo" effect on content that includes a PNG image with
transparency leaves you with something that looks awful, even with the
"fadeIn" opacity set to 1.0 (which, one might think, would leave you
with no filtering at all).  I can work around the problem by doing
something like this:

   $(whatever).fadeTo(5, 1, function() {
$(whatever).css('filter', 'none');
   });

but it'd be nice if jQuery itself would treat fadeTo(_, 1, _) as
setting "filter" to "none".

The effect of having the old filter hack there, even with opacity set
to 1, is to defeat the rendering of the PNG opacity.


-- 
Turtle, turtle, on the ground,
Pink and shiny, turn around.


[jQuery] Re: Pics from jQuery Conference

2009-09-12 Thread Rick Faircloth

Thanks for shareing the pics!

Rick

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of MorningZ
Sent: Saturday, September 12, 2009 9:49 AM
To: jQuery (English)
Subject: [jQuery] Pics from jQuery Conference


Some early pics from today's festivities that is about to start

Signup and a little early snack-age
http://i26.tinypic.com/31779l1.jpg

Way cool "Surface Computer"
http://i31.tinypic.com/2rohpo5.jpg

Bad weather today, but it's all good
http://i25.tinypic.com/350uqys.jpg

Ready for John Resig to give the keynote  totally full house
http://i32.tinypic.com/2hfur06.jpg

More to come !




[jQuery] Re: jQuery called twice, if I delete one, all jQuery scripts stop working

2009-09-12 Thread Adrian Chen

On Sep 12, 10:09 am, Alex Weber  wrote:
> That's totally weird!
>
> I would start over, delete all the include files and add it once
> before any other external js script.  Test it and gradually add the
> others one by one afterwards... This is really a weird problem, its
> the best I can think of because this hasn't happened to me!!
>
> Also, re-download jQuery and check for any conflicts the other files
> might have.  Try calling jQuery.noConflict() at any point after jQuery
> and the other libraries have been loaded!
>
> Alex

After some testing, found out the culprit; one of the js files that
were in the list. I got no clue what could be triggering it, this is
the code inside the js file that is giving the issue:

var j = jQuery.noConflict();

j(document).ready(function()
{
j('a#content-link').click(function()
{
j('#content-div').toggle(400);
return false;
});
});

That's from this script 
http://www.studioyucca.com/2008/10/03/hideshow-content-with-jquery/


[jQuery] Re: Why would this code cause this error in IE?

2009-09-12 Thread Rick Faircloth

Well...they're for form validation purposes.

Those variables are the form fields that I am validating.
I initially set them to valid (for updates), then as a user works with the
form fields,
upon blur of each field, I run a function which scans all fields that are
being validated to see if they are all still valid.

If they are, then the submit button is enabled.  If any of the fields are
invalid, the submit button remains or becomes disabled.

Here's the code that does that:

function ValidateForm() {

 if  (   streetNumber  ==  'valid'
 &&  streetName==  'valid'
 &&  city  ==  'valid'
 &&  state ==  'valid'
 &&  bedrooms  ==  'valid'
 &&  fullBaths ==  'valid'
 &&  rent  ==  'valid'
 &&  securityDeposit   ==  'valid')

 { $('#addButton').removeAttr('disabled');
   $('.validationError:visible').fadeOut(250);  }
   else
 { $('#addButton').attr('disabled', 'disabled');
   $('.validationError').fadeIn(250);   };

};

And, for an example of how an individual field is being validated:

$('#streetNumber').livequery('blur', function() {

 if (this.value.length == 0)
{ $('#' + this.id + '_requiredError').fadeIn(250);
  $(this).css('backgroundColor', '#ffeaea');
  streetNumber = 'invalid'; }
 else
{ $('#' + this.id + '_requiredError').fadeOut(250);
  $(this).css('backgroundColor', '#fff');
  streetNumber = 'valid'; };

  ValidateForm();

});


This works well, except for IE not liking the variable without "var"...

And, for my edification, why are global variables frowned upon?

Suggestions?

Thanks,

Rick




-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Mike McNally
Sent: Saturday, September 12, 2009 11:53 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Why would this code cause this error in IE?


Yes, that's correct.  It would probably help to know what it is that
those (apparently global) variables are, or rather where it is that
they come from (and, from curiosity, why the page would set things up
that way - global variables are as ugly in web pages as they are in
any other programming domain).


On Sat, Sep 12, 2009 at 10:47 AM, Rick Faircloth
 wrote:
>
> Hmmm...that could explain the sudden error I just now received
> running that code that "city is not defined" and "state is not defined",
> etc.,
> when validation tries to run.
>
> I guess using "var" causes the variable to be local within that piece of
> code
> instead of applicable there and in other pieces of code that references
> those variables?
>
> Rick
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of Mike McNally
> Sent: Saturday, September 12, 2009 9:12 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Why would this code cause this error in IE?
>
>
> Well, putting "var" before the variables will probably make IE happy,
> but it also makes the function useless.
>
>
> On Sat, Sep 12, 2009 at 7:12 AM, Rick Faircloth
>  wrote:
>> That did it…seems to satisfy IE that way, too.
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Rick
>>
>>
>>
>> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>> Behalf Of Dhruva Sagar
>> Sent: Saturday, September 12, 2009 6:06 AM
>> To: jquery-en@googlegroups.com
>> Subject: [jQuery] Re: Why would this code cause this error in IE?
>>
>>
>>
>> You should use the keyword 'var' before each variable.
>>
>> Thanks & Regards,
>> Dhruva Sagar.
>>
>>
>> Charles de Gaulle  - "The better I get to know men, the more I find
myself
>> loving dogs."
>>
>> On Sat, Sep 12, 2009 at 3:33 PM, Rick Faircloth

>> wrote:
>>
>> Code:
>>
>>
>>
>>    $(document).ready(function() {
>>
>>
>>
>>   streetNumber     = 'valid';
>>
>>   streetName      = 'valid';
>>
>>   city     = 'valid';
>>
>>   state    = 'valid';
>>
>>   bedrooms     = 'valid';
>>
>>   fullBaths    = 'valid';
>>
>>   rent     = 'valid';
>>
>>   securityDeposit  = 'valid';
>>
>>
>>
>>    });
>>
>>
>
>
>
> --
> Turtle, turtle, on the ground,
> Pink and shiny, turn around.
>
>
>



-- 
Turtle, turtle, on the ground,
Pink and shiny, turn around.




[jQuery] Re: Why would this code cause this error in IE?

2009-09-12 Thread Mike McNally

Yes, that's correct.  It would probably help to know what it is that
those (apparently global) variables are, or rather where it is that
they come from (and, from curiosity, why the page would set things up
that way - global variables are as ugly in web pages as they are in
any other programming domain).


On Sat, Sep 12, 2009 at 10:47 AM, Rick Faircloth
 wrote:
>
> Hmmm...that could explain the sudden error I just now received
> running that code that "city is not defined" and "state is not defined",
> etc.,
> when validation tries to run.
>
> I guess using "var" causes the variable to be local within that piece of
> code
> instead of applicable there and in other pieces of code that references
> those variables?
>
> Rick
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of Mike McNally
> Sent: Saturday, September 12, 2009 9:12 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Why would this code cause this error in IE?
>
>
> Well, putting "var" before the variables will probably make IE happy,
> but it also makes the function useless.
>
>
> On Sat, Sep 12, 2009 at 7:12 AM, Rick Faircloth
>  wrote:
>> That did it…seems to satisfy IE that way, too.
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Rick
>>
>>
>>
>> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>> Behalf Of Dhruva Sagar
>> Sent: Saturday, September 12, 2009 6:06 AM
>> To: jquery-en@googlegroups.com
>> Subject: [jQuery] Re: Why would this code cause this error in IE?
>>
>>
>>
>> You should use the keyword 'var' before each variable.
>>
>> Thanks & Regards,
>> Dhruva Sagar.
>>
>>
>> Charles de Gaulle  - "The better I get to know men, the more I find myself
>> loving dogs."
>>
>> On Sat, Sep 12, 2009 at 3:33 PM, Rick Faircloth 
>> wrote:
>>
>> Code:
>>
>>
>>
>>    $(document).ready(function() {
>>
>>
>>
>>   streetNumber     = 'valid';
>>
>>   streetName      = 'valid';
>>
>>   city     = 'valid';
>>
>>   state    = 'valid';
>>
>>   bedrooms     = 'valid';
>>
>>   fullBaths    = 'valid';
>>
>>   rent     = 'valid';
>>
>>   securityDeposit  = 'valid';
>>
>>
>>
>>    });
>>
>>
>
>
>
> --
> Turtle, turtle, on the ground,
> Pink and shiny, turn around.
>
>
>



-- 
Turtle, turtle, on the ground,
Pink and shiny, turn around.


[jQuery] Re: Why would this code cause this error in IE?

2009-09-12 Thread Rick Faircloth

But...now IE throws an error again:
"Object doesn't support this property or method"

What's the solution?


-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Rick Faircloth
Sent: Saturday, September 12, 2009 11:48 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Why would this code cause this error in IE?


Hmmm...that could explain the sudden error I just now received
running that code that "city is not defined" and "state is not defined",
etc.,
when validation tries to run.

I guess using "var" causes the variable to be local within that piece of
code
instead of applicable there and in other pieces of code that references
those variables?

Rick

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Mike McNally
Sent: Saturday, September 12, 2009 9:12 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Why would this code cause this error in IE?


Well, putting "var" before the variables will probably make IE happy,
but it also makes the function useless.


On Sat, Sep 12, 2009 at 7:12 AM, Rick Faircloth
 wrote:
> That did it…seems to satisfy IE that way, too.
>
>
>
> Thanks,
>
>
>
> Rick
>
>
>
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of Dhruva Sagar
> Sent: Saturday, September 12, 2009 6:06 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Why would this code cause this error in IE?
>
>
>
> You should use the keyword 'var' before each variable.
>
> Thanks & Regards,
> Dhruva Sagar.
>
>
> Charles de Gaulle  - "The better I get to know men, the more I find myself
> loving dogs."
>
> On Sat, Sep 12, 2009 at 3:33 PM, Rick Faircloth 
> wrote:
>
> Code:
>
>
>
>    $(document).ready(function() {
>
>
>
>   streetNumber     = 'valid';
>
>   streetName      = 'valid';
>
>   city     = 'valid';
>
>   state    = 'valid';
>
>   bedrooms     = 'valid';
>
>   fullBaths    = 'valid';
>
>   rent     = 'valid';
>
>   securityDeposit  = 'valid';
>
>
>
>    });
>
>



-- 
Turtle, turtle, on the ground,
Pink and shiny, turn around.






[jQuery] Re: Why would this code cause this error in IE?

2009-09-12 Thread Rick Faircloth

Hmmm...that could explain the sudden error I just now received
running that code that "city is not defined" and "state is not defined",
etc.,
when validation tries to run.

I guess using "var" causes the variable to be local within that piece of
code
instead of applicable there and in other pieces of code that references
those variables?

Rick

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Mike McNally
Sent: Saturday, September 12, 2009 9:12 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Why would this code cause this error in IE?


Well, putting "var" before the variables will probably make IE happy,
but it also makes the function useless.


On Sat, Sep 12, 2009 at 7:12 AM, Rick Faircloth
 wrote:
> That did it…seems to satisfy IE that way, too.
>
>
>
> Thanks,
>
>
>
> Rick
>
>
>
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of Dhruva Sagar
> Sent: Saturday, September 12, 2009 6:06 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Why would this code cause this error in IE?
>
>
>
> You should use the keyword 'var' before each variable.
>
> Thanks & Regards,
> Dhruva Sagar.
>
>
> Charles de Gaulle  - "The better I get to know men, the more I find myself
> loving dogs."
>
> On Sat, Sep 12, 2009 at 3:33 PM, Rick Faircloth 
> wrote:
>
> Code:
>
>
>
>    $(document).ready(function() {
>
>
>
>   streetNumber     = 'valid';
>
>   streetName      = 'valid';
>
>   city     = 'valid';
>
>   state    = 'valid';
>
>   bedrooms     = 'valid';
>
>   fullBaths    = 'valid';
>
>   rent     = 'valid';
>
>   securityDeposit  = 'valid';
>
>
>
>    });
>
>



-- 
Turtle, turtle, on the ground,
Pink and shiny, turn around.




[jQuery] Re: jQuery called twice, if I delete one, all jQuery scripts stop working

2009-09-12 Thread Alex Weber

That's totally weird!

I would start over, delete all the include files and add it once
before any other external js script.  Test it and gradually add the
others one by one afterwards... This is really a weird problem, its
the best I can think of because this hasn't happened to me!!

Also, re-download jQuery and check for any conflicts the other files
might have.  Try calling jQuery.noConflict() at any point after jQuery
and the other libraries have been loaded!

Alex

On Sep 12, 11:33 am, Adrian Chen  wrote:
> I got this at the bottom of a website:
>
> 
> 
> 
> 
> 
> 
>
> If you notice, jquery is called twice. If I delete either one,
> anything that works with jQuery stops working.


[jQuery] Re: IDE supporting jQuery

2009-09-12 Thread Alex Weber

I use linux and I gotta say Aptana has come a long way recently... it
was really slow and put me off a few months ago but now it's about the
same as Netbeans... both are kind of clunky to initialize but after
that they are fine!

What I love in Netbeans is that you can get intellisense-style code
completion for jquery if you include the fully-documented version:
http://jqueryjs.googlecode.com/files/jquery-1.3.2-vsdoc2.js

However, personally, I prefer editing using gedit + plugins.  Its less
bureaucratic in terms of having to creating a project for every file
you edit, etc.  Plus, with plugins, you can customize it to become
quite powerful!  No code-completion for jquery as far as I know
though.

Alex

On Sep 11, 1:02 pm, KirbySaysHi 
wrote:
> NetBeans ftw! For JavaScript and PHP, it's probably the best around.
> Last time I used aptana, it seemed very slow, that was a year ago or
> so.
>
> On Sep 11, 9:20 am, Alex Weber  wrote:
>
> > Just confirming: Aptana and Netbeans are excellent choices! :)
>
> > On Sep 11, 8:15 am, szymon jankowski 
> > wrote:
>
> > > NetBeans IDE also has jquery support.
>
> > > best regards,
>
> > > SJ
>
> > > On Sep 10, 7:58 pm, MorningZ  wrote:
>
> > > > Are you looking for something where Intellisense would work for
> > > > jQuery?  Something else?    Open source so it's free or some other
> > > > reason?
>
> > > > A lot will depend on what you use for server side code so you don't
> > > > have two IDE's to mess with
>
> > > > On Sep 10, 11:41 am, Saga  wrote:
>
> > > > > is there any IDE supporting jQuery..i prefer some open source
> > > > > IDE...pls suggest me on


[jQuery] Re: Selects populating other selects from JSON data

2009-09-12 Thread Alex Weber

Hey, two suggestions:

First off, if you're using JSON data to populate it then I assume the
data will come from an external source and you are only generating it
in your script for testing purposes.  In that case, perfect.  If not,
and the data is actually hard-coded, then you shouldn't really be
doing it like this!

Finally, what I would do and its really just matter of preference,
instead of doing this:

$("select[name='model']").empty();
$.each(model, function (){
$("select[name='model']").append('' +
this +
'') });
}

I would do the following:

var options = '';
$.each(model, function (){
html += '' + this + '');
});
$("select[name='model']").html(options);

It should increase the performance because you cache all the data in a
variable and insert it into the select in one step, instead of
appending it during each iteration.
Using html() will overwrite the previous contents too, so no need to
use empty() either.

Cheers,

Alex

On Sep 12, 12:48 am, "Steffan A. Cline"  wrote:
> on 9/11/09 8:02 PM, Steffan Cline at stef...@hldns.com wrote:
>
>
>
>
>
> > on 9/11/09 5:15 PM, Steffan Cline at stef...@hldns.com wrote:
>
> >> Perhaps I am not Googling correctly to find the data I am after.
>
> >> I want to have a select that upon making a choice will add elements to a
> >> second select. I've seen code to do this using ajax calls but what if I
> >> embed the data into the page in a JSON format? I am looking for a good
> >> example of this. Anyone seen one?
>
> > Ok, getting closer:
>
> > $(document).ready(function () {
> >     var items = {    "Aquatech"     : ["Canon 5D Mark II","Nikon D3","Nikon
> > D3x","Canon 1D","Canon 1Ds","Canon 1Ds Mark II","Canon 1Ds Mark III","Canon
> > 1D Mark III","Canon 30D","Canon EOS 5D","Canon 20D","Nikon D200","Nikon
> > D700","Canon 40D","Canon 50D","Nikon D300"],
> >                     "Canon"     : ["Canon HF20","Canon SD800","Canon
> > A570","Canon G10","Canon G11"],
> >                     "Ikelite"     : ["Olympus FE-360","Canon 20D","Canon
> > Rebel 350 / XT","Nikon D300","Canon Rebel 400 / XTi","Canon 30D","Canon
> > 5D","Nikon D200","Nikon D40","Nikon D40x","Nikon D60","Olympus
> > SP-510","Olympus E-500","Canon G9","Nikon P5000","Nikon P5100","Nikon
> > D80","Nikon D90","Nikon P6000","Nikon D700","Canon 40D","Canon 50D","Canon
> > G10","Canon 5D Mark II","Canon Rebel 500 / T1i","Canon Rebel 450 / XSi"],
> >                     "Sony"         : ["Sony W300"]
> >                 };
>
> >     $.each( items, function(brand){
> >             $("select[name='manufacturer']").append('' + brand + '');
> >             });
> >     $("select[name='manufacturer']").change( function(){
> >         $
>
> >         });
> > });
>
> > So, that is populating the first. Great. Now, it's a matter of finding the
> > chosen value and then adding the elements of the array to the select.
>
> > A nudge anyone?
>
> This is ugly but works. Any suggestions on how to shorten it?
>
> $(document).ready(function () {
>     var items = {    "Aquatech"     : ["Canon 5D Mark II","Nikon D3","Nikon
> D3x","Canon 1D","Canon 1Ds","Canon 1Ds Mark II","Canon 1Ds Mark III","Canon
> 1D Mark III","Canon 30D","Canon EOS 5D","Canon 20D","Nikon D200","Nikon
> D700","Canon 40D","Canon 50D","Nikon D300"],
>                     "Canon"     : ["Canon HF20","Canon SD800","Canon
> A570","Canon G10","Canon G11"],
>                     "Ikelite"     : ["Olympus FE-360","Canon 20D","Canon
> Rebel 350 / XT","Nikon D300","Canon Rebel 400 / XTi","Canon 30D","Canon
> 5D","Nikon D200","Nikon D40","Nikon D40x","Nikon D60","Olympus
> SP-510","Olympus E-500","Canon G9","Nikon P5000","Nikon P5100","Nikon
> D80","Nikon D90","Nikon P6000","Nikon D700","Canon 40D","Canon 50D","Canon
> G10","Canon 5D Mark II","Canon Rebel 500 / T1i","Canon Rebel 450 / XSi"],
>                     "Sony"         : ["Sony W300"]
>                 };
>
>     $.each( items, function(brand){
>             $("select[name='manufacturer']").append('' + brand + '');
>             });
>     $("select[name='manufacturer']").change( function(x){
>             var man = this.value;
>             $.each( items, function(brand, model){
>                         if(brand==man) {
>                             $("select[name='model']").empty();
>                             $.each(model, function (){
> $("select[name='model']").append('' + this +
> '') });
>                             }
>                     });
>
>                 });
>
> });
>
> Thanks
>
> Steffan


[jQuery] Re: [Autocomplete] Receiving data in XML

2009-09-12 Thread Joao Gilberto Magalhaes
Really Thanks! It is so easy!

2009/9/11 

> jQuery('#x').autocomplete(.,parse=function(data){parse the data with
> same resulting format as parse(data) in autocomplete}, ...);
>
>
> On Fri, Sep 11, 2009 at 23:37, Joao Gilberto Magalhaes <
> joaogilbertomagalh...@gmail.com> wrote:
>
>> Hi Alex,
>>
>> Thanks for your quick response. There is one item about parse XML in the
>> autocomplete TODO document, so my intention is help the project.
>>
>> But, in fact I prefer use a solution with no change in autocomplete. Could
>> you give a rough sample about HOW I implement this?
>>
>> Thank you again.
>>
>> 2009/9/11 
>>
>>>
>>> hi,
>>>
>>> i'm personally not the maintainer of autocomplete, but in my opinion this
>>> code is too purpose specific to be hardwired in autocomplete.
>>>
>>> but you could pass a function with the part in else as the 'parse'
>>> argument to autocomplete, and need no change in autocomplete itself.
>>>
>>> On Fri, Sep 11, 2009 at 18:32, Joao Gilberto Magalhaes
>>>  wrote:
>>>

 Hi,

 Basically to work like I said before I make the follow changes in
 AutoComplete v1.1 (full file is attached)

 function parse(data) {
 var parsed = [];
 if (!options.xmlResult)
 {
 var rows = data.split("\n");
 for (var i=0; i < rows.length; i++) {
 var row = $.trim(rows[i]);
 if (row) {
 row = row.split("|");
 parsed[parsed.length] = {
 data: row,
 value: row[0],
 result: options.formatResult &&
 options.formatResult(row, row[0]) || row[0]
 };
 }
 }
 }
 else
 {
 var count = 0;
 $(data).find(options.xmlResult).each(function() {
 var aux = [];
 aux[0] = $(this).html();
 for(i=0;i>>> {
 aux[i+1] = $(this).attr(options.xmlAttrNodes[i]);
 }
 parsed[count++] = {
 data: aux,
 value: aux[0],
 result: options.formatResult &&
 options.formatResult(aux,
 aux[0]) || aux[0]
 };
 });
 }
 return parsed;
 };

 and did this inside the $.Autocompleter.defaults declaration

 xmlResult: false,
 xmlAttrNodes: ["id", "value"],


 So, Is this code OK to be incorporated to future releases of the
 Autocomplete plugin?

 Thanks in advanced.


 2009/9/10 

>
> play with the options to autocomplete: dataType, parse are handling the
> conversation with the server.
>
> On Wed, Sep 9, 2009 at 16:11, Joao Gilberto
>  wrote:
>
>>
>> Hi,
>>
>> First of all, I want to thank you about your excellent Autocomplete
>> plugin for jQuery.
>>
>> So, I plan use your component in my open source framework called
>> XMLNuke. This framework produces XML, so I made some changes in jQuery
>> Autocomplement plugin to support receive XML data.
>>
>> Here an Example:
>>
>>$("#teste3").autocomplete("demo/search.php", {
>>width: 260,
>>selectFirst: false,
>>xmlResult: "value",
>>xmlAttrNodes: [ "id", "info" ]
>>});
>>
>> The XML looks like to:
>>
>> 
>>   Some Description 1
>>   Some Description 2
>>   Some Description 3
>> 
>>
>> How do I attach the file with the changes in Plugin?
>>
>>
>
>
> --
> alex
>
>



>>>
>>>
>>> --
>>> alex
>>>
>>>
>>
>>
>
>
> --
> alex
>
>


[jQuery] jQuery called twice, if I delete one, all jQuery scripts stop working

2009-09-12 Thread Adrian Chen

I got this at the bottom of a website:








If you notice, jquery is called twice. If I delete either one,
anything that works with jQuery stops working.


[jQuery] Pics from jQuery Conference

2009-09-12 Thread MorningZ

Some early pics from today's festivities that is about to start

Signup and a little early snack-age
http://i26.tinypic.com/31779l1.jpg

Way cool "Surface Computer"
http://i31.tinypic.com/2rohpo5.jpg

Bad weather today, but it's all good
http://i25.tinypic.com/350uqys.jpg

Ready for John Resig to give the keynote  totally full house
http://i32.tinypic.com/2hfur06.jpg

More to come !


[jQuery] Opera Issues

2009-09-12 Thread a1anm

Hi,

I'm working on the below site:

http://www.toomanydesigns.com/test/TMD/

I just tested it in the main browsers and it works fine apart from
Opera.

I understand the text positioning because Opera doesn't support this
but does anyone know why the barcode slider isn't working correctly?

I'm new to jQuery so it'sprobably somthing stupid on my part.

Thanks


[jQuery] Re: Why would this code cause this error in IE?

2009-09-12 Thread Mike McNally

Well, putting "var" before the variables will probably make IE happy,
but it also makes the function useless.


On Sat, Sep 12, 2009 at 7:12 AM, Rick Faircloth
 wrote:
> That did it…seems to satisfy IE that way, too.
>
>
>
> Thanks,
>
>
>
> Rick
>
>
>
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of Dhruva Sagar
> Sent: Saturday, September 12, 2009 6:06 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Why would this code cause this error in IE?
>
>
>
> You should use the keyword 'var' before each variable.
>
> Thanks & Regards,
> Dhruva Sagar.
>
>
> Charles de Gaulle  - "The better I get to know men, the more I find myself
> loving dogs."
>
> On Sat, Sep 12, 2009 at 3:33 PM, Rick Faircloth 
> wrote:
>
> Code:
>
>
>
>    $(document).ready(function() {
>
>
>
>   streetNumber     = 'valid';
>
>   streetName      = 'valid';
>
>   city     = 'valid';
>
>   state    = 'valid';
>
>   bedrooms     = 'valid';
>
>   fullBaths    = 'valid';
>
>   rent     = 'valid';
>
>   securityDeposit  = 'valid';
>
>
>
>    });
>
>



-- 
Turtle, turtle, on the ground,
Pink and shiny, turn around.


[jQuery] Re: Jquery Modal Dialog

2009-09-12 Thread NM

Hi anyone,

Any update on this..

On Sep 10, 8:35 pm, NM  wrote:
> Hi,
>
> Iusedthejquerymodaldialogfrom thejqueryui.com, that is
> currently draggable from the title only. is there any way i can make
> that draggable by inserting a div at the footer of thedialogor  make
> it draggable from everywhere in thedialog.


[jQuery] Re: $(this).css({"color" : "red"})

2009-09-12 Thread Mike Alsup

> see that code in the subj.? i'm using FF 3.5, and no matter what i
> do, .css won't work!! any help?

Maybe "this" isn't what you think it is.  Can you post some code or a
link?


[jQuery] Re: file upload empty

2009-09-12 Thread Mike Alsup

> I have a form with some text input and a file input. When i try to
> upload the form with the Form Plugin, the $_FILES array came empty.
> The field name is newImage, so when I try to show $_FILES['newImage']
> ['tmp_name'] i can see nothing. Instead I can see the file name if i
> do $_POST['newImage']. I'm using this plug-in since 7 months ago and
> with different projects to file uploads and I didn't have problems
> before. I upload the form without the plug-in and everything works ok.


Can you post a link?


[jQuery] Re: jquery form plugin upload problem

2009-09-12 Thread Mike Alsup

> I'm using the latest version of the jquery form plugin (from MAlsup) for
> file uploading. The upload works: the server call happens, the file data
> makes it there and the server returns a value, in this case just a
> number (as plain text). I've been unable to get that returned value to
> show up in the success function. Maybe someone knows what I'm missing.

Can you post a link?


[jQuery] $(this).css({"color" : "red"})

2009-09-12 Thread Matt

see that code in the subj.? i'm using FF 3.5, and no matter what i
do, .css won't work!! any help?


[jQuery] Re: Why would this code cause this error in IE?

2009-09-12 Thread Rick Faircloth
That did it…seems to satisfy IE that way, too.

 

Thanks,

 

Rick

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf 
Of Dhruva Sagar
Sent: Saturday, September 12, 2009 6:06 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Why would this code cause this error in IE?

 

You should use the keyword 'var' before each variable.

Thanks & Regards,
Dhruva Sagar.


Charles de Gaulle 
   - "The 
better I get to know men, the more I find myself loving dogs." 

On Sat, Sep 12, 2009 at 3:33 PM, Rick Faircloth  
wrote:

Code:

 

   $(document).ready(function() {

   

  streetNumber = 'valid';

  streetName  = 'valid';

  city = 'valid';

  state= 'valid';

  bedrooms = 'valid';

  fullBaths= 'valid';

  rent = 'valid';

  securityDeposit  = 'valid';

 

   });

 



[jQuery] Re: Why would this code cause this error in IE?

2009-09-12 Thread Dhruva Sagar
You should use the keyword 'var' before each variable.

Thanks & Regards,
Dhruva Sagar.


Charles de 
Gaulle
- "The better I get to know men, the more I find myself loving dogs."

On Sat, Sep 12, 2009 at 3:33 PM, Rick Faircloth wrote:

>  Code:
>
>
>
>$(document).ready(function() {
>
>
>
>   streetNumber = 'valid';
>
>   streetName  = 'valid';
>
>   city = 'valid';
>
>   state= 'valid';
>
>   bedrooms = 'valid';
>
>   fullBaths= 'valid';
>
>   rent = 'valid';
>
>   securityDeposit  = 'valid';
>
>
>
>});
>
>
>
> Error:
>
>
>
> “Object doesn’t support this property or method”
>
>
>
> This doesn’t cause an error in FF.
>
>
>
> Thoughts?
>
>
>
> Thanks,
>
>
>
> Rick
>
>
>
> *
> ---
> *
>
> *"Those who hammer their guns into plows will plow for those who do not."
> - Thomas Jefferson*
>
>
>


[jQuery] Why would this code cause this error in IE?

2009-09-12 Thread Rick Faircloth
Code:

 

   $(document).ready(function() {

   

  streetNumber = 'valid';

  streetName  = 'valid';

  city = 'valid';

  state= 'valid';

  bedrooms = 'valid';

  fullBaths= 'valid';

  rent = 'valid';

  securityDeposit  = 'valid';

 

   });

 

Error:

 

"Object doesn't support this property or method"

 

This doesn't cause an error in FF.

 

Thoughts?

 

Thanks,

 

Rick

 


---

"Those who hammer their guns into plows will plow for those who do not."  -
Thomas Jefferson