[jQuery] Re: AJAX Problem

2007-04-07 Thread dropx

i have figure out the point: the responseXML  returns XMLHttpRequest.
this is why i could not see the xml text. i have faced with many
problems in this Ajax experience :(

On Apr 8, 2:07 am, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
> I made sure my apache server uses application/xml. I make sure all dynamic
> xml content does to!
>
> is it your own server? perhaps you need to upgrade the server??
>
> On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > i am directly getting my data from xml document. how can i make the
> > content-type as application/xml ?
>
> > On Apr 8, 12:49 am, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
> > > I serve my xml as application/xml... it may make a difference!
>
> > > On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:
>
> > > > hi, you are right. firefox and other modern browsers restrict this.
> > > > however. IE confused me because it was working for IE. for firefox by
> > > > netscape.security. i have solved this.
>
> > > > Now i have another problem. After calling the
> > > > $.ajax({..}).responseXML; i am gettin null. however the responseText
> > > > returns the XML as text. Why it could be.(content-type is "text/xml"
> > > > actually i am directly getting XML file).
>
> > > > On Apr 7, 10:30 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> > > > > dropx schrieb:
>
> > > > > > I know how to call from another host with javascript without using
> > > > > > JQuery. my question:
> > > > > > is it possible to solve this with just JQuery's ajax functions?
>
> > > > > XmlHttpRequest ("Ajax") does not allow cross-domain requests. jQuery
> > nor
> > > > > any other library can solve this, because it is not solvable.
>
> > > > > The only way to call JavaScript from another host is by
> > > > > including/appending script elements.
>
> > > > > -- Klaus
>
> > > --
> > > Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
>
> --
> Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ



[jQuery] Re: Body Browser Classes

2007-04-07 Thread Joan Piedra

There are some alternatives.

* IE Conditional Comments
* Client-side conditionals (Javascript)
* Server-side conditionals (php,cf,python,others)

If you ask me, i would choose the server side way ;)

Regards,

On 4/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:





On Apr 6, 4:57 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] schrieb:
>
>
>
> > There is an easier  way that is not jQuery-or-Javascript-dependent,
> > since mostly we just want to know is the browser IE  or not. Use
> > conditional comments around the BODY tag.
Seehttp://www.puidokas.com/updating-my-css-for-ie7/
> > . I use :
> >   
> >   
> >   
> >   
> >   
> >   
> > 
> >   
>
> > Danny Wachsstock
>
> To me this looks really ugly. Why not simply:
>
> 
>
> -- Klaus

Oh, it's ugly all right. So much that IE forces us to do is ugly :)
However, if you're going to use BODY classes, it's probably a better
way than using javascript to detect browsers.

Danny





--
Joan Piedra || Frontend webdeveloper
http://joanpiedra.com/


[jQuery] Re: Autocomplete Question

2007-04-07 Thread Dylan Verheul


Oh, and use Dan's version, he squashed a few bugs and added cool things :-)

On 4/8/07, Dylan Verheul <[EMAIL PROTECTED]> wrote:

http://www.dyve.net/jquery/autocomplete.txt

(sorry to be this brief, it's 5:50am here)

On 4/7/07, Shelane <[EMAIL PROTECTED]> wrote:
>
> One more thing I forgot to mention.
>
> In this example here, I'm only returning 2 values within the found
> data.  There are cases where I might want to pass back 5 different
> pieces of info (address, city, state, etc), but maybe only show 1 or 2
> of those items for the user to see in the drop down.  Maybe I only
> want one of those items to show in the autocomplete box once selected,
> but I want to populate other hidden fields with the other pieces of
> information (like my example).
>
> On Apr 7, 12:43 pm, "Shelane" <[EMAIL PROTECTED]> wrote:
> > I see examples but no actual documentation for this plug-in or the
> > orignial from Dylan Verheul.  I would love to get rid of my
> > scriptaculous uses of autocomplete, but I have yet to figure out how
> > to match what I do there with Dan's or Dylan's plug-in for jQuery.
> >
> > So my questions for these plug-ins:
> > A, what are the minimum function calls to attach to a text field to
> > make it an autocomplete;
> > B, what is the expected format of the output results.
> >
> > With my current implementation of scriptaculous, I'm doing this:
> >
> > 
> > function getSelectionId(text, li) {
> > if (li==undefined || li.tagName != 'LI') return;
> > var name = document.getElementsByClassName("name", li)
> > [0].collectTextNodes().strip();
> > var oun = document.getElementsByClassName("oun", li)
> > [0].collectTextNodes().strip();
> > document.myform.person.value = name;
> > document.myform.relID.value = oun;}
> >
> > 
> >
> >  > type="hidden" name="relID" />
> > 
> > 
> > new Ajax.Autocompleter("person", "container1", "includes/tools/
> > people.lasso?list=reps", {paramName: "query", minChars: 2,
> > indicator:"indicator2", afterUpdateElement: getSelectionId});
> > 
> >
> > The results page returns this for each item found:
> > my matched namemy oun > span>
> >
> > Thanks for help :-)
> >
> > On Apr 5, 9:16 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> >
> > > Great. This is very good news. Thanks Dan.
> >
> > > Rp
> >
> > > On Apr 5, 10:40 am, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
> > > wrote:
> >
> > > > Randy,
> >
> > > > >For those using Dan Switzerautocompletemodule based on Dylan
> > > > >Verheul's plug-in, how do the db calls work once a connection is
> > > > >opened with the ajax option? For instance, if I set the minChars:2 and
> > > > >type in Jo, it queries all cities that start with Jo. But what happens
> > > > >as I contitue to type? Is Joh a new db call? And then Johns, another
> > > > >call, and so on? Or is the initial call stored in chache?
> >
> > > > It's amazing how quickly you forget stuff--especially when you just 
modded
> > > > someone elses code. :)
> >
> > > > First, theAutocompleteplug-in uses a keyboard delay before querying the
> > > > server. This should avoid AJAX calls for each letter that's pressed
> > > > (provided it's configured that way--which it's not by default.)
> >
> > > > By default, the library expects that if the user types in "Jo" that the 
AJAX
> > > > call will return all possible matches for the string "Jo". Provided the
> > > > results for the "Jo" call are still cached, there should be no 
additional
> > > > server traffic for any phrases starting with "Jo".
> >
> > > > This can be controlled with the "matchSubset" option. By default this is
> > > > turned on. If you set it to false (or 0,) then a new AJAX call would be 
made
> > > > for "Jo", "Joh" and "John".
> >
> > > > Also, you may want to be aware of the "matchCase". By default this is 
set to
> > > > false, so it's expecting the server to return case insensitive results. 
If
> > > > this option was set to true, then the string "Jo" is not the same as 
"jo".
> >
> > > > Hope this helps!
> >
> > > > -Dan
>
>



[jQuery] Re: Autocomplete Question

2007-04-07 Thread Dylan Verheul


http://www.dyve.net/jquery/autocomplete.txt

