[jQuery] Re: Calling PHP function with $.ajax()

2009-03-05 Thread Charles Liu
you can decide what you will do in php by the parameters from GET/POST method for example "url:inbox.php?act=delete&id=123" and from the server side, it goes like: $act = empty($_GET['act'])?'':$_GET['act']; if($act=='delete'){ ... } Hope this will be any help Charles 2009/3/6 dawnerd > > No, y

[jQuery] Re: How to trigger "click" event in jquery

2009-03-05 Thread Charles Liu
hi Andy, maybe i don't understand, but, since you bind function "A" to click event, why don't you execute "A" directly instead of trigger Charles 2009/3/6 Yun W > > I have the same issue with the click on jQuery. > > When using $('#elmId').trigger('click'), it doesn't work on Google > Chrome/Saf

[jQuery] Re: how to add callback in the $.ajax ?

2009-03-04 Thread Charles Liu
On Mar 5, 9:06 am, James wrote: > > But does it work with async set to false? > > The code should work correctly if you have async set to false. > > However, you cannot do this (return the JSON from the function) > > properly without that setting set to false. > > >

[jQuery] Re: how to add callback in the $.ajax ?

2009-03-04 Thread Charles Liu
hi Adwin, it is "undefined" because it runs before ajax is finished. maybe you should try to move "return result" next to the position of "result = data" let me know if it works Charles 2009/3/5 Adwin Wijaya > > Hi, > > can i have callback function on the $.ajax ? > I don't want to use async s

[jQuery] Re: I need a jsonp example

2009-03-03 Thread Charles Liu
usually you should use $.getJSON when you need jsonp to get data from another domain On 3月3日, 上午8时17分, craigpierce wrote: > Hi All - > > I'm fairly new to jQuery, and totally new to jsonp. I would like to > see an example of an $.ajax call using jsonp - as of right now, this > is what I have tr

[jQuery] Re: Form inside Form value

2009-02-27 Thread Charles Liu
1st, why do you use 2 forms together? 2nd, when you say "email filed", do you mean "" ? if so, you can use $("#form2_id").find('input[name="email"]').get(0).val(); maybe not so accurate, hope it'll be any help. Charles 2009/2/27 Po01 > > Hi, i have a HTML like that: > > > > > > > > Suppos

[jQuery] Re: I want to do validation via AJAX and then submit form...

2009-02-26 Thread Charles Liu
i think you can : 1. put the new page in the action (as you said) , run the "submit" function of the form when the ajax response is correct 2. run "top.location= the new page" when the ajax response is correct warning: newbie's suggestions above ;) 2009/2/27 Coder > > I need the answer of this

[jQuery] Re: Help for beginners. Inspecting objects.

2009-02-26 Thread Charles Liu
btw, usually you should focus on the property "target" which contains all html properties 2009/2/27 Charles Liu > function get(obj) > { > var str; > for(var i in obj) > > str+=i+"="+obj[i]+";\n" > > alert(str); &

[jQuery] Re: Help for beginners. Inspecting objects.

2009-02-26 Thread Charles Liu
function get(obj) { var str; for(var i in obj) str+=i+"="+obj[i]+";\n" alert(str); } 2009/2/27 Sonya > > Hello, > > I just begin to work with jQuery and have some questions. Where I can > find a list of all properties for elements. E.g. I generate a list > item: