[jQuery] Interface Library - What order is it built in? / bug in IE7 Draggable revert

2007-03-29 Thread Dan G. Switzer, II
I found an issue in the idrag.js file on line 135 of idrag.js file. This
lines:

if (elm.dragCfg.oP != 'relative' && elm.dragCfg.oP !=
'absolute') {
dEs.position = 'relative';
}

The setting of the position of the element to "relative" seems to cause a
weird problem for me in IE7. If the element is in a scrollable  tag,
and you've got the revert set to "true" after the element has "reverted"
back to it's original state, the element will not scroll properly.

Commenting line 135 fixes this problem (and I haven't seen any other adverse
effects.)

Anyway, I was wondering what order the compressed interface.js is build in.
It should would be nice in the online library builder would allow you to
choice whether or not you want the code compressed--that way I could
download just the files I need, correct any bugs and then compress when I go
live.

Also, is there documentation anywhere that describes the dependencies used
in the Interface library?

Thanks,
Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Known memory leaks?

2007-03-28 Thread Dan G. Switzer, II
Markup,

What plug-ins are you using on the page? 

-Dan

>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>Behalf Of Markus Peter
>Sent: Wednesday, March 28, 2007 11:09 AM
>To: jQuery Discussion
>Subject: [jQuery] Known memory leaks?
>
>Hello
>
>We're currently using jQuery 1.1.2 on a production site and have some
>issues with memory leaks, which seem to affect all browsers after a
>while, especially Safari, but also Firefox and IE seem to be
>affected. Users use our page for hours, and parts of the HTML page
>stay open all the time and are not reloaded for the whole session,
>which means even small leaks can easily accumulate and become a real
>problem.
>
>We are currently trying to eliminate the memory leaks but are now
>running into a dead end. The software is unfortunately too large
>(about 2500 lines of JavaScript code) to easily create reduced test
>cases for the leaks so we basically have no clue at all, where the
>leaks occur and whether they are in our code or in jQuery. We noticed
>the situation improved a bit by upgrading from 1.1.1 to 1.1.2, though.
>
>Now, the question is: Are there maybe any already _known_ memory
>leaks in version 1.1.2 which are maybe even be in the upcoming 1.1.3
>or the SVN repository, so we could simply cherry pick the
>corresponding patches. I tried searching through the ticket database
>but could not find anything related to memory leaks but might have
>overlooked someting. So, if any of the developers know of such a bug,
>it will save us a lot of time.
>
>We mainly use the jQuery CSS selection system, event system,
>animations and AJAX by the way - no XPath
>
>--
>Markus Peter - [EMAIL PROTECTED]  http://www.spin-ag.de/
>SPiN AG, Bischof-von-Henle-Str. 2b, 93051 Regensburg, HRB 6295
>Regensburg
>Aufsichtsratsvors.: Dr. Christian Kirnberger
>Vorstände: Fabian Rott, Paul Schmid
>
>
>
>___
>jQuery mailing list
>discuss@jquery.com
>http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Error in Jorn Form Validation Plugin

2007-03-28 Thread Dan G. Switzer, II
What's the new code you implemented look like? Where did you get my example
code? What's the URL of the form so we can take a look at the problem.

-Dan


>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>Behalf Of Web Specialist
>Sent: Tuesday, March 27, 2007 9:48 PM
>To: jQuery Discussion.
>Subject: [jQuery] Error in Jorn Form Validation Plugin
>
>Until yesterday my form with Jorn Form Validation Plugin worked fine only
>submitting after all required fields filled. Today I insert Dan G Switzer
>example to display error message in red colour. And my form dies! ;-)
>
>After click in submit button appear an error in this part of
>jquery.validate.js( v1.0 beta 2):
>
>check: function( element ) {
>element = this.clean( element );
>jQuery( element ).removeClass( this.settings.errorClass );
>var rules = this.rules( element );
>for( var i = 0, rule; rule = rules[i++]; ) {
>try {
>var result = jQuery.validator.methods [rule.method](
>jQuery.trim(element.value), element, rule.parameters );
>if( result === -1 )
>break;
>if( !result ) {
>jQuery(element).addClass( this.settings.errorClass
>);
>this.formatAndAdd( rule, element);
>break;
>}
>} catch(e) { // *
>DEBUGGER STOPS HERE
>this.settings.debug && window.console &&
>console.error("exception occured when checking element " + element.id
> + ", check the '" + rule.method + "' method");
>throw e;
>}
>}
>},
>
>
>What do you suggest to fix this error?
>
>Cheers



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] google takes over my error div!!!

2007-03-26 Thread Dan G. Switzer, II
Jörn,

>amircx schrieb:
>> umm... there is no other tag for replacement? im using it for somthing
>> *
>>
>Good point, thanks. I guess I have to find a combination of elements
>that is easy to style, does not interfere with Google Toolbar and makes
>some semantic sense. That can hardly be achieved without a certain loss
>of flexibility, but it should be a good thing to set certain standards
>as long as they work well.

No matter what tag you pick, some buddy will not like it. :) I'd suggest
using a default (i.e. , , etc) but allow that to be
overridden--that the user can change it.

Between the element and it's unique error class, you should be able to style
it anyway you want w/out causing issues with other like elements on the
page.

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Rounded Corners with Drop Shadow

2007-03-26 Thread Dan G. Switzer, II
It worked for me in IE6 (no shadows) but it is *slow* to render.

 

-Dan

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Glen Lipka
Sent: Monday, March 26, 2007 12:14 PM
To: jQuery Discussion
Subject: [jQuery] Rounded Corners with Drop Shadow

 

http://www.ruzee.com/blog/shadedborder

Reported on Ajaxian.  It says it's jQuery friendly although it doesn't look
like a plugin.

Question:  Does it make sense to jQuerify a script like this if it's jQuery
friendly already? 
What benefit could be gained?  Smaller?  Faster?  Better integration with
other effects?

It looks pretty nice though.

Glen

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] hoverIntent r3 -- animate vs. hoverIntent

2007-03-26 Thread Dan G. Switzer, II
Brian,

>And thank you Dan -- you were actually much closer to the actual issue than
>my earlier hypotheses. Animate is not killing hoverIntent, but it is
>(occasionally) delaying one of the polling intervals, so that two are
>firing in very close succession.

The only reason I suspect this as the root cause is I was having problems
recreating the problem using the method you described. (But I was using my
trackpoint and my circles were always of various sizes--precise control with
a trackpoint is hard. Moving to a mouse--where my circles were very
consistent--also popped up the problem.)

However, if I moved the cursor back-n-forth in a straight line I noticed the
problem. This just got me thinking that the problem probably had to do w/the
interval delay and the current mouse positioning.

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] getting the selectedIndex of a dynamic select

2007-03-26 Thread Dan G. Switzer, II
Rob,

>Ok I think that may answer the next question.
>Are you saying that an assertion:
>   $(this)[0] == this
>will always be true?

No, what he's saying is the "this" in $(this) is actually a reference to the
DOM element.

So, in the code:

$("#myDiv").click(
function (){
// spit out the actual DOM element
alert(this);
}
);

>In other words, if I am using ID selectors and want to access a DOM
>property/method should I read the first element or can I just use the
>jQuery:
>   $("#myDiv").selectedIndex;

The above would not work.  Due to jQuery's chaining mechanism, $("#myDiv")
always returns a jQuery object--so you need to use either the get() method
or reference the jQuery object by it's array shortcut to get to the actual
DOM element.

>or should it always be one of:
>   $("#myDiv").get(0).selectedIndex;
>   $("#myDiv")[0].selectedIndex;

You would need to use on of the two methods you listed above to get to the
selectedIndex property.

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Taconite Plug-in Question...

2007-03-26 Thread Dan G. Switzer, II
Rick,

>Can there be more than one set of
> tags on a single page?

Why would you need more than one taconite tag in the response? It's just the
root tag, you can send multiple replace/append/etc tags.

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] getting the selectedIndex of a dynamic select

2007-03-26 Thread Dan G. Switzer, II
Rob,

>I thought a jQuery object consisted of extended DOM objects - i.e. all DOM
>methods and properties are available, plus the jQuery extensions.

To get to the actual DOM element, you'd use:

alert( $(this).get(0).selectedIndex );

-- or --

alert( $(this)[0].selectedIndex );

(Where 0 would return the first element found--replace the 0 with what ever
array position you want to retrieve.)

jQuery returns an array of matching elements--even if there's only one match
found. 

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] hoverIntent r3 -- animate vs. hoverIntent

