[jQuery] offset bug on YUI grid css

2008-09-09 Thread james_027
Hi, I am using the offset() to get the top and left properties of an html element. I am getting a different result from FF2 and FF3. FF2 got it right while FF3 got it wrong but has almost same result with Chrome. I think it's because of the complexity of YUI grid css? but it was right on FF2 ...

[jQuery] help on accessing this inside callback function of a object

2007-12-16 Thread james_027
hi, Sorry if the subject sounds crazy. I have this MainPage object below function MainPage(){ this.init = function(){ $('#sample').click(function(){ // here is my problem, inside this anonymous function how can I access the method_one function? this.method_one(param_1,

[jQuery] dealing with unresponsive script

2007-11-20 Thread james_027
hi, I am using tablesorter 2. I can't help it but I have a large set of data which lead the firefox to popup a dialog saying unresponsive script with options of cancel, debug or continue. how can I prevent the firefox from popping this dialog and display a more user friendly message like This

[jQuery] using json in $.post

2007-10-30 Thread james_027
hi, I very new with json ( you may say that I still really don't understand it quite well), how do I use the json object that is return from the $.post in its callback argument? $.post('/ap/item/code/edit/', values, function (data){ //how

[jQuery] hacking select tag

2007-10-22 Thread james_027
hi, anyone has an idea to make select tag readonly since readonly attr is not supported. Disabled is not a solution because it prevent the data from being posted. Thanks james

[jQuery] Re: hacking select tag

2007-10-22 Thread james_027
. If available to use: select name=myname options If not available: select name=myname-dis disabled=disabled options input type=hidden name=myname value / Does that help ? Cheers On Oct 22, 5:35 pm, james_027 [EMAIL PROTECTED] wrote: hi, anyone has an idea to make select

[jQuery] number formatting plug-in

2007-10-18 Thread james_027
hi, is there a number formatting plugin for jQuery? Thanks

[jQuery] Re: prevent checkbox to check when click

2007-10-18 Thread james_027
it. Something like: $(':checkbox').bind('click', function() { this.blur(); return false; }); Tested on FF2/Mac. --Erik On 10/18/07, james_027 [EMAIL PROTECTED] wrote: hi, how do i prevent the checkbox to be check when click if it doesn't meet certain requirements? Thanks

[jQuery] prevent checkbox to check when click

2007-10-18 Thread james_027
hi, how do i prevent the checkbox to be check when click if it doesn't meet certain requirements? Thanks

[jQuery] sending data with $.post

2007-10-08 Thread james_027
hi, when using the $.post() the second argument is for the data to be send. is there a shortcut way of specifying all the data in the forms? rather than manually doing {'field1':'value1', 'field2':'value2', ...} Thanks james

[jQuery] clone() is hidden

2007-10-07 Thread james_027
hi, I am wondering why after I did clone().appendTo(), the new element doesn't show up. With firebug I saw that it has display:none in it's style attribute ... I try to do clone().appendTo().show() but it doesn't work Could someone correct me on this? Thanks james

[jQuery] using of several $(document).ready()

2007-09-30 Thread james_027
hi, Will there be any bad if in a page I have more than one $ (document).ready()? The reason for this is because I have put make a *.js which contains the common things that should be done, then on some specific pages I have $(document).ready() again for special cases... Thanks james

[jQuery] Re: overide or deleting events

2007-09-23 Thread james_027
hi, On Sep 22, 10:02 pm, muccy [EMAIL PROTECTED] wrote: I don't understand what you want to achieve. If you want to override I think $(#customer).click(A); $(#customer).click(B); it will execute B on click. Is it false? Yes it's false, it will execute both A B. karl has a good post

[jQuery] overide or deleting events

2007-09-22 Thread james_027
hi i have something like this $('[EMAIL PROTECTED]').click(function(){ $('[EMAIL PROTECTED]').show(); }); and during the user interaction i have something like this $('[EMAIL PROTECTED]').click(function(){ alert('Lookup customer cant be

[jQuery] Re: overide or deleting events

2007-09-22 Thread james_027
Swedbergwww.englishrules.comwww.learningjquery.com On Sep 22, 2007, at 7:35 AM, james_027 wrote: hi i have something like this $('[EMAIL PROTECTED]').click(function(){ $('[EMAIL PROTECTED]').show(); }); and during the user interaction i have something like

[jQuery] Re: popup div

2007-09-18 Thread james_027
, Wizzud [EMAIL PROTECTED] wrote: You could try something like this... $('#myTrigger').click(function(){ $('#myDiv').show(); $(document).one('click', function(){ $('#myDiv').hide(); return false; }); return false; }); james_027-2 wrote: Hi, I am trying to make a simple

[jQuery] how to check hide elements?

2007-09-16 Thread james_027
hi, using the hide() function, how do I know if an element is hidden or not? THanks james

[jQuery] Re: popup div

2007-09-11 Thread james_027
anyone have an idea here? Thanks On Sep 11, 11:21 am, james_027 [EMAIL PROTECTED] wrote: Hi, I am trying to make a simple div that will pop which will be close by just clicking to any part of the page. I have no idea of how to do this. I have try something like this $(document).click

[jQuery] popup div

2007-09-10 Thread james_027
Hi, I am trying to make a simple div that will pop which will be close by just clicking to any part of the page. I have no idea of how to do this. I have try something like this $(document).click(function(e){ $('[EMAIL PROTECTED]').hide(); }); $(body).click(function(e){ $('[EMAIL

[jQuery] Re: editing superfish dropdown menu css

2007-09-04 Thread james_027
On Sep 4, 2:45 pm, Joel Birch [EMAIL PROTECTED] wrote: On 9/4/07, james_027 [EMAIL PROTECTED] wrote: Hi, I am trying to edit the css file, but no matter how I edit it it seems the changes doesn't reflect, is there something I should do first? Thanks james Hi James, There's nothing out

[jQuery] Re: editing superfish dropdown menu css

2007-09-04 Thread james_027
On Sep 4, 2:45 pm, Joel Birch [EMAIL PROTECTED] wrote: On 9/4/07, james_027 [EMAIL PROTECTED] wrote: Hi, I am trying to edit the css file, but no matter how I edit it it seems the changes doesn't reflect, is there something I should do first? Thanks james Hi James, There's nothing out

[jQuery] accessing html() attributes inside an event

2007-08-31 Thread james_027
hi, I would like to do something like this ... $('[EMAIL PROTECTED]').click(function(e){ alert(e.target.html()); }); but it's not working ... can I avoid this ... $('[EMAIL PROTECTED]'+e.target.id+']').html() Thanks james

[jQuery] Re: how to delay a event?

2007-08-23 Thread james_027
Hi, On Aug 23, 2:34 pm, Ganeshji Marwaha [EMAIL PROTECTED] wrote: are u trying to achieve something like autocomplete (like google suggest), if that is the case, then you should look athttp://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ -GTG No I am doing a auto complete

[jQuery] how to delay a event?

2007-08-22 Thread james_027
hi, I have a small jQuery script, that get some data over the server on every keypress by the user, but I don't to perform such action every time when the user presses a key, specially if between key presses happens in short amount of time. How do I delay this event? Here is my script

[jQuery] problem or unable to understand html(val) empty() function

2007-08-05 Thread james_027
hi, I have something like this .. p id=similar_employees Theare are 2 similar employee(s). ul liBondoc Sheryl/li liBondoc Sheryl/li

[jQuery] Re: problem or unable to understand html(val) empty() function

2007-08-05 Thread james_027
Thank Klaus ... I didn't know that it is invalid to put list inside a p cheers, james On Aug 6, 1:45 pm, Klaus Hartl [EMAIL PROTECTED] wrote: james_027 wrote: hi, I have something like this .. p id=similar_employees Theare are 2 similar employee(s

[jQuery] multiline string

2007-08-03 Thread james_027
hi, I am trying to use the jQuery .after() function. I have something like this .. $('p').after('p class=maina href=#sample/a/p'); I want to transform it into something like this to make the code much easier to read $('p').after(' p class=main a href=#sample/a /p '); how can

[jQuery] Re: multiline string

2007-08-03 Thread james_027
hi, nice trick! cheers, james On Aug 3, 4:23 pm, Klaus Hartl [EMAIL PROTECTED] wrote: james_027 wrote: hi, I am trying to use the jQuery .after() function. I have something like this .. $('p').after('p class=maina href=#sample/a/p'); I want to transform it into something like

[jQuery] Re: jqModal caching ajax requests

2007-07-13 Thread james_027
+'?'+new Date().getTime(),function() {if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($ (cc,h.w));f(h);}); cheers, james On Jul 12, 5:44 am, Shelane Enos [EMAIL PROTECTED] wrote: Yes, it is ajqmodalissue. On 7/11/07 2:03 AM, james_027 [EMAIL PROTECTED] wrote: Hi everyone, I am

[jQuery] jqModal plugin with ajax parameter

2007-07-12 Thread james_027
Hi, I use jqModal with ajax parameter calling another page with some javascript like $.post. while this is working under firefox, but not on IE 6. it seems that the javascripts were not loaded. But when I call this page on a standard way everything works fine. Thanks james

[jQuery] Re: construct a MAP

2007-07-11 Thread james_027
use the $.ajax function for all my ajax needs, but more or less, the do the same thing. a_map = {name:'james', age:27, location:'HK'}; So: $.post('myurl.php', a_map); Should work fine. On 7/10/07, james_027 [EMAIL PROTECTED] wrote: Hi, I am using the $.post() function

[jQuery] Re: jqModal caching ajax requests

2007-07-11 Thread james_027
Hi everyone, I am glad to be able to stumble upon this discussion, I am also using jqModal recently. @shelane you mean this caching issue is because of jqModal and not on jQuery? Thanks james On May 25, 12:40 am, Shelane Enos [EMAIL PROTECTED] wrote: I agree about it being strange behavior.

[jQuery] jquery book

2007-07-11 Thread james_027
hi, what javascript books are using jquery? thanks, james

[jQuery] Re: construct a MAP

2007-07-11 Thread james_027
/ Core_JavaScript_1.5_Guide:Literals#Object_Literals --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jul 11, 2007, at 2:26 AM, james_027 wrote: Thanks for your time benjamin, so the above code is still right? cheers, james On Jul 11, 1:08 pm, Benjamin

[jQuery] ajax api question

2007-07-11 Thread james_027
Hi, I am using $.post() function, I don't understand what is callback function ... what is the difference between $.post('test.cgi', params, function(data) { alert(data); } ); and $.post('test.cgi', params, alert(data)); the data being shown is different. and I don't seem to

[jQuery] Re: ajax api question

2007-07-11 Thread james_027
, james_027 [EMAIL PROTECTED] wrote: Hi, I am using $.post() function, I don't understand what is callback function ... what is the difference between $.post('test.cgi', params, function(data) { alert(data); } ); and $.post('test.cgi', params, alert(data

[jQuery] Re: ajax api question

2007-07-11 Thread james_027
/javascript_closures_for_dummies Don't worry if you don't get it right away, that just means you're a mere mortal. Eric On Jul 11, 9:40 pm, james_027 [EMAIL PROTECTED] wrote: Hi, I am using $.post() function, I don't understand what is callback function ... what is the difference between

[jQuery] construct a MAP

2007-07-10 Thread james_027
Hi, I am using the $.post() function, the second parameter is a Map which is Key/value pairs that will be sent to the server. how do I create a map to use in $.post(). I can't find any information about map for javascript may be it's not supported? and this map is in jquery only? is this

[jQuery] Re: getting the caller of an event

2007-06-13 Thread james_027
Thanks for all your advices :) cheers, james On Jun 12, 12:07 pm, Matt Stith [EMAIL PROTECTED] wrote: using javascript is much better than putting the functions inline in the HTML. Its alot cleaner, and makes it alot easier to manage. On 6/12/07, james_027 [EMAIL PROTECTED] wrote: Hi

[jQuery] getting the caller of an event

2007-06-11 Thread james_027
Hi, I have a a calling a javascript function, but there will be several a calling the same javascript function, and I want to know which a calls it, I have assign different id attribute for each a, then I don't know how to proceed ... here is my html: a id=one

[jQuery] Re: getting the caller of an event

2007-06-11 Thread james_027
false); On 6/11/07, james_027 [EMAIL PROTECTED] wrote: Hi, I have a a calling a javascript function, but there will be several a calling the same javascript function, and I want to know which a calls it, I have assign different id attribute for each a, then I don't know how

[jQuery] Re: Text Button

2007-05-27 Thread james_027
browser to find out for sure. --rob On 5/23/07, james_027 [EMAIL PROTECTED] wrote: Hi rob, Thanks very much, that really gives me a lot info. I'll take your suggestion ... Another question ... You mention about the browser to update its DOM with $('p').click(...) does

[jQuery] Re: newbie question: keypress vs keydown

2007-05-22 Thread james_027
Thanks a lot especially to your second post. :) cheers james On May 22, 11:59 am, Richard Worth [EMAIL PROTECTED] wrote: On 5/21/07, Richard Worth [EMAIL PROTECTED] wrote: On 5/21/07, james_027 [EMAIL PROTECTED] wrote: Hi, Is there a difference between to two? Any guidelines

[jQuery] Text Button

2007-05-22 Thread james_027
Hi, Is this the best way to make a text button? a href=#Click Me!/a It's nice that even with using a href=# jquery could make almost any tag to have click event, but the problem is the cursor doesn't indicate that it's clickable. Thanks in advance for any tips, suggestion, guides cheers,

[jQuery] Re: Text Button

2007-05-22 Thread james_027
Hi, What I mean is when the cursor go over the tag, it doesn't show that it is clickable ... hope you got what I mean. james On May 22, 5:15 pm, Michael Stuhr [EMAIL PROTECTED] wrote: james_027 schrieb: Hi, Is this the best way to make a text button? a href=#Click Me!/a It's nice

[jQuery] Re: Text Button

2007-05-22 Thread james_027
: p style=cursor:pointer; cursor:handHover/p The two cursor declarations are needed there as MSIE 5.0 and 5.5 only support 'hand', whereas other browsers use 'pointer' (although some do support hand as well). --rob On 5/22/07, james_027 [EMAIL PROTECTED] wrote: Hi, Is this the best

[jQuery] Re: Text Button

2007-05-22 Thread james_027
Hi, what is the difference between input type=button to button Thanks james On May 22, 5:20 pm, Bob den Otter [EMAIL PROTECTED] wrote: james_027 wrote: Hi, Is this the best way to make a text button? a href=#Click Me!/a Slightly offtopic, but you might want to look into this:http

[jQuery] Re: Text Button

2007-05-22 Thread james_027
(){ // do this and do that ... }); As for the cursor hand look , you can do that in css p{ Cursor: pointer; } -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of james_027 Sent: mardi 22 mai 2007 10:05 To: jQuery (English) Subject: [jQuery

[jQuery] Re: Text Button

2007-05-22 Thread james_027
after loading, which is cumulative if you have to do it for many links/tags. Hope all that info helps! --rob On 5/22/07, james_027 [EMAIL PROTECTED] wrote: Hi, what is the difference between input type=button to button Thanks james On May 22, 5:20 pm, Bob den Otter [EMAIL

[jQuery] Re: callback

2007-05-21 Thread james_027
. Without callbacks we wouldn't easily be able to know when those items where done executing. -- Brandon Aaron On 5/21/07, james_027 [EMAIL PROTECTED] wrote: Hi, I am welcoming myself to Jquery, and I am glad that I give myself a chance to try jquery. The documentation and tutorials

[jQuery] newbie question: keypress vs keydown

2007-05-21 Thread james_027
Hi, Is there a difference between to two? Any guidelines on which one to use on a certion situation? Thanks james