[jQuery] Re: Some jQuery Questions

2007-08-31 Thread Michael Geary

> > > Here is a example JSON:
> > >
> > > var json  = {
> > >   fields:
> > >   [
> > >{prompt1: "Login Name"},
> > >{prompt2: "Real Name"},
> > >{prompt3: "Location"},
> > >{prompt4: "Password"},
> > >{prompt5: "Security Group"},
> > >{prompt6: "File Area"}
> > >   ]
> > > };

> > That's not valid JSON. You need double quotes on all the 
> > property names.
> >
> > Obviously it doesn't make any difference if you are just 
> > eval'ing it (it is valid JavaScript), but if anyone uses it with
> > a real JSON parser it will fail.

> Ok, so what you are saying that I can make it work fine for 
> my own I/O handling, but to be 100% correct across the board, 
> the BCP (best current practice) is  I should always have my 
> JSON generation code doube quote all JSON properties and I 
> will not have any compatibility issue? or shouldn't?
> 
> Now, must it be double quote and/or single quotes?  Does it matter?

It must be double quotes. It's not a question of best current practice, it's
a question of whether it's JSON or not. No double quotes = not JSON.

> I think single quote is often used for WEB work because many 
> back end languages only support double quotes for strings so 
> its easy to code it.  So I have been using single quotes up 
> to this point and double quote it where it is specifically required.

That's totally reasonable, and at least 90% of the "JSON" data in the world
is probably consumed by non-strict JavaScript parsers, most often a simple
eval() which will accept any valid JavaScript code whether it is JSON or
not. But, to make it through any strict JSON parser the double quotes are
required.

Here is a JSON parser and some more information about this requirement:

http://simonwillison.net/2006/Oct/11/json/

-Mike



[jQuery] Re: Find values

2007-08-31 Thread David

ok. I modified  => 
it's ok?
but using .slice() is possible?


On Aug 30, 5:41 pm, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> Seems they are all children of their individual  tag right?
> What is the event you are listening for?
> If its an ajax table you will need to bind the events using the Live jQuery
> plugin.
> Then once you have an event you are listening for you probably will have
> something like:
>
> var parentTR = $(this.parents("tr:first"); //this is the parent TR of
> whatever is firing the event, assuming its inside the TR
> parentTR.children("input:first").val();  //this would be the first inputs
> value
>
> Does this help get you started?
>
> Glen
>
> On 8/30/07, David <[EMAIL PROTECTED]> wrote:
>
>
>
> > Please help me!
>
> > On Aug 30, 10:44 am, David <[EMAIL PROTECTED]> wrote:
> > > I have a table generated by ajax:
> > > 
> > >  
> > >   
> > >   
> > >   
> > >Unu
> > >Psatru
> > >Cinci
> > >   
> > >   
> > >   nimic
> > >  
>
> > >  
> > >   
> > >   
> > >   
> > >Unu
> > >Psatru
> > >Cinci
> > >   
> > >   
> > >   nimic
> > >  
> > > 
>
> > > how find value of first input, value of select,value of next input,
> > > text of  and id of  by click on each 
> > > Thank you.



[jQuery] Re: Passing arguments to Hover and Toggle??

2007-08-31 Thread Sergei

Try this:

.toggle(
function() {
myFunction(this, parameters...);
}
)

And you should define myFunction somewhere else.

On 1 сент, 14:28, Andy Matthews <[EMAIL PROTECTED]> wrote:
> Is there a way to pass arguments from one anonymous function, (in
> either Toggle, or Hover) to the second? Ideally I'd like to be able to
> pass in whatever variables I choose, but I'd settle for being able to
> pass in $(this), the item that triggered the event.



[jQuery] Passing arguments to Hover and Toggle??

2007-08-31 Thread Andy Matthews

Is there a way to pass arguments from one anonymous function, (in
either Toggle, or Hover) to the second? Ideally I'd like to be able to
pass in whatever variables I choose, but I'd settle for being able to
pass in $(this), the item that triggered the event.

Here's the code:

// I have a set of links which show/hide items on a chart
$('a.display').toggle(function(){
 var size = $(this).attr('href');
 $('.' + size).hide();
},function(size ){ // can I pass "size" through to this second
function?
 $('.' + size).show();
});

Anyone? If this is possible, then it needs to become part of the API
docs because I can't find it anywhere on the site.



[jQuery] Re: Some jQuery Questions

2007-08-31 Thread Pops



On Aug 31, 4:51 pm, "Michael Geary" <[EMAIL PROTECTED]> wrote:
> > Here is a example JSON:
>
> > var json  = {
> >   fields:
> >   [
> >{prompt1: "Login Name"},
> >{prompt2: "Real Name"},
> >{prompt3: "Location"},
> >{prompt4: "Password"},
> >{prompt5: "Security Group"},
> >{prompt6: "File Area"}
> >   ]
> > };
>
> That's not valid JSON. You need double quotes on all the property names.
>
> Obviously it doesn't make any difference if you are just eval'ing it (it is
> valid JavaScript), but if anyone uses it with a real JSON parser it will
> fail.

I wanted to get back to you on this.

Ok, so what you are saying that I can make it work fine for my own I/O
handling, but to be 100% correct across the board, the BCP (best
current practice) is  I should always have my JSON generation code
doube quote all JSON properties and I will not have any compatibility
issue? or shouldn't?

Now, must it be double quote and/or single quotes?  Does it matter?

I think single quote is often used for WEB work because many back end
languages only support double quotes for strings so its easy to code
it.  So I have been using single quotes up to this point and double
quote it where it is specifically required.

--
HLS



[jQuery] Re: MooTools $events expando workaround

2007-08-31 Thread Olmo

There's nothing to glean. It's the right thing to do.
-Olmo M.

On Aug 31, 9:23 pm, Rey Bango <[EMAIL PROTECTED]> wrote:
> Actually, I didn't. I left it out intentionally as there was nothing to
> be gleaned from the thread.
>
> Rey...
>
> Olmo wrote:
> > You forgot to post the url to theMooToolsforum:
> >http://forum.mootools.net/viewtopic.php?id=5190#post-26592
>
> > -Olmo M.



[jQuery] Re: Some jQuery Questions

2007-08-31 Thread Pops


On Aug 31, 2:37 pm, "John Beppu" <[EMAIL PROTECTED]> wrote:
> > 2)  Best way to create a toJSON() string or object.
>
> anyObject.toSource()

Hi John,

Yes, at first, that is what I thought and at first, i said "Ah ha!,
thats it!"

But its not quite right for all situations and worst, atleast up to IE
6.0 it doesn't support this JavaScript String object method.  So you
will get a script error under IE. :-)  I have not tried it update IE
7.0

---
HLS



[jQuery] Re: Document Ready - It lost me!?

2007-08-31 Thread Pops



On Aug 30, 5:25 am, Klaus Hartl <[EMAIL PROTECTED]> wrote:

> Simulating block scope in which you can safely use the $ shortcut...

Ok, and now that I came across the need, I saw you and Michael talk
about this.

Before I discovered jQuery 3 weeks ago, I discovered the simple
"alias" trick for $ almost 7 weeks ago. :-) when we were moving ahead
with WEB 2.0 stuff and notice a small neat library was using $

function $(s) { return document.getElementById(s);}

I said "ahhh, so that is what the $ is all about!"  - a short cut
for the massive common usage of document.getElementbyId().   So
started creating JS code like mad and also cleanup some older JS code
that we currently use. I even added a catch to my $ function to help
me isolate bad id references during development:

function $(s) {
   var e = document.getElementById(s);
   if (!e) alert("Bad element id: "+s);
   return e;
}

Of course, I discovered jQuery and up to a few days ago just using it
in isolated stuff.

Now when I add some of my older $ work, I get errors.

So now I see where this "alias" replacement allows for compatibility?

I tried to use the examples, not really understanding what was
happening, and it sorta work but I ended up renaming my $(s)  to
ele(s) simply because I have not officially used my own version.

But if I wanted to keep it  or maybe try some other $ prototype, how
do you switch between the two?

Does that mean you have to use something else for jQuery or just use
jQuery() instead?

--
HLS







[jQuery] Re: MooTools $events expando workaround

2007-08-31 Thread Rey Bango


Actually, I didn't. I left it out intentionally as there was nothing to 
be gleaned from the thread.


Rey...

Olmo wrote:

You forgot to post the url to the MooTools forum:
http://forum.mootools.net/viewtopic.php?id=5190#post-26592

-Olmo M.



[jQuery] Re: MooTools $events expando workaround

2007-08-31 Thread Olmo

You forgot to post the url to the MooTools forum:
http://forum.mootools.net/viewtopic.php?id=5190#post-26592

-Olmo M.

On Aug 30, 4:05 pm, Rey Bango <[EMAIL PROTECTED]> wrote:
> There was a recent flurry of emails on the list discussing a conflict
> with the use ofMooToolsin conjunction with jQuery. WhenMooTools
> released v1.1, they renamed their events expando to $events, thus
> conflicting instantly with jQuery.
>
> Well, Brazilian developer Alexandre Magno
> (http://blog.alexandremagno.net/) came up with a novel and quite simple
> solution to get around this issue; rename the $event expando inMootools!
>
> "I found a solution that works perfectly. Im the live example that we
> need sometimes to use the both frameworks. Im develop all my projects in
> jQuery, cause I learn more easily and feel more comfotable with it.
> Nothing to do withMootools, with is a beatiful framework too... But I
> need the fancy upload to work and is just possible withMootools, I make
> everything, but doesnt work because the conflict with the variable
> $event. I solve this issue by getting themootoolsdownload with no
> compression, use a software like aptana, dreamweaver, or even notepad to
> replace all ocurrences of $event to $event2 for example, and compress
> the libraty after it. This way, the two frameworks works perfectly,
> since the use of jquery with noConflit its configured. I hope this works
> and soon I will develop this fancy upload for jquery to dont have to use
> both. Its a shame for themootoolsteam wait to Jquery solve this
> problem that noboby its blame... its just convention... why just simple
> replace $event for $mootoolsEvent or $mooEvent for example??? Somethimes
> its necessary use both, no doubt..""
>
> This was posted in theMooToolsforum in response to a post where John &
>I were trying to resolve an integration problem for aMooToolsuser
> who wanted to useMooToolsand jQuery together. We realize that its
> unrealistic to expect that developers are going to use just one library
> and the team goes to great lengths to ensure some level of
> interoperability between other libraries via noConflict(). In jQuery
> v1.2, we take that a step further by allowing the renaming of the events
> expando to whatever you would like, thus avoiding any conflict.
>
> While this was not a bug in jQuery, we feel strongly about allowing
> developers to leverage the tools that they need to do their work and we
> never want jQuery to be a bottleneck.
>
> Thank you John & the jQuery team for continuing to make jQuery such a
> flexible solution and thank you Alexandre for expanding jQuery's reach
> to Brazil and offering up this great workaround.
>
> Rey...



[jQuery] Re: The Mitchies. Rating the Best GUI Plugins

2007-08-31 Thread Pops



On Aug 30, 4:45 pm, Mitch <[EMAIL PROTECTED]> wrote:
> I am so pleased you took the time to look closely at my project. Your
> analysis is perfect, but I do have some questoins below. Some may
> sound dumb because I am so new to all this.

My pleasure. I learning from all this too. :-)

> > 
> > This site requires JavaScript to be enabled!
> > 
>
> That is easy to fix and I will add it. There was some thought I might
> create a version that did require JS but I can see now that is the
> impossible dream.