2007-03-24 Thread Dan G. Switzer, II
Brian,

 

>From my playing around it seems that it gets triggered because mouse is in
the target zone at each check (even though it's been moved around a lot.)
Does the bug go away if you lower the interval way down? 

 

-Dan

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Brian Cherne
Sent: Saturday, March 24, 2007 7:44 PM
To: jQuery Discussion
Subject: [jQuery] hoverIntent r3 -- animate vs. hoverIntent

 

I've re-written hoverIntent since the last time I posted. It now has
configurable options, a mouseOut timeout, and is $-friendly.

However, not all is good in the land of hoverIntent. I've been struggling
with this one bug for a while (hence the delay since my last update) and
I've finally (sucked up my pride and) decided to approach the list for help.


I have some example code on my web site that explains the problem in detail.

(demo requires Firefox and Firebug)

Simply put, when multiple instances of hoverIntent are in-play the mouseOut
of one can kill the mouseMove of another. This happens when the mouseOut
uses animate(). Functions like html() do not kill the other instance of
hoverIntent. 

And when hoverIntent is killed, the polling interval lives on (presumably
because timers/intervals live in a different context). Unfortunately, the
mouseMove function of hoverIntent isn't updating the "current" set of mouse
coordinates (because it was killed), so the polling interval compares frozen
coordinates and of course they're the same, thus triggering an accidental
mouseOver. 

I can see the symptoms, but I don't understand what's going on. Can someone
explain what's happening and suggest a way to fix it? And why it breaks with
animate() but not html() is also a mystery...

Note, this problem exists in the much simpler r1. It is not something I
introduced with the inclusion of the mouseOut timeout.

Thanks in advance,

Brian.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] google takes over my error div!!!

2007-03-23 Thread Dan G. Switzer, II
Jörn,

>Thanks for investigating. It would be easy to make the element used for
>error messages customizable. What would you recommend as the default?
>The Google Toolbar problem can occur everywhere, so the label-default
>seems like a bad idea now.

Well, my initial thought was a , but perhaps the  tag would be
more semantically correct. 

The  is supposed to be used to "emphasis" text, and what needs more
emphasis than an error message?

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Plugin Requests

2007-03-23 Thread Dan G. Switzer, II
Glen,

>Take a look at this one:
>http://www.yui-ext.com/deploy/ext-1.0-alpha3/examples/form/combos.html
>
>
>It goes WAY beyond what a typical select box does.  Nice styling.  Keyboard
>shortcuts, tabbing.  Nice scrolling.  Type in to limit the choices. Based
>on normal select markup. It is everything a select box SHOULD be.  The down
>side is that the JS for it 400k (108k compressed).  This is a too big to
>use on a public website.  I think something like this could be made smaller
>and simpler if the only mission was the selectbox.
>
>Also, I liked how you put "design" in quotes.  It makes me feel good about
>myself. ;)

Jack does great stuff--no doubt. 

However, the one problem that every single DHTML replacement I've ever seen
has can also be seen here. 

* Look at the "Unobtrusive" section. 
* Make sure the "Originally looked like:" select box is at the bottom of the
screen.
* Left click to select an option (and notice the select box makes itself
always visible.
* Now try selecting an option in the "Transformed select:" selection box. 

See how the "dropdown" gets hidden? You have to manually scroll to see all
the options.

This is why I don't like replacing select boxes with DHTML elements when the
select box already has all the functionality you need. 

I mean when you really need auto-complete/auto-suggest functionality or need
a behavior that the  tag doesn't have, well then that's a
different beast. To use a DHTML replacement purely for aesthetics is where I
have problems. Users just end up getting confused or irritated. 

-Dan



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Plugin Requests

2007-03-23 Thread Dan G. Switzer, II
I know no one asked for my opinion, but I've never been a fan of trying to
recreate the select box just for "design" reasons. There's certain things
that a select box does that can't be re-created using DOM elements (such as
expanding outside the browser window.) Plus, I've yet to see one that
behaves like a real select box (being able to tab to the element, emulating
exact keyboard operations, etc.)

 

-Dan

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Leonardo K
Sent: Friday, March 23, 2007 2:06 PM
To: jQuery Discussion
Subject: Re: [jQuery] Plugin Requests

 

Hi Glen, look this:

Select box Plugin
http://cbach.jquery.com/demos/selectbox2/



On 3/23/07, Glen Lipka <[EMAIL PROTECTED]> wrote:

Ooh sorry, one more.

It would be awesome to have a plugin that could transform a regular
 structure into something that you could use CSS on.

Maybe even supporting .  So the backend people still get their
Select box, but the front end is reconfigured to be much more flexible.

Select boxes are a visual designers nightmare.

 

Like the checkbox plugin http://kawika.org/jquery/checkbox/ but for selects.

 

:)


Glen

 


 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

 

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Validation plugin: on blur using ajax

2007-03-23 Thread Dan G. Switzer, II
Gareth,

>Dan, many thanks for the explanation. It took a couple of read throughs but
>it all makes sense.

I've posted my presentation at:
http://blog.pengoworks.com/blogger/index.cfm?action=blog:585

Take a look at the files for "ex2.5_mailing_list_validation_ajax.cfm" It
shows off how you can combine local validation (using Jorn's Form Validation
Plug-in) and submitting the form via AJAX (and reporting errors back.)

You can also see the demo live at:
http://www.pengoworks.com/workshop/jquery_demo/ex2.5_mailing_list_validation
_ajax.cfm

If you try to sign up with the e-mail address with my e-mail address, you'll
notice you get an AJAX error (it'll have the string "[AJAX]" in it.)

NOTE: The check for duplicate e-mails is hardcoded for the example, e-mail
addresses aren't actually being added to anything.

All the source code is in the presentation download.

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] google takes over my error div!!!

2007-03-23 Thread Dan G. Switzer, II
I suspect this is because Google is inserting content into any  tag
it sees--which is what Jorn's (I wish I could remember the keystroke to get
the accent right in Jorn's name) Form Validation Plug-in uses.

My guess is if this was switched to some other element, the problem would go
away.

Some Googling seems to confirm that the Google Toolbar does something
w/ tags, so I really think this is the problem.

-Dan

>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>Behalf Of Yansky
>Sent: Thursday, March 22, 2007 4:30 AM
>To: discuss@jquery.com
>Subject: Re: [jQuery] google takes over my error div!!!
>
>
>There are some ideas for workarounds to the problem in this thread:
>http://www.nabble.com/Has-anybody-run-into-this--tf3389892.html
>
>
>amircx wrote:
>>
>> hey. when google toolbar is activate and im using form validation, when i
>> have some error div, its instad of writing my own message its writes :
>> "your google toolbar can fill this in for you select autofill"
>>
>> e
>> anyone knows how to fix it?
>>
>>
>
>--
>View this message in context: http://www.nabble.com/google-takes-over-my-
>error-div%21%21%21-tf3446124.html#a9610255
>Sent from the JQuery mailing list archive at Nabble.com.
>
>
>___
>jQuery mailing list
>discuss@jquery.com
>http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Beta Testers needed for Form Plugin file upload support

2007-03-23 Thread Dan G. Switzer, II
Mike,

>Thanks for that feedback Aaron!  XML responses are a little dicey
>using the iframe approach.  Although both dojo and YUI use this same
>technique, dojo comes right out and says they don't support XML
>responses:
>
>"XML responses are not supported because we can't get a nice
>cross-browser solution"
>
>I was hoping Safari would cooperate since FF, IE and Opera seem to
>play nicely.   I'll keep digging into it (although it's difficult
>without a Mac), but the safest way around this is to return text or
>html responses when submitting the form and that's probably the 90%
>use case anyway.

If for some reason the doc.XMLDocument fails, could we just use the
xhr.responseText and convert it into an XML document?

See this tutorial for some example code that shows creating a new XML
document object and also converting some XML text into a new Document
object:

http://www.webreference.com/programming/javascript/definitive2/index.html

I'm just thinking if we already have the RAW output, we can just convert
that to an XML document.

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] a better way to handle sessions

2007-03-21 Thread Dan G. Switzer, II
Paul,

 

I was thinking about this earlier. I would be nice if there was an
$.ajaxSessionExpired() function. Adobe's SPRY library just released an
update, where if the incoming data request contains just the text "session
expired", then they fire off a special event. 

 

Implementing something like that I wouldn't think would be too
difficult-where jQuery examined the text look for a specific token string.

 

-Dan

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul
Sent: Wednesday, March 21, 2007 6:34 PM
To: 'jQuery Discussion.'
Subject: [jQuery] a better way to handle sessions

 