(sorry to be this brief, it's 5:50am here)

On 4/7/07, Shelane <[EMAIL PROTECTED]> wrote:


One more thing I forgot to mention.

In this example here, I'm only returning 2 values within the found
data.  There are cases where I might want to pass back 5 different
pieces of info (address, city, state, etc), but maybe only show 1 or 2
of those items for the user to see in the drop down.  Maybe I only
want one of those items to show in the autocomplete box once selected,
but I want to populate other hidden fields with the other pieces of
information (like my example).

On Apr 7, 12:43 pm, "Shelane" <[EMAIL PROTECTED]> wrote:
> I see examples but no actual documentation for this plug-in or the
> orignial from Dylan Verheul.  I would love to get rid of my
> scriptaculous uses of autocomplete, but I have yet to figure out how
> to match what I do there with Dan's or Dylan's plug-in for jQuery.
>
> So my questions for these plug-ins:
> A, what are the minimum function calls to attach to a text field to
> make it an autocomplete;
> B, what is the expected format of the output results.
>
> With my current implementation of scriptaculous, I'm doing this:
>
> 
> function getSelectionId(text, li) {
> if (li==undefined || li.tagName != 'LI') return;
> var name = document.getElementsByClassName("name", li)
> [0].collectTextNodes().strip();
> var oun = document.getElementsByClassName("oun", li)
> [0].collectTextNodes().strip();
> document.myform.person.value = name;
> document.myform.relID.value = oun;}
>
> 
>
>  type="hidden" name="relID" />
> 
> 
> new Ajax.Autocompleter("person", "container1", "includes/tools/
> people.lasso?list=reps", {paramName: "query", minChars: 2,
> indicator:"indicator2", afterUpdateElement: getSelectionId});
> 
>
> The results page returns this for each item found:
> my matched namemy oun span>
>
> Thanks for help :-)
>
> On Apr 5, 9:16 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > Great. This is very good news. Thanks Dan.
>
> > Rp
>
> > On Apr 5, 10:40 am, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
> > wrote:
>
> > > Randy,
>
> > > >For those using Dan Switzerautocompletemodule based on Dylan
> > > >Verheul's plug-in, how do the db calls work once a connection is
> > > >opened with the ajax option? For instance, if I set the minChars:2 and
> > > >type in Jo, it queries all cities that start with Jo. But what happens
> > > >as I contitue to type? Is Joh a new db call? And then Johns, another
> > > >call, and so on? Or is the initial call stored in chache?
>
> > > It's amazing how quickly you forget stuff--especially when you just modded
> > > someone elses code. :)
>
> > > First, theAutocompleteplug-in uses a keyboard delay before querying the
> > > server. This should avoid AJAX calls for each letter that's pressed
> > > (provided it's configured that way--which it's not by default.)
>
> > > By default, the library expects that if the user types in "Jo" that the 
AJAX
> > > call will return all possible matches for the string "Jo". Provided the
> > > results for the "Jo" call are still cached, there should be no additional
> > > server traffic for any phrases starting with "Jo".
>
> > > This can be controlled with the "matchSubset" option. By default this is
> > > turned on. If you set it to false (or 0,) then a new AJAX call would be 
made
> > > for "Jo", "Joh" and "John".
>
> > > Also, you may want to be aware of the "matchCase". By default this is set 
to
> > > false, so it's expecting the server to return case insensitive results. If
> > > this option was set to true, then the string "Jo" is not the same as "jo".
>
> > > Hope this helps!
>
> > > -Dan




[jQuery] Re: jQuery Detect

2007-04-07 Thread Ⓙⓐⓚⓔ

You should add:

AddType application/x-xpinstall .xpi

to your .htaccess or to your httpd.conf.


On 4/7/07, Dan Atkinson <[EMAIL PROTECTED]> wrote:



That's a great idea!

You also need to set up your server to handle XPI's correctly as
Firefox isn't catching them correctly.

On Apr 7, 11:35 pm, "Sean Catchpole" <[EMAIL PROTECTED]> wrote:
> A while ago Jason Levine suggested a firefox extension be made to
> detect if a website is using jQuery. I accepted that challenge and
> finally had some time to work on it. Find the link below and give me
> your feedback. Keep in mind this is still very much beta, there are
> lots of bugs I have already discovered, but please let me know if you
> find more, or if you have a feature request.
>
> jQuery Detect v0.2http://www.sunsean.com/jquerydetect/
>
> Bugs:
> Doesn't update when tabs are switched
> Doesn't update when back or forward button is pressed
> Starts initially with icon showing.
>
> Future Features:
> Option to always show version.





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Re: Body Browser Classes

2007-04-07 Thread d . wachss



On Apr 6, 4:57 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] schrieb:
>
>
>
> > There is an easier  way that is not jQuery-or-Javascript-dependent,
> > since mostly we just want to know is the browser IE  or not. Use
> > conditional comments around the BODY tag. 
> > Seehttp://www.puidokas.com/updating-my-css-for-ie7/
> > . I use :
> >   
> >   
> >   
> >   
> >   
> >   
> > 
> >   
>
> > Danny Wachsstock
>
> To me this looks really ugly. Why not simply:
>
> 
>
> -- Klaus

Oh, it's ugly all right. So much that IE forces us to do is ugly :)
However, if you're going to use BODY classes, it's probably a better
way than using javascript to detect browsers.

Danny



[jQuery] Re: [Firefox Extension] jQuery Detect

2007-04-07 Thread Jason Levine


Very cool!  I'll give it a shot.
-- 
View this message in context: 
http://www.nabble.com/-Firefox-Extension--jQuery-Detect-tf3542216s15494.html#a9889631
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: problems with the starterkit

2007-04-07 Thread Mike Alsup



jQuery does a bit more:


All I'm saying is that you can't call a method that doesn't exist.  I
don't care how clever the event system is.  ;-)

Mike


[jQuery] Re: strange hover behavior...

2007-04-07 Thread [EMAIL PROTECTED]

Dear Brian,

great tip. Just installed this plug-in and now it's working perfect!!!

Thanks,

David.

On 7 abr, 21:10, "Brian Cherne" <[EMAIL PROTECTED]> wrote:
> Hi David, have you looked at my hoverIntent plug-in? It may help reduce
> un-intended events from firing.
>
> 
>
> Brian.
>
> On 4/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hello,
>
> > I have this small animated menu I made.
>
> >http://www.pcphd.com.br/teste.htm
>
> > When I fly the mouse over a few elements, it's like jquery stacks all
> > the movements I made and then animates each at a time. Is there a way
> > to make the hover out function to run before the hover in function
> > ends?
>
> > Thanks,
>
> > David- Ocultar texto entre aspas -
>
> - Mostrar texto entre aspas -



[jQuery] dependencies in ext

2007-04-07 Thread Ariel Jakobovits

The tool that someone on the list developed recently regarding javascript 
dependencies...is it generic? Can it be run on the ext project to determine 
dependencies to reduce code footprint?




[jQuery] Re: strange hover behavior...

2007-04-07 Thread Brian Cherne

Hi David, have you looked at my hoverIntent plug-in? It may help reduce
un-intended events from firing.



Brian.

On 4/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:



Hello,

I have this small animated menu I made.

http://www.pcphd.com.br/teste.htm

When I fly the mouse over a few elements, it's like jquery stacks all
the movements I made and then animates each at a time. Is there a way
to make the hover out function to run before the hover in function
ends?

Thanks,

David




[jQuery] Re: Overlib like funtionality with JQuery

2007-04-07 Thread JimD

I use to use overlib an it does have a lot of functionality, but I
recently started using jtip for the ajax request functionality which
worked out great. You don't have to use ajax with jtip.  Also there is
a tweaked version that better handles positioning at the corner or
bottom of pages etc. Granted the other tooltip plugins are great for
simple tips.

