[jQuery] Re: AJAX and transforming proxies

2008-12-17 Thread Bil Corry

Tom Hume wrote on 12/17/2008 8:38 AM: 
 If the header was respected, would you consider it an appropriate
 mechanism to avoid problems with these proxies?

I believe that's the entire purpose of no-transform, to instruct the proxies to 
not transform the data:

http://www.freesoft.org/CIE/RFC/2068/169.htm


 If so I guess I'm wondering whether it'd be prudent to start asking
 AJAX library authors to include it.

AJAX library authors only have control over the request -- that is, requests 
from the client to the server.  Are there transforming proxies that mess with 
requests?  More likely they're only transforming responses from the server, in 
which case it's up to the server to add the header, not the AJAX library 
authors.

To have Apache automatically add the no-transform cache directive header, you'd 
do this (must have mod_headers enabled):

Header set Cache-Control no-transform


I personally do this:

#
# CONFIGURE media caching
#
  Header unset ETag
  FileETag None
  FilesMatch (?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css)$
  Header unset Last-Modified
  Header set Expires Fri, 21 Dec 2012 00:00:00 GMT
  Header set Cache-Control public no-transform
  /FilesMatch
#
#


That will cause the browser to cache all media (including CSS and JavaScript) 
until 2012, and includes the no-transform directive.


- Bil



[jQuery] Re: AJAX and transforming proxies

2008-12-17 Thread Bil Corry

Bil Corry wrote on 12/17/2008 10:07 AM: 
 To have Apache automatically add the no-transform cache directive header, 
 you'd do this (must have mod_headers enabled):
 
   Header set Cache-Control no-transform

Actually, you probably want to do this, to avoid removing already set headers:

Header append Cache-Control no-transform


- Bil



[jQuery] Re: Top 5 Movies of the Box Office Watch Online

2008-12-11 Thread Bil Corry

JQueryProgrammer wrote on 12/10/2008 11:26 PM: 
 Stop spamming the group with such posts. This is irrelevant here.

It's an automated bot, it won't read your reply.  It's better to just report 
either the message as spam via Google Groups, or in the case of a user that 
only posts spam, report the user:


http://groups.google.com/groups/profile?enc_user=LZeFYxUAAADJg96OOJouj4OBi2VW-6sY9h3i3SmjGmAJbX05nZ-8fQ

And I'm assuming the JQuery list owner(s) are also making use of ban feature 
to ban users that only post spam (via the Manage Users option at Google 
Groups).  If not, it's something to consider.


- Bil



[jQuery] Re: Cross domain Ajax without Proxy

2008-12-11 Thread Bil Corry

Roy M wrote on 12/10/2008 4:17 AM: 
 Is it possible to get remote contents if page is in another domain,
 without use of proxy?

I haven't used it, but you might be able to use this:

CSSHttpRequest (CHR) is a method for cross-domain AJAX using CSS for 
transport.
http://nb.io/hacks/csshttprequest/


- Bil



[jQuery] Re: Cross domain Ajax without Proxy

2008-12-11 Thread Bil Corry

ricardobeat wrote on 12/11/2008 7:06 PM: 
 Hi Bill, it seems that that technique doesn't work for FF3, so it's
 out, unfortunately.

It makes reference to an original prototype that does work with FF3, you can 
see it work here:

http://ydnar.typepad.com/css-rpc/css-rpc.html

Although it doesn't actually demonstrate loading anything cross-domain, so I'm 
not sure if that would work or not.


- Bil



[jQuery] Re: Top 5 Movies of the Box Office Watch Online

2008-12-11 Thread Bil Corry

Karl Swedberg wrote on 12/11/2008 3:51 PM: 
 On Dec 11, 2008, at 12:41 PM, Bil Corry wrote:

 And I'm assuming the JQuery list owner(s) are also making use of ban
 feature to ban users that only post spam (via the Manage Users option
 at Google Groups).  If not, it's something to consider.
 
 Yes, we are making use of the ban feature. Many, many times a day.
 (not sure whether to laugh or cry.)

I know, it's a losing battle.  Thank you for the effort.


- Bil




[jQuery] Re: IE z-index problems with superfish and jquery.cycle.plugin.

2008-12-04 Thread Bil Corry

elvisparsley wrote on 12/4/2008 1:00 AM: 
 I have images with jquery cycle under superfish.
 Dropdown submenu of superfish over the images goes behind the images.
 
 I put z-index: 100; for the superfish menu and it works with firefox
 but not with IE.

If bgiframe isn't fixing the issue, then read through these:

OverlappingAndZIndex
http://css-discuss.incutio.com/?page=OverlappingAndZIndex

Give Me Some Z’s
http://www.search-this.com/2007/08/15/give-me-some-zs/

Effect of z-index value to positioned elements
http://aplus.rs/lab/z-pos/index2.php



- Bil



[jQuery] Re: Any Fortune 500 using the Google Ajax Hosting?

2008-11-25 Thread Bil Corry

Bil Corry wrote on 9/9/2008 11:43 AM: 
 Google, on the other hand, doesn't use the Expires header, they instead
 use the Last-Modified header.  This means that instead of the browser
 just outright using the cached jQuery library, it first has to ask
 Google if the file has been modified for *every* page on your site that
 uses the jQuery library.  All of those unnecessary HTTP requests (one
 per page) add overhead and degrade performance.  So the irony here is
 that you will get BETTER performance for your users by hosting the
 jQuery library yourself and using the Expires header.

I revisited this and Google has switched to using the Expires header for the 
hosted JQuery library (and probably all the others as well).  Not sure who at 
Google made the change, but it's a huge improvement, thanks!


- Bil



[jQuery] Re: CSRF best practice

2008-11-24 Thread Bil Corry

Paul Hammant wrote on 11/23/2008 7:28 AM: 
 The article talks of prepending with {d: and suffixing with } if the
 root node is an array.  Is that the best strategy ?

The best strategy is to generate a unique token (nonce) when you create a 
session for the user and store that value in their session, then with every 
request that you want to protect, include the nonce with the request.  So it'd 
look like:

$.get(path/to/my/service?nonce=s8NPYG1Nhsy3GI0yFKju ...)

Then on the server, confirm the nonce passed in matches the nonce stored in the 
session before you return any data.  Since an attacker won't know the nonce 
value, it defeats the CSRF attempt.


- Bil



[jQuery] Re: setRequestHeader('Cache-Control', 'private') ... does not work in $.ajax call

2008-11-23 Thread Bil Corry

Mike Alsup wrote on 11/23/2008 5:38 PM: 
 Aside from that, I could implement server-side data caching that
 ignores the headers.
 
 I think if you implement server-side cache headers correctly you will
 no longer see the client headers you're trying to avoid.  Caching
 should be driven from the server.

That's what I thought too, but Firefox doesn't honor the Expires header.  Try 
the POST Enable Caching via Headers demo:

http://www.corry.biz/cachetest/

It clearly Expires in a day, which works in Firefox for GET, but not for POST.  
Same code works fine in IE7, content is cached for a day for both GET and POST.


- Bil



[jQuery] Re: setRequestHeader('Cache-Control', 'private') ... does not work in $.ajax call

2008-11-21 Thread Bil Corry

Mike Alsup wrote on 11/21/2008 7:27 PM: 
 Responses to this method are not cacheable, unless the response
 includes appropriate Cache-Control or Expires header fields.  What are
 your response headers?

Hmmm.  I created a new demo that uses $.ajax and includes both GET and POST:

http://www.corry.biz/cachetest/

For POST, Firefox 3 does send the following two headers:

Pragma: no-cache
Cache-Control: no-cache

And you can't override it in FireFox with SetRequestHeader().  This is 
interesting because the XHR spec says the browser shouldn't auto-send those 
headers, and it should allow our script to override those values: 

-
If the user agent implements a HTTP cache it should respect Cache-Control 
request headers set by the script (e.g., Cache-Control: no-cache bypasses the 
cache).

It must not send Cache-Control or Pragma request headers automatically unless 
the user explicitly requests such behavior (e.g., by (force-)reloading the 
page).

http://www.w3.org/TR/XMLHttpRequest/#send
-

Beyond that, my server ignores those request headers and sends new data every 
time the browser asks for it.  And as you can see in the cache tests, Firefox 
refuses to cache a POST, even when it receives headers directing it to cache 
the page contents (the same headers work successfully with GET).

In contrast, Internet Explorer 7 by default caches everything unless you tell 
it not to with response headers (or a random URL token).  It behaves 
identically for both GET and POST.


- Bil



[jQuery] Re: setRequestHeader('Cache-Control', 'private') ... does not work in $.ajax call

2008-11-20 Thread Bil Corry