I have a getScreen() function that handles navigation within my application.
Its first task is calling a validateSession() function, which interacts with
the server to assure the user is logged in.  Is there a better way to handle
sessions in ajax apps?

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery LiveSearch

2007-03-21 Thread Dan G. Switzer, II
Robert,

 

Here's my mod of the original Autocomplete Plug-in:

 

http://www.pengoworks.com/workshop/jquery/autocomplete.htm

 

It should provide you w/all the functionality you're looking for.

 

-Dan

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Robert James
Sent: Wednesday, March 21, 2007 6:01 PM
To: jQuery Discussion.
Subject: [jQuery] jQuery LiveSearch

 

What's the best way to do a jQuery LiveSearch?

My main goal is to have very little latency between typing and request.  I
think the best way to do this is to trigger on keypress, not interval - but
I'm not sure the code. 

Basically, I think a Live Search should do the following:

* Trigger on key press
* Cancel old requests after a new key has been pressed (is there a way to do
this?)
* Ignore old responses if we have a newer one (ie, even if the old one
arrives after the new one) 
* Respect the method the forms' html says (it seems that ajaxSubmit and
ajaxForm don't do this - not sure of the fix)

I'm a jQuery newcomer, so please help me out.  If someone's already made a
good livesearch jQuery script - please let me know.  Otherwise, any tips on
how to do the above will be greatly appreciated! 

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Release: Validation plugin beta 2

2007-03-21 Thread Dan G. Switzer, II
Jörn,

>There is one good argument for using IDs: You can click the error labels
>to focus the associated input, without any additional JS, just using the
>for attribute.

I figured that's why you used the  tag. :)

I'm not sure how intuitive it is to the user that clicking the error puts
the focus in the field. So I'm not sure how much usefulness it actually
provides.

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Validation plugin: on blur using ajax

2007-03-21 Thread Dan G. Switzer, II
Gareth,

>I thought I'd try the $.ajax method as suggested and after much mucking
>about it seems to be working :) The only thing that doesn't work is the
>timeout which is (very) bad because, as you pointed out, if the validation
>page doesn't respond / takes too long the browser locks. Under the
>circumstances (single app on a dedicated server) I'm prepared to take the
>risk. Obviously, if someone can tell me why the timeout doesn't work here
>I'd love to know.

Here's another idea, and one I'll be demoing tomorrow at Spring
Conference in Athens, OH.

The basic idea is use the Form Validation Plug-in to validate what you can,
and then use the Form Plug-in to submit the form via AJAX. 

Since you should always be implementing Server-side validation (never rely
strictly on client-side validation--it's too easy to bypass,) validate the
form as you normally would, and build any errors into an array of
structures--which includes the field identifier and message.

Then you pass back to the form a JSON packet that looks something like:

{
success: false,
errors: {
username: "Please try a different user name.",
zipcode:  "You entered an invalid zip code."
}
}

Once the AJAX operation completes, you'll know whether the form was
successfully submitted via the success status and you can pass in the the
errors key directly into the showErrors() function in the Form Validation
library to display any errors the server caught.
 
As soon as I finalize my presentation, I plan on blogging all the source
files and presentation to my blog at http://blog.pengoworks.com/.

You might want to keep an eye out for my post.

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] modifying autocomplete behavior

2007-03-21 Thread Dan G. Switzer, II
Paul,

 

IMO, pulling up all the entries defeats the purpose of an autocomplete (not
to mention if you have more than just a few options-it'll prevent a
scrolling nightmare.)

 

The way that I've addressed this problem in the past is by setting the
Autocomplete matchSubset option to true/1. 

 

On the backend, I design my queries to pull out matches the start off
exactly the way the user typed the phrase in first and then return results
where the string is anywhere else in the string.

 

So, if the user was searching for Cities in Ohio and typed in the letters
"Fi", the results in the drop down box would look like:

 

Findley

Blissfield

Brookfield

Canfield

Chatfield

Deerfield

Defiance

East Springfield

Farifield

Greenfield

 

This puts the most logical choices at top, but perimeter options will still
show up. 

 

The basic SQL idea is to union 2 queries together, where the first query
does a LIKE 'string%' and the second query does a LIKE '%string%'-and
excludes all matches from the first query. You'll also want to add a alias
column that assigns a static value to each query, that way you can properly
order by the queries.

 

Example:

select

cityId, name, 1 as exactMatch

from

city

where

name like '#url.q#%'

 

union

 

select

cityId, name, 0 as exactMatch

from

city

where

name like '%#url.q#%'

and

cityId not in (

select

cityId

from

city

where

name like '#url.q#%'

)

 

order by

exactMatch desc, name asc

 

Hope this help!

 

-Dan

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul
Sent: Wednesday, March 21, 2007 12:11 PM
To: 'jQuery Discussion.'
Subject: [jQuery] modifying autocomplete behavior

 

I'm using the pengoworks autocomplete plugin
(http://www.pengoworks.com/workshop/jquery/autocomplete.htm) and would like
to make an enhancement.  Unfortunately I'm not sure where to begin.

 

I'm using the autocomplete function within an intranet application.  When
the staff knows which product name they wish to select it works well, but
there are a few times when an infrequently-used product needs to be
selected, and they may not know the first few characters to populate the
list.  

 

I would like to modify the plugin so that pressing "escape" returns the
autocomplete result populated with all possible records which users can
scroll through.  Do any of you know what I might need to do to get started?

 

-Paul

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Validation plugin: on blur using ajax

2007-03-20 Thread Dan G. Switzer, II
Gareth,

In order to get this to work the way you have it, you'd have to do a
"synchronous" call to the server, which wouldn't be AJAX (the "A" is for
asynchronous.) :)

Because the code you have is running asynchronously, the AJAX call is fired
off and then the validation routine continues on its way. However, when the
server responds back, your callback function runs--which displays the alert.

You should be able to do a synchronous call using the $.ajax() function, but
it's pretty much always a bad idea to rely on synchronous operations (since
if something happens during the transmission--it can really cause problems.)

For asynchronous validation, I'd recommend doing those as a separate remote
call and then have once the validation returns, have it fire off the rest of
the local validation. You could build a queuing of remote validation rules
that get fired off and once all the rules have returned, run the local
validation.

Just be aware that AJAX validation can really cause UI issues if the server
is unresponsive.
 
-Dan



>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>Behalf Of Gareth Hughes
>Sent: Tuesday, March 20, 2007 4:52 PM
>To: jQuery Discussion.
>Subject: [jQuery] Validation plugin: on blur using ajax
>
>I've been playing with Jörn's excellent validation plugin (beta 2) to try
>and get it to validate individual fields using ajax on blur. It's a pretty
>basic attempt (because I'm sure Jörn is going to do something much better
>soon :), but I've got stuck and I can't fathom out why. I've added a new
>method called remote that I call in my rules like this:
>
>headerx: {remote: "/gen/valid.cfm"}
>
>And in the validate.js the new method looks like this:
>
>remote: function(value, element, remoteurl) {
>$.getJSON(remoteurl+"?value="+value,
>function(data){
>//alert(data.SUCCESS);
>if(data.SUCCESS == 'true'){
>return true;
>}
>});
>},
>
>It works to point; the validation page is called and the value is passed
>correctly, the validation page does its stuff and passes back true or false
>depending on the result being good or bad and the alert displays the
>correct
>true/false result. But, I can't seem to get the 'if' statement to work and,
>even if I put 'return true' above the 'if' (but below the $.getJSON) it
>always returns false.
>
>This is the first time I've used jQuery so A) I'm pretty pleased I got this
>far and B) if what I'm doing looks stupid, please forgive me :)
>
>If anyone can offer a clue I'd appreciate it.
>
>Thanks
>
>Gareth
>
>
>___
>jQuery mailing list
>discuss@jquery.com
>http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Release: Validation plugin beta 2

2007-03-20 Thread Dan G. Switzer, II
>I'd have to take a look at your demo page, but it sounds like what you
>need to use is the errorPlacement option. That allows you to customize
>the placement of generated labels (instead of the default, insert after
>invalid element). Let me know if that doesn't work in your scenario.

I guess I could use the errorPlacement, but that can get ugly when it's
really only one error message you want to move.

Take a look at your example page:
http://jquery.bassistance.de/validate/demo-test/