Yeah, there is an argument for a "point of no return."  It all depends
on your current position is this a sole site or are you create a
product for others to install?.  For us,  its a product (it use to be
sold in Best Buy, CompUsa, etc),  so we don't have the luxury to go
all out with a pure web 2.0 system.  We have over 20 years of
customers and sometimes I just wish we can just blow them away and
start fresh. But then again, it is become of them we are still in
business.  So we have to do it with an optional "plug and play"
migration approach because of our Automated Update System.

The difference today is that we are taken WEB 2.0 more serious and we
can't help but to enforce it in some current parts or newer parts of
the system.  So in these areas, I have the  logic. I think
when it is done, we will simply have a fallback to the old pages and
not worry too much about trying to create a single page that covers
everything.  That is when where it gets messy.

> > - Font Size Scaling
>
> I have the same complaint about sites using fonts that are too hard to
> read. Honestly I have not been thinking about eyes and I better start
> today. Can you offer any words of wisdom on what I need to do to scale
> well. Does it mean using "ems" instead of points? I dont know much
> about ems and not sure I understand them enough to do it right.

I'm not a CSS expert, but I read some CSS sites that seem to indicate
that using pt and container box percentages better for scaling the
fonts.  But I also recall a few weeks back where I web hopped to some
site and I did a ctrl ++ and I was extremely impressed in how the nice
looking web site fonts and dividers all scaled nicely. It didn't
overrun, get ugly.  So I took the moment to look at the page source
and notices how it was using pluses and misses to define relative font
sizes. I save the page but I can't find it off hand.  Maybe some CSS
expert can tell us. :-)

> What happens when the font is too big for its container? Like I didnt
> design the tabs or accordion and I dont know how to scale them.

I think overall that the dimension doesn't scale with the fonts. They
don't get clipped or autofitted within the container they are in.

> > For your web site,
>
> > 1) why restrict the width size? Make it work with 2 4 or 5% left and
> > width margins.
>
> I definitly want to restrict the width because this is a control panel
> like environment, not a web site. Its more like Flash. I need to know
> where text is precisely for this to work. That is why the height is
> fixed too.

Ok, if that is your design requirement so that is how it is. I still
think you can use a % margin or width and still get it like you want
it.

> > 2) You will see the run off in tab 1 if you don't auto-fit the
> > content.
>
> What do  you mean here but "run off" How do I see that?

In tab 1, if you are using FireFox hit contol + a few times until you
see how the text crosses the border.  It doesn't get clipped or
autofitted.

> > - Make it work in full screen!
>
> This is a debatable issue. I think full screen would look weird but I
> am open to seeing it.

In FF, hit F11 for full screen. :-)

--
HLS



[jQuery] Re: Is there checkbox/radio image plugin?

2007-08-31 Thread Sergei

How to download cssHover?  I dont have SVN software.

Thank you.


On 1 сент, 00:58, Jack Killpatrick <[EMAIL PROTECTED]> wrote:
> Maybe this?
>
> http://dev.jquery.com/~gilles/cssHover/?checkbox3=c3&checkbox8=c8&che...



[jQuery] Re: Accordion v1.5 and interface together cause accordion to stop working

2007-08-31 Thread henry

Hi,

Do I just do a search and replace?  Can you maybe share your modified
interface.js that's compatible with the latest jQuery with us?

Thanks.
Henry

On Aug 31, 1:39 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> The problem is that interface overwrites jQuery's own animate function,
> but unfortunately in newer jQuery versions in a way that they behave
> differently.
>
> I had the same problem and renamed all occurrences of "animate" to
> "ifxAnimate" in my interface scripts.
>
> --Klaus
>
> > jman wrote:
> > Hi,
>
> > I am trying to use accordion and interface on the same page and the
> > accordion will not work.
>
> > On line 177 of the accordion file the execution goes to the interface
> > file when it is included. If I remove the interface file from the page
> > line 177 of the accordion jumps to the jquery animate function.
>
> > Any ideas on what is going on?
>
> > Thanks,
> > Jason



[jQuery] Re: Some jQuery Questions

2007-08-31 Thread Pops


Michael Geary wrote:
> > IE doesn't like:
> >
> > json = {};
> >
> > but will accept:
> >
> >var json = {};
>
> Let me take a guess...
>
> You are executing this code inside a function, and you have an HTML element
> in your page with the id 'json'.
> ...
> Did I get it right?

Gawd, I should of seen that. :-)It only came up because I had
temporary changed it to a global scope so that I can see it under
firebug.  It was a local scope in the working code. :-)

> > Also, I did try the original json.js from json.org and there
> > I learned that I needed to understand another concept -
> > pulling just the array from a jQuery result. This is because
> > the JSON parser was creating json for all the properties.  I
> > then realized the jQuery .get() method purpose in life.
>
> That's true, .get() does return a full-blooded Array object (unlike the
> jQuery result object which does have numbered elements and a .length
> property but is not a true Array).
>
> But I don't see how that helps you with JSON. The jQuery result object is an
> array of DOM elements, and there is no JSON representation for those. So you
> can't directly convert a jQuery result object into any kind of JSON format.

Well, this is all among those things where like a scrambled puzzle, I
am getting all my ducks line up to see how to do put many things
together.

For example, going from a string to object and back. concatenation,
merging and unraveling.  Alot of stuff that I still need to understand
without "3rd party" libraries. :-)

Thanks



[jQuery] Re: accessing html() attributes inside an event

2007-08-31 Thread Flesler

replace "e.target.html()"  for "e.target.innerHTML", or as Alexandre
says: "this.innerHTML".

On Aug 31, 7:15 am, "Alexandre Plennevaux" <[EMAIL PROTECTED]>
wrote:
> Why not this?
>
>  $('[EMAIL PROTECTED]').click(function(e){
> alert($(this).html());
>
>
>
> });
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of james_027
> Sent: vendredi 31 août 2007 9:56
> To: jQuery (English)
> Subject: [jQuery] accessing html() attributes inside an event
>
> hi,
>
> I would like to do something like this ...
>
> $('[EMAIL PROTECTED]').click(function(e){
> alert(e.target.html());
> });
>
> but it's not working ...
>
> can I avoid this ... $('[EMAIL PROTECTED]'+e.target.id+']').html()
>
> Thanks
> james
>
> Ce message Envoi est certifié sans virus connu.
> Analyse effectuée par AVG.
> Version: 7.5.484 / Base de données virus: 269.13.0/980 - Date: 30/08/2007
> 18:05- Hide quoted text -
>
> - Show quoted text -



[jQuery] Re: AJAX GetElementByID problem

2007-08-31 Thread happycfer

Hi HLS & Glenn,

Glenn - I see what you mean by using straight JS, you were correct I was going 
straight js and should have been using the ajax calls - thanks for the 
clarification.

HLS - I tried changing my ajax success from:
document.getElementById("destDiv1").innerHTML = thehtml;
to
$("#destDiv1").html(thehtml);
as you suggested and while it does run the alert message, it still fails out on 
the document.getElementByID in the destination page with the same error:
TypeError: document.getElementById("blah1") has no properties

Would you be able to paste in your sample app that you created?  I am probably 
missing something small.

Thanks for the help and suggestion!

-Kevin

> From: [EMAIL PROTECTED]
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: AJAX GetElementByID problem
> Date: Fri, 31 Aug 2007 02:25:39 -0700
> 
> 
> Kevin, I am not sure why you get this property error, but I believe
> that the blah1 script will not be evaluated when you go native with
> getElementById().
> 
> Atleast not here when I did a quick emulated test of your code.
> However, changing it to:
> 
>  $("#destDiv1").html(thehtml);
> 
> worked perfectly, with blah1 script doing the alert and the adding
> text to the blah1  container.
> 
> --
> HLS
> 
> Kevin wrote:
> > Hi All,
> >
> > I'm trying to use an ajax call to call a 2nd page which uses a
> > getElementByID to set a div's content on that page.  If I just try to
> > call the 2nd page, I get a js error that I can't run the
> > getElementByID because it has no properties.  If I change the 2nd page
> > to be a callback function and call that via the callback function of
> > jquery it works fine, so it sounds like an order of operations problem
> > here.  Is there anyway to allow getElementByIDs without forcing them
> > in a callback function?
> >
> > Here is my ajax call:
> > 
> > 
> > document.getElementById("destDiv1").innerHTML = "
> \">\"Loading...\"
"; > > $.ajax({ > > url: 'j1.html?a=' + Math.random(), > > type: 'GET', dataType: 'html', timeout: 6, > > error: function(a,b,c){ > > document.getElementById("destDiv1").innerHTML = 'Error > > loading > > channel' + a + "|" + b + "|" + c; > > }, > > success: function(thehtml){ > > // do something with HTML > > document.getElementById("destDiv1").innerHTML = thehtml; > > } > > }); > > > > > > > > Now the page to be loaded: > > > > > > > > alert("hi"); > > document.getElementById("blah1").innerHTML = "hi"; > > > > > > This throws the error: TypeError: document.getElementById("blah1") has > > no properties > > > > Any ideas? > > > > Thanks! > > > > -Kevin > _ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx

[jQuery] append[To] throwing and error when attempting to append to document outside of current window in Internet Explorer

2007-08-31 Thread Dallas

If I try to create a new window via window.open, and then append to it
with jQuery, I get an error: 'No such interface supported' in Internet
Explorer. It works fine in Firefox.

Example:
http://mybdev.com/~dallas/jquery.html



[jQuery] Re: Some jQuery Questions

2007-08-31 Thread Michael Geary

> > > From: Pops
> > > I figured it out know.  You got to look at the 
> > > constructor type to see if its an Object, Array
> > > or String.   From there you can decide to use
> > > for each or for in or for loop.

> > From: Michael Geary
> > You don't have to write that code yourself:
> > http://jollytoad.googlepages.com/json.js

> Yeah sure. but 90% of the battle is always understanding 
> other people's code.  For me to master a language (in this 
> case JS/jQuery), I have to roll my own, trial and error, live 
> and learn, understanding the basis and then I would be able 
> to say "a, ok, I can understand how this.js or that.js 
> relates and how I can use it or not use it.
> Too much overhead". Etc

You're a lot like me that way. And it's not that much work to build a simple
JSON serializer. But as you can see from json.js, there are just enough
weird little cases to make it "interesting". :-)

> IE doesn't like:
> 
> json = {};
> 
> but will accept:
> 
>var json = {};

Let me take a guess...

You are executing this code inside a function, and you have an HTML element
in your page with the id 'json'.

Unlike other browsers, IE creates a read-only property of the window object
for every id in your page. If you have an element whose ID is 'json', then
window.json is a reference to that object.

"var json = {}" succeeds because it creates a local variable inside the
function named 'json', so there is no conflict. "json = {}" fails because it
attempts to create a window.json property, but that property already exists
and is read-only.

If you were to execute "var json = {}" in the global scope (outside any
function), it would fail too.

Did I get it right?

> Also, I did try the original json.js from json.org and there 
> I learned that I needed to understand another concept - 
> pulling just the array from a jQuery result. This is because 
> the JSON parser was creating json for all the properties.  I 
> then realized the jQuery .get() method purpose in life.

That's true, .get() does return a full-blooded Array object (unlike the
jQuery result object which does have numbered elements and a .length
property but is not a true Array).

But I don't see how that helps you with JSON. The jQuery result object is an
array of DOM elements, and there is no JSON representation for those. So you
can't directly convert a jQuery result object into any kind of JSON format.

-Mike



[jQuery] Re: Some jQuery Questions

2007-08-31 Thread Michael Geary

> From: Pyrolupus
> 
> Mark Gibson wrote a lightweight jQuery plugin with $.toJSON() and
> $.parseJSON():
> 
> http://jollytoad.googlepages.com/json.js
> 
> I haven't tried it out, yet, but it looked good at a cursory glance.

Actually, Douglas "JSON" Crockford wrote the original code, so it's been
well tested and proven:

http://www.json.org/js.html

Unfortunately, Doug's original code adds the toJSON and parseJSON to
Object.prototype, which breaks jQuery and a lot of other code. Mark changed
them into standalone functions (in the jQuery/$ namespace), making the code
compatible with jQuery. (Thanks, Mark!)

-Mike



[jQuery] Re: Some jQuery Questions

2007-08-31 Thread Pops


Michael Geary wrote:
> > I figured it out know.  You got to look at the constructor type to see
> > if its an Object, Array or String.   From there you can decide to use
> > for each or for in or for loop.
>
> You don't have to write that code yourself:
>
> http://jollytoad.googlepages.com/json.js

Yeah sure. but 90% of the battle is always understanding other
people's code.  For me to master a language (in this case JS/jQuery),
I have to roll my own, trial and error, live and learn, understanding
the basis and then I would be able to say "a, ok, I can understand
how this.js or that.js relates and how I can use it or not use it.
Too much overhead". etc

> Description from the plugins page (http://docs.jquery.com/Plugins):
>
> hacked the original json.js into a jQuery plugin. It adds the two
> functions:$.toJSON(value),$.parseJSON(json_str, [safe]).
>
> See the code for more details.

Thanks I will.   More to my point above.

IE doesn't like:

json = {};

but will accept:

   var json = {};

Also, I did try the original json.js from json.org and there I learned
that I needed to understand another concept - pulling just the array
from a jQuery result. This is because the JSON parser was creating
json for all the properties.  I then realized the jQuery .get() method
purpose in life.

Thanks mike.



[jQuery] Re: Some jQuery Questions

2007-08-31 Thread Michael Geary

> Here is a example JSON:
> 
> var json  = {
>   fields:
>   [
>{prompt1: "Login Name"},
>{prompt2: "Real Name"},
>{prompt3: "Location"},
>{prompt4: "Password"},
>{prompt5: "Security Group"},
>{prompt6: "File Area"}
>   ]
> };

That's not valid JSON. You need double quotes on all the property names.

Obviously it doesn't make any difference if you are just eval'ing it (it is
valid JavaScript), but if anyone uses it with a real JSON parser it will
fail.

> I figured it out know.  You got to look at the constructor type to see
> if its an Object, Array or String.   From there you can decide to use
> for each or for in or for loop.

You don't have to write that code yourself:

http://jollytoad.googlepages.com/json.js

Description from the plugins page (http://docs.jquery.com/Plugins):

hacked the original json.js into a jQuery plugin. It adds the two
functions:$.toJSON(value),$.parseJSON(json_str, [safe]).

See the code for more details.

-Mike



[jQuery] Re: Accordion v1.5 and interface together cause accordion to stop working

2007-08-31 Thread Klaus Hartl


jman wrote:

Hi,

I am trying to use accordion and interface on the same page and the
accordion will not work.

On line 177 of the accordion file the execution goes to the interface
file when it is included. If I remove the interface file from the page
line 177 of the accordion jumps to the jquery animate function.

Any ideas on what is going on?

Thanks,
Jason


The problem is that interface overwrites jQuery's own animate function, 
but unfortunately in newer jQuery versions in a way that they behave 
differently.


I had the same problem and renamed all occurrences of "animate" to 
"ifxAnimate" in my interface scripts.



--Klaus


[jQuery] Re: changing url querystring in document.ready onclick

2007-08-31 Thread cfdvlpr

Hmm, adding that line doesn't seem to do anything.



[jQuery] Re: what is $.param?

2007-08-31 Thread Erik Beeson

I think it's mainly used internally for converting from a JavaScript
object to a query string, like:

var obj = {param1: 'val1', param2: 'value 2'};
$.param(obj) == "param1=val1¶m2=value%202"

--Erik


On 8/31/07, mikeyao <[EMAIL PROTECTED]> wrote:
>
> Why can't i find the $.param in the manual?
>
>


[jQuery] Re: Problem dragging forms

2007-08-31 Thread polycarp

Thanks Richard,

I found the UI Draggables about a day after posting this and the
handle setting worked perfect for what I was trying to do.

poly



[jQuery] Table row drag and drop

2007-08-31 Thread Joseph Wenninger

Hi !
I've written my first plugin ,which is only tested with firefox currently.
It allows ordering of table rows with drag and drop and selection of multiple 
rows (select first one, then shift+click select and) and moving of this 
block.

I've started it because the dnd of the interface library didn't work for me. 
it completely broke the table.

The plugin is in an early stage, so there are some glitches every now and then 
but mostly it works.

You can find a demo page at:
http://www.jowenn.net/opensource/jquery/tablerowdnd/

Since it is my first jquery plugin, comments are very welcome

Kind regards
Joseph Wenninger


[jQuery] Re: changing url querystring in document.ready onclick

2007-08-31 Thread Ramiro Araujo

you could use document.hash = "#"; to remove everything behind the #
character.
for some reason if I use document.hash = ""; the page keeps reloading
indefinetly... hah

Ramiro


On Aug 31, 2:08 pm, cfdvlpr <[EMAIL PROTECTED]> wrote:
> Here's what my url looks like:
>
> http:/.com/test.cfm/title.test-size.testSize-
> color.testColor#title.test2-size.testSize-color.testColor2
>
> I want to remove the middle part of this url which is "title.test-
> size.testSize-color.testColor"
>
> Is there a a regular expression that will remove this part of the url?
> Or, is there another way to do this?



[jQuery] what is $.param?

2007-08-31 Thread mikeyao

Why can't i find the $.param in the manual?



[jQuery] JQuery and Internet Explorer = trouble

2007-08-31 Thread vitormv

Hello,

ive been trying to set up some effects with jquery, but  unfortunately
it only woks in FF, not in IE (6 or 7).

I just cant see what im doing wrong, since the elements are NOT
generated dinamically. What happens is IE just ignores the events...

On the main page, i have a few menus, which depends on Ajax. When the
user chooses any option, the element below will get populated by ajax.
But it doesnt work in IE.
http://www.carango.com.br/preview/index.php

Ironically... THIS works both in IE and FF... the only difference is
the 'alert("foo");' before i call the Ajax;



Also, on this page, when the user clicks on a thumbnail, the big img
should load on the left... but in IE it just opens in a new window...
(which seems to be random, i dont know the reason).
http://www.carango.com.br/preview/ver_detalhes.php?cod=317

OBS.: These thumbnails are __NOT__ generated dinamically by php...
They always exist in the page, only their src's get changed by php,
when the page loads.


Any help would be very much appreciated :D
Thanks!



[jQuery] Re: Some jQuery Questions

2007-08-31 Thread Pyrolupus

> 2)  Best way to create a toJSON() string or object.
> I didn't see a direct way to do this, if not, is this best way:
>// Create JSON from form input id="wc*" fields
>
>$jj = $('[EMAIL PROTECTED]').get();
>json = {};
>try {
>   for (var j=0; j <$jj.length; j++) {
>  json[$jj[j].getAttribute("name")] = $jj[j].value;
>   }
>} catch(e) {
>  alert("EXCEPTION:\n\n"+e);
>  return false;
>}

You need to recurse so that you can get subobjects-arrays.

Mark Gibson wrote a lightweight jQuery plugin with $.toJSON() and
$.parseJSON():

http://jollytoad.googlepages.com/json.js

I haven't tried it out, yet, but it looked good at a cursory glance.

Pyro



[jQuery] Accordion v1.5 and interface together cause accordion to stop working

2007-08-31 Thread jman

Hi,

I am trying to use accordion and interface on the same page and the
accordion will not work.

On line 177 of the accordion file the execution goes to the interface
file when it is included. If I remove the interface file from the page
line 177 of the accordion jumps to the jquery animate function.

Any ideas on what is going on?

Thanks,
Jason



[jQuery] 'Could not set the selected property. Unspecified error' under IE6

2007-08-31 Thread Renaud

Hello,

I'm experiencing problems with the function below, called in the $
(document).ready handler under IE6.

Here is the context:

#CtxForm contains 2 select boxes, one called #PlantCtx and one called
#PlantID.
When #PlantCtx is changed, it populates #PlantID with the related
options, with the following function:

function myChangeCtx() {

var i = $('#PlantCtx').fieldValue();
var Plants = $('#PlantID');
$('#PlantID > option').remove();
$.each(plants[i].plants, function(id) {
Plants.append($.create('option', { 'value':
this.toString() }, [ this.toString() ]));
});


}


my $(document).ready calls the function pasted below, called
mySetDefaults, which will set the default value for some form fields,
using what I have in the 'request'  variable, which is a javascript
object that contains the GET parameters.

This function will find all select elements in the #CtxForm div, which
are respectively PlantCtx and PlantID, then look if there is an
attribute by that name in the 'request' object, select it, and then
call the 'onchange' handler for this element, so in short it does:

- Populate PlantCtx
- call mySetDefaults, which will first select the right option in
#PlantCtx
- Call $('#PlantCtx').trigger('change'), which will call myChangeCtx()
- myChangeCtx() will populate PlantID with the related plantids for
the newly selected plantctx
- step to the next select element, which is PlantID, and select the
right PlantID

This works fine under IE7/FF, but with IE6 it  throws an 'Could not
set the selected property. Unspecified error' when calling
the .attr('selected', true) for the right option in _PlantID_.

Here is what I noticed:

- If I call s.children("[EMAIL PROTECTED]""+request[name]+"\"]").size(),
it returns 1
- If I put some alert('foo') right before calling
s.children("[EMAIL PROTECTED]""+request[name]+"\"]").attr("selected",
true);, it will work and wont throw any error

It's really looks like jquery can see the element but it does not yet
exist for IE6, as if the call to mychangeCtx() would populate the DOM
but does not have the time to 'apply' it, that's really bad english
and sounds strange but I can't explain what's happening.

Would anyone have some thoughts about this? The function where the
error is thrown is pasted below.

Thanks!

Regards,
Renaud




function mySetDefaults() {

$('#CtxForm select').each(function() {

var s = $(this);

var name =
s.attr('name').substr(s.attr('name').length-2, s.attr('name').length)
== '[]'?
 
s.attr('name').substr(0, s.attr('name').length-2):
s.attr('name'); //
Remove the ending [] of the name in case it's an array

if (request[name]) {

if (isArray(request[name])) {

 
request[name].forEach(function(element, index, array) {
 
s.selectOptions(element);
});

} else {

 
s.children("option:selected").removeAttr("selected");
s.children("[EMAIL PROTECTED]
\""+request[name]+"\"]").attr("selected", true);

}

s.trigger("change"); // If there
is an onchange handler registered, trigger it
}

});

if (request['datetime_0']) $
('#datetime_0').val(request['datetime_0']);
if (request['datetime_1']) $
('#datetime_1').val(request['datetime_1']);

}



[jQuery] Interface plugin problem with IE7

2007-08-31 Thread Ramiro Araujo

Hi (this is my first post)

Im having a problem with the Drop animation of the Interface plugin,
with internet explorer 7. Im trying to animate a transparent png
image, and the page has a tiled background. the effect works in
firefox, safari 3, opera 9 (with some bug...) and even in internet
explorer 6, with dean edwards ie7 fix.
you can see the effect here: http://www.2mas2son4.com.ar/_test/ or
here: http://www.2mas2son4.com.ar/_test/index2.html (with dean edwards
fix enabled).

Someone knows a way to fix this, or knows why is this happening?

thanks!



[jQuery] Re: MooTools $events expando workaround

2007-08-31 Thread alexanmtz

thanks ray for the oportunity and I would like to say that the jQuery
in Brazil is well represented.

Im glad to help the jQuery team with this issue and I hope help even
more.

Congratulations for you and all jQuery team.

On 30 ago, 18:05, Rey Bango <[EMAIL PROTECTED]> wrote:
> There was a recent flurry of emails on the list discussing a conflict
> with the use of MooTools in conjunction with jQuery. When MooTools
> released v1.1, they renamed their events expando to $events, thus
> conflicting instantly with jQuery.
>
> Well, Brazilian developer Alexandre Magno
> (http://blog.alexandremagno.net/) came up with a novel and quite simple
> solution to get around this issue; rename the $event expando in Mootools!
>
> "I found a solution that works perfectly. Im the live example that we
> need sometimes to use the both frameworks. Im develop all my projects in
> jQuery, cause I learn more easily and feel more comfotable with it.
> Nothing to do with Mootools, with is a beatiful framework too... But I
> need the fancy upload to work and is just possible with Mootools, I make
> everything, but doesnt work because the conflict with the variable
> $event. I solve this issue by getting the mootools download with no
> compression, use a software like aptana, dreamweaver, or even notepad to
> replace all ocurrences of $event to $event2 for example, and compress
> the libraty after it. This way, the two frameworks works perfectly,
> since the use of jquery with noConflit its configured. I hope this works
> and soon I will develop this fancy upload for jquery to dont have to use
> both. Its a shame for the mootools team wait to Jquery solve this
> problem that noboby its blame... its just convention... why just simple
> replace $event for $mootoolsEvent or $mooEvent for example??? Somethimes
> its necessary use both, no doubt..""
>
> This was posted in the MooTools forum in response to a post where John &
>I were trying to resolve an integration problem for a MooTools user
> who wanted to use MooTools and jQuery together. We realize that its
> unrealistic to expect that developers are going to use just one library
> and the team goes to great lengths to ensure some level of
> interoperability between other libraries via noConflict(). In jQuery
> v1.2, we take that a step further by allowing the renaming of the events
> expando to whatever you would like, thus avoiding any conflict.
>
> While this was not a bug in jQuery, we feel strongly about allowing
> developers to leverage the tools that they need to do their work and we
> never want jQuery to be a bottleneck.
>
> Thank you John & the jQuery team for continuing to make jQuery such a
> flexible solution and thank you Alexandre for expanding jQuery's reach
> to Brazil and offering up this great workaround.
>
> Rey...



[jQuery] Re: jQuery and Mootools Problem

2007-08-31 Thread alexanmtz

theres a solution posted by Rey relative a discussion on mootools
forum...

this is the link 
http://groups.google.com/group/jquery-en/browse_thread/thread/9737e52028077d5c

I hope it can be helpfull...

On 23 ago, 18:53, "Yehuda Katz" <[EMAIL PROTECTED]> wrote:
> We could probably fix this rather easily by allowing the user to specify
> what the expand should be called ;)
>
> -- Yehuda
>
> On 8/23/07, John Resig <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > At least it wouldn't cause it on load? Maybe if you just do the window
> > load event with mootools and the document ready with jQuery?
>
> > --John
>
> > On 8/23/07, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> > > hmm ... wouldn't that still cause problems with the $events expando?
>
> > > --
> > > Brandon Aaron
>
> > > On 8/23/07, John Resig < [EMAIL PROTECTED]> wrote:
>
> > > > Yes, just include Mootools /then/ jQuery.
>
> > > > --John
>
> > > > On 8/23/07, kj187 <[EMAIL PROTECTED]> wrote:
>
> > > > > thx for answer.. is there no quick solution ? i need both librarys
>
> > > > > greetz julian
>
> > > > > On 23 Aug., 14:36, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> > > > > > Time to namespace our expandos.
>
> > > > > > --
> > > > > > Brandon Aaron
>
> > > > > > On 8/23/07, Yehuda Katz <[EMAIL PROTECTED]> wrote:
>
> > > > > > > It looks like Mootools is also using the $events expando, but
> > > > > > > differently... it expects it to be an object that can have a
> > "keys"
> > > > > > > attribute.
>
> > > > > > > -- Yehuda
>
> > > > > > > On 8/22/07, Sekmet < [EMAIL PROTECTED]> wrote:
>
> > > > > > > > Hi, i have same problem.. and i already try include mootools
> > > before
> > > > > > > > jQuery
> > > > > > > > and then .noConflict()
>
> > > > > > > > And this problem with mootools is not recognized as a bug by
> > > mootools
> > > > > > > > developer :(
>
> > > > > > > > All the best
> > > > > > > > Carlos
>
> > > > > > > > On Aug 22, 5:59 pm, "John Resig" <[EMAIL PROTECTED]> wrote:
> > > > > > > > > Try includingMootools, then jQuery, then doing the
> > .noConflict()
> > > > > > > > > stuff and see if that works.
>
> > > > > > > > > --John
>
> > > > > > > > > On 8/22/07, kj187 <[EMAIL PROTECTED] > wrote:
>
> > > > > > > > > > Hi,
>
> > > > > > > > > > i use jquery and  mootools.
> > > > > > > > > > But i have a problem, after loading the site, i became an
> > js
> > > error
>
> > > > > > > > > > this.$events[type].keys has no properties
> > > > > > > > > >mootools.v1.11.js
> > > > > > > > > > Line 2878
>
> > > > > > > > > > Here is a screenshot:
> > >http://gfx.kj187.de/jqueryMootoolsProblem.tiff
>
> > > > > > > > > > Has anybody an idea ??
>
> > > > > > > > > > regards kj187 (julian)
>
> > > > > > > --
> > > > > > > Yehuda Katz
> > > > > > > Web Developer | Procore Technologies
> > > > > > > (ph)  718.877.1325
>
> --
> Yehuda Katz
> Web Developer | Procore Technologies
> (ph)  718.877.1325



[jQuery] Re: jCarouselLite with thickbox

2007-08-31 Thread [EMAIL PROTECTED]

i am waiting for help,,, aren't there any experts around??

On Aug 30, 2:37 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hello!! i am new in jquery world and am greatly impressed by the
> effect that we can create using jquery pluggins. i have a question, i
> hope i am posting at right place..
>
> i have developed a site and used jquery pluggins in that site. i have
> used jCarouselLite for image rotation and then used thickbox for each
> image,, so that if user clicks on that image,, some information is
> displayed.
>
> i have slightly modified the jCarouselLite,, so that when user hover
> mouse over the image,, the rotation stops and starts again when mouse
> is removed from it.. this is working fine..
>
> now i am having a problem that thickbox is displayed properly from few
> clicks but after maybe  one complete rotation of images (dont know
> exact scenerio),, when i click on the images,, instead of thickbox
> appearing,, a new page is loaded in the same windows,, as if its a
> normal page,,
>
> you can check itwww.discretelogix.com
>
> Does anyone have any idea, why is thickbox behaving like this
> anything that i am doing wrongany suggestion??
>
> Regards,



[jQuery] accordian and interface conflict

2007-08-31 Thread jman

Hi,

I am not sure if this is talked about elsewhere, but I have a problem
using accordian 1.5 with the interface plugin.

The problem is that when I click to open a different part of the
accordian it does not show up. Following it in firebug the code jumps
to the interface plugin at line 177 "complete: settings.finished".
When the interface is not included it, jumps to jQuery animate.

Also, I may have been a little too quick to create a bug report over
at the jquery plugin site. If this is something that is already known
about, I will cancel by buy request.

Thanks,
Jason



[jQuery] Repeated AJAX calls

2007-08-31 Thread Dough Boy

I have a "wizard" setup that allows the user to create a line of text
based upon options chosen.  I then write this line to the screen.  All
of the text they did is saved at the end by clicking on the save
button.  Some users are not smart enough to click the save button and
all of the work they did is erased.

So I went ahead and tried to have it save to the screen AND save to
the database via AJAX.  Basically I just do an AJAX call to save all
of the text everytime they add a new line, or edit a previous one.

This works fine for the first call.  The second time the function is
executed the AJAX is sending the old data (even though there is new
data).

Am I missing something that the .ajax({}) "function" would cache what
it sends?



[jQuery] Re: Release: Accordion 1.5

2007-08-31 Thread jman

Hi,

I am fairly new to jQuery in general, so this question might have been
answered somewhere along the way.

I have a problem using the accordion plugin with the interface plugin.
They don't interact, just including the interface.js file on the same
page makes the accordion stop working.

It appears the problem is on line 177 "complete: settings.finished" of
the jquery.accordion.js file. When the interface is included the
execution jumps to the interface file, when the interface file is not
included the execution jumps to jQuery, animate.

Any help would be greatly appreciated,
Jason


On Aug 30, 3:25 pm, Erin Doak <[EMAIL PROTECTED]> wrote:
> I agree that people like the animation effects.
> I'm all for them. The problem is that if a
> menu/header is still in the opening animation
> process and the mouse is moved to a new
> menu/header item the new menu doesn't open at all
> - no matter how long one waits. That to me is a
> bug.
>
> Erin
>
> >In the real world, things dont always happen instantly.
>
> >A sliding door (like on Star Trek) opens with a
> >whoosh.  I am sure they "could" have built a
> >door "shield" that was opened instantly rather
> >than a whooshing door.  Especially with their
> >futuristic technology.  However, people like the
> >whoosh.  It's possible to have it too long, like
> >whosh.  In which case
> >you bump into the door with your nose ( i.e.
> >Supermarket Doors) or "whsh" in which case it
> >feels like the "power" it turned up too high,
> >which is jarring.
>
> >The perfect effect is timed to the Goldilocks
> >principle.  Not too quick, not too slow, not the
> >instant the user puts their mouseover, not
> >waiting too long to fire, not too much bounce,
> >not too robot-like.  It should be "just-right".
>
> >Glen
>
> >On 8/30/07, Erin Doak
> ><[EMAIL PROTECTED]>
> >wrote:
>
> >>In my opinion (and only my opinion) i think
> >>that it is kinda disturbing if we hover on one
> >>item and immediately if we hover on another
> >>item, the accordian doesn't open for the second
> >>item.
>
> >I think that the interface should always be
> >responsive to the user. If the mouse is over a
> >menu it should activate. The animation is really
> >just an 'extra'. The ability to navigate a web
> >site by accessing the menu items is of paramount
> >importance.
>
> >One possible solution might be to offer either behavior as an option.
>
> >Erin
>
> >On 8/26/07, Jörn Zaefferer <[EMAIL PROTECTED]> 
> >wrote:
>
> >Ganeshji Marwaha schrieb:
> >>  Jörn, this is fantastic... very re-usable as well..
>
> >>  I have a question/suggestion though... When i hover over one of the
> >>  items, and before the animation completes if i hover over another
> >>  item, the animation for the second item doesn't occur. Now, i will
> >>  have to move my mouse out of that item and hover over it again to get
> >>  the other item to expand. Is it something that can be fixed, or is it
> >>  a known limitation that we will have to live by...
>
> >Well, so far that was intended to be a feature, not a bug. The
> >combination of long-running animations with hover is annoying, right.
> >But it is also annoying when the accordion keeps changing on each mouse
> >move, even when you didn't intend to get a different chunk. "Fixing" it
> >isn't difficult, but it is difficult to decide what the right fix
> >actually is. Your help is appreciated.
>
> >-- Jörn



[jQuery] jQuery (Turkish)

2007-08-31 Thread altan

jQuery users from Turkey came together to share their knowledge.
The group address is
http://groups.google.com/group/jquery-turkish
and also can be accessible on
http://jquery-tr.com

We are waiting for all Turkish users.

Regards,



[jQuery] Re: Form Input Lookup

2007-08-31 Thread Phunky

Thanks for the reply Pyro, i managed to get something working but i
have a feeling it quite bloated way of doing it...


http://pastebin.com/m7d942a29

The above links to the code snippet that i created, it checks a URL
that returns either "match" or "null" depending if it finds a match
for the selected text and then depending on the results changes the
styling of the element.

I have a funny feeling im not doing it the best way possible but then
im very bad at JS :D



[jQuery] Re: Close Thickbox Window Link that Doesn't Refresh Parent Page

2007-08-31 Thread cfdvlpr

FYI, I found the function I needed:  tb_remove();



[jQuery] Re: jqModal content overflowing -- scrollbars?

2007-08-31 Thread Josh Nathanson


Would it be possible to use the wrap method to wrap the content in a 
secondary div on callback, which would be styled to your specifications?  I 
think if you try to change the layout properties of the jqModal div itself 
it will cause problems like what you're seeing.


-- Josh


- Original Message - 
From: "Sean O" <[EMAIL PROTECTED]>

To: 
Sent: Friday, August 31, 2007 12:32 PM
Subject: [jQuery] jqModal content overflowing -- scrollbars?





Hi,


First off, Brice, great work on jqModal.  It's the just-about-perfect
solution to my AJAX popup window that can interact easily with the calling
page.

I have one question on how to size the window with content constraints...

I'm using it to call up a directory and display a list of files, one per
line.  Some of the directories can get pretty big: 100-200 files (lines) 
or

more.  The jqModal window stretches to the bottom of the screen, but does
not scroll within itself.  Scrolling the parent has the jqModal simply
bouncing down to stay fixed within the viewport.

I tried setting the height manually:


This "worked" in FF2, but the content spilled out onto the overlay below.
In IE6, it just ignored the height declaration and drew the window to the
bottom of the viewport, but additional content was still hidden below.

So - how can I have a fixed width & height jqModal window that adds a
vertical scrollbar to accommodate content that might overflow those 
bounds?

(and works in IE6+ & FF2 :)


Thanks,

_
SEAN O
http://www.sean-o.com
--
View this message in context: 
http://www.nabble.com/jqModal-content-overflowingscrollbars--tf4362025s15494.html#a12432679

Sent from the JQuery mailing list archive at Nabble.com.





[jQuery] Close Thickbox Window Link that Doesn't Refresh Parent Page

2007-08-31 Thread cfdvlpr

I want to have a link that says close this window inside my thickbox
window, but I don't want this link to do anything but what would
happen if you clicked outside the thickbox window in the darkened
area.  Is there simply a class that I can add to this a element that
would do this?



[jQuery] jqModal content overflowing -- scrollbars?

2007-08-31 Thread Sean O


Hi,


First off, Brice, great work on jqModal.  It's the just-about-perfect
solution to my AJAX popup window that can interact easily with the calling
page.

I have one question on how to size the window with content constraints...

I'm using it to call up a directory and display a list of files, one per
line.  Some of the directories can get pretty big: 100-200 files (lines) or
more.  The jqModal window stretches to the bottom of the screen, but does
not scroll within itself.  Scrolling the parent has the jqModal simply
bouncing down to stay fixed within the viewport.

I tried setting the height manually:


This "worked" in FF2, but the content spilled out onto the overlay below.
In IE6, it just ignored the height declaration and drew the window to the
bottom of the viewport, but additional content was still hidden below.

So - how can I have a fixed width & height jqModal window that adds a
vertical scrollbar to accommodate content that might overflow those bounds?
(and works in IE6+ & FF2 :)


Thanks,

_
SEAN O
http://www.sean-o.com
-- 
View this message in context: 
http://www.nabble.com/jqModal-content-overflowingscrollbars--tf4362025s15494.html#a12432679
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: next() problems

2007-08-31 Thread Pops


Sean wrote:
> Oh, I just tried it and actually you're right!  Bummer.  It worked in
> the code I was using, anyway ;-)
>
> That behavior actually doesn't make much sense to me; it doesn't seem
> like, in practive, you'd ever have immediate siblings that could be
> some class (or whatever) that you don't expect.  Selecting the next
> matching element makes more sense.
>

Actually, it does make sense. I have a similar piece of code using
fieldset, legends and divs, like so:

[ Results ]
[ Error ]
[ Log ]

and I wanted to animate (fadein/out, slideUp/Down) when the user
clicked the field set legend title, to show/hide the next element
 container.

I too got into the thinking like you did but I wasn't sure yet what
were "selectors" jQuery results.

With the help of Joan, I came up with idiom:

   $('legend').click( function() {
   $(this).next().slideToggle('medium',function(){});
   });

I forget,  but my original code was similar in concept to what you
had.  I think I had tried this:

   $('legend').next().slideToggle('medium',function(){});
   $('legend div').slideToggle('medium',function(){});

and that isn't correct for what i wanted.

It makes perfect sense once you get a good handle on selectors and
what are jQuery results.   From there, I was able to correct other
similar incorrect thinkings where I was using lumping multiple filters
into selector search criteria.

--
HLS



[jQuery] Re: Jquery Quick Reference / Cheat Sheet

2007-08-31 Thread Richard D. Worth
Here's one I like, courtesy of [EMAIL PROTECTED]:

http://www.n-bp.com/jquery_cheat_sheet/v112/jQuery_cheat_sheet_v1-1-2.pdf

- Richard

On 8/31/07, Rey Bango <[EMAIL PROTECTED]> wrote:
>
>
> Hey cfdvlpr,
>
> Here ya go:
>
> http://spreadsheets.google.com/pub?key=pmkgiRQf98ll4L1SSh9E0Dw
>
> You can also look at this:
>
> http://jquery.bassistance.de/api-browser/
>
> So I take it you're a ColdFusion developer?
>
> Rey...
>
>
>
> cfdvlpr wrote:
> > Has anyone made one?  Care to share it?
> >
> >
>


[jQuery] moreSelectors plugin syntax issue?

2007-08-31 Thread Steve Finkelstein
Hi all,

I'm using the jQuery Form plugin by Mike Alsup and jQuery More Selectors
here: http://www.softwareunity.com/sandbox/JQueryMoreSelectors/

I have a callback function which I'm calling with the following syntax:

function validate() {
// ensure something is at least filled out.

if ($('#form2:modified'))
{
$('#error').show("slow", function(){
setTimeout("$('#error').hide('slow')", 1);
});

// Do not submit the call to server.
return false;
}

}

This seems to error out, and I can't find where the syntax issue is.

Thanks for any help.

- sf


[jQuery] Re: Jquery Quick Reference / Cheat Sheet

2007-08-31 Thread Rey Bango


Hey cfdvlpr,

Here ya go:

http://spreadsheets.google.com/pub?key=pmkgiRQf98ll4L1SSh9E0Dw

You can also look at this:

http://jquery.bassistance.de/api-browser/

So I take it you're a ColdFusion developer?

Rey...



cfdvlpr wrote:

Has anyone made one?  Care to share it?




[jQuery] Re: Some jQuery Questions

2007-08-31 Thread John Beppu
>
> 2)  Best way to create a toJSON() string or object.


anyObject.toSource()


[jQuery] Re: Some jQuery Questions

2007-08-31 Thread Pops


Klaus Hartl wrote:

> Yes, there is a direct method, just use a for loop:
>
> for (var key in json) {
>  console.log(key); // key
>  console.log(json[key]); // value
> }
>
> Maybe I didn't get the question right?

Hi Klaus,

Ok, Now I see why I asked the question.  Yes, I did try the above, but
I see in some code snippet I was struggling to grasp JSON Objects,
Strings and Arrays:

Here is a example JSON:

var json  = {
  fields:
  [
   {prompt1: "Login Name"},
   {prompt2: "Real Name"},
   {prompt3: "Location"},
   {prompt4: "Password"},
   {prompt5: "Security Group"},
   {prompt6: "File Area"}
  ]
};

Essentially, I wanted to pull the property names ("prompt1" to
"prompt6").  They don't need to have to this pattern in my case.  The
prompts can have varying names.

So when I used the "for in" syntax above, it wasn't quite what I
wanted.  For example:

   for (var i in json) {
   console.log(i, " | ",json[i]);
   for (var k in json[i]) {
  console.log(k," | ",json[i][k]);
   }
   }

Produces this:

fields  |  [Object prompt1=Login Name, Object prompt2=Real Name,
Object prompt3=Location, Object prompt4=Password, Object
prompt5=Security Group, Object prompt6=File Area]
0 | Object prompt1=Login Name
1 | Object prompt2=Real Name
2 | Object prompt3=Location
3 | Object prompt4=Password
4 | Object prompt5=Security Group
5 | Object prompt6=File Area

I figured it out know.  You got to look at the constructor type to see
if its an Object, Array or String.   From there you can decide to use
for each or for in or for loop.

I just figured that with all the "selector" stuff, that they would be
a more direct  way. :-)

--
HLS



[jQuery] Table Pager / Pagination Plugin. Arrows around the page numbers < 1 2 3 4 5 > (next and previous)

2007-08-31 Thread cfdvlpr

Has anyone added the < > around the page numbers?  If so, can you
please share this modification?



[jQuery] Re: Stop Default Event

2007-08-31 Thread Rafael Santos
Thx Larry... ill try it next time.

ah, sometimes there are unclosed html tags that makes anchors trigger
doesn't be stopped.
Usually isnt my fault hehe... anyway...

If i found a recent demo I'll post it here.

On 8/30/07, Larry Garfield <[EMAIL PROTECTED]> wrote:
>
>
> I usually do:
>
> $().bind('click', function(event) {
>   event.preventDefault().
>   ...
> });
>
> On Thursday 30 August 2007, Rafael Santos wrote:
> > Are there anyone who have a snippet to really prevent the something is
> > fired.
> >
> > Sometimes my "return false" doesn't work on FF, IE6 and IE7. hehe =(
> >
> > And i see mootools can do something like this:
> >
> > e.stop();
>
>
> --
> Larry Garfield  AIM: LOLG42
> [EMAIL PROTECTED]  ICQ: 6817012
>
> "If nature has made any one thing less susceptible than all others of
> exclusive property, it is the action of the thinking power called an idea,
> which an individual may exclusively possess as long as he keeps it to
> himself; but the moment it is divulged, it forces itself into the
> possession
> of every one, and the receiver cannot dispossess himself of it."  --
> Thomas
> Jefferson
>



-- 
Rafael Santos Sá :: webdeveloper
www.rafael-santos.com


[jQuery] blockUI IE6 checkbox

2007-08-31 Thread seedy


I have a few checkboxes that fire an ajax request, and use blockUI to block
an element during this request.  
Problem is, the checkbox gets 'unchecked' whenever blockUI shows up. 
Its reproducible with the following code (appears to not just affect element
blocking)



check me 




 $(function(){
$('input:checkbox').click(function(){ alert('booga'); $.blockUI(); });
 });



You will see the box get checked, then when the alert goes away, it
magically becomes unchecked.  Any ideas?
-- 
View this message in context: 
http://www.nabble.com/blockUI-IE6-checkbox-tf4361472s15494.html#a12430878
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: check uncheck

2007-08-31 Thread [EMAIL PROTECTED]

Thanks John I got it.

Andrea

On Aug 31, 12:10 pm, "John Resig" <[EMAIL PROTECTED]> wrote:
> http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_disable.2F...
>
> --John
>
> On 8/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> > I need the check of a checkbox disable other inputs and change value
> > to others.
> > Here the code:
>
> > //click on keep prop cancel unnecesary fields
> > $(document).ready(function(){
> > $('#keepProp').click(function(){
> > state = $('.percent').val();
> > if (this.checked){
> > $('.depend').attr({disabled:'true'});
> > $('.percent').val('%');
> > } else {
> > $('.depend').attr({disabled:'false'});
> > $('.percent').val(state);
> > };
> > });
> > });
>
> > Works fine if I check but the uncheck operation do not do nothing???
>
> > Help
>
> > Andrea