frankadelic wrote on 11/20/2008 3:41 PM: 
 ...however, this does not work properly. Rather than replacing the
 header values, it appends them. For example:
 Cache-Control: no-cache, private

And you may find the behavior varies between browsers (some may append, others 
replace).  It was recently brought up on the W3 WebApps working group list as 
something that needs to be better specified:

http://lists.w3.org/Archives/Public/public-webapps/2008OctDec/0252.html

Related, there's this which talks about removing headers from XHR to conserve 
bandwidth:

http://blog.mibbit.com/?p=143



- Bil



[jQuery] Re: setRequestHeader('Cache-Control', 'private') ... does not work in $.ajax call

2008-11-20 Thread Bil Corry

frankadelic wrote on 11/20/2008 8:29 PM: 
 My original test was with Firefox 2.
 Just tried it in IE7. Same problem. In both cases, I can't get the web
 service to return a cached result.

I've never tried to control browser caching from setting headers in the 
browser, I've always used caching headers set via the server (which alert the 
browser to which pages to cache or not cache).

In the absence of cache headers from the server, browsers can choose the 
behavior they want, and FF chooses to not cache the page, and IE chooses to 
cache the page.

You can see the behavior of your own browser here:

http://www.corry.biz/iecache/

You'll see four buttons, clicking each one multiple times will perform multiple 
AJAX calls.  You can tell if the request is being cached if the returned time 
displed doesn't change.

The first button has no special headers from the server, the second one uses 
headers to prevent caching, the third one uses a dynamic param to prevent 
caching, and the last one uses headers to cache the page.


- Bil



[jQuery] Re: Issue with FF back button

2008-11-14 Thread Bil Corry

Aparajita wrote on 11/14/2008 5:36 AM: 
 Problem is when someone fills all fields and proceeds to the next page
 and want to edit something by pressing the back button, Firefox does
 not allow to resubmit the page. Its something like submit button has
 been disabled.

I experienced that problem too, where one day a simple form (no JS) that I've 
used for years suddenly couldn't be resubmitted if I hit the back button unless 
I reloaded the page.  I never did figure out the problem, but as mysteriously 
as it started, it recently stopped and it now works again.

I just did a quick search, and this may actually be the cause of my issue:

http://forums.mozillazine.org/viewtopic.php?t=612043

A recent upgrade of Firefox disabled the RealPlayer add-on (not compatible), so 
perhaps that was the fix...


- Bil



[jQuery] Re: Character encoding problem when using ajax .load

2008-11-12 Thread Bil Corry

James C wrote on 11/12/2008 9:58 AM: 
 I need to somehow keep the file as latin-1 but get jquery/javascript
 to understand it, either by encoding it as utf-8 (on the fly) or some
 other crazy means.

You need to specify the character set in the response header.


- Bil



[jQuery] Re: Cross domain with $.ajax(url : 'http://someWhereElse.aspx')

2008-11-12 Thread Bil Corry

John Ruffin wrote on 11/12/2008 11:21 PM: 
 What's the best practice for this remote domain call scenario?
 ($.getJson(), $.getScript(), etc...)

AFAIK, IE8 is the only browser currently that has a XS-XHR feature (XDR):


http://blogs.msdn.com/ie/archive/2008/06/23/securing-cross-site-xmlhttprequest.aspx

So you'll have to make the call to the same domain, and have the server do the 
remote call and echo back the results.  Presumably that's how this works:

http://www.ajax-cross-domain.com/


- Bil 




[jQuery] Re: Cross domain with $.ajax(url : 'http://someWhereElse.aspx')

2008-11-12 Thread Bil Corry

John Ruffin wrote on 11/12/2008 11:59 PM: 
 Bil, can you elaborate on your approach a bit?  Short example.

Sure, you mentioned you were trying to do this:

$.ajax( url : 'https://somedomain.com/secure/somefile.aspx')

Instead, you have to do this (assuming your site is mydomain.com):

$.ajax( url : 'https://mydomain.com/remotecall.aspx')

That will load a page off of your server, but you want it from the remote 
server.  So remotecall.aspx on your server then has to perform the request, get 
the result, and return it to the browser.  In other words, remotecall.aspx on 
your server is acting as a proxy to the remote server.

I'd give you some example code for ASP.NET, but I don't program in it.  Here's 
what it would look like in the server-side language I do use, which is Lasso:

content_body = 
include_url('https://somedomain.com/secure/somefile.aspx', 
-postParams=client_postParams, -getParams=client_getParams, 
-SendMIMEHeaders=client_headers);

What it's doing is setting the response to the browser being the response from 
the remote server, and it's proxying the GET, POST, and request headers to the 
remote server.  That's a simple example, in the real world, if you use HTTP 
Authentication or Cookies, or pass the session ID via a GET/POST param, then 
you'll want to filter out those headers/params before sending it on to the 
remote site to avoid leaking sensitive data.

The other tricky bit is if you're relying on the browser to already be logged 
into the remote site (either via a session cookie or HTTP Authentication) -- 
the user's browser will not send your site the cookie or Auth headers needed to 
authenticate to the remote server.  In that case, the user will have to provide 
you with their username and password for the remote site in order for your 
server to masquerade as them.  If you control the remote server, then you can 
code around this limitation.


- Bil



[jQuery] Re: problem with z-index and INPUT objects

2008-11-07 Thread Bil Corry

nmiddleweek wrote on 11/7/2008 1:25 PM: 
 Hello again :)
 
 I've put together a test page that shows a table grid with INPUT
 fields in each cell. When you click on a field, it shows a blue tab to
 the right. Click the tab and it hides the field and shows a green
 panel.
 
 I'm having problems on IE in that the blue tab sits underneath the
 adjacent INPUT field. On FF and Chrome this is fine and shows on top.
 
 Has anyone got any clues with where I've gone wrong?
 
 http://www.getdiverted.com/test/test.html

Maybe this will help:

http://plugins.jquery.com/project/bgiframe


Otherwise, try reading through these:

OverlappingAndZIndex
http://css-discuss.incutio.com/?page=OverlappingAndZIndex

Give Me Some Z’s
http://www.search-this.com/2007/08/15/give-me-some-zs/

Effect of z-index value to positioned elements
http://aplus.rs/lab/z-pos/index2.php



- Bil



[jQuery] Re: Can Jquery fetch file, and display download dialog?

2008-11-05 Thread Bil Corry

tlphipps wrote on 11/5/2008 8:45 AM: 
 The default action for handling .mp3 downloads is determined by the
 user's browser and you cannot change that from your end.  But you can
 create specific server-side headers that will instruct the browser to
 download the file as an 'attachment' instead of trying to simply open
 the document.
 
 The specific headers you need are:
 Content-Disposition: attachment; filename=01-01-08-PM.mp3

There are a couple of new header options recognized by IE8 that improve 
security for IE and tell it to force download.  They look like this:

Content-Type: audio/mpeg; authoritative=true;
X-Download-Options: noopen

You can read about authoritative=true; and X-Download-Options here:


http://blogs.msdn.com/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx


- Bil



[jQuery] Re: gzip

2008-10-29 Thread Bil Corry

dmlees wrote on 10/29/2008 8:56 PM: 
 My web hosting service said they think gzip compression is enabled.

You can check.  Load your javascript file directly, then use Firebug  Net to 
inspect the headers, or the Web Developer add-on for Firefox use the View 
Response Headers -- either way, if you see the header:

Content-Encoding: gzip

then it's being gzip'd.


 Does that mean that all my javascript files are being gzipped on the
 server in such a way that when they get to my browser, they are
 processed correctly? If so, then I don't have to do anything to reduce
 the size of jquery 1.2.6 min to get the benefit of smaller files to
 send over the net.

That's right, if the server is already gzipping your JavaScript files, then you 
don't have to do anything more than use the min version of jQuery and the gzip 
part is taken care of for you automatically.


- Bil



[jQuery] Re: JQuery SEO Question

2008-10-23 Thread Bil Corry

edzah wrote on 10/23/2008 6:56 AM: 
 I am creating a product page that has a jquery script that hides/
 unhides divs to show the currently select product. I've just realised
 that we have too many products to load them all on the same page.
 Instead I want to load the content of each div in when they are
 selected. That means that the pages I am loading from will not be
 spidered as they are javascript loads.
 
 Doing a bit of reading I noticed that some people were talking about
 putting an anchor tag in too.
 What do I do, just put a load of anchor tags at the bottom to all the
 content that will be loaded via jquery, with no anchor text or
 something. So that the anchor tags are there for the spider bot but
 not for the user.

One solution would be to wrap the anchors on the page in noscript so bots and 
those not using JavaScript can find the content.