I only mention jtip because some folks looking at the jtip plugin may
not realize this updated version is also available:
http://www.learningjquery.com/2006/10/updated-plugin-jtip

I just wish there was a way to put a delay on jtip so when its open,
you can either delay it or keep it open unless someone closes it so if
you have clickable hyperlinks inside the tip one can click on them.



[jQuery] strange hover behavior...

2007-04-07 Thread [EMAIL PROTECTED]

Hello,

I have this small animated menu I made.

http://www.pcphd.com.br/teste.htm

When I fly the mouse over a few elements, it's like jquery stacks all
the movements I made and then animates each at a time. Is there a way
to make the hover out function to run before the hover in function
ends?

Thanks,

David



[jQuery] Re: AJAX Problem

2007-04-07 Thread Ⓙⓐⓚⓔ

I made sure my apache server uses application/xml. I make sure all dynamic
xml content does to!

is it your own server? perhaps you need to upgrade the server??

On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:



i am directly getting my data from xml document. how can i make the
content-type as application/xml ?

On Apr 8, 12:49 am, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
> I serve my xml as application/xml... it may make a difference!
>
> On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > hi, you are right. firefox and other modern browsers restrict this.
> > however. IE confused me because it was working for IE. for firefox by
> > netscape.security. i have solved this.
>
> > Now i have another problem. After calling the
> > $.ajax({..}).responseXML; i am gettin null. however the responseText
> > returns the XML as text. Why it could be.(content-type is "text/xml"
> > actually i am directly getting XML file).
>
> > On Apr 7, 10:30 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> > > dropx schrieb:
>
> > > > I know how to call from another host with javascript without using
> > > > JQuery. my question:
> > > > is it possible to solve this with just JQuery's ajax functions?
>
> > > XmlHttpRequest ("Ajax") does not allow cross-domain requests. jQuery
nor
> > > any other library can solve this, because it is not solvable.
>
> > > The only way to call JavaScript from another host is by
> > > including/appending script elements.
>
> > > -- Klaus
>
> --
> Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Re: jQuery Detect

2007-04-07 Thread Dan Atkinson

That's a great idea!

You also need to set up your server to handle XPI's correctly as
Firefox isn't catching them correctly.

On Apr 7, 11:35 pm, "Sean Catchpole" <[EMAIL PROTECTED]> wrote:
> A while ago Jason Levine suggested a firefox extension be made to
> detect if a website is using jQuery. I accepted that challenge and
> finally had some time to work on it. Find the link below and give me
> your feedback. Keep in mind this is still very much beta, there are
> lots of bugs I have already discovered, but please let me know if you
> find more, or if you have a feature request.
>
> jQuery Detect v0.2http://www.sunsean.com/jquerydetect/
>
> Bugs:
> Doesn't update when tabs are switched
> Doesn't update when back or forward button is pressed
> Starts initially with icon showing.
>
> Future Features:
> Option to always show version.



[jQuery] [Firefox Extension] jQuery Detect

2007-04-07 Thread Sean Catchpole

A while ago Jason Levine suggested a firefox extension be made to
detect if a website is using jQuery. I accepted that challenge and
finally had some time to work on it. Find the link below and give me
your feedback. Keep in mind this is still very much beta, there are
lots of bugs I have already discovered, but please let me know if you
find more, or if you have a feature request.

jQuery Detect v0.2
http://www.sunsean.com/jquerydetect/

Bugs:
Doesn't update when tabs are switched
Doesn't update when back or forward button is pressed
Starts initially with icon showing.

Future Features:
Option to always show version.



[jQuery] Re: AJAX Problem

2007-04-07 Thread dropx

i am directly getting my data from xml document. how can i make the
content-type as application/xml ?

On Apr 8, 12:49 am, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
> I serve my xml as application/xml... it may make a difference!
>
> On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > hi, you are right. firefox and other modern browsers restrict this.
> > however. IE confused me because it was working for IE. for firefox by
> > netscape.security. i have solved this.
>
> > Now i have another problem. After calling the
> > $.ajax({..}).responseXML; i am gettin null. however the responseText
> > returns the XML as text. Why it could be.(content-type is "text/xml"
> > actually i am directly getting XML file).
>
> > On Apr 7, 10:30 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> > > dropx schrieb:
>
> > > > I know how to call from another host with javascript without using
> > > > JQuery. my question:
> > > > is it possible to solve this with just JQuery's ajax functions?
>
> > > XmlHttpRequest ("Ajax") does not allow cross-domain requests. jQuery nor
> > > any other library can solve this, because it is not solvable.
>
> > > The only way to call JavaScript from another host is by
> > > including/appending script elements.
>
> > > -- Klaus
>
> --
> Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ



[jQuery] Re: AJAX Problem

2007-04-07 Thread Ⓙⓐⓚⓔ

I serve my xml as application/xml... it may make a difference!

On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:



hi, you are right. firefox and other modern browsers restrict this.
however. IE confused me because it was working for IE. for firefox by
netscape.security. i have solved this.

Now i have another problem. After calling the
$.ajax({..}).responseXML; i am gettin null. however the responseText
returns the XML as text. Why it could be.(content-type is "text/xml"
actually i am directly getting XML file).




On Apr 7, 10:30 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> dropx schrieb:
>
> > I know how to call from another host with javascript without using
> > JQuery. my question:
> > is it possible to solve this with just JQuery's ajax functions?
>
> XmlHttpRequest ("Ajax") does not allow cross-domain requests. jQuery nor
> any other library can solve this, because it is not solvable.
>
> The only way to call JavaScript from another host is by
> including/appending script elements.
>
> -- Klaus





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Re: Overlib like funtionality with JQuery

2007-04-07 Thread [EMAIL PROTECTED]

Hello everybody, I'm a french speaker people and really new in jquery,
so I'll try to be fluent.

For my final year work as a computer graphics I'm working on a
multiplayer game. In this game users will need a lot of help and I
made my homemade tooltip. I'm thinking about translate it into a
jquery plugin if I have positive feedbacks.

Please have a look on it : http://www.fightformetal.net/examples/tootltip/

And feel free to correct my mistakes or write me.

(it's full-degradable and dom compliant).

Thanx a lot



[jQuery] Re: AJAX Problem

2007-04-07 Thread dropx

hi, you are right. firefox and other modern browsers restrict this.
however. IE confused me because it was working for IE. for firefox by
netscape.security. i have solved this.

Now i have another problem. After calling the
$.ajax({..}).responseXML; i am gettin null. however the responseText
returns the XML as text. Why it could be.(content-type is "text/xml"
actually i am directly getting XML file).




On Apr 7, 10:30 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> dropx schrieb:
>
> > I know how to call from another host with javascript without using
> > JQuery. my question:
> > is it possible to solve this with just JQuery's ajax functions?
>
> XmlHttpRequest ("Ajax") does not allow cross-domain requests. jQuery nor
> any other library can solve this, because it is not solvable.
>
> The only way to call JavaScript from another host is by
> including/appending script elements.
>
> -- Klaus



[jQuery] Re: blockui url exclude list?

2007-04-07 Thread moe

hi mike,

thanks for the pointer, works fine so far.
just in one particular case i needed to disable
blockui for an $('#id').load( .. ).

i have written my own load() for that case but wonder
if it would make sense to add the filtering option that i
suggested to blockui nonetheless?

i imagine it might be desirable at times to disable only
blockui without knocking out the other handlers.


just my 2c :)
regards, moe