[jQuery] Re: check uncheck

2007-08-31 Thread John Resig

http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_disable.2Fenable_an_element.3F

--John

On 8/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I need the check of a checkbox disable other inputs and change value
> to others.
> Here the code:
>
> //click on keep prop cancel unnecesary fields
> $(document).ready(function(){
> $('#keepProp').click(function(){
> state = $('.percent').val();
> if (this.checked){
> $('.depend').attr({disabled:'true'});
> $('.percent').val('%');
> } else {
> $('.depend').attr({disabled:'false'});
> $('.percent').val(state);
> };
> });
> });
>
> Works fine if I check but the uncheck operation do not do nothing???
>
> Help
>
> Andrea
>
>


[jQuery] Re: changing url querystring in document.ready onclick

2007-08-31 Thread cfdvlpr

Here's what my url looks like:

http:/.com/test.cfm/title.test-size.testSize-
color.testColor#title.test2-size.testSize-color.testColor2

I want to remove the middle part of this url which is "title.test-
size.testSize-color.testColor"

Is there a a regular expression that will remove this part of the url?
Or, is there another way to do this?



[jQuery] Re: check uncheck

2007-08-31 Thread [EMAIL PROTECTED]

Nobody has a suggestion?
Thanks

Andrea

On Aug 30, 9:16 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I need the check of a checkbox disable other inputs and change value
> to others.
> Here the code:
>
> //click on keep prop cancel unnecesary fields
> $(document).ready(function(){
> $('#keepProp').click(function(){
> state = $('.percent').val();
> if (this.checked){
> $('.depend').attr({disabled:'true'});
> $('.percent').val('%');
> } else {
> $('.depend').attr({disabled:'false'});
> $('.percent').val(state);
> };
> });
>
> });
>
> Works fine if I check but the uncheck operation do not do nothing???
>
> Help
>
> Andrea



[jQuery] Re: next() problems

2007-08-31 Thread Sean

Oh, I just tried it and actually you're right!  Bummer.  It worked in
the code I was using, anyway ;-)

That behavior actually doesn't make much sense to me; it doesn't seem
like, in practive, you'd ever have immediate siblings that could be
some class (or whatever) that you don't expect.  Selecting the next
matching element makes more sense.

Sean

On Aug 31, 11:08 am, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Hi Sean,
>
> Actually, you can't use .next() in that situation.
>
> The argument for .next() acts as a filter for what the very next  
> sibling can be. So, jQuery(this).next('#someId) will only select the  
> very next sibling, and only if it has an id of "someId"
>
> cf.http://docs.jquery.com/Traversing/next
>
> Also, I realize this is nitpicky, but in your example you should  
> probably write either next("#WhateverId") or next(".WhateverClass"),  
> but not next("#WhateverClass")
>
> --Karl
> _
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Aug 31, 2007, at 9:17 AM, duma wrote:
>
>
>
>
>
> > Actually, since next() takes a selector as an argument, you can use  
> > next().
>
> > Just do something like the following:
>
> > jQuery("div.faq h4").click(function() {
> >   jQuery(this).next("#WhateverClass").addClass("top");
> > });
>
> > Sean
>
> > Karl Swedberg-2 wrote:
>
> >> The .next() method will only select the very next sibling. If you
> >> have other siblings in between the two h4s, you'll need to use a
> >> different selector.
>
> >> You could try this instead:
>
> >> jQuery('div.faq h4').click(function() {
> >>jQuery('~ h4:first', this).addClass('top');
> >> });
>
> >> That'll find the first sibling h4 that follows the clicked h4.
>
> >> --Karl
> >> _
> >> Karl Swedberg
> >>www.englishrules.com
> >>www.learningjquery.com
>
> >> On Aug 30, 2007, at 8:03 PM, Josh Nathanson wrote:
>
> >>> Next() will only get siblings -- can you post the html?
>
> >>> -- Josh
>
> >>> - Original Message - From: "ruperdupe" <[EMAIL PROTECTED]>
> >>> To: "jQuery (English)" 
> >>> Sent: Thursday, August 30, 2007 11:36 AM
> >>> Subject: [jQuery] next() problems
>
>  What I'm trying to do is when someone clicks on a h4 heading the  
>  next
>  one has a class (top) added to it. In between each heading there  
>  are
>  other elements. The h4s are inside a div called 'faq'.
>  So far I've tried:
>  jQuery('div.faq h4').click(function() {
>  jQuery(this).next().addClass('top');
>  });
>  And:
>  jQuery('div.faq h4').click(function() {
>  jQuery(this).next('h4').addClass('top');
>  });
>  Neither works and I can't figure out why? If anyone could help,  
>  that
>  would be great!
>  (I'm using jQuery instead of $ because I'm using Prototype as well)
>
> > --
> > View this message in context:http://www.nabble.com/next%28%29-
> > problems-tf4357523s15494.html#a12426258
> > Sent from the JQuery mailing list archive at Nabble.com.- Hide quoted text -
>
> - Show quoted text -



[jQuery] Re: Some jQuery Questions

2007-08-31 Thread Pops


Klaus Hartl wrote:

> I'm going to answer the first question (low hanging fruit)...

:-)

> Yes, there is a direct method, just use a for loop:
>
> for (var key in json) {
>  console.log(key); // key
>  console.log(json[key]); // value
> }
>
> Maybe I didn't get the question right?

I don't know why I missed this.   I think at the moment I was mentally
stuck on using "for each" and stuck grasping and learning direct
property references.

Thanks



[jQuery] Re: next() problems

2007-08-31 Thread Karl Swedberg

Hi Sean,

Actually, you can't use .next() in that situation.