Another would be to use CSS to { display: none } the anchors so that the 
anchors are still viewable to bots, but not to browsers.

Another would be to by default show anchors and not your content, then use 
javascript to hide the anchors and show the content.

Another would be to use Sitemaps and list the Sitemap in your robots.txt file:

http://www.sitemaps.org/protocol.php#submit_robots

There are probably other ways too.


- Bil



[jQuery] Re: Jquery load not getting updated pages.....

2008-10-21 Thread Bil Corry

Stever wrote on 10/21/2008 11:34 AM: 
 Apparently this file is saved in the cache, how do I make sure
 everytime I click on the tool button I get the latest page?

Via the headers, have the page expire in the past and set the cache-control 
headers to no-cache:

Expires: Thu, 11 Jun 1998 13:17:30 GMT
Cache-Control: no-store, no-cache, must-revalidate, no-transform, 
max-age=0, post-check=0, pre-check=0
Pragma: no-cache


Some people instead choose to make the URL dynamic by appending a random query 
string using the current milliseconds (or something similar).  I don't use that 
method, so maybe someone who does it that way can respond.


- Bil



[jQuery] Re: Jquery load not getting updated pages.....

2008-10-21 Thread Bil Corry

Stever wrote on 10/21/2008 6:33 PM: 
 How do I update the headers. Apparently this is done from the server 
 side.

It depends on your server-side language and web server.  Apache can set headers 
using mod_headers:

http://httpd.apache.org/docs/2.0/mod/mod_headers.html#header

Depending on your server-side language (Lasso, PHP, Python, Perl, etc) you'd 
have to look it up as it differs per language.



 I know you said I could add a random query statement to the URL in
 the load

You can do that instead of setting the headers.  Might be easier if you're 
unsure of how to set response headers.


- Bil



[jQuery] Re: minify + gzip??????? stupid question i know but please explain...

2008-10-15 Thread Bil Corry

Alex Weber wrote on 10/15/2008 6:58 AM: 
 or if i enable mod_deflate it takes care of the gzipping?

Mod_deflate:

http://httpd.apache.org/docs/2.0/mod/mod_deflate.html


And mod_expires to cache the files on the browser for some duration (1 year is 
good):

http://httpd.apache.org/docs/2.0/mod/mod_expires.html


- BIl



[jQuery] Re: Replacing special characters from Ajax - xml data

2008-10-15 Thread Bil Corry

You're searching for 'å' but most likely the garbage character isn't 'å' but 
instead transformed to something else in the current character set.  So you 
have to determine what each garbage character is (WireShark is good to see the 
actual byte values being transmitted), then replace it back to the appropriate 
character.  If the final page is in UTF-8, then any illegal character will be 
transformed into a special UTF-8 character.  You will not be able to reverse it 
in that case as you could have dozens of illegal characters and they're all now 
the UTF-8 invalid character.

- Bil


neXib wrote on 10/15/2008 2:16 AM: 
 Nobody have a clue? Tell me if I need to clarify.
 
 On Oct 14, 10:47 am, neXib [EMAIL PROTECTED] wrote:
 Hi,

 I've got a xml feed that I'm getting from an external url, it's in
 utf-8 format and loads fine (looks perfect if I just copy it into the
 local xml file). But the problem is that our way of getting this xml
 file which is something the company have coded earlier (old now) seems
 to encode it as something other than utf-8. So when I output the data
 special characters like our æøå (aring; and such) turns into garble.
 I can probably get this code of ours changed internally, but in the
 meantime it would be nice if I could replace these characters with
 jquery. I tried a jquery like below but nothing like aring; or hex
 values or anything shows the right character. Ideas?

 var $thirdLink = $(this).find('h5.media');
 var linkText = 
 $thirdLink.text().replace('å','aring;');
 $thirdLink.text(linkText);
 





[jQuery] Re: Pack or Min | Which is better for faster loading?

2008-10-14 Thread Bil Corry

Sridhar Kuppalli wrote on 10/14/2008 11:32 AM: 
 Which of these are better for faster loading?
 
 jquery-1.2.6.min.js(size-54kb)
 
 jquery-1.2.6.pack.js  (size-30kb)
 