On Wed, Apr 04, 2007 at 09:05:04AM -0400, Mike Alsup wrote:
> 
> Moe,
> 
> You don't need to change anything in blockUI.  Just set the 'global'
> flag to false for your validator ajax calls (use $.ajax instead of
> $.get and $.post).
> 
> Mike
> 
> 
> On 4/3/07, moe <[EMAIL PROTECTED]> wrote:
> >
> >hi list and mike,
> >
> >i'd like to use blockui together with an ajax form
> >validator: 
> >http://www.joestump.net/content/source/jquery-verify/jquery-verify-0.0.1.html
> >
> >the problem is that every time the validator calls home
> >(during typing) the form input field loses focus because
> >blockui kicks in.
> >
> >obviously i'd like to disable blockui for these calls.
> >
> >can someone give me a hint on how to patch blockui so that
> >it ignores all requests where the url matches a list of
> >preconfigured patterns?
> >
> >i've glanced at the code but couldn't figure
> >out how to weave in the magic.
> >
> >mike, could you lend me a hand?
> >
> >
> >tia, moe
> >
> >
> 


[jQuery] Re: Autocomplete Question

2007-04-07 Thread Shelane

One more thing I forgot to mention.

In this example here, I'm only returning 2 values within the found
data.  There are cases where I might want to pass back 5 different
pieces of info (address, city, state, etc), but maybe only show 1 or 2
of those items for the user to see in the drop down.  Maybe I only
want one of those items to show in the autocomplete box once selected,
but I want to populate other hidden fields with the other pieces of
information (like my example).

On Apr 7, 12:43 pm, "Shelane" <[EMAIL PROTECTED]> wrote:
> I see examples but no actual documentation for this plug-in or the
> orignial from Dylan Verheul.  I would love to get rid of my
> scriptaculous uses of autocomplete, but I have yet to figure out how
> to match what I do there with Dan's or Dylan's plug-in for jQuery.
>
> So my questions for these plug-ins:
> A, what are the minimum function calls to attach to a text field to
> make it an autocomplete;
> B, what is the expected format of the output results.
>
> With my current implementation of scriptaculous, I'm doing this:
>
> 
> function getSelectionId(text, li) {
> if (li==undefined || li.tagName != 'LI') return;
> var name = document.getElementsByClassName("name", li)
> [0].collectTextNodes().strip();
> var oun = document.getElementsByClassName("oun", li)
> [0].collectTextNodes().strip();
> document.myform.person.value = name;
> document.myform.relID.value = oun;}
>
> 
>
>  type="hidden" name="relID" />
> 
> 
> new Ajax.Autocompleter("person", "container1", "includes/tools/
> people.lasso?list=reps", {paramName: "query", minChars: 2,
> indicator:"indicator2", afterUpdateElement: getSelectionId});
> 
>
> The results page returns this for each item found:
> my matched namemy oun span>
>
> Thanks for help :-)
>
> On Apr 5, 9:16 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > Great. This is very good news. Thanks Dan.
>
> > Rp
>
> > On Apr 5, 10:40 am, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
> > wrote:
>
> > > Randy,
>
> > > >For those using Dan Switzerautocompletemodule based on Dylan
> > > >Verheul's plug-in, how do the db calls work once a connection is
> > > >opened with the ajax option? For instance, if I set the minChars:2 and
> > > >type in Jo, it queries all cities that start with Jo. But what happens
> > > >as I contitue to type? Is Joh a new db call? And then Johns, another
> > > >call, and so on? Or is the initial call stored in chache?
>
> > > It's amazing how quickly you forget stuff--especially when you just modded
> > > someone elses code. :)
>
> > > First, theAutocompleteplug-in uses a keyboard delay before querying the
> > > server. This should avoid AJAX calls for each letter that's pressed
> > > (provided it's configured that way--which it's not by default.)
>
> > > By default, the library expects that if the user types in "Jo" that the 
> > > AJAX
> > > call will return all possible matches for the string "Jo". Provided the
> > > results for the "Jo" call are still cached, there should be no additional
> > > server traffic for any phrases starting with "Jo".
>
> > > This can be controlled with the "matchSubset" option. By default this is
> > > turned on. If you set it to false (or 0,) then a new AJAX call would be 
> > > made
> > > for "Jo", "Joh" and "John".
>
> > > Also, you may want to be aware of the "matchCase". By default this is set 
> > > to
> > > false, so it's expecting the server to return case insensitive results. If
> > > this option was set to true, then the string "Jo" is not the same as "jo".
>
> > > Hope this helps!
>
> > > -Dan



[jQuery] Re: Autocomplete Question

2007-04-07 Thread Shelane

I see examples but no actual documentation for this plug-in or the
orignial from Dylan Verheul.  I would love to get rid of my
scriptaculous uses of autocomplete, but I have yet to figure out how
to match what I do there with Dan's or Dylan's plug-in for jQuery.

So my questions for these plug-ins:
A, what are the minimum function calls to attach to a text field to
make it an autocomplete;
B, what is the expected format of the output results.

With my current implementation of scriptaculous, I'm doing this:


function getSelectionId(text, li) {
if (li==undefined || li.tagName != 'LI') return;
var name = document.getElementsByClassName("name", li)
[0].collectTextNodes().strip();
var oun = document.getElementsByClassName("oun", li)
[0].collectTextNodes().strip();
document.myform.person.value = name;
document.myform.relID.value = oun;
}





new Ajax.Autocompleter("person", "container1", "includes/tools/
people.lasso?list=reps", {paramName: "query", minChars: 2,
indicator:"indicator2", afterUpdateElement: getSelectionId});



The results page returns this for each item found:
my matched namemy oun

Thanks for help :-)


On Apr 5, 9:16 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Great. This is very good news. Thanks Dan.
>
> Rp
>
> On Apr 5, 10:40 am, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
> wrote:
>
> > Randy,
>
> > >For those using Dan Switzerautocompletemodule based on Dylan
> > >Verheul's plug-in, how do the db calls work once a connection is
> > >opened with the ajax option? For instance, if I set the minChars:2 and
> > >type in Jo, it queries all cities that start with Jo. But what happens
> > >as I contitue to type? Is Joh a new db call? And then Johns, another
> > >call, and so on? Or is the initial call stored in chache?
>
> > It's amazing how quickly you forget stuff--especially when you just modded
> > someone elses code. :)
>
> > First, theAutocompleteplug-in uses a keyboard delay before querying the
> > server. This should avoid AJAX calls for each letter that's pressed
> > (provided it's configured that way--which it's not by default.)
>
> > By default, the library expects that if the user types in "Jo" that the AJAX
> > call will return all possible matches for the string "Jo". Provided the
> > results for the "Jo" call are still cached, there should be no additional
> > server traffic for any phrases starting with "Jo".
>
> > This can be controlled with the "matchSubset" option. By default this is
> > turned on. If you set it to false (or 0,) then a new AJAX call would be made
> > for "Jo", "Joh" and "John".
>
> > Also, you may want to be aware of the "matchCase". By default this is set to
> > false, so it's expecting the server to return case insensitive results. If
> > this option was set to true, then the string "Jo" is not the same as "jo".
>
> > Hope this helps!
>
> > -Dan



[jQuery] Re: AJAX Problem

2007-04-07 Thread Klaus Hartl


dropx schrieb:

I know how to call from another host with javascript without using
JQuery. my question:
is it possible to solve this with just JQuery's ajax functions?