The argument for .next() acts as a filter for what the very next  
sibling can be. So, jQuery(this).next('#someId) will only select the  
very next sibling, and only if it has an id of "someId"


cf. http://docs.jquery.com/Traversing/next

Also, I realize this is nitpicky, but in your example you should  
probably write either next("#WhateverId") or next(".WhateverClass"),  
but not next("#WhateverClass")



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



On Aug 31, 2007, at 9:17 AM, duma wrote:




Actually, since next() takes a selector as an argument, you can use  
next().


Just do something like the following:

jQuery("div.faq h4").click(function() {
  jQuery(this).next("#WhateverClass").addClass("top");
});

Sean


Karl Swedberg-2 wrote:


The .next() method will only select the very next sibling. If you
have other siblings in between the two h4s, you'll need to use a
different selector.

You could try this instead:

jQuery('div.faq h4').click(function() {
   jQuery('~ h4:first', this).addClass('top');
});

That'll find the first sibling h4 that follows the clicked h4.

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



On Aug 30, 2007, at 8:03 PM, Josh Nathanson wrote:



Next() will only get siblings -- can you post the html?

-- Josh

- Original Message - From: "ruperdupe" <[EMAIL PROTECTED]>
To: "jQuery (English)" 
Sent: Thursday, August 30, 2007 11:36 AM
Subject: [jQuery] next() problems


What I'm trying to do is when someone clicks on a h4 heading the  
next
one has a class (top) added to it. In between each heading there  
are

other elements. The h4s are inside a div called 'faq'.
So far I've tried:
jQuery('div.faq h4').click(function() {
jQuery(this).next().addClass('top');
});
And:
jQuery('div.faq h4').click(function() {
jQuery(this).next('h4').addClass('top');
});
Neither works and I can't figure out why? If anyone could help,  
that

would be great!
(I'm using jQuery instead of $ because I'm using Prototype as well)







--
View this message in context: http://www.nabble.com/next%28%29- 
problems-tf4357523s15494.html#a12426258

Sent from the JQuery mailing list archive at Nabble.com.





[jQuery] Re: How to use Form Plugin and ValidationAide Plugin

2007-08-31 Thread Massimiliano Marini

> The  interesting code is this:
> 
>   var v = jQuery("#form").validate({
>   submitHandler: function(form) {
>   jQuery(form).ajaxSubmit({
>   dataType: "json",
>   after: function(result) {
>   if(result.status) {
>   v.showErrors
> (result.data); v.focusInvalid();

Hi Jorn,
this code works perfectly but I can manage the ajax response, a simple
json d,ata like in your example, firebug show me the response but I
can't manage why? My code is like your code ... but mine don't work. Any
suggest will be appreciated.

My code : 

var v = $("#frmCreaStudio").validate({
debug: true,
  focusInvalidElement: true,
  errorLabelContainer: $("#frmCreate div.error"),
  submitHandler: function(frmCreate) {
$("#frmCreate").ajaxSubmit({
  url: "jresponse.php",
  dataType: "json",
  after: function(result) {
if(result.status) {
  v.showErrors(result.data);
  v.focusInvalid();
}
  }
});
  }
});

I've a div with id="result" but nothing appear inside, I've tried
to put some alert in every position but nothing ... my brain is stalled.

--
Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/
"It's easier to invent the future than to predict it."  -- Alan Kay


[jQuery] Re: Is there checkbox/radio image plugin?

2007-08-31 Thread Glen Lipka
http://kawika.org/jquery/checkbox/
Try this one.

Glen

On 8/31/07, cfdvlpr <[EMAIL PROTECTED]> wrote:
>
>
> I'd be interested in this as well.
>
>


[jQuery] Re: Is there checkbox/radio image plugin?

2007-08-31 Thread Jack Killpatrick


Maybe this?

http://dev.jquery.com/~gilles/cssHover/?checkbox3=c3&checkbox8=c8&checkbox11=c11&radiogrp=r3&button3=&text1=Some+default+value

- Jack

Sergei wrote:

Hello,

Is there any checkbox/radio image replacement plugin for jQuery?

Like on this page:
http://mootools.net/download

Thank you.


  





[jQuery] Re: What can add an effect to this rotate?

2007-08-31 Thread Steve Finkelstein
Mike you're just filled with tricks up your sleeve, aren't you?

Thank you so much, I bookmarked that. Seems I have a few of your personals
bookmarked already!

- sf

On 8/31/07, Mike Alsup <[EMAIL PROTECTED]> wrote:
>
>
> > I was curious, is there anything jQuery has available that can take this
> > single image rotater and add an effect to it? Something that slowly
> fades in
> > the next photo? An example of what I'm trying to apply this on is
> > http://devel.phpgeek.org.
>
> The Cycle Plugin can do that, as can InnerFade and others.
>
> http://malsup.com/jquery/cycle/
>


[jQuery] Re: AJAX GetElementByID problem

2007-08-31 Thread Glen Lipka
I meant, where is the jQuery in your code.  It looks like straight
Javascript.
The message from Pops has jQuery.  Did that fix the error?

Glen

On 8/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>  Hi Glenn,
>
> If you are asking where the script to include the js for jquery is, it is
> located within the head tag of the first page.  my jquery js file (v
> 1.1.3.1 btw) is located in the folder as both the source page and the page
> retrieved.
>
> Does this answer your question?
>
> -Kevin
>
>
> --
> Date: Wed, 29 Aug 2007 10:52:16 -0700
> From: [EMAIL PROTECTED]
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: AJAX GetElementByID problem
>
> Where is the jQuery?
>
> Glen
>
> On 8/29/07, *Kevin* <[EMAIL PROTECTED]> wrote:
>
>
> Hi All,
>
> I'm trying to use an ajax call to call a 2nd page which uses a
> getElementByID to set a div's content on that page.  If I just try to
> call the 2nd page, I get a js error that I can't run the
> getElementByID because it has no properties.  If I change the 2nd page
> to be a callback function and call that via the callback function of
> jquery it works fine, so it sounds like an order of operations problem
> here.  Is there anyway to allow getElementByIDs without forcing them
> in a callback function?
>
> Here is my ajax call:
> 
> 
> document.getElementById("destDiv1").innerHTML = "
align=\"center > \">\"Loading...\"
"; > $.ajax({ > url: 'j1.html?a=' + Math.random(), > type: 'GET', dataType: 'html', timeout: 6, > error: function(a,b,c){ > document.getElementById ("destDiv1").innerHTML = > 'Error loading > channel' + a + "|" + b + "|" + c; > }, > success: function(thehtml){ > // do something with HTML > document.getElementById("destDiv1").innerHTML = > thehtml; > } > }); > > > > Now the page to be loaded: > > > > alert("hi"); > document.getElementById("blah1").innerHTML = "hi"; > > > This throws the error: TypeError: document.getElementById("blah1") has > no properties > > Any ideas? > > Thanks! > > -Kevin > > > > -- > Explore the seven wonders of the world Learn > more! >

[jQuery] Re: What can add an effect to this rotate?

2007-08-31 Thread Mike Alsup

> I was curious, is there anything jQuery has available that can take this
> single image rotater and add an effect to it? Something that slowly fades in
> the next photo? An example of what I'm trying to apply this on is
> http://devel.phpgeek.org.

The Cycle Plugin can do that, as can InnerFade and others.

http://malsup.com/jquery/cycle/


[jQuery] JCarousel not auto-starting

2007-08-31 Thread Michael Price


Hi all,
I've got a list of about 13 images which I want to scroll horizontally 
using Jan's excellent jCarousel. I want it to auto-scroll three at a 
time, same as the example on his site:


http://sorgalla.com/projects/jcarousel/examples/static_auto.html

However, when I set up my list and use it's ID to jCarousel, like the 
one in the example:


$("#myListID").jcarousel({
auto: 3,
wrap: "last"
});

It doesn't move automatically. If I allow the buttons to remain in place 
then I can use those to scroll left and right, but never automatically.


This is on a site using jQuery 1.1.3.1 and I've tried it with the script 
included in the jC download. Any suggestions?


The site in question is still under development so I can't show where it 
is, unfortunately. If I had more time I'd put a small testcase together 
but alas, I'm running a little short on that commodity at the mo.


Thanks for any help offered!

Regards,
Michael Price



[jQuery] What can add an effect to this rotate?

2007-08-31 Thread Steve Finkelstein
Hi all,

I was curious, is there anything jQuery has available that can take this
single image rotater and add an effect to it? Something that slowly fades in
the next photo? An example of what I'm trying to apply this on is
http://devel.phpgeek.org.

If someone can point out what I can reference or read in documentation for
this, that'd be great.

Thanks!

- sf


[jQuery] Re: Is there checkbox/radio image plugin?

2007-08-31 Thread cfdvlpr

I'd be interested in this as well.



[jQuery] Is there checkbox/radio image plugin?

2007-08-31 Thread Sergei

Hello,

Is there any checkbox/radio image replacement plugin for jQuery?

Like on this page:
http://mootools.net/download

Thank you.



[jQuery] [NEWS] Cool Refrigerator Magnet Demo

2007-08-31 Thread Rey Bango


Ben Nadel has come up with a VERY cool demo to simulate a refrigerator 
magnet using ColdFusion for dynamic image generation and jQuery for DnD. 
Whether you're into ColdFusion or not, its definitely worth a look and 
can certainly be migrated to other server-side languages that support 
some form of dynamic image generation.


Be sure to check it out:

http://www.bennadel.com/blog/935-jQuery-ColdFusion-8-Erotic-And-Magnetic-Poetry.htm

Rey../



[jQuery] Re: Looking for a calendar picker that allows for two instances on one page

2007-08-31 Thread Andy Matthews
Right, but I need it conjunction with being able to click on a day and have
it be selected.

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Felix Geisendörfer
Sent: Thursday, August 30, 2007 5:10 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Looking for a calendar picker that allows for two
instances on one page



I saw that, but I want to actually display the calendar itself, not just on
popup, but fully displayed.

AFAIK kevin's plugin is capable to do this. See:
http://kelvinluck.com/assets/jquery/datePicker/v2/demo/renderCalendar.html

-- Felix

--
My Blog: http://www.thinkingphp.org
My Business: http://www.fg-webdesign.de 


Andy Matthews wrote: 

I saw that, but I want to actually display the calendar itself, not just on
popup, but fully displayed.

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Ezell
Sent: Thursday, August 30, 2007 4:40 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Looking for a calendar picker that allows for two
instances on one page


Andy, 
I've used datePicker[1] from Kelvin Luck to do multiple date fields on the
same page. I am still using v1 (because I am too lazy to update it and test
the new v2), but I'm sure v2 would work fine for you. 

There are some cool things being done with time and date pickers that work
nicely if you need time.

[1]  http://kelvinluck.com/assets/jquery/datePicker

/alex


On 8/30/07, Andy Matthews <[EMAIL PROTECTED]> wrote: 

I'm working on an app which allows users to search against data in our db
using a date range (start, end).
 
What I need is a calendar which allows a user to select both dates, then
click submit. So I need a calendar which allows for two instances of itself
on one page. 
 
I'm looking at jCalendar: http://tedserbinski.com/jcalendar/index.html which
looks really great. But does anyone know if there's a better one?
 


 
Andy Matthews
Senior ColdFusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com  
 


 

<>

[jQuery] Re: Running a Function After All other Javascript is Loaded

2007-08-31 Thread duma


What other code are you wating for?  If you're waiting for a certain bit of
code, just call them both from the same place, and you can control the order
right there.

Sean


cfdvlpr wrote:
> 
> 
> Here's what I am doing currently:
> setTimeout("expandMenuUsingCookie()",550);
> 
> But, I'm sure there is a better way than that.  Can anyone share a
> better way to run code last?
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Running-a-Function-After-All-other-Javascript-is-Loaded-tf4356266s15494.html#a12426228
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: next() problems

2007-08-31 Thread duma


Actually, since next() takes a selector as an argument, you can use next().

Just do something like the following:

jQuery("div.faq h4").click(function() {
  jQuery(this).next("#WhateverClass").addClass("top");
});

Sean


Karl Swedberg-2 wrote:
> 
> The .next() method will only select the very next sibling. If you  
> have other siblings in between the two h4s, you'll need to use a  
> different selector.
> 
> You could try this instead:
> 
> jQuery('div.faq h4').click(function() {
>jQuery('~ h4:first', this).addClass('top');
> });
> 
> That'll find the first sibling h4 that follows the clicked h4.
> 
> --Karl
> _
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
> 
> 
> 
> On Aug 30, 2007, at 8:03 PM, Josh Nathanson wrote:
> 
>>
>> Next() will only get siblings -- can you post the html?
>>
>> -- Josh
>>
>> - Original Message - From: "ruperdupe" <[EMAIL PROTECTED]>
>> To: "jQuery (English)" 
>> Sent: Thursday, August 30, 2007 11:36 AM
>> Subject: [jQuery] next() problems
>>
>>
>>> What I'm trying to do is when someone clicks on a h4 heading the next
>>> one has a class (top) added to it. In between each heading there are
>>> other elements. The h4s are inside a div called 'faq'.
>>> So far I've tried:
>>> jQuery('div.faq h4').click(function() {
>>> jQuery(this).next().addClass('top');
>>> });
>>> And:
>>> jQuery('div.faq h4').click(function() {
>>> jQuery(this).next('h4').addClass('top');
>>> });
>>> Neither works and I can't figure out why? If anyone could help, that
>>> would be great!
>>> (I'm using jQuery instead of $ because I'm using Prototype as well)
>>>
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/next%28%29-problems-tf4357523s15494.html#a12426258
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: SITE: Kohls.com

2007-08-31 Thread Andy Matthews

Doh...JSP execution failed on the homepage. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Quin Hoxie
Sent: Friday, August 31, 2007 1:53 AM
To: jQuery (English)
Subject: [jQuery] SITE: Kohls.com


Just saw that kohls was using jquery on their site, and by using I mean
including it.  I could not actually see them using it anywhere, though I
probably just could not find it.  Anyway, there are plenty of places where
they should have used it to simplify things.

http://www.kohls.com/upgrade/myaccount/kohls_login.jsp




[jQuery] Re: Problems with IE after a jquery load

2007-08-31 Thread danzinger


Hi

Im sorry for not warning about the resize issue, (ive deleted that part of
code ;P)

So if i have 

[jQuery] Re: Best of both jquery validate and jqueryyav

2007-08-31 Thread SeViR


Olivier Percebois-Garve escribió:

Hi

So far I have been able to make custom error boxes with the following 
code:

  $(".error").each(function(i, n){
$formElement = $(n).next('input, 
select');

$offset = $formElement.offset();
$left = 
$offset.left+$formElement.width()+$formElement.parent().next(".error_exclamation_mark").width();

$top = $offset.top;
$(n).wrap("clearfix\">");
$(n).before('class=\"errorBoxTitle\">Error');   
$formElement.after('class=\"error_exclamation_mark\">');  
$formElement.wrap('class=\"errorFormElement">');   
  

$(n).parent(".errorBox").css('position', 'absolute').css('left', 
$left).css('top', $top);

  });

Open issues with that are :
- the code is being runned each time I hit the submit button, so the 
error boxes are are duplicated.

 I dont know how to make it run just once.
-my dimension code get some positions wrong, I cant tell where it 
comes from.


jQuery.YAV remove automatically before the next validation the old error 
tags, but you wrap the errors
inside an another DIV (errorBox) so this is not removed. Analizing your 
code, I think that you are trying

something like this example, maybe?:

The rules sets:
NAME: required
HOTMAIL: implies pre-condition if checked then HOTMAIL ACCOUNT must pass 
the regexp expression.


I don't need move the error messages into absolute position. The 
messages are removed in each validation
without duplication problems, I can set the exclamation mark and the 
errorBoxTittle and the more important,
I don't need wrap any input element into to another DIV for to change 
the CSS of the field on error.


http://projects.sevir.org/storage/yav/moreimpliesexample.html

The JS code:
   $(document).ready(function(){
   $("#myform").yav({
   errorPositon: "before",
   errorTag: "div",
   errorClass: "errorBox",
   onError: function(){
   $(".errorBox").each(function(){
   $(this).html(
   'ERROR' +
   ''+$(this).html()+''
   );
   });
   return false;
   }
   },{
   inputclasserror: "errorFormElement"
   });
   });



But that is peanuts compared to the pain of getting the "implies" 
rules to work.

I just broke my head on that the whole afternoon and feel very frustrated.

The rules syntax seem easier on the yav website.

Sevir, you may want to add examples on your website.
If I can give some constructive critics:
-The code in the "alt" attribute may be indented. its just too long to 
read.
-Each example should have only one specific thing: for instance 
http://projects.sevir.org/storage/yav/relationships.html

 that page demonstrates a relation + a custom rule.



Ok, I will see that, thanks for your suggestions.

Ok, that's what I can say for now, my brain is smoking ;-(

-Olivier



--
Best Regards,
José Francisco Rives Lirola 

SeViR CW · Computer Design
http://www.sevir.org
 
Murcia - Spain




[jQuery] [ANNOUNCE] New Simple Array manager plugin

2007-08-31 Thread Tane Piper

Today, I've released a small bit of code that I have been working
with.  I needed an easy way to track my arrays, and be able to pop and
push data in to them, so i created the jQuery simple array manager:

http://digitalspaghetti.me.uk/index.php?q=node/31

To use the manager, you first need to create your 2D array:

var myArray = $().arrayMan({width: 6, height: 6});

You can then pop data into any x/y position within the array:

$().arrayPush(myArray, 'This is the data I want to insert', {x:0, y6});

To display this data, I can then easily assign it to a variable for example:

var mydata = $().arrayPop(myArray, {x:0, y:6});

The plugin should be easily expendable to support more dimensions in
arrays, but for my needs I only needed a 2D array.  Hope someone finds
this code useful.

-- 
Tane Piper
http://digitalspaghetti.me.uk

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


[jQuery] Re: Running a Function After All other Javascript is Loaded

2007-08-31 Thread Flesler

What about using jQuery.ready event but put the script right before
the end of the body, that should be in the end of the queue of
jQuery.readyList... just a quick thought

On Aug 30, 4:01 pm, cfdvlpr <[EMAIL PROTECTED]> wrote:
> Here's what I am doing currently:
> setTimeout("expandMenuUsingCookie()",550);
>
> But, I'm sure there is a better way than that.  Can anyone share a
> better way to run code last?



[jQuery] Posted varilbes

2007-08-31 Thread mohsin

I have a page with a form, when I post the form I want a jquery on the
target page to read POST variables.



[jQuery] Re: Access Contents of iFrame/TinyMCE?

2007-08-31 Thread Flesler

I think you can.. you can get to the document of the iframe, this way:
  var iframe = document.getElementById('myframe');// or $('#myframe')
[0]; the other is just faster.
  var doc = iframe.document || iframe.contentDocument ||
iframe.contentWindow && iframe.contentWindow.document || null;
   if( !doc ) return;
   //and now jquery
   $( selector, doc ).

If I'm not mistaken, that should do the job, might not work in some
browser but it does in most.



[jQuery] Re: Running a Function After All other Javascript is Loaded

2007-08-31 Thread Flesler

What about using jQuery.ready event but put the script right before
the end of the body, that should be in the end of the queue of
jQuery.readyList... just a quick thought

On Aug 30, 4:01 pm, cfdvlpr <[EMAIL PROTECTED]> wrote:
> Here's what I am doing currently:
> setTimeout("expandMenuUsingCookie()",550);
>
> But, I'm sure there is a better way than that.  Can anyone share a
> better way to run code last?



[jQuery] jquery 1.1.3.1 to 1.1.4 $(document).ready issue

2007-08-31 Thread bigmammoth

oky I have a strange error related to $(document).ready upgrading to
1.1.4 from 1.1.3.1
mdale: in 1.1.3.1 this works:  ie "document ready" is printed
http://pastie.caboo.se/92588
but in 1.1.4 http://pastie.caboo.se/92595 fails to print "document
ready"

thanks,
michael



[jQuery] Re: What's wrong with my coding?

2007-08-31 Thread Joe L

Cool, Thanks Klaus, It works perfectly!



[jQuery] Re: Access Contents of iFrame/TinyMCE?

2007-08-31 Thread Flesler

I think you can.. you can get to the document of the iframe, this way:
  var iframe = document.getElementById('myframe');// or $('#myframe')
[0]; the other is just faster.
  var doc = iframe.document || iframe.contentDocument ||
iframe.contentWindow && iframe.contentWindow.document || null;
   if( !doc ) return;
   //and now jquery
   $( selector, doc ).

If I'm not mistaken, that should do the job, might not work in some
browser but it does in most.


On Aug 29, 11:41 pm, "Andre Behrens" <[EMAIL PROTECTED]> wrote:
> Is there any way to have a look at the contents of an iFrame with
> jQuery? My assumption is "no".
>
> Alternatively, anyone know how I can add jQuery etc. to a TinyMCE
> editor iFrame? Some recreational googling has yet to bear fruit.
>
> Basically, I've been asked to add some magical juju to images in the
> editors, and jQuery seems the straightest path, but getting to the
> content of an editor is proving tricky. It seems to nuke script tags,
> which strikes me as a Good Idea, though frustrating to my efforts.
> Anyone know anything?
>
> Thanks!
>
> -andre



[jQuery] Re: Access Contents of iFrame/TinyMCE?

2007-08-31 Thread Flesler

I think you can.. you can get to the document of the iframe, this way:
  var iframe = document.getElementById('myframe');// or $('#myframe')
[0]; the other is just faster.
  var doc = iframe.document || iframe.contentDocument ||
iframe.contentWindow && iframe.contentWindow.document || null;
   if( !doc ) return;
   //and now jquery
   $( selector, doc ).

If I'm not mistaken, that should do the job, might not work in some
browser but it does in most.

On Aug 29, 11:41 pm, "Andre Behrens" <[EMAIL PROTECTED]> wrote:
> Is there any way to have a look at the contents of an iFrame with
> jQuery? My assumption is "no".
>
> Alternatively, anyone know how I can add jQuery etc. to a TinyMCE
> editor iFrame? Some recreational googling has yet to bear fruit.
>
> Basically, I've been asked to add some magical juju to images in the
> editors, and jQuery seems the straightest path, but getting to the
> content of an editor is proving tricky. It seems to nuke script tags,
> which strikes me as a Good Idea, though frustrating to my efforts.
> Anyone know anything?
>
> Thanks!
>
> -andre



[jQuery] New css framework with helper tool ( a website builder made with jquery)

2007-08-31 Thread Armand Datema

Just ran into this one, nice idea but whats cooler, the entire thing
is build in jquery

http://builder.yaml.de/

-- 
Armand Datema
CTO SchwingSoft


[jQuery] Re: AJAX GetElementByID problem

2007-08-31 Thread Pops

Kevin, I am not sure why you get this property error, but I believe
that the blah1 script will not be evaluated when you go native with
getElementById().

Atleast not here when I did a quick emulated test of your code.
However, changing it to:

 $("#destDiv1").html(thehtml);

worked perfectly, with blah1 script doing the alert and the adding
text to the blah1  container.

--
HLS

Kevin wrote:
> Hi All,
>
> I'm trying to use an ajax call to call a 2nd page which uses a
> getElementByID to set a div's content on that page.  If I just try to
> call the 2nd page, I get a js error that I can't run the
> getElementByID because it has no properties.  If I change the 2nd page
> to be a callback function and call that via the callback function of
> jquery it works fine, so it sounds like an order of operations problem
> here.  Is there anyway to allow getElementByIDs without forcing them
> in a callback function?
>
> Here is my ajax call:
> 
>   
>   document.getElementById("destDiv1").innerHTML = "
\">\"Loading...\"
"; > $.ajax({ > url: 'j1.html?a=' + Math.random(), > type: 'GET', dataType: 'html', timeout: 6, > error: function(a,b,c){ > document.getElementById("destDiv1").innerHTML = 'Error > loading > channel' + a + "|" + b + "|" + c; > }, > success: function(thehtml){ > // do something with HTML > document.getElementById("destDiv1").innerHTML = thehtml; > } > }); > > > > Now the page to be loaded: > > > > alert("hi"); > document.getElementById("blah1").innerHTML = "hi"; > > > This throws the error: TypeError: document.getElementById("blah1") has > no properties > > Any ideas? > > Thanks! > > -Kevin

[jQuery] Re: Some jQuery Questions

2007-08-31 Thread Klaus Hartl


Pops wrote:

Now that getting a handle on the JS/jQuery language, I have these
basic questions

1)  For an JSON object, how do you get the key name?

Example

var json = {field1: "data2", field2: "data2"};

I know how to get the data, but how do you get the field names? IOW, I
want to get the names of the keys.

Is there a method that traverses the JSON and returns key/value?

Do I need regex() or is there a more direct method?


I'm going to answer the first question (low hanging fruit)...

Yes, there is a direct method, just use a for loop:

for (var key in json) {
console.log(key); // key
console.log(json[key]); // value
}

http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Statements:for...in

Maybe I didn't get the question right?


--Klaus


[jQuery] Re: accessing html() attributes inside an event

2007-08-31 Thread Alexandre Plennevaux

Why not this?

 $('[EMAIL PROTECTED]').click(function(e){
alert($(this).html());
});

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of james_027
Sent: vendredi 31 août 2007 9:56
To: jQuery (English)
Subject: [jQuery] accessing html() attributes inside an event


hi,

I would like to do something like this ...

$('[EMAIL PROTECTED]').click(function(e){
alert(e.target.html());
});

but it's not working ...

can I avoid this ... $('[EMAIL PROTECTED]'+e.target.id+']').html()

Thanks
james

Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.484 / Base de données virus: 269.13.0/980 - Date: 30/08/2007
18:05
 



[jQuery] Some jQuery Questions

2007-08-31 Thread Pops

Now that getting a handle on the JS/jQuery language, I have these
basic questions

1)  For an JSON object, how do you get the key name?

Example

var json = {field1: "data2", field2: "data2"};

I know how to get the data, but how do you get the field names? IOW, I
want to get the names of the keys.

Is there a method that traverses the JSON and returns key/value?

Do I need regex() or is there a more direct method?

2)  Best way to create a toJSON() string or object.

I didn't see a direct way to do this, if not, is this best way:

   // Create JSON from form input id="wc*" fields

   $jj = $('[EMAIL PROTECTED]').get();
   json = {};
   try {
  for (var j=0; j <$jj.length; j++) {
 json[$jj[j].getAttribute("name")] = $jj[j].value;
  }
   } catch(e) {
 alert("EXCEPTION:\n\n"+e);
 return false;
   }

TIA

--
HLS



[jQuery] Memory leak?

2007-08-31 Thread oscar esp

I have a strange behaviour (jQuery 1.1.3 /1.1.2).

I have a screen with a lot of ajax call. That works fine in local test
environment (same machine server-client) or when the net is quick.

However I when I put it in our intranet there are a machine (win2000
ie6) that some times have memory leaks. I have checked the cpu and is
not at 100%.  I check time consumption for the server calls and this
machine (I suppose that we have some net problem) is very slow.

I don't know how afford this issue in order to investigate. It seems
that the problem is related with the net (then ajax call are very
slow)... because in other PC doesn't happen. But maybe is something
related with cpu machine or OS or IE version.

Any clue to begin to investigate?



[jQuery] accessing html() attributes inside an event

2007-08-31 Thread james_027

hi,

I would like to do something like this ...

$('[EMAIL PROTECTED]').click(function(e){
alert(e.target.html());
});

but it's not working ...

can I avoid this ... $('[EMAIL PROTECTED]'+e.target.id+']').html()

Thanks
james



[jQuery] Re: jdmenu and css issue?

2007-08-31 Thread Joel Birch
On 8/31/07, Eridius <[EMAIL PROTECTED]> wrote:
>
>
>
> it seems to be the image cuase when i put image under one  there is a
> space
> on the bottom, what the hell could be cuasing this?


Hi Eridius,

That is because the default display property for img tags is 'inline'. If
you apply display:block to the img the space will disappear.

img { display:block; }

Joel Birch.


[jQuery] Re: Best of both jquery validate and jqueryyav

2007-08-31 Thread SeViR


Jörn Zaefferer escribió:


Olivier Percebois-Garve schrieb:

Will "implies" be integrated anytime soon in validate ?


Could someone please explain how implies works like? I looked at the 
examples of YAV, but apart from the notion of dependencies I could 
figure out how it works. I'd be happy to integrate a similar feature 
into the validation plugin, once I understand what it does. Maybe its 
already possible and just not documented.


-- Jörn

This is a simple example of YAV implies 
http://yav.sourceforge.net/en/learnbyexample.html

but more complexes rules can be set with YAV (or jQuery.YAV) by example:

A: checkbox
B: textbox
C: selectbox

The rule:
(A=checked AND B='myself') IMPLIES (C='Freelance')

But you can set this before rule in another rule:
D: the before rule
E: textbox

The 2nd rule:
D is passed IMPLIES E='I work alone'

That I see, Validation plugin only can do this requirements using custom 
functions.


--
Best Regards,
José Francisco Rives Lirola 

SeViR CW · Computer Design
http://www.sevir.org
 
Murcia - Spain