The min version.  Even better, enable gzip compression at the server.  And even 
better still, use the Expires header and set it to expire in a year -- that 
will cause the browser to cache the file for a year, so it won't have to 
download another version for an entire year (assuming the user doesn't clear 
their cache).


 One more strange thing I have observed is when I include
 http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js 
 
 the loading time is very less compared to the same file inclusion in my
 production site.(http://mysite.com/js/ jquery-1.2.6.min.js)
 
 What is the reason for this?

Most likely your server isn't telling the browser to cache the file and Google 
is.


- Bil



[jQuery] Re: Whats best for js compression, packer, jsminify, YUI?

2008-10-08 Thread Bil Corry

JimD wrote on 10/8/2008 2:21 PM: 
 I know this has probably been discussed before but I with all the
 options available, I was wondering what method seems to work best
 overall for compressing js files. I want to put all my jquery plugins
 into one file and compress for performance but I'm worried about
 breaking things.

Minimize, don't pack.  And the other half of it if you're concerned about 
performance is set the Expires header to 1 year from now when you serve the 
file:

http://developer.yahoo.com/performance/rules.html#expires

That will cause the user to download your JavaScript once, and then load it 
locally for the next year (provided their cache isn't cleared).


- Bil
 



[jQuery] Re: Intercept Back button click on browser

2008-10-06 Thread Bil Corry

Leanan wrote on 10/6/2008 3:52 PM: 
 You should notice that every time you click on the Test links, you
 will actually get the html page twice instead of once.

You test for Chap1 twice in the IF statements and you don't test for Chap3 at 
all.  I suspect that would cause a double-load issue for Chap1.


- Bil



[jQuery] Re: math with form fields

2008-10-01 Thread Bil Corry

amidude wrote on 10/1/2008 2:50 PM: 
 the math part is pretty fuzzy too.

For the math part, you might look at the Calculation plugin:


http://www.pengoworks.com/workshop/jquery/calculation/calculation.plugin.htm


- Bil



[jQuery] Re: math with form fields

2008-10-01 Thread Bil Corry

amidude wrote on 10/1/2008 3:20 PM: 
 I've read over that and it's not helping much as it does very simple
 math. I'm not a math genius by any means. But that didn't look like it
 did anything other than add or subtract.
 
 The math I need to calculate the BMI is a little more involved.

Well, I was thinking you could use parseNumber to convert the strings into 
numbers.  But you can do it manually too:

$('#bmiCalc').bind('submit',function(event) {
var feet = parseFloat($('#feet').val(),10);
var inches = parseFloat($('#inches').val(),10);
var pounds = parseFloat($('#pounds').val(),10);

var totalInches = (feet * 12.0) + inches;

var bmi = Math.round(((pounds / (totalInches * 
totalInches)) * 703.0) * 10.0) / 10.0;
alert(bmi);
});


That will return the correct BMI result.


- Bil



[jQuery] Re: Intercept Back button click on browser

2008-09-30 Thread Bil Corry

Leanan wrote on 9/30/2008 10:10 AM: 
 How can I make it so that when the user clicks the back button in
 their browser, this same thing happens, as I'll likely have people
 trying to click the back button instead of the back link on the page
 and then tell me it's broken.  Is it even possible?

You'll want to use one of the history plug-ins:

http://plugins.jquery.com/project/history
http://plugins.jquery.com/project/jHistory

And the jQuery UI project has a history feature, although it sounds like it 
needs some work:


http://docs.jquery.com/UI/Tabs#Does_UI_Tabs_support_back_button_and_bookmarking_of_tabs.3F


- Bil



[jQuery] Re: Any Fortune 500 using the Google Ajax Hosting?

2008-09-09 Thread Bil Corry


rcherny wrote on 9/9/2008 7:36 AM: 

Hey, I'm implementing jQuery for a fairly large company, and was asked
by their team if we knew if anyone in the Fortune 500 was using the
Google Ajax hosting:

http://code.google.com/apis/ajaxlibs/

They have some IT issues which are preventing proper server
configurations in the short term at least, so this was seen as a way
to help improve things.

However, they seem to be skeptical for some reason...


I don't recommend the Google AJAX hosting to my clients.  Here's why: the 
jQuery library is small to begin with, so we're not talking about saving oodles 
of bandwidth, and if you set the Expires header to expire in a year, then the 
browser will only download it once per year for your site (unless the user 
clears their browser cache):

http://developer.yahoo.com/performance/rules.html#expires

So assuming the browser's cache isn't cleared, the browser will just use the 
cached version without having to send a HTTP request.  That's as little 
overhead as you can possibly achieve resulting in the best performance.

Google, on the other hand, doesn't use the Expires header, they instead use the 
Last-Modified header.  This means that instead of the browser just outright 
using the cached jQuery library, it first has to ask Google if the file has 
been modified for *every* page on your site that uses the jQuery library.  All 
of those unnecessary HTTP requests (one per page) add overhead and degrade 
performance.  So the irony here is that you will get BETTER performance for 
your users by hosting the jQuery library yourself and using the Expires header.

So why doesn't Google use the Expires header given it would provide the best 
performance?  The only reason to do what Google is doing (using the 
Last-Modified header) would be if the resource could changed at any given 
moment.  But the AJAX libraries are all versioned and will never change (there 
would be a new version).  So that can't be it.  Which leaves us with only one 
other reason (that I can think of) which is the Last-Modified header allows 
Google to track the visitors using your site on every page that uses the jQuery 
library.


- Bil




[jQuery] Re: jQuery test suite on new Google Chrome browser

2008-09-03 Thread Bil Corry


Rey Bango wrote on 9/3/2008 9:01 AM: 

Yep, let's find a way for Google to kill Mozilla. Good thinking Bill.


If your comment is directed to me, then you've misunderstood.  I use Firefox.  
I haven't installed Chrome, nor do I plan to.


- Bil



[jQuery] Re: jQuery test suite on new Google Chrome browser

2008-09-03 Thread Bil Corry


Rey Bango wrote on 9/3/2008 1:09 PM: 

I was replying to your comment here:

Converting a few FF users over and saving on the USD $60+ million 
Google pays Mozilla every year probably doesn't hurt either... 


Did I misread this or was it said in a context that I missed?


My comment was written in the context of the quote I replied to.  Guy Fraser wrote that 
Chrome was designed to kill MSIE on corporate networks.  If that is the case, 
then the fact that Google will also save money from the conversion of Firefox users 
certainly doesn't hurt either (from Google's perspective).  I was subtly suggesting that 
while it may be accidental that Google is saving itself some revenue, it may also be 
intentional.  It'll be interesting to see if Google ever offers Chrome-only features or 
services, which would entice users to switch to Chrome.

And for the record, my comment was never intended to champion ways to kill 
Mozilla.  Apologies if that's how it read.

- Bil




[jQuery] Re: New Google Browser announced

2008-09-03 Thread Bil Corry


Jonathan wrote on 9/3/2008 8:54 AM: 

For those interested in more information on Chrome, checkout their
comic book here:

http://www.google.com/googlebooks/chrome/

It does a nice job of explaining some of the thinking behind Chrome. I
have been playing around with it since yesterday and it's great! Super
fast and super simple.



Another browser that sounds interesting is Opus Palladianum, a purported secure browser 
that doesn't suffer from fundamental design flaws like other browsers popular today:

http://www.eweek.com/c/a/Security/Is-There-Room-for-a-Security-Browser/

Supposedly it too will be built on WebKit.  Outside of this research paper, I 
haven't heard anything more about it:

http://www.cs.uiuc.edu/homes/kingst/Research_files/grier08.pdf


- Bil



[jQuery] Re: jQuery test suite on new Google Chrome browser

2008-09-03 Thread Bil Corry


Guy Fraser wrote on 9/3/2008 5:22 AM: 
I think everyone is missing the whole point of Chrome: It's designed to 
kill MSIE on corporate networks - http://tinyurl.com/68lvhb


Converting a few FF users over and saving on the USD $60+ million Google pays 
Mozilla every year probably doesn't hurt either...


- Bil



[jQuery] Re: best techniques to optimize loading of multiple libraries?

2008-08-29 Thread Bil Corry


Alex Weber wrote on 8/29/2008 10:15 AM: 

i'd rather use packed then minified though :)


Use minified, not packed.  Although a packed file is smaller, it's overall 
performance is worse when compared to minified:

-
This means, in the end, that using a minifed version of the code is much faster 
than the packed one - even though its file size is quite larger.

http://ejohn.org/blog/library-loading-speed/
-


- Bil



[jQuery] Re: removing html comments from the dom

2008-08-18 Thread Bil Corry


James wrote on 8/18/2008 10:04 AM: 

Does anyone know if it is possible to remove html comments from the
DOM with jQuery?

My problem is that I really need a page to render in full standards-
compliance mode in IE, but my outdated corporate CMS (Vignette)
inserts an html comment at the beginning of every page which throws IE
into quirks mode rendering. (Ordinarily this is not a major problem, I
just code with the appropriate CSS hacks to accomodate quirks mode).
In this instance though, it's causing some very jerky show/hide
animations which only become smooth in standards compliance mode.


If IE is in quirks mode, can you reset it to standards mode by adjusting the 
DOM?

Another option is to place a proxy between your CMS and the internet and use 
the proxy to strip off the HTML comment.


- Bil



[jQuery] Re: Packed version 32 kB

2008-07-22 Thread Bil Corry


hosemaria wrote on 7/22/2008 12:45 PM: 

My tests says that packed version is the slowest one up to 3-4 times.
 Why is that?


Resig explains it here:

-
When distributing a piece of JavaScript code it's traditional to think that the 
smallest (byte-size) code will download and load the fastest. This is not true 
- and is a fascinating result of this survey. Looking at the speed of loading 
jQuery in three forms: normal, minified (using Yahoo Min), and packed (using 
Packer). By order of file size, packed is the smallest, then minifed, then 
normal. However, the packed version has an overhead: It must be uncompressed, 
on the client-side, using a JavaScript decompression algorithm. This unpacking 
has a tangible cost in load time. This means, in the end, that using a minifed 
version of the code is much faster than the packed one - even though its file 
size is quite larger.

http://ejohn.org/blog/library-loading-speed/
-



What is the reason to use packed version? At JQuery main site they
say Packed version is Great for production use.


You should use the minified version.  The only scenario I can think of to use 
the packed version is where the connection speed is so slow, the smaller size 
more than makes up for the lag in decompressing the packed version.


- Bil



[jQuery] Re: Firefox 3 and packed jQuery

2008-07-21 Thread Bil Corry


hubbs wrote on 7/21/2008 11:23 AM: 

What exactly is the difference between minified and packed?


Minified is the JavaScript condensed; same code, just smaller in size (it 
removes extra white space, comments, etc).

Packed is the JavaScript compressed; it also includes a bit of JavaScript 
code to uncompress it.

The best solution is serving jQuery minified and have the web server gzip 
(compress) it for those browsers that support it.  Even if your web server 
doesn't support gzip compression, the minified version is still the better pick 
according to Resig:

-
This means, in the end, that using a minifed version of the code is much faster 
than the packed one - even though its file size is quite larger.

http://ejohn.org/blog/library-loading-speed/
-

Given the above, I'm not sure when or why you'd ever use the packed version.


- Bil



[jQuery] Re: Download a file made from a String

2008-07-15 Thread Bil Corry


aharef wrote on 7/15/2008 5:08 AM: 

* the file is actually displayed in the browser :( But thats solvable
PHP-Offtopic ;)


You'll want to serve the file with the Content-Disposition header set to 
attachment -- the headers should look something like this:

HTTP/1.0 200 OK
MIME-Version: 1.0
Content-Type: application/xml; authoritative=true
Content-Disposition: attachment; filename=myFile.xml
X-Download-Options: noopen
Content-Length: 1024


- Bil



[jQuery] Re: jQuery and RIA design

2008-07-13 Thread Bil Corry


john6630 wrote on 7/12/2008 9:31 PM: 

I have studied the jqModal plug-in and Alexandre Plennevaux's tutorial
on using this with an IFrame. It seems to me, I can emmulate my
windows programming approach using a main page with navigation which
launches various other pages using jqModal and Ajax. If that is
possible, won't the stateless issue be resolved since I can use global
variables on the main page to store autorization, activity, state,
etc.? It seems this would be an exact fit to my current programming
process. It also would not require a framework since my app is
essentially the total framework.


You could code a webapp like this, where it's driven from a master page on the 
client side.  The issue is if the client is responsible for storing 
authorization, state, etc, then a malicious user could circumvent your 
authorization and change their state.  That's why the proliferation of 
server-side frameworks; they provide the scaffolding you need to build a secure 
web app (a way to maintain the state of the client, a way to authorize them, 
etc).

The #1 rule for secure webapp programming is to treat all client input (headers 
and request) as hostile until proven otherwise (or sanitized).


- Bil



[jQuery] Re: unsubscribe me

2008-07-02 Thread Bil Corry

Rohit Mandlik wrote on 7/2/2008 12:05 PM: 
 How can i unsubscribe from this forum so i will not get more mails from this
 forum.
 I forgot my username and password.

How are you sending and receiving email from your gmail account if you don't 
know your username and password?  Your username and password is the same for 
both gmail and googlegroups.

To unsubscribe, go here and click on the button labeled unsubscribe:

http://groups.google.com/group/jquery-en/subscribe


- Bil




[jQuery] Re: Don't redirect on form submit

2008-06-28 Thread Bil Corry


Sid wrote on 6/28/2008 8:31 PM: 

What I basically want to achieve is that on clicking the submit
button, the data is posted to the php file without any noticeable
difference happening to my page. The response etc will be taken care
of by my code. Any ideas?


If you submit the request via XHR, then the page can remain the same (with the div refreshed) while the data is sent to the server.  Just note that if your site is entirely driven from a single page using XHR, then I hear you should be careful of memory leaks; not sure how relevant that advice is anymore with the newer browsers. 



- Bil



[jQuery] Re: Validate plugin: RFC2822 compliant emails

2008-06-28 Thread Bil Corry


Scott González wrote on 6/27/2008 6:51 AM: 

No problem.  The interesting thing is that the more you comply with
the RFC, the more likely you are to allow someone to accidentally
enter an incorrect email address.


Jan Goyvaerts does a great job of explaining the issues surrounding validating 
email addresses:

http://www.regular-expressions.info/email.html

But for the truly pedantic, here's the regex to validate RFC 822 email 
addresses:

http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html

Just note that whatever method you choose, the top-level domains are being opened up.  So 
instead of .com, .org, .net, etc..., there could be some 70 million of them, such as 
.jquery.  The other interesting change is UTF-8 domains; for example, it could 
allow Chinese organizations to register domain names written using Chinese 
ideograms, ending with the two Chinese symbols meaning 'China.'

http://www.networkworld.com/news/2008/062608-board-opens-way-for-new.html


- Bil




[jQuery] Re: AJAX Difference between IIS and Apache?

2008-06-23 Thread Bil Corry


patrick davey wrote on 6/23/2008 5:52 PM: 

data: 'requestID=350elementID=' +
'ajax' + 'update_value=1 2 3 4 5',


Spaces are not valid in a GET request.  The above should be:

data: 'requestID=350elementID=' +
'ajax' + 'update_value=1%202%203%204%205',


- Bil



[jQuery] Re: Multiple Upload songs

2008-06-23 Thread Bil Corry


Sarm wrote on 6/23/2008 12:05 PM: 

I am new at Jquery. I want to upload multiple song using Jquery
Multiple upload plugin. I am not understanding how to get songs from
Jquery and upload it on FTP.


The Multiple File Upload Plugin is used for uploading via HTTP.  You can't use it to 
upload via FTP, for that you would need a Java applet (or some other plugin technology), 
something like Java File Uploader which I found via Google (I have never used 
it):

http://javauploader.com/


- Bil



[jQuery] Re: Convert special characters

2008-05-22 Thread Bil Corry


hubbs wrote on 5/22/2008 12:23 PM: 

Karl, it seems to be the biggest problem when text is copied from MS
Word, then sent through ajax.  The quotes don't play nice.


The curly quotes from MS Word are in the Windows-1252 character set.  You're 
using ISO-8859-1, which does not have the curly quotes (they don't exist in 
ISO-8859-1).  So even if you work around the UTF-8 issue, you will never get 
the curly quotes to work properly in ISO-8859-1 (except maybe browsers that 
auto-detect the charset mismatch and adjust accordingly).

So at a minimum, you should change to Windows-1252 character set if you want to 
support the extended MS characters, but if you're going to switch, just jump to 
UTF-8 and call it good.


- Bil



[jQuery] Re: Turn off Cache Busting in $.getScript

2008-05-14 Thread Bil Corry


Karl Rudd wrote on 5/14/2008 5:00 PM: 

  jQuery.ajaxSetup({ cache: true });


Does setting the cache option affect all subsequent XHR requests (or just the immediate 
one)?  And is the entire effect of setting cache to true that the random 
value is no longer appended to the URL?


- Bil



[jQuery] Re: Turn off Cache Busting in $.getScript

2008-05-14 Thread Bil Corry


Karl Rudd wrote on 5/14/2008 5:28 PM: 

The ajaxSetup() options affect all subsequent calls. The random cache
busting value should no longer be appended.


Thank you for the clarification.

Firefox and Internet Explorer will obey the cache headers sent by the server for the 
requested content (assuming the user hasn't changed the default cache settings of the 
browser).  It's only in the absence of a cache header that FireFox and Internet Explorer 
behave differently.  Firefox defaults to not caching the request whereas Internet 
Explorer defaults to caching the request.  So in practice, the random cache busting 
value really only benefits Internet Explorer when used against a server that 
doesn't explicitly tell the browser whether to cache the request or not.  I'm not sure 
how Safari and Opera behave, I haven't tested those browsers.

I think it might be worthwhile to document that the cache option really is just a way to have jQuery force 
the page to not be cached when set to false, overriding the request cache header.  But when set to 
true, it defers to the cache header, or if none present, if defers to the default browser behavior.  So 
this is the important point -- setting the cache option to true does not mean the request is cached, it 
just means jQuery won't force the page to be not cached.  Whether the request is cached or not depends on the cache 
header, or when none present, the default browser behavior.


- Bil



[jQuery] Re: Jquery spell checker

2008-05-01 Thread Bil Corry


Fontzter wrote on 5/1/2008 10:09 AM: 

Any leads on this?  This is a common request of IE6 users.  I would
like to have an elegant solution using jQuery.


There's always this, if you want to purchase a stand-alone solution (doesn't 
use jQuery):

http://www.thesolutioncafe.com/ajax-spell-checker.html


Otherwise, the Prototype-based Spellify is probably your best bet:

http://www.spellify.com/


- Bil



[jQuery] Re: Jquery spell checker

2008-05-01 Thread Bil Corry


Joe wrote on 5/1/2008 12:00 PM: 

I would assume this would have to include some sort of database
interaction.  I will be considering a PHP/MySQL/jQuery solution.


Spellify uses Google's spellchecker - good if you want just regular spell 
checking, bad if you need custom spell checking for specialized applications 
(e.g. medical terminology, legal jargon, etc.).  So if someone were to step up 
and convert Spellify to jQuery, it would be nice to allow custom dictionaries 
to be specified, and even better, allow the user to save any custom words.

I think JSpell (the paid solution I mentioned) does all that and more.  I've 
never used JSpell, so can't speak to how good/bad it is.

The other option, since Firefox already has a built-in spell checker, is to 
have your IE users install a plug-in to do spell checking:

http://www.iespell.com/


- Bil



[jQuery] Re: Spam Plugin

2008-04-09 Thread Bil Corry


Seth - TA wrote on 4/9/2008 9:46 AM: 

I have a feed of new jQuery plugins that I like to check daily to see
what great things are created. I saw this one today -
http://plugins.jquery.com/project/n-contextmenu. Interested, I went to
the demo, and I got like 5 pop-ups, redirected to a new site and
another 3 pop-ups. Anyway to remove from the list?


It worked fine for me.


- Bil



[jQuery] Re: Jquery spell checker

2008-04-08 Thread Bil Corry


rsmolkin wrote on 4/4/2008 7:53 AM: 

Has anyone seen a spell checker for text areas written in Jquery?

I'm looking for one that is either stand-alone or can be used via AJAX
connecting to ColdFusion.

I would like to add a spell checker to all text areas that will work
like Gmail.


I've been thinking of converting this Prototype-based spell checker to jQuery:

http://www.spellify.com/

But if there's something better out there, I'd like to hear about it too.


- Bil



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

2008-03-06 Thread Bil Corry


[EMAIL PROTECTED] wrote on 3/5/2008 1:40 PM: 

Flash is the only known way to get any dimension related
information from an image before it is uploaded.


Or a Java-based uploader, like JUpload:

http://jupload.biz/

JUpload can resize and convert the image to the desired format/size before the 
user uploads it; handy if your users are not tech-savvy enough to do it 
themselves.


- Bil



[jQuery] Re: why jQuery?

2008-03-03 Thread Bil Corry


zok wrote on 3/2/2008 2:51 PM: 

what is going to have the best future: jQuery or Prototype
(scriptaculous)?
Maybe you can tell me a few differences and/or reasons for your
joice...


Maybe you can read the archives of the jQuery and Prototype lists, plenty of 
discussion on the topic:

http://groups.google.com/group/jquery-en/search?q=prototype
http://groups.google.com/group/rubyonrails-spinoffs/search?q=jquery


And if that's not enough, here's more:

http://www.google.com/search?q=jquery+vs+prototype
http://www.google.com/search?q=prototype+vs+jquery


- Bil



[jQuery] Re: ClearType rendering issue in IE

2008-02-11 Thread Bil Corry


Giant Jam Sandwich wrote on 2/11/2008 11:06 AM: 

Thanks Mike -- that fixed it. The brief flicker in IE7 between
ClearType and regular type I suppose is unavoidable. I could use a
slide transition instead, but it wouldn't look as good. Oh well.



This talks a bit about the problem and offers a second workaround:

http://mattberseth.com/blog/2007/12/ie7_cleartype_dximagetransform.html


- Bil



[jQuery] Re: Feb 12 IE6 Forced Update

2008-01-24 Thread Bil Corry


Jonathan Sharp wrote on 1/24/2008 10:51 AM: 

Do you have a link to this handy?


-
Microsoft Corp. has warned corporate administrators that it will push a new 
version of Internet Explorer 7 their way next month, and it has posted 
guidelines on how to ward off the automatic update if admins want to keep the 
older IE6 browser on their companies' machines.

http://www.pcworld.com/businesscenter/article/141472/warning_an_ie7_autoupdate_is_coming_soon.html
- 



- Bil



[jQuery] Re: [Off-Topic] Reverse IP Lookup

2008-01-18 Thread Bil Corry


Glen Lipka wrote on 1/17/2008 8:12 PM: 

I need to find a commercial company that provides a Reverse IP Lookup as a
web service.

So I would pass: 63.82.2.35 and it would spit back ideally: Marketo,
Address, City, State, Zip etc.


While an IP can give you a clue as to where the user is located, proxies can 
thwart this by allowing a user in one country to appear to be coming from 
another (anonymizers, company VPNs, etc).  With that caveat, the service I've 
heard about the most is GeoIP:

http://www.maxmind.com/app/web_services

Looking at it now, it appears they offer a Proxy detector service as well.

They also offer a free, less accurate service as well:

http://www.maxmind.com/app/geolitecity



- Bil



[jQuery] Re: Jquery, Jsonp and UTF8

2008-01-17 Thread Bil Corry


Mathieu wrote on 1/17/2008 9:26 AM: 

From what i understand, the fact that my content is using UTF8 is
normal since this is made in Ajax using Json; but i can't spot the
reason why Firefox doesn't act like IE.


Do you have a simple example coded?  Or it is online somewhere?


- Bil



[jQuery] Re: server side jquery

2007-12-17 Thread Bil Corry


Michael Geary wrote on 12/16/2007 7:57 PM: 

I wonder if Hpricot might be a place to start? It's made for HTML, not XML,
though...

http://code.whytheluckystiff.net/hpricot/



AppJet allows you to host webapps for free, with the app written entirely in 
JavaScript:

-
With AppJet, you write your entire app using JavaScript, including the server 
logic and database. This simplifies the process of building a web app, because 
it lets you do everything in just one language. JavaScript is easy to learn, 
but still pulls its weight for advanced uses. In fact, the AppJet site itself 
and the AppJet framework are written in server-side JavaScript.

http://appjet.com/about/features
--

I haven't tried it, but it looks interesting.  It was mentioned here, which is 
how I found out about it:

http://www.gnucitizen.org/blog/the-next-line-of-defence-web20-you-must-read-this 



- Bil



[jQuery] Re: Survey, what is the scariest animal?

2007-11-30 Thread Bil Corry


Rey Bango wrote on 11/30/2007 9:56 AM: 
It may have slipped through. We do our best to catch these when Google 
doesn't but we can't catch em all.


Oh, I expect things will slip through.  I was just asking so that the poster 
can be shown the door.


- Bil



[jQuery] Re: Survey, what is the scariest animal?

2007-11-30 Thread Bil Corry


biophilen wrote on 11/30/2007 1:53 AM: 

Please take 10-15 mnutes of your time to be an anonymous participant
in a research project that I am performing for school.


Doesn't posting the same message in 385 different forums count as spam?

http://groups.google.com/groups/search?q=biophilenqt_s=Search+Groups


- Bil



[jQuery] Re: Make IE 6 Work Like IE 7

2007-11-28 Thread Bil Corry


Brett wrote on 11/27/2007 11:42 PM: 

Not that I know of however the last update for that library as in
2005, so either thats a bug on the timestamp, or its too old to
continue supporting.


I tried using it on a project in Europe, but it would crash the 
German-localized version of IE6.  Since I couldn't reproduce it with my 
American version, I never could figure out what the issue was.  But I haven't 
used it since.


- Bil



[jQuery] Re: Ajax Form and latin characters

2007-11-21 Thread Bil Corry


Feed wrote on 11/21/2007 12:23 PM: 

I'm having a really hard time making my AJAX form submit an e-mail
correctly. The form sends the data to an ASP page which then submits
an e-mail through CDONTS. The problem is: the latin characters are
scrambled in the e-mail received by the final user.

Eg.: the word cães is received as cães


Perhaps this thread will give you some ideas:

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


- Bil




[jQuery] Re: Browser Exit Event

2007-11-15 Thread Bil Corry


[EMAIL PROTECTED] wrote on 11/15/2007 8:12 AM: 

I'd just like to know what the jQuery best practice for catching the
browser exit event is?


Probably just bind your code to the onunload event.  From the jQuery docs:

$(window).unload( function () { alert(Bye now!); } );

More info here:

http://docs.jquery.com/Events/unload


- Bil



[jQuery] Re: Scripts at the bottom of the page

2007-11-14 Thread Bil Corry


Brandon Aaron wrote on 11/14/2007 9:11 AM: 

Actually, it isn't outside the scope of jQuery and it is now fixed in
Rev 3822.


Thanks!


- Bil



[jQuery] Re: Scripts at the bottom of the page

2007-11-09 Thread Bil Corry


mike503 wrote on 11/8/2007 9:03 PM: 

I also might try submitting this as a bug/enhancement request and see
where it goes there.


Yes, please do.  



- Bil



[jQuery] Re: Scripts at the bottom of the page

2007-11-08 Thread Bil Corry


mike503 wrote on 11/8/2007 3:16 AM: 

Thank god someone else can validate this.


I played with it a bit.  It appears the anonymous functions being bound to mousseover and mouseout don't have 
access to the functions outside themselves when the page is first being loaded (perhaps they're not fully 
bound yet?).  Below is a simple test case, load it in Firefox, pop open Firebugs, place the cursor over the 
Test Span, hit Ctrl-R to reload the page and rapidly move the cursor in/out of the Test 
Span.  If you do, you'll see the error xyzzy is not defined when the page is first loading, 
then the error goes away once those anonymous functions have access to functions outside themselves.

And the problem occurs regardless of the placement of JavaScript on the page; it 
still happens when all the JavaScript is in the head as well.  One 
work-around is to surround all the code contained within the anonymous functions with 
try/catch, and simply ignore the errors.

- Bil


!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN 
http://www.w3.org/TR/html4/strict.dtd;
html
head
meta http-equiv=Content-Type content=text/html; 
charset=utf-8
titleDemo/title
/head
body
span id=testTest Span/span
script src=jquery-1.2.1.js type=text/javascript/script
script language=JavaScript type=text/javascript
function xyzzy() {}; // noop
$(function(){
$(#test).mouseover(function() {
xyzzy();
$(this).css(background-color, 
#7dbeee).css(cursor, pointer);
});
$(#test).mouseout(function() {
xyzzy();
$(this).css(background-color, 
#ff9900).css(cursor, default);
});
});
/script
/body
/html



[jQuery] Re: Scripts at the bottom of the page

2007-11-08 Thread Bil Corry


mike503 wrote on 11/8/2007 4:22 PM: 

