[jQuery] Re: passing 0 to html() doesn't work like it does for other numbers

2008-06-17 Thread Morgan Allen
I have noticed another really strange bug(?) here, numbers with a leading
zero come out wrong. like 0123 ends up as 83. Stranger yet, 18 is 18, 19 is
19 but 20 is 16? But it does not appear to be jQuery.

On Mon, Jun 16, 2008 at 8:57 PM, Morgan Allen <[EMAIL PROTECTED]>
wrote:

> This has to do with the way JS evaluates true and false with 0. !0 == true.
> The simple fix is passing String(0), line 964 (in current svn) is the
> problem, if(!elem) return, change that to if(!elem && elem !== 0) return. I
> will check for a bug report and submit a patch.
>
>
> On Mon, Jun 16, 2008 at 5:02 PM, Lowell <[EMAIL PROTECTED]> wrote:
>
>>
>> When I call html(5) it will set the innerHtml of my element(s) to "5".
>> However, zero seems to work differently. When I call html(0), it
>> removes the contents of my element(s) and does not append anything. I
>> had hoped after a call to html(0), that html() would return "0".
>>
>> Is this the expected behavior, or is this a bug?
>>
>> Thanks,
>> Lowell
>>
>
>
>
> --
> http://morglog.alleycatracing.com
> Lets make up more accronyms!
>
> http://www.alleycatracing.com
> LTABOTIIOFR! ROFL! ROFL! ROFL!
> Upcoming alley cats, reviews, touring logs, and a general congregation of
> bike nerdity.




-- 
http://morglog.alleycatracing.com
Lets make up more accronyms!

http://www.alleycatracing.com
LTABOTIIOFR! ROFL! ROFL! ROFL!
Upcoming alley cats, reviews, touring logs, and a general congregation of
bike nerdity.


[jQuery] Re: passing 0 to html() doesn't work like it does for other numbers

2008-06-17 Thread Morgan Allen
This has to do with the way JS evaluates true and false with 0. !0 == true.
The simple fix is passing String(0), line 964 (in current svn) is the
problem, if(!elem) return, change that to if(!elem && elem !== 0) return. I
will check for a bug report and submit a patch.

On Mon, Jun 16, 2008 at 5:02 PM, Lowell <[EMAIL PROTECTED]> wrote:

>
> When I call html(5) it will set the innerHtml of my element(s) to "5".
> However, zero seems to work differently. When I call html(0), it
> removes the contents of my element(s) and does not append anything. I
> had hoped after a call to html(0), that html() would return "0".
>
> Is this the expected behavior, or is this a bug?
>
> Thanks,
> Lowell
>



-- 
http://morglog.alleycatracing.com
Lets make up more accronyms!

http://www.alleycatracing.com
LTABOTIIOFR! ROFL! ROFL! ROFL!
Upcoming alley cats, reviews, touring logs, and a general congregation of
bike nerdity.


[jQuery] Re: jQuery allow encoding into json?

2008-06-05 Thread Morgan Allen
*http://mg.to/2006/01/25/json-for-jquery
http://www.mail-archive.com/[EMAIL PROTECTED]/msg06247.html
the second is a port of the original from json.org, I use that for my JSON
requests.
*
On Thu, Jun 5, 2008 at 5:15 PM, Mark <[EMAIL PROTECTED]> wrote:

>
> could not find a function for it.
>
> Will be creating a complicated js object on client side.  Want to
> encode that object into json, and stuff the value into a hidden form
> field for POST.
>
> anybody help a nubie?
>



-- 
http://morglog.alleycatracing.com
Lets make up more accronyms!

http://www.alleycatracing.com
LTABOTIIOFR! ROFL! ROFL! ROFL!
Upcoming alley cats, reviews, touring logs, and a general congregation of
bike nerdity.


[jQuery] Re: firebugExecuteCommand and $ becoming a function called "anonymous"

2008-06-04 Thread Morgan Allen
I was having that problem too, but I think upgrading to 1.2b1 fixed it.

On Wed, Jun 4, 2008 at 10:00 AM, Peter Bengtsson <[EMAIL PROTECTED]> wrote:

>
> My site stopped working because $ is no longer an alias for jQuery.
> Instead it's this function:
>
> function anonymous() { return window.console.notifyFirebug(arguments,
> "$", "firebugExecuteCommand"); }
>
> I suspect that my Firebug (version 1.2.0a21X) has incorrectly set
> itself as an alias for $. Does anybody know about this in the jQuery
> community? My next destination is to go over to Firebug website and
> lurk.
>



-- 
http://morglog.alleycatracing.com
Lets make up more accronyms!

http://www.alleycatracing.com
LTABOTIIOFR! ROFL! ROFL! ROFL!
Upcoming alley cats, reviews, touring logs, and a general congregation of
bike nerdity.


[jQuery] Re: filenames cannot contain spaces in jquery 1.2.5

2008-05-24 Thread Morgan Allen
This has to do with loading a specific element from the results. The url
will except (space separated) the url then a selector of an element(s) to be
be the replacement. This is useful for doing partial refreshed,
$('#toBeUpdate').load('thisUrl #toBeUpdated'). While this is a nice feature,
I am not sure putting anything but a url in the url paramater is the best
idea.
So wether this is a bug or not, I am not sure, but in the meaning you have
to encode the space like you are doing.

On Sat, May 24, 2008 at 12:21 PM, simjo <[EMAIL PROTECTED]> wrote:

>
> Hi, I recently started working with jquery 1.1.3.1.
> I made extensive use of the "load" function eg:
>
>$("#content").load($(this).attr("name"));
>
> After updating to 1.2.5 none of the load functions except for one
> worked any more.
> Searching the internet did not bring the solution and after trying to
> find the problem myself I found out that 1.2.5 does not like the
> spaces in the filenames of the files I tries to load.
> I solved it by changing the code to:
>
>var filename = $(this).attr("name");
>//replace spaces with %20 because the load function does not
> work when the filename contains spaces
>$("#content").load(filename.replace(/ /g,"%20"));
>
> Is this a bug in 1.2.5 or is this by design?
>



-- 
http://morglog.alleycatracing.com
Lets make up more accronyms!

http://www.alleycatracing.com
LTABOTIIOFR! ROFL! ROFL! ROFL!
Upcoming alley cats, reviews, touring logs, and a general congregation of
bike nerdity.


[jQuery] Re: [OT] twitter

2008-05-20 Thread Morgan Allen
Twitterfox works ok, I have not tried anything else

On Tue, May 20, 2008 at 12:48 PM, Alexandre Plennevaux <[EMAIL PROTECTED]>
wrote:

> hi friends,
>
> now that jquery uses twitter, i might give twitter a chance. Can you
> recommend a good way to use it? A twitter client? Which?
> i'm a bit afraid of the "distraction" it brings. but using it in my Greader
> is not very satisfactory. Any clue, welcomed !
>
>
> Thanks,
>
> --
> Alexandre Plennevaux
> LAb[au]
>
> http://www.lab-au.com




-- 
http://morglog.alleycatracing.com
Lets make up more accronyms!

http://www.alleycatracing.com
LTABOTIIOFR! ROFL! ROFL! ROFL!
Upcoming alley cats, reviews, touring logs, and a general congregation of
bike nerdity.


[jQuery] Re: Manipulating content generated after $(document).ready

2008-04-29 Thread Morgan Allen
Just add the .click to the .clone() chain.

On Tue, Apr 29, 2008 at 2:19 PM, Matt Henry <[EMAIL PROTECTED]> wrote:

>
> I'm wondering if it's possible to use jQuery to manipulate content
> that has been generated by jQuery after the page has loaded.
>
> Here's what I'm trying to accomplish: The user clicks a span in a long
> block of text, and that span is cloned, wrapped in list tags, and
> appended to a ul at the end of the document:
>
> //Add span to confirmation div at end of document
> $('span.data').click(function(){
>  var confirmList = $('div#confirmSelections ul');
>  $
> (this).clone().appendTo(confirmList).removeClass("highlight").wrap(" li>");
> })
>
> So far, so good. However, I'd like the user to also be able to click
> one of the cloned spans at the end and have that remove it from the
> list, which I figured ought to look something like this:
>
> //Hide span when clicked
> $('div#confirmSelections ul li span.data').click(function(){
>  $(this).hide();
> });
> //FAIL
>
> I've had no trouble manipulating the elements that are there at $
> (document).ready (e.g. the ul and the div containing it), but I can't
> do anything with the lis or spans that are generated by jQuery. What
> am I missing?
>
> Any help with this would be greatly appreciated. Thanks.
>



-- 
http://morglog.alleycatracing.com
Lets make up more accronyms!

http://www.alleycatracing.com
LTABOTIIOFR! ROFL! ROFL! ROFL!
Upcoming alley cats, reviews, touring logs, and a general congregation of
bike nerdity.


[jQuery] Re: Select multiple elements with "almost" same id

2008-04-18 Thread Morgan Allen
el[id^='quantity'] should do it for you. the ^= is starts with.

On Thu, Apr 17, 2008 at 3:30 PM, Zlochko <[EMAIL PROTECTED]> wrote:

>
> Hallo everyone. My name is Gjoko Pargo. I am a new member of this
> group, in fact - this is my first message here. I work mainly as a web
> applications developer and have extensive experience in php, asp,
> coldfusion, javascript and several types of databases.
> Although I do have some pretty good experience in JavaScript I still
> can't seem to get the grasp of some of the jQuery concepts. So I have
> two pretty basic questions which I was not able to find answers for.
>
> 1. In one of my projects, I am building a shopping cart. The product
> list quantity fields are made of input fields with id's consisted of a
> reserved word and product_id combination. They look something like
> this:
> 
> 
> For those with web application experience the name quantity with it's
> two square brackets gives the browser the ability to make a list of
> each entry in one associative array and send it to the browser on
> submit.
>
> My problem is - I need to select all of the form elements which have
> "quantity[something]" in their id and then apply some action to them.
> Could anyone please help me on how to achieve this? Is this done with
> regular expressions or is there some "native" jQuery way to do this?
>
> 2. On the same page where the product list is, there is also a
> shopping basket. What happens is that after the visitor populates the
> quantities of the desired products he/she hits on the submit button,
> and if everything is ok, the data is transfered to the server over
> ajax submit and then the contents of the shopping basket is changed in
> real time. Everything works ok, but I would like to add some eye
> candy...
> Namely, after submit, I want to fadeOut the shopping basket (or a
> specific element), and then do a fedeIn to make the shopping basket
> visible again with the new value. I was able to succeed in this, but
> unfortunately the fedeOut, changeOfQuantityValue and fadeIn are not
> synchronized. This means that depending on the speed of the connection
> the list starts to fade out, changes the item list values (while still
> visible), and then fades back in... or for slower connections: it
> fades out, fades in and then change the item list values.
> Any help with this?
>
> Thank you very much,
> Gjoko Pargo.
>



-- 
http://morglog.alleycatracing.com
Lets make up more accronyms!

http://www.alleycatracing.com
LTABOTIIOFR! ROFL! ROFL! ROFL!
Upcoming alley cats, reviews, touring logs, and a general congregation of
bike nerdity.


[jQuery] Re: searching for an element with particular value

2008-02-14 Thread Morgan Allen
'input[name*=file][value=' + val + ']:hidden'

On Thu, Feb 14, 2008 at 3:33 PM, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> How do I search the DIV, "myDiv" for a hidden input field whose name
> begins with the word "file" and whose value is equal to the value
> contained in the variable "myVar"?
>
> Thanks, - Dave
>



-- 
http://morglog.alleycatracing.com
Lets make up more accronyms!

http://www.alleycatracing.com
LTABOTIIOFR! ROFL! ROFL! ROFL!
Upcoming alley cats, reviews, touring logs, and a general congregation of
bike nerdity.


[jQuery] Re: Reverse Ajax in jQuery

2008-02-05 Thread Morgan Allen
You can check out the plugin I have been working on also. It uses the Bayeux
protocol to handle channeled communication with a cometd server.
http://plugins.jquery.com/project/Comet

On Feb 5, 2008 8:11 AM, Jamie <[EMAIL PROTECTED]> wrote:

>
> FYI, for anyone else who might want a solution for this..
>
> I ended up doing it using an alternate reverse ajax which closes the
> connection after an update is sent.
>
> On the first call, the client requests a long-executing call be
> started.  The server starts a thread to perform the request and
> returns an ID to identify the request.
>
> The client then updates the page UI and immediately requests an update
> from the server.  The server sits on the request (pauses the request
> thread) until new status information is available, at which point it
> sends the status back to the client (I use XML do to the
> infrastructure of my site, you could use JSON).  The client then
> updates the UI again.
>
> This repeats until the state received from the server indicates the
> call is complete.
>
> - Jamie
>
>
>
> On Jan 25, 8:47 am, Jamie <[EMAIL PROTECTED]> wrote:
> > Hey,
> >
> > Has anyone ever tried any reverse ajax solution using jQuery?  I have
> > a slow-loading ajax call and would like the server to send back status
> > updates through the open HTML connection.  Does anyone know how I
> > could gain access to the server response data as in comes in, rather
> > than at the completion of the ajax call?
> >
> > Thanks!
> > Jamie Goodfellow
>



-- 
http://morglog.alleycatracing.com
Lets make up more accronyms!

http://www.alleycatracing.com
LTABOTIIOFR! ROFL! ROFL! ROFL!
Upcoming alley cats, reviews, touring logs, and a general congregation of
bike nerdity.


[jQuery] Re: [ANN] Lily, javascript visual programming tool

2008-01-30 Thread Morgan Allen
The minVersion in the install.rdf is 2.0.0 I changed to 2.0.0.* and it
installed

On Jan 29, 2008 9:33 PM, Bill Orcutt <[EMAIL PROTECTED]> wrote:

>
> Thanks for the useful feedback on the site. I've added another
> download link and will implement some of the other suggestions as I
> find time. I hope once you've had a chance to have a look at the
> program, you'll consider joining the user group-
> http://groups.google.com/group/lily-users.
>
> -Bill
>
> On Jan 29, 4:19 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> > Jörn Zaefferer schrieb:
> >
> > >BillOrcuttschrieb:
> > >> [...]
> > >> Have a look at the demo applications below to get a feel for some of
> > >> what Lily can do:
> > >> [...]
> > >> More information about Lily is available on the website:
> > >>http://www.lilyapp.org/
> >
> > > Wow. Thats amazing stuff, I love the svg/javascript sound demos. Using
> > > interactive visuals to create music is so much fun.
> >
> > > Now I just need to take a closer look how Lily enbales stuff like
> > > that, so most likey more feedback coming soon from here.
> >
> > Okay, some things:
> > You need a Getting Started section and make that awfully obvious to find
> > on the lilapp.org front page. Currently its difficult to find the
> > download or even the wiki (which doesn't help in that respect).
> > Along the link to the download should be the content of the readme file,
> > avoid the need to download the package before being able to understand
> > what and how to install.
> > I found the download link only on the Public Beta 1 release post, which
> > isn't even on the front page anymore.
> > I also wonder if that couldn't be installed directly from the page - its
> > just a firefox extension, isn't it? That way I wouldn't need to save
> > anything on my disk and unpacking it. The included examples and demos
> > could be provided via the page/wiki.
> >
> > Ah. After writing all that I discovered the top navigation bar,
> > including the download link. You may want to make that a bit more
> obvious...
> >
> > Jörn
>



-- 
http://morglog.alleycatracing.com
Lets make up more accronyms!

http://www.alleycatracing.com
LTABOTIIOFR! ROFL! ROFL! ROFL!
Upcoming alley cats, reviews, touring logs, and a general congregation of
bike nerdity.


[jQuery] Re: [ANN] Lily, javascript visual programming tool

2008-01-29 Thread Morgan Allen
Could not agree more Jörn, every link I click seemed to be sending me in
circles. Luckily this app looked really cool, otherwise I would have said
f-it in half the time it took me find the download. And I still have not
found on the site where is says what version of firefox this is meant for.
Apparently not 2.0.0.9.

On Jan 29, 2008 4:19 PM, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:

>
> Jörn Zaefferer schrieb:
> >
> > Bill Orcutt schrieb:
> >> [...]
> >> Have a look at the demo applications below to get a feel for some of
> >> what Lily can do:
> >> [...]
> >> More information about Lily is available on the website:
> >> http://www.lilyapp.org/
> >>
> > Wow. Thats amazing stuff, I love the svg/javascript sound demos. Using
> > interactive visuals to create music is so much fun.
> >
> > Now I just need to take a closer look how Lily enbales stuff like
> > that, so most likey more feedback coming soon from here.
> Okay, some things:
> You need a Getting Started section and make that awfully obvious to find
> on the lilapp.org front page. Currently its difficult to find the
> download or even the wiki (which doesn't help in that respect).
> Along the link to the download should be the content of the readme file,
> avoid the need to download the package before being able to understand
> what and how to install.
> I found the download link only on the Public Beta 1 release post, which
> isn't even on the front page anymore.
> I also wonder if that couldn't be installed directly from the page - its
> just a firefox extension, isn't it? That way I wouldn't need to save
> anything on my disk and unpacking it. The included examples and demos
> could be provided via the page/wiki.
>
> Ah. After writing all that I discovered the top navigation bar,
> including the download link. You may want to make that a bit more
> obvious...
>
> Jörn
>



-- 
http://morglog.alleycatracing.com
Lets make up more accronyms!

http://www.alleycatracing.com
LTABOTIIOFR! ROFL! ROFL! ROFL!
Upcoming alley cats, reviews, touring logs, and a general congregation of
bike nerdity.


[jQuery] Re: Loading dynamic JS libraries with jQuery

2008-01-15 Thread Morgan Allen
.getScript()?

On Jan 15, 2008 3:20 PM, Nazgulled <[EMAIL PROTECTED]> wrote:

>
> Hi,
> I'm trying to load JS files (libraries) dynamically at run-time with
> jQuery but I'm not being able to... I thought I had this working
> before but now it's not. Here's my code:
>
> INDEX.HTML
> 
> 
> 
> 
> 
> 
> 
> 
>
> GLOBAL.JS
> function loadJavascript(scriptFile) {
>var scriptsPath;
>
>// Builds the correct scripts path
>scriptsPath = $('script').attr('src');
>scriptsPath = scriptsPath.replace(/\w+\.js$/, '');
>
>// Creates the  element and appends it to the 
>$(document.createElement('script'))
>.attr('src',  scriptsPath + scriptFile + ".js")
>.attr('type', 'text/javascript')
>.appendTo('head');
> }
>
> $(document).ready(function() {
>// Dynamically loads a list of javascript files
>loadJavascript('jquery.form');
> }
>
> It should have created a