XmlHttpRequest ("Ajax") does not allow cross-domain requests. jQuery nor 
any other library can solve this, because it is not solvable.


The only way to call JavaScript from another host is by 
including/appending script elements.



-- Klaus




[jQuery] Re: AJAX Problem

2007-04-07 Thread Ariel Jakobovits

Might it be that you are trying to access the responseText of the 
XMLHttpRequest object that is returned from $.ajax() before it is ready? Your 
call seems like it would have to be a synchronous call to work.

- Original Message 
From: dropx <[EMAIL PROTECTED]>
To: jQuery (English) 
Sent: Saturday, April 7, 2007 8:39:26 AM
Subject: [jQuery] Re: AJAX Problem


no,
i omitted some part of the url:
it is like http://localhost/jquery/Posts.xml


On Apr 7, 6:28 pm, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
>   url:"http://../../Posts.xml";;
> probably should be
>   url:"../../Posts.xml",
>
> On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > hi guys,
> > i am trying to write a simple ajax code with $.ajax() function.
> > however the Firebug plug-in in Firefox show this error:
>
> > [Exception... "'Permission denied to call method XMLHttpRequest.open'
> > when calling method: [nsIDOMEventListener::handleEvent]"  nsresult:
> > "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"  location: ""
> > data: no]
>
> > in the IE it is working there is not any problem.
>
> > my code is this:
> > var txt = $.ajax({
> > url:"http://../../Posts.xml";;,
> > type:"GET",
> > dataType:"xml"
> > }).responseText;
>
> > i need help. thnks...
>
> --
> Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ






[jQuery] Re: problems with the starterkit

2007-04-07 Thread Klaus Hartl


Jörn Zaefferer schrieb:


Mike Alsup schrieb:


> Huh?  The reset event is not bound by jQuery.  Are you thinking of 
submit?

>

No, starting with jQuery 1.1 element events are also triggered. The
following for example will focus the first input in the page:


Yes, but those events have to be bound.  The reset event is not bound 
by jQuery.

jQuery does a bit more:

trigger: function(type, data, element) {
// Clone the incoming data, if any
data = jQuery.makeArray(data || []);

// Handle a global trigger
if ( !element )
jQuery.each( this.global[type] || [], function(){
jQuery.event.trigger( type, data, this );
});

// Handle triggering a single element
else {
var handler = element["on" + type ], val,
fn = jQuery.isFunction( element[ type ] );

if ( handler ) {
// Pass along a fake event
data.unshift( this.fix({ type: type, target: element }) );

// Trigger the event
if ( (val = handler.apply( element, data )) !== false )
this.triggered = true;
}

if ( fn && val !== false )
element[ type ]();

this.triggered = false;
}
},

The element[ type ](); part is particular intersting.



So the element inherent method is triggered, no matter if there is an 
additional event bound or not?



-- Klaus


[jQuery] Re: Unique parameter in Ajax

2007-04-07 Thread Klaus Hartl


Diego A. schrieb:


Hi Klaus,

See
http://www.nabble.com/Unique-parameter-in-Ajax-tf3440508s15494.html#a9883915

It's just my preference. I like to use my own header in case the jQuery
implementatin changes.


I see. I'm pretty sure that this wan't change though. It works with 
Rails out-of-the-box (request.xml_http_request?) and one or the other 
PHP framework does rely on this as well.




-- Klaus


[jQuery] Re: AJAX Problem

2007-04-07 Thread Ⓙⓐⓚⓔ

it's an ajax thing, not a jquery thing.

On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:



I know how to call from another host with javascript without using
JQuery. my question:
is it possible to solve this with just JQuery's ajax functions?


On Apr 7, 7:17 pm, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
> then you need a work-around! I just posted my 6 line perl program the
other
> day!
>
> On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > thnks,
> > whatabout if they are on the different hosts. For example,  if i want
> > to get xml feeds of a website how can i do that.
>
> > On Apr 7, 7:07 pm, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
> > > don't specify the host name in the ajax call! If it's not on the
same
> > host,
> > > you shouldn't be able to do it in the first place... IE cares so
little
> > for
> > > the rules!
>
> > > On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:
>
> > > > no,
> > > > i omitted some part of the url:
> > > > it is likehttp://localhost/jquery/Posts.xml
>
> > > > On Apr 7, 6:28 pm, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
> > > > >   url:"http://../../Posts.xml";
> > > > > probably should be
> > > > >   url:"../../Posts.xml",
>
> > > > > On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:
>
> > > > > > hi guys,
> > > > > > i am trying to write a simple ajax code with $.ajax()
function.
> > > > > > however the Firebug plug-in in Firefox show this error:
>
> > > > > > [Exception... "'Permission denied to call method
> > XMLHttpRequest.open'
> > > > > > when calling method:
> > [nsIDOMEventListener::handleEvent]"  nsresult:
> > > > > > "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"  location:
""
> > > > > > data: no]
>
> > > > > > in the IE it is working there is not any problem.
>
> > > > > > my code is this:
> > > > > > var txt = $.ajax({
> > > > > > url:"http://../../Posts.xml";,
> > > > > > type:"GET",
> > > > > > dataType:"xml"
> > > > > > }).responseText;
>
> > > > > > i need help. thnks...
>
> > > > > --
> > > > > Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
>
> > > --
> > > Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
>
> --
> Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Re: AJAX Problem

2007-04-07 Thread dropx

I know how to call from another host with javascript without using
JQuery. my question:
is it possible to solve this with just JQuery's ajax functions?


On Apr 7, 7:17 pm, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
> then you need a work-around! I just posted my 6 line perl program the other
> day!
>
> On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > thnks,
> > whatabout if they are on the different hosts. For example,  if i want
> > to get xml feeds of a website how can i do that.
>
> > On Apr 7, 7:07 pm, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
> > > don't specify the host name in the ajax call! If it's not on the same
> > host,
> > > you shouldn't be able to do it in the first place... IE cares so little
> > for
> > > the rules!
>
> > > On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:
>
> > > > no,
> > > > i omitted some part of the url:
> > > > it is likehttp://localhost/jquery/Posts.xml
>
> > > > On Apr 7, 6:28 pm, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
> > > > >   url:"http://../../Posts.xml";
> > > > > probably should be
> > > > >   url:"../../Posts.xml",
>
> > > > > On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:
>
> > > > > > hi guys,
> > > > > > i am trying to write a simple ajax code with $.ajax() function.
> > > > > > however the Firebug plug-in in Firefox show this error:
>
> > > > > > [Exception... "'Permission denied to call method
> > XMLHttpRequest.open'
> > > > > > when calling method:
> > [nsIDOMEventListener::handleEvent]"  nsresult:
> > > > > > "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"  location: ""
> > > > > > data: no]
>
> > > > > > in the IE it is working there is not any problem.
>
> > > > > > my code is this:
> > > > > > var txt = $.ajax({
> > > > > > url:"http://../../Posts.xml";,
> > > > > > type:"GET",
> > > > > > dataType:"xml"
> > > > > > }).responseText;
>
> > > > > > i need help. thnks...
>
> > > > > --
> > > > > Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
>
> > > --
> > > Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
>
> --
> Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ



[jQuery] Re: AJAX Problem

2007-04-07 Thread Ⓙⓐⓚⓔ

then you need a work-around! I just posted my 6 line perl program the other
day!

On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:



thnks,
whatabout if they are on the different hosts. For example,  if i want
to get xml feeds of a website how can i do that.


On Apr 7, 7:07 pm, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
> don't specify the host name in the ajax call! If it's not on the same
host,
> you shouldn't be able to do it in the first place... IE cares so little
for
> the rules!
>
> On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > no,
> > i omitted some part of the url:
> > it is likehttp://localhost/jquery/Posts.xml
>
> > On Apr 7, 6:28 pm, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
> > >   url:"http://../../Posts.xml";
> > > probably should be
> > >   url:"../../Posts.xml",
>
> > > On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:
>
> > > > hi guys,
> > > > i am trying to write a simple ajax code with $.ajax() function.
> > > > however the Firebug plug-in in Firefox show this error:
>
> > > > [Exception... "'Permission denied to call method
XMLHttpRequest.open'
> > > > when calling method:
[nsIDOMEventListener::handleEvent]"  nsresult:
> > > > "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"  location: ""
> > > > data: no]
>
> > > > in the IE it is working there is not any problem.
>
> > > > my code is this:
> > > > var txt = $.ajax({
> > > > url:"http://../../Posts.xml";,
> > > > type:"GET",
> > > > dataType:"xml"
> > > > }).responseText;
>
> > > > i need help. thnks...
>
> > > --
> > > Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
>
> --
> Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Re: AJAX Problem

2007-04-07 Thread dropx

thnks,
whatabout if they are on the different hosts. For example,  if i want
to get xml feeds of a website how can i do that.


On Apr 7, 7:07 pm, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
> don't specify the host name in the ajax call! If it's not on the same host,
> you shouldn't be able to do it in the first place... IE cares so little for
> the rules!
>
> On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > no,
> > i omitted some part of the url:
> > it is likehttp://localhost/jquery/Posts.xml
>
> > On Apr 7, 6:28 pm, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
> > >   url:"http://../../Posts.xml";
> > > probably should be
> > >   url:"../../Posts.xml",
>
> > > On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:
>
> > > > hi guys,
> > > > i am trying to write a simple ajax code with $.ajax() function.
> > > > however the Firebug plug-in in Firefox show this error:
>
> > > > [Exception... "'Permission denied to call method XMLHttpRequest.open'
> > > > when calling method: [nsIDOMEventListener::handleEvent]"  nsresult:
> > > > "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"  location: ""
> > > > data: no]
>
> > > > in the IE it is working there is not any problem.
>
> > > > my code is this:
> > > > var txt = $.ajax({
> > > > url:"http://../../Posts.xml";,
> > > > type:"GET",
> > > > dataType:"xml"
> > > > }).responseText;
>
> > > > i need help. thnks...
>
> > > --
> > > Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
>
> --
> Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ



[jQuery] Re: AJAX Problem

2007-04-07 Thread Ⓙⓐⓚⓔ

don't specify the host name in the ajax call! If it's not on the same host,
you shouldn't be able to do it in the first place... IE cares so little for
the rules!

On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:



no,
i omitted some part of the url:
it is like http://localhost/jquery/Posts.xml


On Apr 7, 6:28 pm, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
>   url:"http://../../Posts.xml";
> probably should be
>   url:"../../Posts.xml",
>
> On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > hi guys,
> > i am trying to write a simple ajax code with $.ajax() function.
> > however the Firebug plug-in in Firefox show this error:
>
> > [Exception... "'Permission denied to call method XMLHttpRequest.open'
> > when calling method: [nsIDOMEventListener::handleEvent]"  nsresult:
> > "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"  location: ""
> > data: no]
>
> > in the IE it is working there is not any problem.
>
> > my code is this:
> > var txt = $.ajax({
> > url:"http://../../Posts.xml";,
> > type:"GET",
> > dataType:"xml"
> > }).responseText;
>
> > i need help. thnks...
>
> --
> Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Re: problems with the starterkit

2007-04-07 Thread Jörn Zaefferer


Mike Alsup schrieb:


> Huh?  The reset event is not bound by jQuery.  Are you thinking of 
submit?

>

No, starting with jQuery 1.1 element events are also triggered. The
following for example will focus the first input in the page:


Yes, but those events have to be bound.  The reset event is not bound 
by jQuery.

jQuery does a bit more:

trigger: function(type, data, element) {
// Clone the incoming data, if any
data = jQuery.makeArray(data || []);

// Handle a global trigger
if ( !element )
jQuery.each( this.global[type] || [], function(){
jQuery.event.trigger( type, data, this );
});

// Handle triggering a single element
else {
var handler = element["on" + type ], val,
fn = jQuery.isFunction( element[ type ] );

if ( handler ) {
// Pass along a fake event
data.unshift( this.fix({ type: type, target: element }) 
);

// Trigger the event
if ( (val = handler.apply( element, data )) !== false )
this.triggered = true;
}

if ( fn && val !== false )
element[ type ]();

this.triggered = false;
}
},

The element[ type ](); part is particular intersting.

--
Jörn Zaefferer

http://bassistance.de



[jQuery] Re: AJAX Problem

2007-04-07 Thread dropx

no,
i omitted some part of the url:
it is like http://localhost/jquery/Posts.xml


On Apr 7, 6:28 pm, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
>   url:"http://../../Posts.xml";
> probably should be
>   url:"../../Posts.xml",
>
> On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > hi guys,
> > i am trying to write a simple ajax code with $.ajax() function.
> > however the Firebug plug-in in Firefox show this error:
>
> > [Exception... "'Permission denied to call method XMLHttpRequest.open'
> > when calling method: [nsIDOMEventListener::handleEvent]"  nsresult:
> > "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"  location: ""
> > data: no]
>
> > in the IE it is working there is not any problem.
>
> > my code is this:
> > var txt = $.ajax({
> > url:"http://../../Posts.xml";,
> > type:"GET",
> > dataType:"xml"
> > }).responseText;
>
> > i need help. thnks...
>
> --
> Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ



[jQuery] Re: AJAX Problem

2007-04-07 Thread Ⓙⓐⓚⓔ

 url:"http://../../Posts.xml";
probably should be
 url:"../../Posts.xml",


On 4/7/07, dropx <[EMAIL PROTECTED]> wrote:



hi guys,
i am trying to write a simple ajax code with $.ajax() function.
however the Firebug plug-in in Firefox show this error:

[Exception... "'Permission denied to call method XMLHttpRequest.open'
when calling method: [nsIDOMEventListener::handleEvent]"  nsresult:
"0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"  location: ""
data: no]

in the IE it is working there is not any problem.

my code is this:
var txt = $.ajax({
url:"http://../../Posts.xml";,
type:"GET",
dataType:"xml"
}).responseText;

i need help. thnks...





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] AJAX Problem

2007-04-07 Thread dropx

hi guys,
i am trying to write a simple ajax code with $.ajax() function.
however the Firebug plug-in in Firefox show this error:

[Exception... "'Permission denied to call method XMLHttpRequest.open'
when calling method: [nsIDOMEventListener::handleEvent]"  nsresult:
"0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"  location: ""
data: no]

in the IE it is working there is not any problem.

my code is this:
 var txt = $.ajax({
url:"http://../../Posts.xml";,
type:"GET",
dataType:"xml"
}).responseText;

i need help. thnks...



[jQuery] Re: Tabs created on the fly

2007-04-07 Thread Mikael Noone

Please talk to klaus about this, he is going to rewrite his Tab Plugin
to support dynamic tab creation. Maybe you could help eachother to make it
possible?