My code is almost identical (because it's seeded from your example.)
However, on the "Please agree to our policy" line, I've moved the checkbox
*before* the phrase--which is generally where people put it.

When you do this, the default placement for this one label isn't in a good
spot--it gets placed between the checkbox and the text. My work around was
to put this line after the "please agree" text:



Having to add the "generated" attribute makes the markup fail validation.

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Release: Validation plugin beta 2

2007-03-19 Thread Dan G. Switzer, II
Jorn,

 

Also, while preparing my demo I found I needed to explicitly declare in the
HTML where a validation error might appear for a given form field. I had to
actually go into the code to determine the correct way to format the  tag. 

 

What happens if you want a static message, you do:

 



Please select at least two topics you'd like to receive.



 

If an error occurred for a field with the ID or NAME attribute of “topic”,
this label would be displayed.

 

However, if you want to define the exact placement of an error for a dynamic
message (i.e. generated from the message maps or from the rules themselves)
you have to do:

 



 

I had to dig through the code to figure out I needed to manually add the
“generated” attribute. Also, doing this makes the markup invalid.

 

I’d like to see a better method of mapping individual error messages to the
correct element on the screen. Perhaps another mapping option:

 

$("#form").validate({

rules: {email: {required: true}},

messages: {email: "Please enter an e-mail address."},

errorElement: {email: "#errorEmail"}

});

 

Where the errorElement structure would allow you to define the element in
which the error gets displayed. I’m not sure I like the name “errorElement”,
but you get the idea.

 

-Dan

 

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Jörn Zaefferer
Sent: Sunday, March 18, 2007 5:38 PM
To: jQuery Discussion.
Subject: [jQuery] Release: Validation plugin beta 2

 

The validation plugin beta 2 is out! If you are already working with it: A
update is recommended. If not, and you need client-side validation (pure or
mixed with AJAX requests), check it out:
http://bassistance.de/jquery-plugins/jquery-plugin-validation/

Recent changes:

*   Improved dependecy feature by adding two custom expressions:
":blank" to select elements with an empty value and ":filled" to select
elements with a value, both excluding whitespace
*   Added a resetForm() method to the validator: Resets each form
element (using the form plugin, if available), removes classes on invalid
elements and hides all error messages
*   Fixed docs for validator.showErrors()
*   Fixed error label creation to always use html() instead of text(),
allowing arbitrary HTML passed in as messages
*   Fixed error label creation to use specified error class

Have fun!



-- 
Jörn Zaefferer
 
http://bassistance.de
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Release: Validation plugin beta 2

2007-03-19 Thread Dan G. Switzer, II
Jorn,

>> Also, maybe this has changed in beta 2, but I'd think using the ID
>> attribute for some fields and the NAME attribute for others is
>> confusing for the error labels. I'd rather see the use of just the
>> NAME attribute-so it's consistent across the board.
>>
>The idea is to always use IDs, but generate them using names when they
>are not available. So far that seemed to work quite well, do you have a
>specific example where it didn't work out?

For example, for radio & checkbox elements you use the NAME attribute, but
for everything else you use the ID attribute. I just find it confusing to
try to explain the difference (on when you use what.)

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Release: Validation plugin beta 2

2007-03-19 Thread Dan G. Switzer, II
Jorn,

 

One thing I’d like to see is a way to reset a specific field’s error status.
I wrote this as a hack:

 

// for any input field in the signup
form, add a onfocus event

$("#frmSignUp input").focus(

// everything in this
function is executed

function (){

// $(this)
performs the operation on the current jQuery object

 

// this removes
the error class from the field

 
$(this).removeClass("error");

 

// the label
name is equal to the field "name" attribute

// for checkbox
and radio elements and equal to the "id"

// attribute for
all other fields

var sLabelName =
($(this)[0].type == "checkbox" || $(this)[0].type == "radio") ?
$(this)[0].name : $(this)[0].id ;

 

// remove the
error message for the current field

$("[EMAIL 
PROTECTED]"
+ $(this)[0].name + "[EMAIL PROTECTED]").html("");

}

);

 

Also, maybe this has changed in beta 2, but I’d think using the ID attribute
for some fields and the NAME attribute for others is confusing for the error
labels. I’d rather see the use of just the NAME attribute—so it’s consistent
across the board.

 

-Dan

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Jörn Zaefferer
Sent: Sunday, March 18, 2007 5:38 PM
To: jQuery Discussion.
Subject: [jQuery] Release: Validation plugin beta 2

 

The validation plugin beta 2 is out! If you are already working with it: A
update is recommended. If not, and you need client-side validation (pure or
mixed with AJAX requests), check it out:
http://bassistance.de/jquery-plugins/jquery-plugin-validation/

Recent changes:

*   Improved dependecy feature by adding two custom expressions:
":blank" to select elements with an empty value and ":filled" to select
elements with a value, both excluding whitespace
*   Added a resetForm() method to the validator: Resets each form
element (using the form plugin, if available), removes classes on invalid
elements and hides all error messages
*   Fixed docs for validator.showErrors()
*   Fixed error label creation to always use html() instead of text(),
allowing arbitrary HTML passed in as messages
*   Fixed error label creation to use specified error class

Have fun!



-- 
Jörn Zaefferer
 
http://bassistance.de
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Layout plug-ins / Creating a Dashboard

2007-03-16 Thread Dan G. Switzer, II
David,

>Do you have a design comp that shows what you are trying to achieve?

Here's a quick dirty example (sorry, I didn't use jQuery--just cut-n-paste
into an html file.)

It defaults to display 5 widgets of various dimensions. If you click the
"Show Absolute Position" it'll show those same widgets laid out in a manor
that makes a little more sense.

What I'm looking for is something that would take those "Widgets" and
automatically calculate the best way to arrange them within the container.

Hopefully this makes sense.

-Dan


.widget {
margin: 10px;
padding: 10px;
background-color: #cc;
border: 1px solid black;
text-align: center;
}

.float {
float: left;
}

.absolute {
position: absolute;
}

#container {
width: 100%;
}

#container2 {
width: 100%;
display: none;
}



function showContainer(sId){
if( sId == "container" ){
document.getElementById("container").style.display =
"block";
document.getElementById("container2").style.display =
"none";
} else {
document.getElementById("container2").style.display =
"block";
document.getElementById("container").style.display = "none";
}
}



Show Float Left
Show Absolute
Position




Widget 1
Widget 2
Widget 3
Widget 4
Widget 5



Widget 1
Widget 2
Widget 3
Widget 4
Widget 5



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Layout plug-ins / Creating a Dashboard

2007-03-16 Thread Dan G. Switzer, II
David,

That's what I'm going to do to start. However, I'm wanting to come up with a
solution that will arrange the  in a smarter arrangement based upon the
number of s and the height/width of each. 

Floating everything left is ok as long as each DIV is a similar
width/height, but I'll have some widgets that are considerable larger than
others.

-Dan

>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>Behalf Of David Dexter
>Sent: Friday, March 16, 2007 4:35 PM
>To: 'jQuery Discussion.'
>Subject: Re: [jQuery] Layout plug-ins / Creating a Dashboard
>
>Dan,
>
>I did something similar and I just put each app in a div inside a container
>div and set the sub div's style attribute to float left.
>
>i.e. => (I wouldn't use inline styles... I just put those for example)
>
>
>   App 1 Icon
>   App 2 Icon
>   App 3 Icon
>   App 4 Icon
>   App 5 Icon
>
>
>I hope that helps.
>
>David Dexter
>
>
>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>Behalf Of Dan G. Switzer, II
>Sent: Friday, March 16, 2007 12:32 PM
>To: 'jQuery Discussion.'
>Subject: [jQuery] Layout plug-ins / Creating a Dashboard
>
>I'm going to be working on a "Dashboard" for an application that could
>contain X number of "widgets" (a "widget" would a block element of various
>width/heights that would contain charts and various threshold alerts.)
>
>Since a user will be able to configure which "widgets" are on their
>Dashboard, I need something that will dynamically lay out the widgets so
>that they best fit the Dashboard window.
>
>Before reinventing the wheel, I was just wondering if any one has seen any
>good plug-ins that might help w/my layout dilemma.
>
>Thanks,
>Dan
>
>
>___
>jQuery mailing list
>discuss@jquery.com
>http://jquery.com/discuss/
>
>
>
>___
>jQuery mailing list
>discuss@jquery.com
>http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Layout plug-ins / Creating a Dashboard

2007-03-16 Thread Dan G. Switzer, II
I'm going to be working on a "Dashboard" for an application that could
contain X number of "widgets" (a "widget" would a block element of various
width/heights that would contain charts and various threshold alerts.)

Since a user will be able to configure which "widgets" are on their
Dashboard, I need something that will dynamically lay out the widgets so
that they best fit the Dashboard window.

Before reinventing the wheel, I was just wondering if any one has seen any
good plug-ins that might help w/my layout dilemma. 

Thanks,
Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] NEW Plug-in: cfjs (ColdFusionJavaScript)

