[jQuery] Re: post AJAX no response

2009-11-12 Thread David
Hi, I'm back again with this AJAX post problem. I've used HttpFox FF extension and I've got some extra information. The post call is aborted. I got next message using HttpFox extension: Method: post Time: 0.451 Result: Aborted Type: NS_BINDING_ABORTED This happens when I use a low band interne

[jQuery] Re: $.post(), php file in parent directory?

2009-10-27 Thread James
Yes. // parent directory $.post('../file.php'); // folder in parent directory $.post('../dir/file.php'); // folder in grandparent directory $.post('../../folder/file.php'); // child directory $.post('child/file.php'); $.post('./child/file.php'); // base directory $.post('/file.php'); // curr

[jQuery] Re: $.post and form data

2009-10-13 Thread Jason
Thanks! Looks perfect. On Oct 12, 12:40 am, Karl Swedberg wrote: > On Oct 11, 2009, at 3:35 PM, Jason wrote: > > > > > Can someone explain a little bit more (more then jQuery's docs) about > > how the $.post operates?  I know it's a "shortcut" for .ajax and it > > uses the HTTP POST request.  So

[jQuery] Re: $.post() speed

2009-10-12 Thread Adonis
Yeap, thanks fof the helping out!! I still may have some more questions and if so, i ll post some more! Kind regards, On Oct 9, 5:43 pm, MorningZ wrote: > You've got the "x" set inside the callback and are trying to alert it > *before* it gets back from it the $.postcall, hence it's empty > > so

[jQuery] Re: $.post and form data

2009-10-11 Thread Karl Swedberg
On Oct 11, 2009, at 3:35 PM, Jason wrote: Can someone explain a little bit more (more then jQuery's docs) about how the $.post operates? I know it's a "shortcut" for .ajax and it uses the HTTP POST request. So I'm guessing it's not sending the same request the form would send... i.e. you HAVE

[jQuery] Re: $.post() speed

2009-10-09 Thread MorningZ
You've got the "x" set inside the callback and are trying to alert it *before* it gets back from it the $.post call, hence it's empty so if you have $.post( ... do ajax stuff to variable "x" . ) alert(x); // <--- this gets run right away, the asynchronous call of $.post doesn't "wait to f

[jQuery] Re: $.post() speed

2009-10-09 Thread Adonis
ok, here is an effort to sum up the code.. * function initialiseLegendLayerGroupEntry(a,b,c,d,e,f) { var x; $("#division_name").bind("click", function() { if(this.value == "sth") { y=callFunction(a,b,c,d,e,f); $.ajax({ type: "POST",

[jQuery] Re: $.post() speed

2009-10-09 Thread Adonis
ok, here is an effort to sum up the code.. * function initialiseLegendLayerGroupEntry(a,b,c,d,e,f) { var x; $("#division_name").bind("click", function() { if(this.value == "sth") { y=callFunction(a,b,c,d,e,f); $.ajax({ type: "POST",

[jQuery] Re: $.post() speed

2009-10-09 Thread Adonis
ok, here is an effort to sum up the code.. * function initialiseLegendLayerGroupEntry(a,b,c,d,e,f) { var x; $("#division_name").bind("click", function() { if(this.value == "sth") { y=callFunction(a,b,c,d,e,f); $.ajax({ type: "POST",

[jQuery] Re: post AJAX no response

2009-10-08 Thread David
Hi Doug, yes, I am sure the data loads correctly, as this post call is requested once you select an option in a select list. I have an alert message just before the post call and I can see the 'selected_data' parameter. In fact, as I have said, the request is well done, as the server sends the ou

[jQuery] Re: post AJAX no response

2009-10-08 Thread Knight, Doug
Hi David, Do you have your call inside a $(document).ready? It may be that in a high bandwidth environment your data loads completely before your call is triggered, whereas in a low bandwidth environment your page has the chance to finish loading before the data makes it to your call. My two c

[jQuery] Re: $.post() speed

2009-10-08 Thread MorningZ
You should should the specific $.post() code in detail, there's something you are missing because when you get back from the async call, everything (global variables, page objects) are fully available at that point... there's zero need to use setTimeout On Oct 8, 12:27 pm, Adonis wrote: > D

[jQuery] Re: $.post() speed

2009-10-08 Thread Adonis
Dan, I used a $.ajax() call with a callback -> success: function(msg) etc. but still it does not work the way I want to. from the server side i am using, * return render_to_response("blah.html",{ 'project_id':project_id }, context_instance = RequestContext(request)) * putting the project_id in a

[jQuery] Re: $.post() speed

2009-10-08 Thread Dan G. Switzer, II
Adonis, The $.post() function is asynchronous (by default) when your code hits a $.post() call, it'll keep executing code. In order to do something with the results of your AJAX call, you'll want to use the callback option--which is a function run when the AJAX call is completed. -Dan On Thu, Oct

[jQuery] Re: $.post cross domain first sends an OPTIONS verb?

2009-10-06 Thread David P
Were you able to find a solution to get it working in Firefox? Thank you david On Oct 1, 10:25 am, Vitaly Piven wrote: > Hello David, > > I have similar problem . $.post() sends some "OPTIONS" request instead > of expected "POST" (according to logs of web server). > > On 25 сен, 21:32, David P

[jQuery] Re: $.post cross domain first sends an OPTIONS verb?

2009-10-01 Thread Vitaly Piven
btw, In IE works just fine. Problems with Firefox 3.5. 2009/10/1 Vitaly Piven > > Hello David, > > I have similar problem . $.post() sends some "OPTIONS" request instead > of expected "POST" (according to logs of web server). > > On 25 сен, 21:32, David P wrote: > > I use $.post like so: > > >

[jQuery] Re: $.post cross domain first sends an OPTIONS verb?

2009-10-01 Thread Vitaly Piven
Hello David, I have similar problem . $.post() sends some "OPTIONS" request instead of expected "POST" (according to logs of web server). On 25 сен, 21:32, David P wrote: > I use $.post like so: > > $.post("http://mydomain.com/some/webservice";, $.toJSON({ emailAddress: > emailAddress }), callb

[jQuery] Re: $.post - post array is empty

2009-09-09 Thread Armand Turpel
i found the solution. the problem is that browsers *dont allow cross site ajax*. with *jsonp* in $.ajax it works. it would be great to emphasize this in every ajax function doc. it toke me a few hours of debugging to come to this insight Cesar Sanz wrote: try _REQUEST['aa'] and see if is

[jQuery] Re: $.post - post array is empty

2009-09-09 Thread Cesar Sanz
try _REQUEST['aa'] and see if is data is not empty - Original Message - From: "atur" To: "jQuery (English)" Sent: Wednesday, September 09, 2009 3:48 AM Subject: [jQuery] $.post - post array is empty Hi, I stick on a wired ajax problem. The following code works on my local machine

[jQuery] Re: post an array

2009-09-09 Thread Adonis
Hello, I managed to post my array by calling toString() javascript method : $.ajax({ type: "POST", url: "/addFeature/", data: {project_name:project_name, 'vertexArray':vertexArray.toString()}, success: function(msg){

[jQuery] Re: post an array

2009-09-09 Thread Alex Weber
You can't post a javascript object, its gotta be key-value pairs if the data is coming from a form you can do: var serial = $('#myform').serialize(); and post the variable serial if not then as far as I know you gotta convert the object into key- value pairs some other way! On Sep 9, 6

[jQuery] Re: Post PHP object via AJAX

2009-08-25 Thread James
What do you mean a "PHP object"? You can't pass a PHP object in Javascript...Javascript is Javascript, not PHP. You can pass in a Javascript object (JSON format) to jQuery's ajax() and it'll convert accordingly for you depending on whether you're doing a GET or POST. This below, is the same way t

[jQuery] Re: POST GET help

2009-08-13 Thread James
$('#JobQuery').keyup(function(){ $.post("/jobs/search/", $("#JobSearchForm").serialize(), function (data) { // default response type is 'html' $("#someDiv").html(data); }); }); On Aug 13, 10:47 am, Brett Ritter wrote: > On Thu, Aug 13, 2009 at 4:43 PM, Dave Maharaj :: > >

[jQuery] Re: POST GET help

2009-08-13 Thread Brett Ritter
On Thu, Aug 13, 2009 at 4:43 PM, Dave Maharaj :: WidePixels.com wrote: > $('#JobQuery').keyup(function(){ > $.post("/jobs/search/", $("#JobSearchForm").serialize()); > }); ... > can I get the data in the response to load into a div? The third parameter to $.post is a callback function that is cal

[jQuery] Re: Post variable array

2009-08-13 Thread cz231
Boy...I wish I asked here before I wrote all of those extra and unnecessary lines. Thanks for all of your help though. The serialize function worked perfectly. On Aug 12, 6:36 pm, James wrote: > I believe what you're trying to do is what serializeArray() function > in jQuery already does:http://

[jQuery] Re: Post variable array

2009-08-12 Thread James
I believe what you're trying to do is what serializeArray() function in jQuery already does: http://docs.jquery.com/Ajax/serializeArray $("button.save").click(function(){ var action = $(this).parent("form").attr("action"); var postThis = $(this).parent("form").serializeArray(); $.pos

[jQuery] Re: Post variable array

2009-08-12 Thread cz231
Yeah sure...here's the code: $("button.save").click(function(){ var action = $(this).parent("form").attr("action"); var i = 0; var size = $(this).siblings("input, select").size(); var nameArray = []; var valueArray =

[jQuery] Re: Post variable array

2009-08-12 Thread James
It's probably possible to not need to use it. But you're not revealing much code to us it's difficult to help. Can you show us how what you put in your variable 'postThis'? How do you create this? If you have postThis as a JSON object to begin with, you don't need the json2.js file. On Aug 12, 11

[jQuery] Re: Post variable array

2009-08-12 Thread cz231
And there's no way to do it without adding another js file? I ask because for this project is pretty important to keep the number of requests down. On Aug 12, 3:43 pm, James wrote: > The type you want is JSON (an object). > > Include this Javascript file here:http://www.json.org/json2.js > > Th

[jQuery] Re: Post variable array

2009-08-12 Thread James
The type you want is JSON (an object). Include this Javascript file here: http://www.json.org/json2.js Then use the JSON.parse() function which will convert a String to a JSON object. The String has to have a format like a JSON object for it to work properly. var postData = JSON.parse(postThis)

[jQuery] Re: Post variable array

2009-08-12 Thread cz231
I think I know the problem...My postThis variable ends up being just one big string. How do I convert it to the correct type? (I'm not even sure what type is correct) On Aug 12, 2:00 pm, James wrote: > I don't see the problem... > > Something like this should work: > > var action = 'somepage.php

[jQuery] Re: Post variable array

2009-08-12 Thread James
I don't see the problem... Something like this should work: var action = 'somepage.php'; var postThis = {Name:"Jimmy", Username:"Something", Password:"something", Email:"someth...@someplace.com"}; $.post(action, postThis, function(data) { alert('done'); }); Otherwise, post your real code fo

[jQuery] Re: Post variable array

2009-08-12 Thread cz231
Oops. I'm sorry. action is the url to be posted to, and postThis is equal to: Name: "Jimmy", Username: "Something", Password: "something", Email: "someth...@someplace.com" On Aug 12, 12:51 pm, Jörn Zaefferer wrote: > What values do the variables "action"  and postThis contain? You > describe th

[jQuery] Re: Post variable array

2009-08-12 Thread Jörn Zaefferer
What values do the variables "action" and postThis contain? You describe them as "actions", isn't telling me anything. Jörn On Wed, Aug 12, 2009 at 7:40 PM, cz231 wrote: > > Hi, > > I'm using AJAX to submit a form. I'm using the POST method. Example: > > $.post(action, postThis); > > Both actio

[jQuery] Re: $.post callback broken in safari in new window.open()

2009-08-05 Thread akume
i'm having a similar problem with $.get. the callback isn't fired for safari 4. -akume Thomas Bircher wrote: > > > hello > > I'm opening a new window with window.open() > In the new window a file is loaded with the following post data > function: > > function ajaxPost(url,data){ >

[jQuery] Re: POST data not being sent

2009-07-29 Thread Brett Ritter
On Wed, Jul 29, 2009 at 1:48 PM, shaf wrote: > Ok guys, thats for the advice and replies. > Cesar, if thats how you construct a GET string how would I construct a > POST string ? You don't need a single string. $.ajax({ type: "POST", async: false, url: _HOMEDIR+"send.php", data: { aParameter:

[jQuery] Re: POST data not being sent

2009-07-29 Thread Cesar Sanz
s Regards - Original Message - From: "shaf" To: "jQuery (English)" Sent: Wednesday, July 29, 2009 11:48 AM Subject: [jQuery] Re: POST data not being sent Ok guys, thats for the advice and replies. Cesar, if thats how you construct a GET string how would I cons

[jQuery] Re: POST data not being sent

2009-07-29 Thread alyanm
Hi, I personally prefer to use $.getJSON for this sort of thing, seems to do a better job with the JSON parsing and all that: $.getJSON(_HOMEDIR+"send?"+str, ... However, I'm wondering if "send" is actually the name of the file you want to invoke? Perhaps you left the .php off in your url stri

[jQuery] Re: POST data not being sent

2009-07-29 Thread shaf
span:last").text("Sending..").show(); > > }, > ----- Original Message - > From: "Brett Ritter" > To: > Sent: Wednesday, July 29, 2009 10:20 AM > Subject: [jQuery] Re: POST data not being sent > > > On Wed, Jul 29, 2009 at 12:16 PM,

[jQuery] Re: POST data not being sent

2009-07-29 Thread Cesar Sanz
str, dataType: "json", beforeSend: function() { $("span:last").text("Sending..").show(); }, - Original Message - From: "Brett Ritter" To: Sent: Wednesday, July 29, 2009 10:20 AM Subject: [jQuery] Re: POST data not being sent On Wed, Jul 29, 2009 at

[jQuery] Re: POST data not being sent

2009-07-29 Thread Brett Ritter
On Wed, Jul 29, 2009 at 12:16 PM, Liam Potter wrote: > also, don't delete the quoted > posts, means everyone not using a web based group reader can follow the > conversation. However feel free to TRIM lengthy posts to the relevant parts. Even non-web-based group readers support threading or sorti

[jQuery] Re: POST data not being sent

2009-07-29 Thread Liam Potter
tell us what happens when you submit the form, also, don't delete the quoted posts, means everyone not using a web based group reader can follow the conversation. shaf wrote: Thanks for the reply but that doesnt really answer my question.

[jQuery] Re: POST data not being sent

2009-07-29 Thread shaf
Thanks for the reply but that doesnt really answer my question.

[jQuery] Re: POST data not being sent

2009-07-28 Thread Donny Kurnia
shaf wrote: Hi Guys I am trying to make an ajax POST request but its not working. Code below: var _HOMEDIR = "http://localhost/personal/index.php/home/";; $(document).ready(function() { $("form").submit(function() { var str = $("form").serialize(); $.aj

[jQuery] Re: $.post-ing data brackets as first character of form value adds semi-colon to input name

2009-07-14 Thread Jeff Nouwen
On Jul 13, 3:54 pm, Jeff Nouwen wrote: > My PHP script is being called through CodeIgniter, but I don't > immediately see anything in its code that would cause the addition of > the semi-colon. And upon closer inspection of CodeIgniter's source, it is indeed the cause of my problem, not jQuery.

[jQuery] Re: POST method not working for AJAX Tabs

2009-06-21 Thread Klaus Hartl
$('#tabs').tabs({ spinner: 'Loading...', ajaxOptions: { dataType:'text' } }); http://docs.jquery.com/UI/Tabs#options --Klaus On 21 Jun., 22:18, Hardip wrote: > a small correction. > > the method is working. > > what wasn't working is the dataType. > > if i set it to json,

[jQuery] Re: POST method not working for AJAX Tabs

2009-06-21 Thread Hardip
a small correction. the method is working. what wasn't working is the dataType. if i set it to json, globally, then Tabs tries to fetch json, not text (general HTML). how can i make an exception to Tabs. [code] $.ajaxSetup({ type:'post', dataType:'json',

[jQuery] Re: $.post form don't post

2009-05-31 Thread Angel
Sent from my iPhone On May 31, 2009, at 10:16 AM, mar4eva mar4eva wrote: var value = $('#ListaCliente).val(); $.post("teste.php", { selectvalue: ""+value}); 2009/5/30, _zeh_ : I have the following select: ABA CARLOS LUIZ SILVIO and may an

[jQuery] Re: $.post form don't post

2009-05-31 Thread mar4eva mar4eva
var value = $('#ListaCliente).val(); $.post("teste.php", { selectvalue: ""+value}); 2009/5/30, _zeh_ : > > I have the following select: > > > ABA > CARLOS > LUIZ > SILVIO > > > and may > > and my post is this: > $.post('teste.php', >

[jQuery] Re: POST Redirection

2009-05-05 Thread Nekura Neko
> Hope you still can help me. > > > On May 2, 6:30 pm, Danny Nolan wrote: > > > > got it installed? Enable it, have it running while viewing the form. Now > > > submit the form and firebug will capture the post URL, will popup inside > > > the firebug w

[jQuery] Re: POST Redirection

2009-05-04 Thread Cryptonit
firebug will capture the post URL, will popup inside > > the firebug window. > > > --- On Sat, 5/2/09, Cryptonit wrote: > > > From: Cryptonit > > Subject: [jQuery] Re: POST Redirection > > To: "jQuery (English)" > > Date: Saturday, May 2, 2009, 9:

[jQuery] Re: POST Redirection

2009-05-03 Thread Cryptonit
te: > > From: Cryptonit > Subject: [jQuery] Re: POST Redirection > To: "jQuery (English)" > Date: Saturday, May 2, 2009, 9:20 AM > > Could you please be a little more precise? > I've installed firebug, now what? > Maybe I also have to be more specific: I don&#x

[jQuery] Re: POST Redirection

2009-05-02 Thread Danny Nolan
got it installed? Enable it, have it running while viewing the form. Now submit the form and firebug will capture the post URL, will popup inside the firebug window. --- On Sat, 5/2/09, Cryptonit wrote: From: Cryptonit Subject: [jQuery] Re: POST Redirection To: "jQuery (English)&q

[jQuery] Re: POST Redirection

2009-05-02 Thread Cryptonit
Could you please be a little more precise? I've installed firebug, now what? Maybe I also have to be more specific: I don't create a web page, I'm creating a firefox extension. So I can't just debug everything I like... Could you please point me to the exact property I have to look for? On 2 Mai,

[jQuery] Re: POST Redirection

2009-05-01 Thread Danny Nolan
Firebug is your friend --- On Fri, 5/1/09, Cryptonit wrote: From: Cryptonit Subject: [jQuery] POST Redirection To: "jQuery (English)" Date: Friday, May 1, 2009, 2:22 PM Hi Folks! Here's my problem: I want to make a post request to a web service site. This site is automaticly redirecting me

[jQuery] Re: $.post error on response

2009-04-06 Thread Guido
I had Firebug is reporting an error on line 3633 of jquery 1.3.2. Actually Firebug also added "411 Length Required". Moreover the same script was fine when running it ajax call against another server My situation was a post with no data posted (the url was enough, mvc/ restful style) $.ajax({ t

[jQuery] Re: $.post problem

2009-03-30 Thread James
Where are you defining the 'click'? Before the $.post, in the success callback function of $.post, or after the $.post? On Mar 28, 5:10 am, paljo wrote: > Hi, > > I' m using $.post in this form: $.post("rpc.php",{data:data},function > (result){$('.aDiv').html(result);}); > Basically i' m searchi

[jQuery] Re: post form using jquery ajax

2009-03-29 Thread Abdullah Rubiyath
Hi, I believe you can post form either using $.post or $.ajax method and there's a function called serialize( ), which serializes form data, instead of typing it's data in key value pairs manually. Serialize: http://docs.jquery.com/Ajax/serialize $.post and $.ajax: http://docs.jquery.com/Pos

[jQuery] Re: post form using jquery ajax

2009-03-29 Thread Dunc
Check out: http://www.dexign.net/post/2008/07/16/jQuery-To-Call-ASPNET-Page-Methods-and-Web-Services.aspx Makes it really simple. On 29 Mar, 09:34, iceangel89 wrote: > how can i post a form to server using jquery? > > $.post requires me to post data in key value pairs. if the form is big > then

[jQuery] Re: Post Form to Two Servers

2009-03-25 Thread James
You can do this using AJAX by just firing off the request to two different URLs with the same POST form data. Otherwise, you could do it using a server-side method by submitting the form to one URL, and the script can push some of that data to another URL using something like cURL. On Mar 25, 1:

[jQuery] Re: $.post() callback

2009-03-07 Thread bart
Thanks for your reply.I reviewed the code and it was a structure problem, I've set a few things up differently and now it works. Thanks :) On Mar 6, 10:01 am, James wrote: > I don't see any issues with the code you posted. I suggest try > removing some code from inside-out to debug. Start by rem

[jQuery] Re: $.post() callback

2009-03-06 Thread James
I don't see any issues with the code you posted. I suggest try removing some code from inside-out to debug. Start by removing the AJAX portion. Does it still follow through on the href? If not, it's the AJAX. Is so, something else is wrong. Remove the confirm, and test. Etc. On Mar 6, 2:56 am, ba

[jQuery] Re: $.post error on response

2009-02-27 Thread James
Do you have any other ajax options set outside the code you've provided? It would be helpful if you try this on a demo page and isolate the issue. It sounds like something else may be interfering with it. On Feb 27, 9:46 am, Dan wrote: > Hi Ricardo, > > I've been trying so many different combin

[jQuery] Re: $.post error on response

2009-02-27 Thread Dan
Hi Ricardo, I've been trying so many different combinations to get this to work that I forgot the callback function on the version I posted. I've tried it with the callback and even copy/pasted your code and still no luck. I'm completely baffled why a simple echo statement isn't getting returned

[jQuery] Re: $.post error on response

2009-02-27 Thread Dan
Thanks for the quick reply. I tried your code and the alert displays "[object XMLHttpRequest]". Firebug still doesn't display anything in the response even though the PHP function is just echoing "checked out". On Feb 27, 12:46 pm, MorningZ wrote: > oops.. forgot to change one line > > CallParam

[jQuery] Re: $.post error on response

2009-02-27 Thread ricardobeat
Where are you expecting to collect the response? Are you using a callback? function check_out_image(image_id) { $.post('ajax/checkout_image', {imageid: image_id}, function(resp){ alert(resp); }); } On Feb 27, 2:41 pm, Dan wrote: > I'm using jquery 1.3.2 and trying to send some dat

[jQuery] Re: $.post error on response

2009-02-27 Thread MorningZ
oops.. forgot to change one line CallParams.data = { imageid: image_id }; On Feb 27, 1:39 pm, MorningZ wrote: > instead of $.post, try this instead > > var CallParams = {}; > CallParams.type = "POST"; > CallParams.url = "your-page.php"; > CallParams.processData = true; > CallParams.data = para

[jQuery] Re: $.post error on response

2009-02-27 Thread MorningZ
instead of $.post, try this instead var CallParams = {}; CallParams.type = "POST"; CallParams.url = "your-page.php"; CallParams.processData = true; CallParams.data = params; CallParams.dataType = "json"; CallParams.success = function(data) { // "data" is the result }; CallParams.error = funct

[jQuery] Re: .post ajax issue

2009-02-11 Thread drummingsticks
drummingsticks > > Sent: Wednesday, February 11, 2009 6:11 AM > > To: jQuery (English) > > Subject: [jQuery] Re: .post ajax issue > > > Sorry about the confusion. > > > I'm trying to use jQuery's .post function. > > > I use Firebug in Firefox t

[jQuery] Re: $.post NOT_ENOUGH_ARGS

2009-02-11 Thread Tim Johnson
Thank you very much James. this is great! cheers tim On Wednesday 11 February 2009, James wrote: > You can use a generic classname on all your forms. > > > ... > > > > ... > > > $(function() { > $(".myForm").submit(function(){ > $.post($(this).attr("action"), >$

[jQuery] Re: $.post NOT_ENOUGH_ARGS

2009-02-11 Thread James
You can use a generic classname on all your forms. ... ... $(function() { $(".myForm").submit(function(){ $.post($(this).attr("action"), $(this).serialize(), function(response,mystatus) { alert('response: ' + response + " stat

[jQuery] Re: $.post NOT_ENOUGH_ARGS

2009-02-11 Thread Tim Johnson
On Tuesday 10 February 2009, mkmanning wrote: > For the second argument use $(form).serialize() > > You should also use onsubmit="return CheckForm0(this);" > although the best practice would be to remove the inline script and > bind > the submit event like this: > $('form').submit(function(){ >

[jQuery] Re: .post ajax issue

2009-02-10 Thread Konstantin Mirin
> -Original Message- > From: jquery-en@googlegroups.com > [mailto:jquery...@googlegroups.com] On Behalf Of drummingsticks > Sent: Wednesday, February 11, 2009 6:11 AM > To: jQuery (English) > Subject: [jQuery] Re: .post ajax issue > > > > Sorry about the confusion. &

[jQuery] Re: $.post NOT_ENOUGH_ARGS

2009-02-10 Thread mkmanning
For the second argument use $(form).serialize() You should also use onsubmit="return CheckForm0(this);" although the best practice would be to remove the inline script and bind the submit event like this: $('form').submit(function(){ //do your ajax here and return false }); On Feb 10, 8:14 pm,

[jQuery] Re: $.post NOT_ENOUGH_ARGS

2009-02-10 Thread Tim Johnson
On Tuesday 10 February 2009, James wrote: > The second parameter (where you have 'form') is suppose to be a JS > object like: > {name:form.myName, email:form.email, phone:form.phone} Potentially, 'form' could have hundreds of elements and in reality, does. So how to convert the 'form' object int

[jQuery] Re: .post ajax issue

2009-02-10 Thread drummingsticks
Sorry about the confusion. I'm trying to use jQuery's .post function. I use Firebug in Firefox to test and check what was sent from the page and what the ajax response is back from the server. In the post tab of Firebug, it correctly shows the data that needs to be passed to the server, however

[jQuery] Re: $.post NOT_ENOUGH_ARGS

2009-02-10 Thread James
The second parameter (where you have 'form') is suppose to be a JS object like: {name:form.myName, email:form.email, phone:form.phone} function CheckForm0(form) { $.post(form.action,{name:form.myName, email:form.email, phone:form.phone}, function(response,mystatus){ alert('respo

[jQuery] Re: .post ajax issue

2009-02-10 Thread Mike Alsup
> I'm attempting to use AJAX utilizing the .post function. > Using Firebug, I see that the post is correctly passing the expected > form variables to the page. > However, the form variable do not exist when trying to locate them in > the requested page. Can you please explain that again? I'm not

[jQuery] Re: $.post not working with object arrays

2009-01-11 Thread Jolyon Terwilliger
change test.arr = new Array(1, 2, 3); to test["arr[]"] = new Array(1, 2, 3); awkward, but should work.. On Dec 23 2008, 10:52 am, drimsun wrote: > Hello, > > Whenever I try to pass an object containing array data through jQuery > AJAX only the > last value of the array is sent. Consider this

[jQuery] Re: POST METHOD IN REMOTE PARAM FOR VALIDATE PLUGIN

2008-11-25 Thread Jörn Zaefferer
With the 1.5 release you will be able to use this instead: $("#myform").validate({ rules: { username: { required: true, remote: { url: "checkusername.php", type: "post" data: { email: function() { return $("#email").val() } } }

[jQuery] Re: POST METHOD IN REMOTE PARAM FOR VALIDATE PLUGIN

2008-11-23 Thread Jörn Zaefferer
Could you create a ticket for this? http://dev.jquery.com/newticket (requires registration) Thanks Jörn On Sun, Nov 23, 2008 at 4:23 AM, Mahbub <[EMAIL PROTECTED]> wrote: > > The jQuery Validate libraries "remote" parameter uses GET method for > AJAX calls. If nothing is given as the "type" param

[jQuery] Re: .post trouble

2008-11-19 Thread none
It was solved by adding encodeURIComponent :-)

[jQuery] Re: $.post with an array of variables

2008-11-11 Thread Isaak Malik
Create a string instead and see if that works for you? Example: var str = '?'; str += 'freshbox=' + encodeURIComponent(freshBoxType); //etc... On Tue, Nov 11, 2008 at 8:37 PM, tukutela <[EMAIL PROTECTED]>wrote: > > Hi all, > > I have an array of variables that is built from the following: > > d

[jQuery] Re: $.post using dynamic arrays

2008-09-16 Thread ricardobeat
Just pass your array object: $.post("/index.php",{run: url, arr : yourarray }, On Sep 16, 1:58 pm, Anthony <[EMAIL PROTECTED]> wrote: > This may be quite simple for many, but I am stuck trying to make a > dynamic $.post() where the request (post) variables passed are fed > from a dynamicly chang

[jQuery] Re: $.post using dynamic arrays

2008-09-16 Thread Anthony
To those who read this: I got my answer. I was setting up an assoc. array with [ ]... in Javascript, this is not how it is done. /-- CODE --/ function http(verb, url, callback, paramstr) { params = { }; var urlparts = url.split('?'); paramstr += '&' + urlparts[1];

[jQuery] Re: $.post callback problem

2008-09-12 Thread Peter Edwards
It looks like you have a rogue parenthesis to me - $.post($(this).attr("href")) - the last closing parenthesis completes the $.post call, so your callback function will not fire. on 11/09/2008 21:49 Tom Shafer said:: > i am trying to use data i am getting back from $.post but I am not > able to

[jQuery] Re: $.post callback problem

2008-09-11 Thread Mike Nichols
I've had problems with not specifiying the 'data' to be sent to the server on a post ,ie: $.post(url,{data:{}}); You might try that and see if it fixes it On Sep 11, 3:32 pm, Mike Alsup <[EMAIL PROTECTED]> wrote: > > i am trying to use data i am getting back from $.post but I am not > > able to

[jQuery] Re: $.post callback problem

2008-09-11 Thread Mike Alsup
> i am trying to use data i am getting back from $.post but I am not > able to get the function with the data in it to work > > $("a.rater").click(function(event) >         { >                 $.post($(this).attr("href")), >                         function(data) >                         { >    

[jQuery] Re: $.post - timing problem

2008-09-07 Thread [EMAIL PROTECTED]
The function passed to $.post is a callback, meaning execution continues in the main thread of operation until $.post returns, at which point the callback function is executed. To make your 2nd post command wait until after the first is completed, your second post command should be part of your c

[jQuery] Re: $.post - timing problem

2008-09-07 Thread Michael Geary
$.post returns immediately. It does not wait for the data to be downloaded. There is an option to force it to wait, but that is definitely not recommend, since it locks up the browser (and *all* browser sessions from the same browser instance) while waiting. The callback function is where you put

[jQuery] Re: $.post problem. need help badly

2008-07-16 Thread iTsadok
Pappa Bear, note that the original problem was that upon executing "return true" the submit action would take the browser to a new page. Kirov (if I understood him correctly) suggested to "wait for a result code from the POST request before returning true". Now, in Java for example, I would take t

[jQuery] Re: $.post problem. need help badly

2008-07-15 Thread Pappa Bear
You can with ajax... depending on the result that is returned, you can have your script perform various things. If the result returns with a success for the call, you can call one thing, while if returns a failure, you can, say alert the user with a message. Even single threads allow for multiple

[jQuery] Re: $.post problem. need help badly

2008-07-15 Thread Mario Soto
you can call a function when web service returns the result of the page that database already saved the info: function otherajaxcall(pa,ra,me,ter){ $.ajax({ type: "POST", url: "someother.php", data: "age=25&gender=male", success: function(msg){ alert(msg); } }

[jQuery] Re: $.post problem. need help badly

2008-07-15 Thread iTsadok
Sorry, in my earlier post I got a little confused with the bind/unbind semantics. This code should be better: function save_data() { var bound_form = $(this); $.post("/save_data.php", { name: "opt-in name", email: "opt-in email" }, function() { bound_form.unbind("submit", save_da

[jQuery] Re: $.post problem. need help badly

2008-07-15 Thread iTsadok
You can't "wait for a result before returning", there is no waiting mechanism (only timers) and Javascript is single-threaded anyway, so nothing will happen until you return. What you should do is return false, and perform a manual submit of the form once the POST is done. Now, this might be trick

[jQuery] Re: $.post problem. need help badly

2008-07-14 Thread Kirov
I think you should wait for a result code from the post request before you return true; otherwise the post is handled asynchronously and perhaps not done according to your plans :) Good luck; On Jul 14, 4:49 pm, Sandy <[EMAIL PROTECTED]> wrote: > hi, > > i wanna try to save the data from a form

[jQuery] Re: $.post problem. need help badly

2008-07-14 Thread Sandy
this is fixed now: i changed this: $("form:last").bind("submit", submit_optin); to: $("form:last").find(":submit").bind("submit", submit_optin); On Jul 14, 9:49 pm, Sandy <[EMAIL PROTECTED]> wrote: > hi, > > i wanna try to save the data from a form to a database before > submitt

[jQuery] Re: $.post() not sending info

2008-05-18 Thread ferdjuan
If this code is verbatim I would suggest some kind of validation in your php script, with the script you have now anyone could hijack your database with an sql injection, or anything really. I suggest looking at: stripslashes(), striptags(), preg_match(), ereg(), trim(), any validation is better t

[jQuery] Re: $.post() not sending info

2008-05-17 Thread riscphree
Ah, I see now. I went ahead and got the Forms plugin working and that was really so easy to do. At least I know how to do it another way now. Thanks! On May 17, 12:05 am, Jason Huck <[EMAIL PROTECTED]> wrote: > If this code is verbatim, then I would say it's because your $.post() > call does not

[jQuery] Re: $.post() not sending info

2008-05-16 Thread Jason Huck
If this code is verbatim, then I would say it's because your $.post() call does not include a "submit" param, which is what sendsuggest.php is checking for in order to process the submission. - jason On May 16, 7:59 pm, riscphree <[EMAIL PROTECTED]> wrote: > I've got a suggestion form that ins

  1   2   >