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
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
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
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
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
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
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",
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",
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",
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
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
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
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
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
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
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:
> >
>
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
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
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
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){
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
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
$('#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 ::
>
>
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
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://
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
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 =
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
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
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)
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
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
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
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
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){
>
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:
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
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
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,
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
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
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.
Thanks for the reply but that doesnt really answer my question.
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
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.
$('#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,
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',
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
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',
>
> 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
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:
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
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
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,
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
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
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
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
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
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:
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
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
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
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
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
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
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
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
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
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"),
>$
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
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(){
>
> -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.
&
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,
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
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
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
> 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
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
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() }
}
}
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
It was solved by adding encodeURIComponent :-)
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
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
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];
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
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
> 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)
> {
>
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
$.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
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
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
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);
}
}
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
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
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
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
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
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
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 - 100 of 139 matches
Mail list logo