2007-03-13 Thread Dan G. Switzer, II
>Please add:
>
>   StructKeyExists: function(s,k){
>   for(var n in s){
>   if (n == k) return true;
>   }
>   return false;
>   },
>
>
>Shall we post additions and updates here?

This would be much more efficient:

StructKeyExists: function(s,k){
return !!s[k];
},

However, it's also important to remember that a ColdFusion "structure" isn't
the exact same thing as a JavaScript Object.

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Heads Up - I'll be giving a jQuery Presentation at Spring 2007...

2007-02-15 Thread Dan G. Switzer, II
I'm going to be giving a presentation on jQuery at Spring  2007 this
year (http://www.sbconference.com/.)

I'm planning on going over some popular plug-ins and some basic tips/tricks.


Any suggestions?

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] $.show() improvement

2007-02-14 Thread Dan G. Switzer, II
John,

>Currently, the only tricky case is if an element has a display: none
>set on page load - we have no way to determine what that element's
>'show' should be. And yes, if we implemented this, we would absolutely
>cache the result.
>
>Right now, if an element is visible (even if it's a div with a
>display:inline) and you hide it, then show it again - it'll go back to
>an inline state again (as you would expect).

Why not assume the default behavior for the element? (i.e. a, span, etc
elements are inline; div, p, etc are block elements.)

You might have an occasional situation where someone wants a span to be a
block element, but going back to the expect display type would solve most
issues.

-Dan 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Taconite Plugin - New and Improved!

2007-02-12 Thread Dan G. Switzer, II
>Dan G. Switzer, II wrote:
>> However, the verbose XML language is both a plus and a negative. It's
>very
>> easy to read and determine what's going on, but it also means you end up
>> with much large data packets you need to transfer between the client and
>> server.
>>
>
>This is not a problem if you already use a lot of AHAH on your pages

First, I looked at Taconite a long time ago, so thing might have changed a
bit.

The issue I was talking about was if you're trying to update a table w/let's
say 50 records. At the time, Taconite had no way of just sending back some
JSON data to update the table. You would have needed to send across all the
HTML.

Obviously, when you're dealing w/large tabular data sets, using a
lightweight data exchange format cuts down on the bandwidth considerably. 

>From looking at the examples that were posted, it looks like there's ways to
deal w/JSON data now.

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Miniscule (<1k) Drag'n'Resize for jqModal via jqDnR

2007-02-12 Thread Dan G. Switzer, II
FYI - The following works for me in IE6/FF1.5 (the only 2 I tested)





window.alert = function (sMsg){
prompt(sMsg);
}

// the alert box is now the prompt dialog
alert("hello world");








>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>Behalf Of Dan G. Switzer, II
>Sent: Monday, February 12, 2007 9:39 AM
>To: [EMAIL PROTECTED]; 'jQuery Discussion.'
>Subject: Re: [jQuery] Miniscule (<1k) Drag'n'Resize for jqModal via jqDnR
>
>Try
>
>window.alert = function (){
>   $('#ex1a').jqm();
>}
>
>-Dan
>
>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>>Behalf Of Alexandre Plennevaux
>>Sent: Sunday, February 11, 2007 7:51 AM
>>To: 'jQuery Discussion.'
>>Subject: Re: [jQuery] Miniscule (<1k) Drag'n'Resize for jqModal via jqDnR
>>
>>No, not at all !(
>>
>>
>>This is what i tried:
>>
>>
>>
>>
>>function alert() {
>>  $('#ex1a').jqm();
>>}
>>
>>$().ready(function() {
>>alert("hello world");
>>
>>});
>>
>>
>>
>>Just nothing happens.
>>
>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>>Behalf Of R. Rajesh Jeba Anbiah
>>Sent: dimanche 11 février 2007 11:55
>>To: discuss@jquery.com
>>Subject: Re: [jQuery] Miniscule (<1k) Drag'n'Resize for jqModal via jqDnR
>>
>>On Feb 10, 3:02 pm, "Alexandre Plennevaux" <[EMAIL PROTECTED]>
>>wrote:
>>> Well, i used to disable alert like this:
>>>
>>> function alert() {}
>>
>>   Oh, thanks.
>>
>>> But i guess you could tweak it to launch a modal window instead. I'll
>>> give it a try
>>
>>   Just curious, was your try success?
>>
>>--
>>  
>>Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/
>>
>>
>>___
>>jQuery mailing list
>>discuss@jquery.com
>>http://jquery.com/discuss/
>>
>>--
>>Ce message Envoi est certifié sans virus connu.
>>Analyse effectuée par AVG.
>>Version: 7.5.441 / Base de données virus: 268.17.35/680 - Date: 10/02/2007
>>21:15
>>
>>
>>
>>___
>>jQuery mailing list
>>discuss@jquery.com
>>http://jquery.com/discuss/
>>
>
>
>
>___
>jQuery mailing list
>discuss@jquery.com
>http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Taconite Plugin - New and Improved!

2007-02-12 Thread Dan G. Switzer, II
Matt,

I played around with the Taconite stuff quite a bit 18 months ago or so. I
really like the readability of the XML--it makes it very easy to figure out
what's supposed to happen. 

Plus, all changes are driven from the XML, so if you've restructured your
returning record to include more information, you don't need to worry about
making changes in multiple places, since the XML contains all instructions.

However, the verbose XML language is both a plus and a negative. It's very
easy to read and determine what's going on, but it also means you end up
with much large data packets you need to transfer between the client and
server. 

-Dan

>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>Behalf Of Matt Grimm
>Sent: Sunday, February 11, 2007 2:25 PM
>To: jQuery Discussion.
>Subject: Re: [jQuery] Taconite Plugin - New and Improved!
>
>Mike, this is an extraordinary idea. I'm still working out exactly how I
>can implement it into my current projects, but this could very well
>change the way I use JavaScript in heavy AJAX environments. This allows
>me to use true AJAX (as opposed to AHAH) while still maintaining the
>flexibility of making asynchronous calls to update HTML snippets. The
>beauty I see is that I don't need to write one large library that
>contains each and every JS call I'll make in the lifetime of a page.
>Instead, I only have to include the relevant code for the particular
>call that has just been made. Plus, using a MVC framework and templating
>engine, the HTML and JS can be cleanly written together with well-formed
>XML documents.
>
>Thank you. This is great.
>
>m.
>
>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>Behalf Of Mike Alsup
>Sent: Tuesday, February 06, 2007 11:40 AM
>To: jQuery Discussion.
>Subject: [jQuery] Taconite Plugin - New and Improved!
>
>I've just rewritten my Taconite Plugin and added some pretty cool
>features.  If you're not familiar with Taconite, it's an easy way to
>effect multiple client-side updates with the results of a single ajax
>call.  With this latest version there is absolutely no code required
>to process command documents returned from the server.  The plugin
>detects taconite responses and automatically processes them for you.
>
>Other changes:
>
>- Available commands now include almost everything in the jQuery API
>- Vastly improved logging/debug support
>- Fully extensible
>
>Full details and examples can be found at:
>http://www.malsup.com/jquery/taconite/
>
>Mike
>
>PS: For anyone using my old xmlExec plugin, this is a drop-in
>replacement.
>
>___
>jQuery mailing list
>discuss@jquery.com
>http://jquery.com/discuss/
>
>___
>jQuery mailing list
>discuss@jquery.com
>http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Miniscule (<1k) Drag'n'Resize for jqModal via jqDnR

2007-02-12 Thread Dan G. Switzer, II
Try

window.alert = function (){
$('#ex1a').jqm();
}

-Dan

>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>Behalf Of Alexandre Plennevaux
>Sent: Sunday, February 11, 2007 7:51 AM
>To: 'jQuery Discussion.'
>Subject: Re: [jQuery] Miniscule (<1k) Drag'n'Resize for jqModal via jqDnR
>
>No, not at all !(
>
>
>This is what i tried:
>
>
>
>
>function alert() {
>   $('#ex1a').jqm();
>}
>
>$().ready(function() {
>alert("hello world");
>
>});
>
>
>
>Just nothing happens.
>
>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>Behalf Of R. Rajesh Jeba Anbiah
>Sent: dimanche 11 février 2007 11:55
>To: discuss@jquery.com
>Subject: Re: [jQuery] Miniscule (<1k) Drag'n'Resize for jqModal via jqDnR
>
>On Feb 10, 3:02 pm, "Alexandre Plennevaux" <[EMAIL PROTECTED]>
>wrote:
>> Well, i used to disable alert like this:
>>
>> function alert() {}
>
>   Oh, thanks.
>
>> But i guess you could tweak it to launch a modal window instead. I'll
>> give it a try
>
>   Just curious, was your try success?
>
>--
>  
>Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/
>
>
>___
>jQuery mailing list
>discuss@jquery.com
>http://jquery.com/discuss/
>
>--
>Ce message Envoi est certifié sans virus connu.
>Analyse effectuée par AVG.
>Version: 7.5.441 / Base de données virus: 268.17.35/680 - Date: 10/02/2007
>21:15
>
>
>
>___
>jQuery mailing list
>discuss@jquery.com
>http://jquery.com/discuss/
>



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery operations on ajax data

2007-02-07 Thread Dan G. Switzer, II
Paul,

 

I was just pointing out that you only really need to reinitialize the
click() handler on images in the #content layer (the one where you're
loading the content.) There's no reason to update the entire DOM again. Just
the segment you loaded into DOM.

 

-Dan

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul
Sent: Wednesday, February 07, 2007 5:14 PM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] jQuery operations on ajax data

 