On 4/4/07, bmckenzie <[EMAIL PROTECTED]> wrote:



I used to be able to create new tabs with the tabs plugin, but I've
messed something up (or maybe there's something different in the new
version).

Anyway, here's the setup:



function createTab (myId, myText) {
   myId = myId || '4' ;
   myText = myText || "Four";
   var myDivId = 'div-' + myId;
   var myAnchor = '#' + myDivId;
   // create tab and div w/ dom_creator plugin
   var myTab = $.LI({},
  $.A({ href:myAnchor}, myText ) );
   $('#tabContainer').append(myTab);
   var myDiv= $.DIV( {id:myDivId, Class:'fragment clearfix'},
'Fetching data . . . ');
   // $(myDiv).append(loadingAnim );
   $('#container').after(myDiv);
   $('#container').find('#tabContainer
ul>li>a').unbind('click').end().tabs() ;
   // debugger;
   $('#container').triggerTab(4);
}


$(function() {
$('#container').tabs();
$('button.test').bind('click', function(){createTab()});

});



and here's the html, adapted from demo page:
   
Create Tab



One
Two
Three


First tab is active by default:
$('#container').tabs();


Lorem ipsum dolor sit amet, consectetuer adipiscing
elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna
aliquam erat volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing
elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna
aliquam erat volutpat.


Lorem ipsum dolor sit amet, consectetuer adipiscing
elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna
aliquam erat volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing
elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna
aliquam erat volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing
elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna
aliquam erat volutpat.





Test page where you can see this not working:
http://www.2MinuteExplainer.com/test.html

(everything goes to pieces when you click the new tab)

thx,

Bruce




[jQuery] Re: problems with the starterkit

2007-04-07 Thread Mike Alsup



> Huh?  The reset event is not bound by jQuery.  Are you thinking of submit?
>

No, starting with jQuery 1.1 element events are also triggered. The
following for example will focus the first input in the page:


Yes, but those events have to be bound.  The reset event is not bound by jQuery.

Mike


[jQuery] Re: response handler scope

2007-04-07 Thread Diego A.

I understand what you're saying but I don't know how to do that.
What software do I need to update merge my local version and the
upstream version?

On Apr 7, 7:42 am, "Ralf S. Engelschall"  wrote:
> On Sat, Apr 07, 2007, Diego A. wrote:
> > It works, but I think that is a terrible idea.
> > You'll have to edit the jQuery source every-time there is new release.
> > I take a different approach:
> > 1. Load jQuery source.
> > 2. Make changes to suit my application.
> > [...]
>
> You don't really have to repeat local changes every time a new upstream
> version comes out. Just use a an arbitrary version control system like
> CVS, Subversion or Monotone and _merge_ your and the upstream version
> regularily. I'm doing this with both jQuery and dozend of other upstream
> sources I've local modifications for.
>
> As jQuery lives in a public accessible SVN itself, it is even simpler
> in this particular case. Just checkout jQuery from its SVN, apply your
> local modifications (without committing!) to your working area and then
> regularily "svn update" your working area by merging in the upstream
> sources. If your changes are really surgical ones you usually will not
> even get any conflict on updating your working area. This allows you
> to maintain your local modifications easily.
>
> But if your local modifications are worth taken over by the upstream
> vendor, please do not forget to at least once submit it to them...
>
>Ralf S. Engelschall
>[EMAIL PROTECTED]
>www.engelschall.com



[jQuery] Re: IE XML parsing problem

2007-04-07 Thread Diego A.

On Apr 7, 2:42 am, Ariel Jakobovits <[EMAIL PROTECTED]> wrote:
> Did you contribute this back to the Metadata community?
Where is the Metadata community???

> - Original Message 
> From: Diego A. <[EMAIL PROTECTED]>
> To: jquery-en@googlegroups.com
> Sent: Friday, April 6, 2007 3:54:52 PM
> Subject: [jQuery] Re: IE XML parsing problem
>
> I've been fighting with this bug too and I believe I've found the fix.
> I can't be 100% sure, but I believe the problem was in the jquery.metaData
> plugin.
> The fix has worked for me and 2 other people so far...
>
> Here is the fix I posted on my blog, hope it helps. And if it does work for
> you, then this is definitely what's been driving so many people crazy!
>
> http://fyneworks.blogspot.com/2007/04/fix-for-jquery-bug-in-ie-workin...
>
> = Fix for jQuery bug in IE - Working with XML documents =
>
> It's been driving me crazy and I'm not alone (1, 2). But I've finally
> managed to fix the weird jQuery bug in IE when working with XML documents
> (or so I hope).
>
> The bug isn't in jQuery itself, it's in the very popular Metadata plug-in,
> used to load meta data and settings from elements using the class property.
>
> The Error: Lines 101 - 105 in the Metadata plugin.
>  if ( $.meta.single )
> this[ $.meta.single ] = data; // Throws error on XML documents in IE
>  else
> $.extend( this, data ); // Throws error on XML documents in IE
>
>  this.metaDone = true; // Throws error on XML documents in IE
>
> The fix: Find lines 75-77 in the Metadata plugin:
>  $.fn.setArray = function(){
> return setArray.apply( this, arguments ).each(function(){
>if ( this.metaDone ) return;
>
> And make the following change: (add line)
>  $.fn.setArray = function(){
> return setArray.apply( this, arguments ).each(function(){
>try{ this['meta']=null; }catch(e){ return; } // Detect and trap error
>if ( this.metaDone ) return;
>
> And that's it! This fix will allow Metadata to do what it does on HTML
> elements and not throw that obscure "Object doesn't support this property or
> method" error in Internet Explorer.
>
> Angelo Sozzi wrote:
>
> > Hi,
>
> > I've managed to finish my first plugin and re-learn javascript at the same
> > time. So I'm not quite sure if this is a Javascript or jQuery issue.
>
> > The plugin loads external content from HTML or XML data using an AJAX call
> > to the file name generated from the LI element clicked.
> > DEMO:http://www.sozzi.cn/jquery/fish.fn.trial3.html
>
> > It works perfectly for the HTML variant but the XML fails in IE throwing a
> > " Object doesn't support this property or method" error.
> > It seems to happen in the XML call and parse function on the line finding
> > the "link" within the XML object:
>
> > (snip)...
> > $.get(XMLurl, function(xml){
> > $("site", xml).each(function(){  // step through each 
> > 'site'
> > xml node
> > $(this).find("link").each(function(){ // find 'link' insidet the
> > 'site' node and turn it into html
> > settings.parsedXML += " 
> > "+$(this).text()+" ";
> > (snip)
>
> > Any thoughts on what I'm doing wrong?
>
> > js:
> > /*
> >  * AZlinker 0.4 Beta
> >  * By Angelo Sozzi (http://www.sozzi.cn/jQuery)
> >  * A jQuery plugin that will load XML or HTML links into divs
> >  * by maping the UL>LI element names to filenames
> >  * Demo athttp://www.sozzi.cn/jQuery/a_zlink.html
> >  */
>
> > $.fn.AZlinker = function(settings) {
> >  var settings = $.extend({
> > targetID: "#xml_here",
> > elemname: "li",
> > methodXML: true,
> > parsedXML: ""
> >  }, settings || {}); // overwrite settings if there are any given in
> > the function call
> >   // other plugin code
> >   $("#busy").hide();
> >   var list = $(this).find(settings.elemname)
> >   list.hover(
> > function(){ $(this).next().addClass("medium");
> > $(this).prev().addClass("medium");
> > $(this).addClass("large");},
> > function(){ $(this).next().removeClass("medium");
> > $(this).prev().removeClass("medium");
> > $(this).removeClass("large");}
> > );
> > // make clicked li active, read html and use to retrieve html or xml
> > list.click(function(){//Add an OnClick event to all 
> > list.removeClass("active");   //OnClick Remove the active class 
> > from all
> > li
> > $(this).addClass("active"); //Add class=active to clicked li
> > if (settings.methodXML){
> > var XMLurl = "xml/"+$.trim($(this).text())+".xml";  //Read out 
> > text
> > from litext li and make filename from it
> > loadXML(XMLurl);
> > }
> > else {
> > HTMLurl = "html/"+$.trim($(this).text())+".html"; //read out text 
> > from
> > litext li and make filename from it
> > $(settings.targetID).load(HTMLurl);//trim is used because 
> > text leaves
> > a space 

[jQuery] Re: Unique parameter in Ajax

2007-04-07 Thread Diego A.


Hi Klaus,

See
http://www.nabble.com/Unique-parameter-in-Ajax-tf3440508s15494.html#a9883915

It's just my preference. I like to use my own header in case the jQuery
implementatin changes.


Klaus Hartl wrote:
> 
> 
> Diego A. schrieb:
>> I ended up changing my server application to look for the header
>> "x-Method =
>> Ajax" and it works just fine.
> 
> 
> Oh well, jQuery already adds a custom header to each Ajax request:
> 
> "X-Requested-With: XmlHttpRequest"
> 
> 
> 
> -- Klaus
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Unique-parameter-in-Ajax-tf3440508s15494.html#a9883928
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Unique parameter in Ajax

2007-04-07 Thread Diego A.


Exactly. That is exactly why I needed that unique parameter.
And to answer the question of 'how' I do it, here's the code (ASP):

DIM AJAX_REQUEST = False
' Look for "x-Requested-With" header sent by jQuery
If InStr(1, Request.ServerVariables("ALL_HTTP"),
"HTTP_X_REQUESTED_WITH:XMLHttpRequest")>0 Then
 AJAX_REQUEST = True
End If

I personally like to use my own custom header just in case the jQuery
implementation changes and the above stops working. So I configure jQuery to
always send a "x-Method" header, with the value "Ajax". So...

DIM AJAX_REQUEST = False
' Look for "x-Requested-With" header sent by jQuery
If InStr(1, Request.ServerVariables("ALL_HTTP"), "HTTP_X_METHOD:Ajax")>0
Then sQuery = sQuery & "&ajax=y"
 AJAX_REQUEST = True
End If

And the javascript to configure jQuery is:
$.ajaxSetup({ global:true, headers: {"X-Method":"Ajax"} });

Hope this helps


AHeimlich wrote:
> 
> On 4/6/07, Ariel Jakobovits <[EMAIL PROTECTED]> wrote:
>>
>> Just curious, what changes about the server's behavior when the x-Method
>> is specified as Ajax?
>>
> 
> By itself, it doesn't do anything. But in your server-side code, you can
> look for this (or more accurately, look for an HTTP header named
> "X-Requested-With" with the value "XmlHttpRequest") and alter your code's
> output accordingly (what "accordingly" means is entirely up to you).
> 
> For example, you could have a URL that sends a complete HTML page with
> your
> site's header, footer, navigation, etc when requested normally through the
> browser, but when requested through AJAX it only outputs the content it
> created (without the header and stuff).
> 
> -- 
> Aaron Heimlich
> Web Developer
> [EMAIL PROTECTED]
> http://aheimlich.freepgs.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Unique-parameter-in-Ajax-tf3440508s15494.html#a9883915
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Truncate Plugin v.2.0

2007-04-07 Thread Ariel Jakobovits

I think you should create a set of tags that are truncatable, like , , 
and  and focus on truncating those, and ignore , , etc. Just make 
sure not to truncate the closing tags of those non-truncating tags so as to 
invalidate the HTML.

- Original Message 
From: Giant Jam Sandwich <[EMAIL PROTECTED]>
To: jQuery (English) 
Sent: Friday, April 6, 2007 6:18:03 PM
Subject: [jQuery] Re: Truncate Plugin v.2.0


The issue becomes the character count. If I pull the string as HTML,
and use the max length provided, then I would have to use a regular
expression to skip html tags in the count. That part would not be so
hard, but if the truncate needs to happen in the middle of a child
tag, I would have to pull in the close tags. Consider the following:

This is a string to demonstrate a technical issue with this plugin.

If the truncate happens immediately after the word "this", then I have
to add back the  and the . Is this less complicated than I am
making it sound? Any suggestions would be appreciated.

Thanks for everyone's positive feedback so far!


On Apr 5, 9:55 am, "Andy Matthews" <[EMAIL PROTECTED]> wrote:
> Well, I suppose you could search for LAST child tag (of any type) of the
> selected tag, then truncate the  text inside that to make sure you still
> keep your formatting. So given your example:
> This is my string to truncate.
>
> You might end up with this:
> This is my string to tr...
> --
> Starting with this:
> jquery is  the BOMB yo. It makes short
> work of coding
>
> You'd end up with this:
> jquery is  the BOMB yo. It makes short
> w...
> --
> And finally, if there were no child tags:
> I'm plain vanilla HTML and I'll die alone because I have no children
>
> You'd get this:
> I'm plain vanilla HTML and I'll die alone...
>
> Your thoughts?
>
> andy
>
>
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of Giant Jam Sandwich
> Sent: Thursday, April 05, 2007 8:25 AM
> To: jQuery (English)
> Subject: [jQuery] Re: Truncate Plugin v.2.0
>
> Hey Andy,
>
> Sorry about that. This was an updated release of an older version (which had
> the description of what the plugin did). If you view the source, you can see
> instructions on how to use the plugin. It is not a newsreader - it is for
> string manipulation. I will probably update the demo to better explain that.
>
> As an aside, this will need a 2.1 update soon enough. Currently, if you were
> to select a parent element, and the string within that element you wanted to
> truncate had HTML (child elements), you would loose that formatting. For
> instance:
>
> 
>This is my string to truncate. 
>
> If you choose the paragraph tag as the element to parse the text, it will
> grab that (sans bold tag), and then append it back to the paragraph tag
> without the bold. I need to rethink how to handle this scenario. Any
> suggestions?
>
> Brian
>
> On Apr 5, 9:11 am, "Andy Matthews" <[EMAIL PROTECTED]> wrote:
> > What's it do? You have an example without explaining it's usage or
> > what exactly it does. You have news headlines on your example page, so
> > is it a newsreader? Your headlines are cut off so does it trim down a
> > string of text to a specified length?
>
> > andy
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED]
> > On
>
> > Behalf Of Giant Jam Sandwich
> > Sent: Wednesday, April 04, 2007 6:35 PM
> > To: jQuery (English)
> > Subject: [jQuery] Truncate Plugin v.2.0
>
> > Well, I have vastly improved this script. It was my first plugin for
> > jQuery, and after creating a few others, I decided to go back and make
> > some edits on this one. You can find the demo here:
>
> >http://reindel.com/blog/src/jquery_truncate/
>
> > Feedback is always welcome.
>
> > Brian- Hide quoted text -
>
> - Show quoted text -