What is confusing is why I can bind the event to the jquery-
initialized object but the action inside the event is confused.
Perhaps I can try replacing $(this) with $(#theactual div name)


That won't work because jQuery doesn't exist -- you'd have to use straight 
JavaScript.  Probably the best solution is to make the event wait until jQuery 
exists.  Seems like a task jQuery itself should take care of though.


- Bil



[jQuery] [WARN] Firefox’s JAR: Protocol issues

2007-11-07 Thread Bil Corry


Severe XSS problem in Firefox:

http://www.gnucitizen.org/blog/web-mayhem-firefoxs-jar-protocol-issues


Apparently, Mozilla has known about it since February 2007, but hasn't made any 
progress on fixing it (read the comments).  Because of the above public 
disclosure, Mozilla just made the previously undisclosed bug public:

https://bugzilla.mozilla.org/show_bug.cgi?id=369814


Get the NoScript plug-in, version 1.1.7.8 (currently a development version) 
in order to protect yourself when using Firefox:

http://noscript.net/getit#direct


- Bil





[jQuery] Re: serialize a form with german characters

2007-11-04 Thread Bil Corry


Oli wrote on 11/4/2007 5:01 AM: 

I tried to send a form via ajax. To send it, I first serialized it -
but after that there seems to be an encoding problem with my german
characters. I can see these strange broken characters in the firefox-
log.


I think the firefox log is just a false alarm; my guess is it doesn't correctly display the 
result of serialize.  To see what I mean, create an empty input called 
serialize then add this to your jQuery code:

$(#serialized).val($(#frm_coupon).serialize());

You'll see the result as:

Behandlung=Option+w%C3%A4hlenbetrag=Ausw%C3%A4hlen

The umlaut a (ä) is being encoded as C3A4, which is correct:

http://www.fileformat.info/info/unicode/char/00e4/index.htm


- Bil




[jQuery] Re: jQuery AJAX Docs

2007-11-01 Thread Bil Corry


Dave Buchholz wrote on 10/31/2007 4:39 PM: 

Are there any resources for newbies that explain how to do AJAX calls
with jQuery ?


Go here:  http://jquery.com/

Follow the Tutorials link in the upper menu bar.  Scroll down to the section labeled 
AJAX.


- Bil





[jQuery] Re: I just hate the way this mailing list handles grouping messages...

2007-10-30 Thread Bil Corry


Rick Faircloth wrote on 10/30/2007 12:04 PM: 

Can this be done differently?  This has to be a mailing list setting or
something, because all my other mailing lists are able to have
follow-up messages containing Re: automatically grouped with
the original.


I don't use Outlook, but threading works fine for me using Thunderbird on 
Windows XP for this list.

One thought, choose one of the replies from this list and view the headers for it -- does 
it have the In-Reply-To header?  If not, then your SMTP server (or email 
gateway) is stripping that header out, which is used for threading.


- Bil




[jQuery] Re: I just hate the way this mailing list handles grouping messages...

2007-10-30 Thread Bil Corry


Rick Faircloth wrote on 10/30/2007 2:11 PM: 

I'll check out the header!

(But if that is the problem, wouldn't it affect other lists?)


Are the other lists also served via GoogleGroups?  Are they sent to your SMTP 
server in the same way as this list?

Without knowing your particulars, I was allowing for the possibility that this 
list was somehow handled differently than the rest of your lists (e.g. the 
messages are delivered by way of a gmail account that is then forwarded to your 
Outlook account, or e.g. all the other lists are not served via GoogleGroups, 
pointing a finger at something GoogleGroups is doing).


- Bil



[jQuery] Re: is jQuery.noConflict() removed from jQuery??

2007-10-30 Thread Bil Corry


Rey Bango wrote on 10/30/2007 3:58 PM: 

Am I missing something?


It was replaced by link spam and was reverted by Richard earlier today:

http://groups.google.com/group/jquery-en/msg/aa6122493f30060f


- Bil



[jQuery] Re: Minified jQuery?

2007-10-23 Thread Bil Corry


Eli wrote on 10/23/2007 10:54 AM: 

I've noticed that on the front page of jQuery.com there is a new
version for download, the minified and gzipped one.
now it says that it weighs 14k, while ont he google download page, it
says 46k.
downloaded, and indeed, it's a 46k js file.
what gives?

where is the minifieing  gzipping coming in?


It's a 46k minified file.  To get the 14k size, you have to serve it via a web 
server that has gzip compression enabled AND the browser must be able to accept 
gzip compression.  If the browser can't accept gzip compression, or if your web 
server can't serve it using gzip compression, then it's 46k for the browser.


- Bil



[jQuery] Re: Minified jQuery?

2007-10-23 Thread Bil Corry


Eli wrote on 10/23/2007 11:33 AM: 

So basically all I need is to put the minified file on my server as
usual,
and those that have gzip enabled (all modern browser support gzip,
right?) will get a 14k file instead of the 46k?


Yes, assuming your web server is configured to send it gzipped.



Do I have to do any special adjustments to my apache 2 server to
support gzip?


Yes, you need to configure Apache to use mod_deflate:

http://httpd.apache.org/docs/2.0/mod/mod_deflate.html



- Bil



[jQuery] Re: Minified jQuery?

2007-10-23 Thread Bil Corry


Andy Matthews wrote on 10/23/2007 1:06 PM: 

It's my opinion that wording needs to be changed on the front page.

That's been the source of so much confusion on this list, not to mention the
people who never even post about it. 


I suppose if someone wasn't paying attention, they could inadvertently use the 
14kb version on a server that doesn't support gzip compression and think it's 
14kb when it's really 46k (or whatever the actual size is).

Changing the wording seems easy enough though:


Download jQuery
---

For Production Use - Compressed for deployment, smaller is better.

Download jQuery 1.2.1 (14kb, Minified and Gzipped)
Requires configuring your web server or middleware to serve 
Gzip.

Download jQuery 1.2.1 (26kb, Packed)
For those that can't Gzip their JavaScript.

For Development Use - Uncompressed for testing, learning and development.

Download jQuery 1.2.1 (77kb, Uncompressed)




- Bil



[jQuery] Re: Session management in an Ajax app

2007-10-09 Thread Bil Corry


Michael Geary wrote on 10/9/2007 1:27 PM: 

It's still an interesting bit of code (of course I would say that!) -
the $.expire function shows how easy it is to augment an existing
JavaScript function with new behavior.


It *is* interesting, thanks for sharing the code.  We display a countdown timer 
on the bottom of the page so the user is aware of how much time they have until 
they're booted out, and if the user needs more time, they click on the timer to 
reset it (which pings the server to keep their server-side session active).  
Currently, we manually reset the timer for the user when they do certain 
actions, but having the timer auto-reset when performing an ajax call would be 
handy.


- Bil



[jQuery] Re: Problem while setting designMode=on in firefox.

2007-10-08 Thread Bil Corry


Ashish Agrawal wrote on 10/8/2007 10:26 AM: 

First one (with document.ready) don't work (at least for me in FF 2).
But second one works fine as expected.
Can any one tell me how can I simulate body onload using jQuery?


This is how I did it.  I never tested anything beyond FF2 and IE7, but it does 
work for them.


!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
http://www.w3.org/TR/html4/loose.dtd;
html
head
meta http-equiv=Content-Type content=text/html; 
charset=utf-8
titleDesignmode Demo/title
script src=jquery-latest.pack.js 
type=text/javascript/script
script language=JavaScript type=text/javascript
jQuery.fn.designmode = function(option) {
var option = option || 'On';
this.each(function(i){
if (this)
if (this.contentDocument)
$(this).load( 
function() { this.contentDocument.designMode = option; }); // FF2
else if (this.contentWindow  
this.contentWindow.document)

this.contentWindow.document.designMode = option; // IE7
});
return this;
}

$(function(){
$(#edit).designmode(); // turn on designMode
});
/script
/head
body style=background: white;
iframe id=edit style=height: 100px; width: 400px; border: 1px solid 
black; background: white; overflow: auto; display: inline;
/iframe
/body
/html





- Bil



[jQuery] Re: Registry Fix for Windows XP

2007-09-23 Thread Bil Corry


John Travolta wrote on 9/22/2007 3:34 PM: 

Repair your registry base http://windowsxpsp2pro.blogspot.com/


I would consider any message that is posted to 87 (very diverse) groups and 
doesn't explicitly relate to any of them as spam:

http://groups.google.com/groups/profile?enc_user=0jmzXBUeX-LPQOS8DDwUSy3XNf5E9h3i3SmjGmAJbX05nZ-8fQ


- Bil




[jQuery] Spolsky's Strategy Letter VI

2007-09-19 Thread Bil Corry


This is interesting in the context of jQuery's core optimization vs. larger, 
less-optimized libraries:

-
The developers who put a lot of effort into optimizing things and making them 
tight and fast will wake up to discover that effort was, more or less, wasted, 
or, at the very least, you could say that it “conferred no long term 
competitive advantage,” if you’re the kind of person who talks like an 
economist.

http://www.joelonsoftware.com/items/2007/09/18.html
-


- Bil




[jQuery] Re: Code Review: Table filtering...

2007-09-14 Thread Bil Corry


Andy Matthews wrote on 9/14/2007 8:11 AM: 

Yesterday I asked on the list for suggestions on how to filter the contents
of a table using an autocomplete type interface. Didn't get any answers so
last night I wrote it myself.


Sorry, I must have missed your post (I find it difficult to keep up with the 
traffic on this list).  This is what I've been using for many years, the only 
tweak I made to it was to make it case-insensitive:

http://www.codeproject.com/jscript/tablefilter.asp


- Bil



[jQuery] Re: unsubscribe

2007-09-14 Thread Bil Corry


[EMAIL PROTECTED] wrote on 9/14/2007 3:44 PM: 

How do I unsubscribe from this list?


Go here, select unsubscribe from the list of choices under Subscription 
Type:

http://groups.google.com/groups/mysubs

Note, you can choose to remain a member and select No email which then allows 
you to post and browse the messages online instead of getting them in your inbox.

- Bil



[jQuery] Re: [NEWS] Firebug 1.1 Beta Released

2007-09-13 Thread Bil Corry


Jörn Zaefferer wrote on 9/13/2007 12:55 PM: 
It looks like Joe lost interest for Firebug some time ago. Considering 
the usefullness of the tool, its just natural that someone else takes it 
up. Lets hope Joe will help making that an official release again.


Not so much lost interest as not enough time -- apply for the job and you 
can be paid to work on Firebug full-time!

http://www.getfirebug.com/blog/2007/05/09/job-at-yahoo/
http://yuiblog.com/blog/2007/05/07/firebug/


- Bil




[jQuery] Re: Need plugin to determine # of chars

2007-09-10 Thread Bil Corry


Rey Bango wrote on 9/10/2007 3:33 PM: 

I need a plugin that does the following:

- Displays a running total of the chars being entered in a field (input 
or textarea)

- Enforces a char limit

I could've sworn I saw a plugin that does this.


Probably this one:

http://www.tomdeater.com/jquery/character_counter/


- Bil



[jQuery] An introduction to using JQuery with Lasso

2007-08-26 Thread Bil Corry


jQuery is the topic this week for LassoSoft's _Tip of the Week_ (publishers of 
Lasso):

-
The tip of the week for August 24, 2007 introduces JQuery and shows
how a simple newsticker plugin can be used with Lasso. The tip shows how
Lasso can be used to automatically add the required JQuery elements to the
head of the document.

http://www.lassosoft.com/Documentation/TotW/index.lasso?9302
-


- Bil



[jQuery] Re: Fwd: jQuery and UTF8

2007-08-20 Thread Bil Corry


barophobia wrote on 8/15/2007 11:15 PM: 

Content-Typetext/html

Does that give you a clue?


Your server should be sending this as the content-type if serving UTF-8:

text/html; charset=UTF-8

Otherwise, you're leaving it up to the browser to decipher the charset.


- Bil



[jQuery] Re: Fwd: jQuery and UTF8

2007-08-20 Thread Bil Corry


barophobia wrote on 8/20/2007 11:58 AM: 

1. Why do you think the standard pages work fine?


Do you have a meta tag defining the charset?  Most likely that wouldn't be 
present in an AJAX call but would tell the browser the correct charset.



2. What about the issue I'm having sending the data? How do I get the
UTF-8 text to be recorded properly when submitted via an AJAX call?


I believe jQuery sends the data as UTF-8; the issue as I understand it is when 
you want to send something other than UTF-8, as per this thread:

 
http://groups.google.com/group/jquery-en/browse_thread/thread/5fc0bd4e73d41e03/#anchor_94c6c9cd173ae26d


You said you're using Japanese characters, are you sure you're using UTF-8 or 
could you be using SHIFT_JIS?  Do you have an example page?


- Bil



[jQuery] Re: Create excel file from table data

2007-08-10 Thread Bil Corry


Glen Lipka wrote on 8/10/2007 10:34 AM: 

Yes.  Specifically a table.  You can even add CSS backgrounds, and borders
which Excel picks up too.
(Assuming the headers say its excel)


And you can tell Excel how to format the data, for example to display a US zip 
code:

td style=font-align: right; color: red; 
mso-number-format:0;07643/td


Or a date:

	td style=font-align: right; color: red; mso-number-format:-mm-dd;2006-12-20/td 



The other option that has been offered on the LassoTalk list is creating an Excel file 
that has the format you want, save it as XML, then replace the dummy placeholder text 
with the real values.  The downside to the XML method is XML is only supported by newer 
versions of Excel (not sure how new Excel has to be).


- Bil



[jQuery] Re: [OT] Development tool by yahoo for firebug

2007-07-26 Thread Bil Corry


Benjamin Sterling wrote on 7/25/2007 6:49 AM: 

Came across this today and found it pretty interesting when looking at some
of my current projects.  Figured I'd share.

http://developer.yahoo.com/yslow/



Their advice to Move Scripts to the Bottom is an interesting one.  I currently 
place them in the head and use jQuery's Document Ready function.

http://developer.yahoo.com/performance/rules.html#js_bottom



- Bil



[jQuery] Re: Frequently Asked Questions (FAQ)

2007-07-16 Thread Bil Corry


Richard D. Worth wrote on 7/14/2007 8:06 AM: 

Just a few to start with. Please add any questions you've seen come up a
lot.


Two questions I had when starting with jQuery, and glancing through the API 
docs, I still don't see them documented (maybe in a tutorial?):

(1) How do you select an element by its ID?

(2) How do you select all elements given a CSS class?


Seems like they should be included on the Selectors page.


- Bil



[jQuery] Safari 3 and onload

2007-06-15 Thread Bil Corry


Via Ajaxian, interesting browser behavior:

-
Safari does not fire onload at the same time as other browsers. With most 
browsers, they will wait until the page is loaded, all images and stylesheets 
and scripts have run, and the page has been displayed before they fire onload. 
Safari does not.

In Safari, it seems onload fires before the page has been displayed, before 
layout has been calculated, before any costly reflows have taken place. It 
fires before images have completed loading (this can also happen in rare cases 
in Opera, but Safari seems to do it everywhere), meaning that a substantial 
part of the load time is not included.

http://www.howtocreate.co.uk/safaribenchmarks.html
-


- Bil




[jQuery] Re: ANNOUNCE: Please Welcome New jQuery Team Member Glen Lipka

2007-06-15 Thread Bil Corry


Karl Swedberg wrote on 6/15/2007 6:31 PM: 
As a member of the welcoming committee, I'm pleased to announce that we 
have sent you some fabulous membership prizes via carrier pigeon, 


Don't you mean delivered via RFC 2549?


- Bil




[jQuery] Re: ANNOUNCE: Please Welcome New jQuery Team Member Glen Lipka

2007-06-15 Thread Bil Corry


Karl Swedberg wrote on 6/15/2007 6:52 PM: 
ha! that's pretty funny. I had no idea what you were talking about. It's 
always good to learn more trivia, especially if it's fake. :)


Geek humor for sure.


- Bil




[jQuery] Re: Safari for Windows Support Questions

2007-06-13 Thread Bil Corry


Glen Lipka wrote on 6/13/2007 9:53 AM: 

  - Why couldn't Apple just support Firefox?  It works fine!  KILL
  SAFARI!


This came up on the Lasso list.  Not sure how true it is, but John Gruber 
claims Safari currently earns Apple about $2 million per month, and would 
generate much much more with Windows users also using Safari:

It’s not widely publicized, but those integrated search bars in web browser 
toolbars are revenue generators. When you do a Google search from Safari’s toolbar, 
Google pays Apple a portion of the ad revenue from the resulting page. (Ever notice the 
“client=safari” string in the URL query?)

http://daringfireball.net/2007/06/wwdc_2007_keynote


I think I need to release my own web browser...


- Bil





[jQuery] Re: follow up on real world speed test

2007-06-13 Thread Bil Corry


Dan G. Switzer, II wrote on 6/13/2007 10:45 AM: 

For me it was 2nd to last-only behind cssQuery.


Same here using Win/FF2.0.0.4:

 MooTools 1.2dev   226
 prototype 1.5.1   251
 dojo query358
 ext 1.1b1 511
 jQuery 1.1.2dev  1100
 cssQuery 2.021965



- Bil




[jQuery] Re: Request to all developers: Put version number in file name please

2007-06-13 Thread Bil Corry


Ⓙⓐⓚⓔ wrote on 6/13/2007 1:27 PM: 

I would quickly grep my files and find the version in use.


How would you grep the version from jquery-latest.pack.js?

  http://code.jquery.com/jquery-latest.pack.js

The version shows up as:

  ... 6.E=6.8p={3Y:1.1.2,8q ...


- Bil





[jQuery] SlickSpeed CSS Selector TestSuite

2007-06-12 Thread Bil Corry



-
SlickSpeed is a CSS selector test suite provided by the MooTools folk.

This tool comes at the same time as they release CSS3 support in Mootools, and 
it compares Prototype, jQuery, MooTools, Ext, and CSS Query.

http://ajaxian.com/archives/slickspeed-css-selector-testsuite
-


- Bil




  1   2   >