Dan, 

 

Thank you.  Using the callback to reinit did the trick.

 

Oh and I have no idea what you meant about only triggering off the handler
for the #content layer.  Will you explain?

 

-Paul

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dan G. Switzer, II
Sent: Wednesday, February 07, 2007 2:53 PM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] jQuery operations on ajax data

 

Paul,

 

The load() method is asynchronous. You'll need to use the callback to fire
off a trigger to reinitialize your img click handler. Also, I'd only trigger
off the handler for the #content layer.

 

-Dan

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul
Sent: Wednesday, February 07, 2007 4:30 PM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] jQuery operations on ajax data

 

I think I already am, Andy.  Here's my first few lines; do I need to do
something more?  (And thanks, btw.)

 

$(function() {

 /* Load the initial screen content */

 
$("#content").load("includes/sh4-welcome.cfm?nocache=#getTickCount
()#");

 /*  Assign the onclick event handler to all the images on
the keypad. */

 $("#keypad img").click(function() {

  ...

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Andy Matthews
Sent: Wednesday, February 07, 2007 2:12 PM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] jQuery operations on ajax data

 

You just have to reassign the function to the images after you load in
content.

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul
Sent: Wednesday, February 07, 2007 3:14 PM
To: 'jQuery Discussion.'
Subject: [jQuery] jQuery operations on ajax data

I'm using jQuery to assign a function to every image within a div on my
page:

 

$("#keypad img").click(function() { ...

 

It worked great, until I set about organizing the screens in my single-page
application.  I want to load the content dynamically as a user moves about
the application, so I'm trying to initialize the first screen like so:

 

$("#content").load("includes/sh4-welcome.cfm");

 

This renders the html properly, but it breaks the jQuery click function I
was assigning to the images. (The #keypad div is within the file being
loaded at runtime.)  There aren't any JS errors, but nothing happens when I
click.  If I remove the ajax call, and instead put the data back inline the
good old-fashioned way, the click functions work again.

 

Is there a rule I don't know about using jQuery functions on ajax-loaded
data?

 

-Paul

 

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery operations on ajax data

2007-02-07 Thread Dan G. Switzer, II
PS - Your code to prevent caching seems flawed. By using the CF
getTickCount() function the tick count will be hard code into your template.
What you want to do, is use the JS Date() object to get the current
milliseconds.

 

-Dan

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul
Sent: Wednesday, February 07, 2007 4:30 PM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] jQuery operations on ajax data

 

I think I already am, Andy.  Here's my first few lines; do I need to do
something more?  (And thanks, btw.)

 

$(function() {

 /* Load the initial screen content */

 
$("#content").load("includes/sh4-welcome.cfm?nocache=#getTickCount
()#");

 /*  Assign the onclick event handler to all the images on
the keypad. */

 $("#keypad img").click(function() {

  ...

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Andy Matthews
Sent: Wednesday, February 07, 2007 2:12 PM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] jQuery operations on ajax data

 

You just have to reassign the function to the images after you load in
content.

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul
Sent: Wednesday, February 07, 2007 3:14 PM
To: 'jQuery Discussion.'
Subject: [jQuery] jQuery operations on ajax data

I'm using jQuery to assign a function to every image within a div on my
page:

 

$("#keypad img").click(function() { ...

 

It worked great, until I set about organizing the screens in my single-page
application.  I want to load the content dynamically as a user moves about
the application, so I'm trying to initialize the first screen like so:

 

$("#content").load("includes/sh4-welcome.cfm");

 

This renders the html properly, but it breaks the jQuery click function I
was assigning to the images. (The #keypad div is within the file being
loaded at runtime.)  There aren't any JS errors, but nothing happens when I
click.  If I remove the ajax call, and instead put the data back inline the
good old-fashioned way, the click functions work again.

 

Is there a rule I don't know about using jQuery functions on ajax-loaded
data?

 

-Paul

 

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery operations on ajax data

2007-02-07 Thread Dan G. Switzer, II
Paul,

 

The load() method is asynchronous. You'll need to use the callback to fire
off a trigger to reinitialize your img click handler. Also, I'd only trigger
off the handler for the #content layer.

 

-Dan

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul
Sent: Wednesday, February 07, 2007 4:30 PM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] jQuery operations on ajax data

 

I think I already am, Andy.  Here's my first few lines; do I need to do
something more?  (And thanks, btw.)

 

$(function() {

 /* Load the initial screen content */

 
$("#content").load("includes/sh4-welcome.cfm?nocache=#getTickCount
()#");

 /*  Assign the onclick event handler to all the images on
the keypad. */

 $("#keypad img").click(function() {

  ...

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Andy Matthews
Sent: Wednesday, February 07, 2007 2:12 PM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] jQuery operations on ajax data

 

You just have to reassign the function to the images after you load in
content.

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul
Sent: Wednesday, February 07, 2007 3:14 PM
To: 'jQuery Discussion.'
Subject: [jQuery] jQuery operations on ajax data

I'm using jQuery to assign a function to every image within a div on my
page:

 

$("#keypad img").click(function() { ...

 

It worked great, until I set about organizing the screens in my single-page
application.  I want to load the content dynamically as a user moves about
the application, so I'm trying to initialize the first screen like so:

 

$("#content").load("includes/sh4-welcome.cfm");

 

This renders the html properly, but it breaks the jQuery click function I
was assigning to the images. (The #keypad div is within the file being
loaded at runtime.)  There aren't any JS errors, but nothing happens when I
click.  If I remove the ajax call, and instead put the data back inline the
good old-fashioned way, the click functions work again.

 

Is there a rule I don't know about using jQuery functions on ajax-loaded
data?

 

-Paul

 

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Dylan Verheul's Autocomplete Mod...

2007-02-01 Thread Dan G. Switzer, II
Sean,

Here's Dylan's post where documents the settings. I didn't really change the
functionality of any of those settings, so hopefully this will help you out:

http://www.nabble.com/Autocompleter-documentation-tf2201442.html#a6095249

What's your current configuration code look like? 

What browser are you using?

What version of jQuery are you using?

-Dan

>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>Behalf Of Sean O
>Sent: Thursday, February 01, 2007 11:16 AM
>To: discuss@jquery.com
>Subject: Re: [jQuery] Dylan Verheul's Autocomplete Mod...
>
>
>Hi Dan,
>
>
>Great work on this plugin mod.  I've got it integrated into a Sales Order
>application I've developed.
>
>However, I'm still having a few quirks such as the autocomplete only
>showing
>matches when the {minChars} # of characters is input.  Any more or less,
>and
>it disappears.  I think I've now tried about 57 different combinations of
>settings, and I can't get it to work like your demo (keep typing and the
>selections limit themselves).
>
>To that end, do you have any documentation that might help?
>
>
>Thanks,
>
>SEAN O
>
>
>
>
>Dan G. Switzer, II wrote:
>>
>> Sean,
>>
>>>Dan, this looks great.  I like the Ajax/array flexibility.
>>>
>>>Do you have some sample backend code that populates the ajax listbox?
>(e.g.
>>>your autocomplete.cfm)
>>
>> Here's the URL to the AJAX template:
>>
>> http://www.pengoworks.com/workshop/jquery/autocomplete_ajax.cfm?q=sp
>>
>> That currently returns:
>>
>> Sparta|896
>> Spencer|897
>> Spencerville|898
>> Spring Valley|899
>> Springboro|900
>> Springfield|901
>>
>> The code basically expects a pipe delimited list of options separated by
>> new
>> lines. The pipe delimited list is then split into an array.
>>
>>>Also, how do you match content in the middle of a string?  (typing 'rica'
>>>will bring up 'Africa')  I haven't had much luck with matchSubset or
>>>matchContains...
>>
>> Well, the matchSubset actually is a cache checking option. It's designed
>> to
>> expand the cache search.
>>
>> The matchContains is what you want to set to 1. This should make sure the
>> JS
>> portion of the code actually searches for the matches anywhere in the
>> string.
>>
>> On top of that, your AJAX page also needs to return matches for both
>> "exact"
>> (matches at the start of the string) and "contain" (matches anywhere in
>> the
>> string.)
>>
>> The way I handle this is to provide "exact" returns first and then
>> "contain"
>> matches second.
>>
>> My SQL would look something like:
>>
>> select
>>  1 as ExactMatch, UserId, Name
>> from
>>  User
>> where
>>  Name like 'Dan%'
>>
>> union
>>
>> select
>>  0 as ExactMatch, UserId, Name
>> from
>>  User
>> where
>>  UserId not in (
>>  select
>>  UserId
>>  from
>>  User
>>  where
>>  Name like 'Dan%'
>>  )
>> and
>>  Name like '%Dan%'
>>
>>
>> order by
>>  ExactMatch desc, Name asc
>>
>> This allows me to show exact/best matches at top and other interesting
>> matches at the bottom. The code that I'm using needed to allow users to
>> search by either last name or first name. For users who type the last
>name
>> in first (which is the way the results are returned) then those exact
>> matches appear right at top.
>>
>> I'll try to actually write some documentation when I get a chance. I was
>> trying to find Dylan's original post to the mailing list where he
>> documented
>> the plug-in, but I couldn't find it when I went back to look for it. It
>> almost looked like the post was archived.
>>
>> -Dan
>>
>>
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
>>
>>
>
>--
>View this message in context: http://www.nabble.com/Dylan-Verheul%27s-
>Autocomplete-Mod...-tf2968123.html#a8751034
>Sent from the JQuery mailing list archive at Nabble.com.
>
>
>___
>jQuery mailing list
>discuss@jquery.com
>http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Bug in $() in jQuery v1.1.1?

2007-01-30 Thread Dan G. Switzer, II
Jörn,

>In case you want to test it with your copy of jQuery, modify pushStack
>to look like this:
>
>pushStack: function( a ) {
>   var ret = jQuery(a);
>   ret.prevObject = this;
>   return ret;
>},

Yes, that does indeed fix the problem! I guess I should have searched the
archives better.

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Bug in $() in jQuery v1.1.1?

2007-01-30 Thread Dan G. Switzer, II
I've got the following test case that performs quite a bit different between
v1.0.4 and v1.1.1. 

In the code below v1.0.4 returns an undefined object for both test
cases--which certainly seems like it would be the expected behavior (I mean
if an element doesn't exist, it shouldn't be returned.) Also, the statements
should for all intents and purposes return the exact same results.

However, in v1.1.1 I you get radically different results. The first case
returns the context element--which definitely seems wrong--and the second
test returns an empty element--which seems like an unexpected behavior.

Should v1.1.1 really be returning an empty element if no match exists?

-Dan

PS - Here's the test.


  
Item 1
  
  
Item 2
  
  
Item 3
  





function bug(){

  // v1.1.1 returns parent element (the UL--which is the context element)
  // v1.0.4 returns undefined
  alert(
$("li.selected", document.getElementById("idTest"))[0]
  );

  // v1.1.1 returns an empty element
  // v1.0.4 returns undefined
  alert(
$("#idTest li.selected")[0]
  );
}



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Changing a browser's starting page

2007-01-25 Thread Dan G. Switzer, II
Gerry,

>Probably, but that still does not solve my problem... :(

The default homepage for IE is stored in the registry. Since you have the
many employees, I suspect you have something in place to manage Windows
patches/registry changes for all your users.

I would recommend just pushing out the updated homepage to all your users
with without tool you use to manage your users PCs. Talk to your IT staff if
this isn't something your group handles.

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] IE bug

2007-01-19 Thread Dan G. Switzer, II
Philip,

 

The problem seems to be some piece of JS in your app is trying to write a
 tag dynamically. However, that piece of code is actually replacing
the entire DOM object when it writes this code. What I'm seeing is this in
the source code:

 

<script id=__ie_init defer=true src=//:>

 

The "defer" attribute is designed to prevent the browser from executing the
code in the script tag until the DOM is ready. You definitely don't want
that there when you're loading most external libraries. Especially not
jQuery.

 

http://www.websiteoptimization.com/speed/tweak/defer/

 

-Dan

 

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Philip Pryce
Sent: Friday, January 19, 2007 3:08 PM
To: jQuery Discussion.
Subject: Re: [jQuery] IE bug

 

So your saying i should remove it? or add it to ones that dont have it?

On 1/19/07, Dan G. Switzer, II <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:

Philip,

 

Viewing the source code in IE6 showed me that you've got some code writing a

Re: [jQuery] IE bug

2007-01-19 Thread Dan G. Switzer, II
Philip,

 

Viewing the source code in IE6 showed me that you've got some code writing a

Re: [jQuery] ID of parent

2007-01-19 Thread Dan G. Switzer, II
Just out of curiosity, are there more than 1 DOM item on the page w/id of
sText?

 

-Dan

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Methvin
Sent: Friday, January 19, 2007 9:09 AM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] ID of parent

 

> var ej = $("#sText").parent().attr("id");

Looks good to me. Do you have a test page?

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Proper OOP paradigm

2007-01-17 Thread Dan G. Switzer, II
>> > var myObject = new femalePatient(37);
>> >
>> > alert(myObject.age); // alerts 42
>>
>> This shows the OOP limitations of Javascript. In a real-world
>> femalePatient
>> object, the age property would be unavailable. ;-)
>
>Yep. A proper Java class would limit access to a getter method, whichs
>throws an exception when called...

Actually, should it divide the age by 2? That it actually outputs 21? ;)


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Form not submitting

2007-01-17 Thread Dan G. Switzer, II
Dave,

>> $("#login")[0].submit();
>
>Unfortunately that doesn't work either. In firebug I get:
>$("#login")[0].submit is not a function
>
>I get the same error with
>document.login.submit();

The document.login.submit() would only work if you have a form tag w/the
"name" attribute of "login". 

What does document.getElementById("login").submit() do?

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Thickbox CSS - Including in Thickbox.js?

2007-01-16 Thread Dan G. Switzer, II
Nate,

>Here is a question I have, and perhaps this is doable (I can't see why
>not),
>but why don't the *box scripts like Thickbox, Lightbox, etc, just write the
>CSS in the Javascript file, and eliminate the need to include a CSS file
>(or
>it's contents in your CSS)?

I'm just giving a general answer to why API developers may choose to go w/an
external stylesheet over programming the stylesheets via the API.

I think the reason most people like the idea of an external style sheet is
that it allows you to have different style sheets for different
purposes--without needing to touch the API.

The disadvantage code rewritten this way has, is that it's often impossible
to style multiple instances of the same plug-in on the same page in a
different style--which can sometimes be necessary. The code has to allow for
some way to customize the class declarations. 

I've only run into a few times when this has been necessary and it's usually
w/DHTML menus.

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Dylan Verheul's Autocomplete Mod...

2007-01-16 Thread Dan G. Switzer, II
Sean,

>Dan, this looks great.  I like the Ajax/array flexibility.
>
>Do you have some sample backend code that populates the ajax listbox? (e.g.
>your autocomplete.cfm)

Here's the URL to the AJAX template:

http://www.pengoworks.com/workshop/jquery/autocomplete_ajax.cfm?q=sp

That currently returns:

Sparta|896
Spencer|897
Spencerville|898
Spring Valley|899
Springboro|900
Springfield|901

The code basically expects a pipe delimited list of options separated by new
lines. The pipe delimited list is then split into an array.

>Also, how do you match content in the middle of a string?  (typing 'rica'
>will bring up 'Africa')  I haven't had much luck with matchSubset or
>matchContains...

Well, the matchSubset actually is a cache checking option. It's designed to
expand the cache search.

The matchContains is what you want to set to 1. This should make sure the JS
portion of the code actually searches for the matches anywhere in the
string.

On top of that, your AJAX page also needs to return matches for both "exact"
(matches at the start of the string) and "contain" (matches anywhere in the
string.)

The way I handle this is to provide "exact" returns first and then "contain"
matches second.

My SQL would look something like:

select
1 as ExactMatch, UserId, Name
from
User
where
Name like 'Dan%'

union

select
0 as ExactMatch, UserId, Name
from
User
where
UserId not in (
select
UserId
from
User
where
Name like 'Dan%'
)
and
Name like '%Dan%'


order by
ExactMatch desc, Name asc

This allows me to show exact/best matches at top and other interesting
matches at the bottom. The code that I'm using needed to allow users to
search by either last name or first name. For users who type the last name
in first (which is the way the results are returned) then those exact
matches appear right at top.

I'll try to actually write some documentation when I get a chance. I was
trying to find Dylan's original post to the mailing list where he documented
the plug-in, but I couldn't find it when I went back to look for it. It
almost looked like the post was archived.

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Dylan Verheul's Autocomplete Mod...

2007-01-12 Thread Dan G. Switzer, II
Dylan,

You're correct. It also doesn't work very well if you're displaying the drop
down options in a drastically different way then the autocomplete box is
being filled in.

However, it's a nice feature if you've got a very straightforward match.

Also, on a somewhat related note, what I've been doing for "contain" type
matches is loading exact "start" matches at the top of the search results
and "contain" matches below that. Seems to work pretty well for looking up
customers out of the database. 

-Dan 

>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>Behalf Of Dylan Verheul
>Sent: Friday, January 12, 2007 3:36 PM
>To: jQuery Discussion.
>Subject: Re: [jQuery] Dylan Verheul's Autocomplete Mod...
>
>I have't actually looked at the code, but it's nice to see that the
>autocompleter is still being used and improved upon.
>
>One thing:
>
>> * Autofill pre-populates text box as you type
>
>This probably won't work if you allow searching within a string, and
>not just at the beginning of the string.
>
>Best,
>
>Dylan
>
>On 1/12/07, Dan G. Switzer, II <[EMAIL PROTECTED]> wrote:
>> I needed some modifications to the autocomplete library that Dylan
>Verheul
>> released, and I wanted to share the modded library:
>>
>> http://www.pengoworks.com/workshop/jquery/autocomplete.htm
>>
>> Here are some of the things I fixed/changed:
>>
>> * Supports local data array (can now use w/out AJAX).
>> * Limit dropdown to XX number of results (good for limiting the results
>to
>> users)
>> * Autofill pre-populates text box as you type
>> * New findValue() method can be used to programmatically determine if the
>> value in the box is a valid option. (Useful for verifying the text
>entered
>> is an existing value option.)
>> * Dropdown options now correctly re-position themselves on each display
>> (which means they adjust for changing to the DOM)
>> * Dropdown box defaults to the width of the input field its attached to
>(you
>> can manually specify a larger width as well)
>> * Better emulates Windows autocomplete boxes (for example: hitting delete
>> and retyping the same box will now bring back the dropdown menu)
>> * Miscellaneous bug fixes
>>
>> -Dan
>>
>>
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
>>
>
>___
>jQuery mailing list
>discuss@jquery.com
>http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Dylan Verheul's Autocomplete Mod...

2007-01-12 Thread Dan G. Switzer, II
I needed some modifications to the autocomplete library that Dylan Verheul
released, and I wanted to share the modded library:

http://www.pengoworks.com/workshop/jquery/autocomplete.htm

Here are some of the things I fixed/changed:

* Supports local data array (can now use w/out AJAX).
* Limit dropdown to XX number of results (good for limiting the results to
users)
* Autofill pre-populates text box as you type
* New findValue() method can be used to programmatically determine if the
value in the box is a valid option. (Useful for verifying the text entered
is an existing value option.)
* Dropdown options now correctly re-position themselves on each display
(which means they adjust for changing to the DOM)
* Dropdown box defaults to the width of the input field its attached to (you
can manually specify a larger width as well)
* Better emulates Windows autocomplete boxes (for example: hitting delete
and retyping the same box will now bring back the dropdown menu)
* Miscellaneous bug fixes

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Automatically advancing to next form element...

2007-01-10 Thread Dan G. Switzer, II
Dave,

I'm actually looking at it for several uses:

* The autocomplete function I'm using doesn't correctly "tab" to the next
field if you use the [TAB] key when selecting an option from the keyboard
* Implementing autotabbing to the next field when a certain number of
characters have been typed in

I'll probably play around w/developing a plugin for this that will allow you
to programmatically go between next/prev form fields.

-Dan

>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>Behalf Of Dave Methvin
>Sent: Wednesday, January 10, 2007 5:42 PM
>To: 'jQuery Discussion.'
>Subject: Re: [jQuery] Automatically advancing to next form element...
>
>> Does anyone have code that will automatically advance the
>> focus the next form element in the DOM and if it's the last
>> form element, cycle to the first form field again?
>
>Have you looked at setting tabOrder on the fields? That doesn't require any
>Javascript at all. Or were you looking to have Enter or some other key
>advance fields? Even in that case it might be useful to use tabOrder to
>decide which field goes next.
>
>
>
>___
>jQuery mailing list
>discuss@jquery.com
>http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Automatically advancing to next form element...

2007-01-10 Thread Dan G. Switzer, II
Does anyone have code that will automatically advance the focus the next
form element in the DOM and if it's the last form element, cycle to the
first form field again?

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Sticky Tooltips Plug-in?

2007-01-09 Thread Dan G. Switzer, II
Jörn,

>I guess my "click" feature is not yet quite what you are looking for,
>right? http://jquery.bassistance.de/tooltip/tooltipTest.html Click the
>image to see it.
>
>You could just remove the overlay code from thickbox... that should go
>into it's own plugin anyway.

No. I need the hide/close functionality to be based upon the user clicking
something. I've been working on modifying the jTip plug-in to meet my needs.

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Sticky Tooltips Plug-in?

2007-01-09 Thread Dan G. Switzer, II
I'm looking for tooltip that supports sticky tips (i.e. trigger via a click
and have to manually close.)

I've looked at the Tip libraries on the plug-in page, but none do what I
need.

Specifically what I'm wanting to do is load an external chunk of HTML when a
user clicks on an object. I know thickbox will do this, but I don't want to
cover up the rest of the page.

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Q: Extending Autocomplete Plugin...

2007-01-04 Thread Dan G. Switzer, II
Jörn,

That was it. I'm having trouble figuring out the namespace of the plug-ins.

Thanks!

-Dan

>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>Behalf Of Jörn Zaefferer
>Sent: Thursday, January 04, 2007 5:05 PM
>To: jQuery Discussion.
>Subject: Re: [jQuery] Q: Extending Autocomplete Plugin...
>
>Dan G. Switzer, II schrieb:
>> jQuery.fn.autocompleteLocal = function(data, options) {
>>  return jQuery.fn.autocomplete(null, options, data);
>> }
>>
>> But this doesn't work. How can I extend the jQuery.fn.autocomplete plug-
>in
>> to do what I want?
>Your example doesn't make much sense. Maybe something like this is what
>you are looking for:
>
>jQuery.fn.autocompleteLocal = function(url, options) {
>   var defaults = { ... };
>   return this.autocomplete(url, jQuery.extend(defaults, options));
>}
>
>--
>Jörn Zaefferer
>
>http://bassistance.de
>
>
>___
>jQuery mailing list
>discuss@jquery.com
>http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Q: Extending Autocomplete Plugin...

2007-01-04 Thread Dan G. Switzer, II
I'm relatively new to jQuery. I've been playing around w/the API a bit and
slowly implementing it into some work.

Today I've been making some modifications to the Autocomplete library to
meet certain requirements of a project. One of the modifications I've made
is to allow local data to be passed to the autocomplete plugin so that you
can use it without any additional AJAX calls.

However, I have a question that I can't seem to figure out. The plugin is
declared using the following:

jQuery.fn.autocomplete = function(url, options) {
// Make sure options exists
options = options || {};
// Set url as option
options.url = url;

// ... some more config code ...

this.each(function() {
var input = this;
new jQuery.autocomplete(input, options);
});

// Don't break the chain
return this;
}

What I'm looking to do is define another function that sets some different
default options but calls the jQuery.fn.autocomplete function.

I've tried:

jQuery.fn.autocompleteLocal = function(data, options) {
return jQuery.fn.autocomplete(null, options, data);
}

But this doesn't work. How can I extend the jQuery.fn.autocomplete plug-in
to do what I want?

Thanks,
Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/