Instead of doing $(this).ajaxSubmit(options);
try
$('#formId').ajaxSubmit(options);
where #formId is the id of the form you are submitting.
On Feb 14, 8:58 am, NHARRY nha...@live.co.uk wrote:
I have a form that is loaded using .load it is then posted using the
jquery form plugin. But it
Use Firebug to see what data is actually being posted to the server.
in update_homepage.php i save data to mysqldb.
But if i click to submit buton, i see in div id=odezva/div OK
echo from update_homepage.php, but in db is only first (Nadpis) field
of form. And (!!!) if i click to this
.ajaxForm uses $.ajax, which uses XMLHttpRequest. There are some
issues with the way xhr interacts with document.domain, independent of
jQuery.
http://fettig.net/weblog/2005/11/28/how-to-make-xmlhttprequest-connections-to-another-server-in-your-domain/
Here is a patched version of the ajaxForm function that fixes the
problem.
$.fn.ajaxForm = function(options) {
return this.ajaxFormUnbind().bind('submit.form-plugin', function() {
$(this).ajaxSubmit(options);
return false;
Can you post a link to this page, or a similar example page?
On Nov 1, 6:00 pm, Jim Byrnes jf_byr...@comcast.net wrote:
I am new to jQuery and really new to the form plugin so I must be
missing something simple but I can't figure out what is wrong.
I have this form:
div class=print
Mike Alsup wrote:
Can you post a link to this page, or a similar example page?
Unfortunately no. It is an internal app that hooks to a MySQl database
on a web server I setup on my desktop.
I did put together a small test case that exhibits the same behavior. I
am running jQuery 1.3.2 and
Can you post your full code so we can see?
On Oct 17, 11:46 pm, Boray Eris pidiz...@gmail.com wrote:
http://www.pidizayn.com/virtualsub/jqform
First form is ok. But second one that pulled with jquery not working.
What's wrong?
I'm using the latest version of the jquery form plugin (from MAlsup) for
file uploading. The upload works: the server call happens, the file data
makes it there and the server returns a value, in this case just a
number (as plain text). I've been unable to get that returned value to
show up
Thanks, Mike, it magically started working for me. I must have had
something else cheesed ;-)
Appreciate your response, it seems to be working nicely now.
- Jack
Mike Alsup wrote:
I'm using the latest version of the jquery form plugin (from MAlsup) for
file uploading. The upload works: the
I need to check all multiselect values before posting form.
How i can do it?
I'm trying to use beforeSubmit function, but changes that I do there
doesn't applying to the formData.
(Form plugin send information that was grabbed before beforeSubmit
function).
Try 'beforeSerialize' instead
Using the following code:
$('.input_all').attr(disabled, disabled);
for input texts with the class=input_all seems to break jQuery forms
ajax submit.
How can I fix this?
If you are expecting disabled inputs to be submitted then that is not
really broken - disabled inputs should *not* be
To protect the input fields, use readOnly instead of disabled and the
value will be included.
On Aug 21, 9:39 pm, Chris Hall sifuh...@gmail.com wrote:
Using the following code:
$('.input_all').attr(disabled, disabled);
for input texts with the class=input_all seems to break jQuery forms
Well, here's your code from what i see
$('#submitForm').click(function() {
if ($('#contactForm').valid()) {
$('#loading').fadeIn(slow);
$('#contactForm').ajaxForm(function(data) {
... more code
});
}
});
So, hopefully like you did, fired up IE8's
Thanks for the good advice. I downloaded the development version of
jquery 1.3.2.
IE script debugger is highlighting line 1897
return submit === elem.type;
Surely there is nothing wrong with this?
input id=submitForm type=submit value=Send title=Send your
message /
if you have in html the following:
input type=checkbox value=true name=check/
input type=hidden value=false name=check/
ajaxSubmit will submit :
check : true
check : false
$(#check).fieldValue() will return
[ true ]
so, this is inconsistent with the result of ajaxSubmit, it should
On Aug 3, 4:57 pm, Mike Alsup mal...@gmail.com wrote:
if you have in html the following:
input type=checkbox value=true name=check/
input type=hidden value=false name=check/
ajaxSubmit will submit :
check : true
check : false
$(#check).fieldValue() will return
[ true ]
The problem has been solved ... I forgot to close the script tag of the
plugin js inclusion ...
debussy007 wrote:
Hi,
When I add the jquery.form.js plugin from malsup, my Yahoo UI TreeView
won't render anymore ...
There seems to be some conflict.
Is there any workaround for that ?
success: processJson, // post-submit callback
function process(data){
Is the function processJson or process??
Yes valid markup rocks! I never thought of moving my form elements
around like I did so I thought posting my temporary solution might be
helpful to some. As I said temporary solution is the key phrase there.
I was able to get one of my buttons working as needed but am having
issues with my other
You are able to span a form across a few divs. What I realized though
is that there must be an equel number of divs between the Form tags to
work properly
for example this will work
form
div random content /div
div my form elements to submit /div
div content /div
div content/div
submit button
You are able to span a form across a few divs. What I realized though
is that there must be an equel number of divs between the Form tags to
work properly
Yeah, valid markup always helps. :-)
http://validator.w3.org/
On Mon, Jun 8, 2009 at 18:10, johnHoysajohnho...@gmail.com wrote:
I have my form working great as long as my submit button is contained
within the form tags. But the design calls for the submit button to be
outside of the form. Any suggestions?
Don't get me wrong, but that is not logical at
Why not do
form
div/
div[submit]/div
/form
? What differs if you do this?
If you move the form tag outside to an other div it just seems to stop
working unless in IE7.
I will try the button onclick like you suggested.
Thanx for the help.
Doh!
Of course as soon as I post that something occurs to me that hadn't
before. During a testing cycle a script tag for jquery was added to
the output from the form. I guess that reinitializes everything, which
makes sense. Pulled the tag from the output and everything is fine
again.
-Sean
Ok, after large amounts of debugging and thinking things through, my
co-worker (who originally wrote the piece we're working on) noticed
that we close the modal dialog in which our form resides after we make
our call to submit. This makes perfect sense because the modal is no
longer needed after
Update:
I am using ExpressionEngine and am trying to edit to the publish area
(for those of you wondering) and I have no control over the name
attribute for the submit button and it's value is submit so I've
used jQuery to change the name of the submit button to something else
with this line of
Second Update:
If you remove the name attribute from the button using jQuery then it
works. Just changing the name does not.
All fixed.
On Apr 14, 11:01 am, MeanStudios cody.lundqu...@gmail.com wrote:
Update:
I am using ExpressionEngine and am trying to edit to the publish area
(for those
On 29 Mar., 02:46, Mike Alsup mal...@gmail.com wrote:
Well there must be more to the story than what you're telling us. The
code you've shown above looks fine. Perhaps there is a problem with
the json response.
Actually that was excactly the problem. It would be good to get some
kind of
Cool, you should mention that on the website :)
Oh wait - this would kind of be the failure function mentioned
above. I actually get parsererror as statustext in the complete
function. Just didn't know about it :)
You can use all of the normal ajax options with the Form plugin.
success,
I'm trying to use the form plugin from malsup.org to submit a form
with ajax, but it does not seem to work with options.
This works:
$(#loginform).ajaxSubmit(function(obj,
statusText) {
alert(obj);
The problem is that this CB function finds only checked checkboxes.
That's how forms are supposed to be submitted. If you don't want this
behavior then you'll have to serialize the form yourself using
fieldSerialize. For example:
$('#myForm').submit(function() {
var data =
I have a form and i submit it with:
$(#form_ajax).ajaxSubmit();
My problem is that some of the inputs are loaded on an action via
ajax.
When i submit the form the inputs which are loaded later are not
submitted.
Has anyone any idea?
Thanks a lot!
If those inputs are added to the
James, (and all)
Thanks a lot for the help - I'm now seeing all of the things I want
in firebug. I'm getting an XHR respose (is this the proper
terminology? Is XHR always a request? regardless...)
I'm getting a response from my script which includes a script tag
(with functions) and an HTML
CLARIFYING:
I have two different URL's between my form's action and my url set in
the options that are sent to $('#myForm').ajaxForm(options)
I did that just because in earlier testing I was trying to confirm
that the URL used in my options variable would actually override the
value that was
Hi Thanks for replying back.
showRequest doesnt do anything. It just print the returned data.
Hey one more thing I noted, this plugin works fine with IE but not
Mozilla :(
Any workaround??
Thanks
On Feb 24, 4:45 am, Mike Alsup mal...@gmail.com wrote:
I am getting the output xml from the
showRequest doesnt do anything. It just print the returned data.
Hey one more thing I noted, this plugin works fine with IE but not
Mozilla :(
Any workaround??
I'm afraid you haven't provided enough information. The plugin works
fine with both FF and IE so there is something more to the
Hi Mike,
Thanks a lot for your reply..
This is what I did exactly
I just downloaded jquery.form.js from http://malsup.com/jquery/form/#download
The following code works fine in IE (The returned XML from server is
displayed through alert() )
But when I use the same code in Mozilla 3.0.6,
Chances are VERY likely that your function showResponse is throwing
an error in JavaScript, making the rest of the script stop running,
and as a result allowing the page/browser to make a normal, page
changing, post
comment out all the code in said function, or wrap it in a
try...catch to see
Hi ,
As you said I put the try catch.. Again, I dint even see the alert
msg :( It redirected the page
to sell.php5
I am once again pasting the exactl code I have for your kind notice.
Hey,.. The problem seems weird..
The same page which worked well in IE is not working when I put
the file into my server odibab.com and opened the page from IE.
So, If i keep the same html page in my local windows and use It works
But not when It is coming from odibab.com server.
Any idea why
In Firefox, open up the Error Console, clear it, then try submitting
the form and see if an error is getting tossed that way.
Another option, is calling preventDefault(); on the event BEFORE your
processing code, so the form won't post, even if an error/exception is
thrown.
Hi Eric,
Thanks for helping me..
I did what you said, I got these two exceptions in the Mozilla Error
console.
Error: uncaught exception: [Exception... Illegal document.domain
value code: 1009 nsresult: 0x805303f1
(NS_ERROR_DOM_BAD_DOCUMENT_DOMAIN) location: http://odibab.com/
You can only make ajax calls from within the same domain.
So if you're on http://www.something.com/ you CANNOT make an ajax
request to, say, http://www.otherdomain.com/
This is a security feature to prevent cross site scripting. It's not
enforced if you're running off the localhost iirc, but as
Hey Eric,
My problem is solved!!!
Thanks a million :)
it's caused because I was loading the file into Firefox locally. If I
upload it to our server and run it, it works fine.
this was bcoz of some cross domain access policy in mozilla. I just
found it after seeing the error console msg.
it's caused because I was loading the file into Firefox locally. If I
upload it to our server and run it, it works fine.
this was bcoz of some cross domain access policy in mozilla. I just
found it after seeing the error console msg.
I'm glad you found the problem! As a side note, this is
Yes, that's normal.
On Feb 25, 1:55 pm, Brian Long brilon...@gmail.com wrote:
Hey everybody - I'm definitely an amateur, but I have a pretty good
understanding of PHP / MySQL / Firebug / FirePHP so I think we can
work through this.
If using the standard form plugin model - I have the
I am getting the output xml from the php in the same window.
It never goes inside showResponse function.
I donot want this page redirection to happen :(
Instead I want to handle the returned xml (or any data) in jquery
itself.
What does showRequest do? Can you post a link?
Daniel and all,
I am also seeing this same behavior. I'm using FF 3.0.6.
I have tried various arrangements of the code using all the examples
from the plugin's webpage, but it always submits via non-AJAX. Also,
if I try to use an options param to ajaxForm rather than a function
callback, it
Nevermind my second point in my last post. I see why it was calling
those callbacks immediately. duh. I had parentheses after their
names in the options hash!
Anyways, I do still have the main problem of not submitting via AJAX.
I am also seeing this same behavior. I'm using FF 3.0.6.
I have tried various arrangements of the code using all the examples
from the plugin's webpage, but it always submits via non-AJAX.
Seems to work ok for me:
http://www.malsup.com/jquery/form/testing/feb19.html
Are you including the
right direction, basically on submit, rather than redirecting to the
default success (or error page), I just wanted this message to appear
in the alert.
script type=text/javascript
// wait for the DOM to be loaded
$(document).ready(function() {
// bind
Weird. Could it be that you are have the $(document).ready call in
the head? I currently don't have it set up this way. But I thought
from looking at other examples that it didn't matter.
On Feb 19, 12:29 pm, Mike Alsup mal...@gmail.com wrote:
I am also seeing this same behavior. I'm using
Hammering this home, I also tried to point my form to your test.php
page, but still no change. I do see your response, but it moves the
browser forward to a new page to display it. I also have the exact
same versions of jquery and jquery form plugin. Is there some other
setting somewhere on
Ok, I think the problem is related to using XMLHttpRequest in a cross-
site situation (which I was, since my API is a different domain than
my HTML). I will resolve this using jsonp, or some other method.
Sorry for the trouble. Hope this helps others.
Everything has been checked for validation and so on. Doesn't work in
IE or FF. Thanks in advance!
script type=text/javascript
$(document).ready(function() {
var submitoptions = {
target: '#loading'
};
$('#e2').submit(function(){
It is posting, but its not ajax posting. I've tried with and without
other inputs, and it still submits like a normal form. I'm losing my
mind over this one! Thanks for the quick response, Mike. Love the
plugin, and have used it more than once!
On Feb 18, 5:26 pm, Mike Alsup mal...@gmail.com
It is posting, but its not ajax posting. I've tried with and without
other inputs, and it still submits like a normal form. I'm losing my
mind over this one! Thanks for the quick response, Mike. Love the
plugin, and have used it more than once!
Daniel, can you post a link that shows the
Hello,
Topic is somewhat old, but I'm stuck on the same thing.. 'success' isn't
called
I've managed to narrow it down somewhat on:
http://www.manneke.com/ajaxform/test.php
The first form is to an external php file that echoes 'hello' afterwhich
success IS NOT called.
The second form is to
Topic is somewhat old, but I'm stuck on the same thing.. 'success' isn't
called
I've managed to narrow it down somewhat
on:http://www.manneke.com/ajaxform/test.php
The first form is to an external php file that echoes 'hello' afterwhich
success IS NOT called.
The second form is to a
Verzonden: donderdag 22 januari 2009 15:11
Aan: jQuery (English)
Onderwerp: [jQuery] Re: jQuery Form Plugin - success callback function
isn't called
Topic is somewhat old, but I'm stuck on the same thing.. 'success' isn't
called
I've managed to narrow it down somewhat
on:http://www.manneke.com
malsup wrote:
Sorry, I read your first message too quickly. Is 'edit_card_jq' bound
as a submit handler? If so, you should return false form that fn. If
not, could you post a little more code or provide a link?
Here's a link that shows what I'm doing:
After submitting the form, successfully, the backend responds with a blank
HTML form. This loads correctly after the call to ajaxSubmit. However when I
submit the form a second time (to add an additional item) the submit is not
sent through ajax, although my button handler which calls
My handler - as shown previously - rebinds events when the submit succeeds. I
confirmed this, as stated in my message by adding an alert that is shown the
next time I click the submit button, so that isn't it.
malsup wrote:
Any ideas why this would happen?
This is why:
My handler - as shown previously - rebinds events when the submit succeeds. I
confirmed this, as stated in my message by adding an alert that is shown the
next time I click the submit button, so that isn't it.
Sorry, I read your first message too quickly. Is 'edit_card_jq' bound
as a submit
Actually if you put a debugger; statement there and debug with
firebug you will see that it actually gets called. But for some reason
the alert does not work. But other js code will work so you can show
your messages somewhere else on the page if you want or need to.
On 7 nov, 15:34, Mike Alsup
I have the same problem here and the call sure is successful, because
the rest of the commands get executed.
The weird thing is that only the alert that does not get executed.
I have even inspected the response with firebug and repeated the tests
using selenium with and without the alert so I´m
Actually if you put a debugger; statement there and debug with
firebug you will see that it actually gets called. But for some reason
the alert does not work. But other js code will work so you can show
your messages somewhere else on the page if you want or need to.
Post a link so we can
Greetings!
I've
seenhttp://docs.jquery.com/JQuery_1.2_Roadmap#Form.2FField_Serializationhttp://docs.jquery.com/Release:jQuery_1.2/Attributes.
Is fieldValue() still better then standard val()?
The main difference is that fieldSerialize tests for successful
elements and val does not.
Hrm, I'm having the same problem. Anybody have any ideas?
On Oct 23, 6:34 am, Sebastian [EMAIL PROTECTED] wrote:
Hey guys,
I'm working with the jQueryFormPlugin and I'm having some trouble
with it.
In my HTML I have a button, which, when clicked, inserts aformvia
jQuery. To then register
The form submits as it should, using an AJAX call. When I add a
beforeSubmit callback function to the options array, that gets called
as well, as it should. Only the success callback (the alert) isn't
called and I don't know why.
Maybe the call wasn't successful. Can you post a link?
You can bind those events and call ajaxSubmit when appropriate.
ajaxForm waits on the submit event.
Mike
On Oct 27, 6:24 pm, brian mahoney [EMAIL PROTECTED] wrote:
Is there a way to get the jQuery Form Plugin to work with a
keyUp() or change() instead of having to use a submit button?
I have a form that works perfectly until I try to upload a file,
please check out:
http://freshbump.scheetzdesigns.com/
Click the big blue Add the Next Image button and play with the form.
If you don't add a file to upload, it works. Once you add a file, it's
a no-go.
There is
Don't you think we can have this feature built-in ?
Something like $('form').ajaxForm('cancel')
I don't know exactly where I can post this request
Hi Andre,
This is the right place to post your request. I've added it to my
list of items to evaluate for future releases.
Cheers!
Mike
Hmm, haven't tried it but I suppose you could do this:
$('iframe[id^=jqFormIO']).attr('src','about:blank');
Mike
On Oct 2, 8:56 am, André Cassal [EMAIL PROTECTED] wrote:
Hey Folks,
Can I cancel a connection during an upload?
I'm using this form pluginhttp://www.malsup.com/jquery/form/and
Hey Mike, thanks, it works.
Don't you think we can have this feature built-in ?
Something like $('form').ajaxForm('cancel')
I don't know exactly where I can post this request
Best,
André
On Oct 2, 10:20 am, Mike Alsup [EMAIL PROTECTED] wrote:
Hmm, haven't tried it but I suppose you could do
Hi Prajwala,
thanks for your feedback!
displayData(); ist not the problem as far as I've figured out, since
it's not even executed. The problem is that displayData() is not
called, even though the Ajax Request was executed successfully. Thanks
to you debugger hint I was able to pinpoint the
I think you might be having some problem with the displayData function.
firebug will help you in debugging the code. put debugger statement before
displayData function and run on firefox after installing firebug. submit the
form, after getting response from server, the debugger will stop at
Thanks for the tip, that's actually what I ended up doing. It's not so
bad actually, since at least after the user credentials are checked
once, I can set a validate bit to equal true, and then have the form
submit normally.
On Sep 13, 4:05 pm, Mike Alsup [EMAIL PROTECTED] wrote:
I'm trying
I'm trying to use the beforeSubmit callback of the jQuery form plugin
to check some values with the server before submitting the entire
form, which can include a large file upload (which would be annoying
to upload, and then fail due to other submitted values being invalid--
hence the
Hello
beforeSubmit: function(arr) {
var json = // ... build json string
arr.length = 0; // throw away current array contents (if you want)
arr[0] = { name: 'someName', value: json };
}
thats it :-) Thanks...
Greetings,
Stefan Sturm
Does jQuery provides a way to convert to JSON string?
Felix Halim
There are plugins that provide that functionality. This is a great
option as well:
http://www.json.org/json2.js
Mike
Stefan,
Any particular reason why you'd want to do this??
Usually its the opposite... posting form fields normally (usually
easier to interpret by the server-side script) and then returning a
JSON object to jQuery, in which case you can use $.getJSON()
Alex
On Aug 29, 3:19 am, Stefan Sturm
Hello,
thanks for your answer.
I made it the way you say. I build my json string in the beforeSubmit
function. So, now I have a correct json string, but how can I replace
the post array?
Sorry, but I hang at this point.
Thanks agin for your Help,
Stefan Sturm
2008/9/9 Mike Alsup [EMAIL
thanks for your answer.
I made it the way you say. I build my json string in the beforeSubmit
function. So, now I have a correct json string, but how can I replace
the post array?
Sorry, but I hang at this point.
beforeSubmit: function(arr) {
var json = // ... build json string
Does jQuery provides a way to convert to JSON string?
Felix Halim
On Tue, Sep 9, 2008 at 10:22 PM, Mike Alsup [EMAIL PROTECTED] wrote:
I'm using the jQuery Form PlugIn(http://www.malsup.com/jquery/form/)
to handle my Forms. I like it, but I have a question about an
improvment:
At this
Hello,
I'm using the jQuery Form PlugIn( http://www.malsup.com/jquery/form/ )
to handle my Forms. I like it, but I have a question about an
improvment:
At this time all form fields are send using post, but it wold be nice,
to send all form fields json encoded as one post parameter.
Is
I'm using the jQuery Form PlugIn(http://www.malsup.com/jquery/form/)
to handle my Forms. I like it, but I have a question about an
improvment:
At this time all form fields are send using post, but it wold be nice,
to send all form fields json encoded as one post parameter.
Is there a
trying to get a file upload to work but for some reason my inputs
won't post
this is what I have
[code]
var options = {
url: 'includes/images.php?a=add',
type: 'post',
dataType: 'json',
success: processJson};
var container =
On Aug 19, 12:26 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
Hello, this may be a stupid question, but im trying to make an upload
from a form with the form plugin (excelent btw), the form data is sent
to a DB through a php script. Here is the form:
form action=upload_contrib.php
pratikspace wrote:
examples work fine. i dont know if this is something to do with perl.
i am
using modperl just to print the post parameter. thats it. nothing
hard. the sample code i have provided above works perfectly fine on
older firefox
but not on firefox3. i am very puzzled.
fwiw,
So if i do this on FireFox version lesser than 3 , it works nicely. data is
submitted, i get proper alerts. BUT when i do this in FireFox3, i get the
error msg, because data is empty after doing post.
I've not seen any problems with FF3. Can you use the examples
successfully?
examples work fine. i dont know if this is something to do with perl. i am
using modperl just to print the post parameter. thats it. nothing hard.
the sample code i have provided above works perfectly fine on older firefox
but not on firefox3.
i am very puzzled.
just to add some more info.
I didn't dig in your code but it's working for me
I tested my apps that do exactly the same thing a json-rpc
communication
client - send
string:hello world!
server - receive - answer
string:ok gotcha
then I guess, it's a pratikspace's bug :)
On Jun 18, 3:31 pm, Mike Alsup [EMAIL PROTECTED]
Hey Lasthaai,
I suffered the same issue and realised what was going on. Given that $
(this) is bound back to this function in which it currently resides,
affectively causes an infinite loop. Here is a way around this issue,
while still using the jquery forum plugin:
$(function() {
for (var
I've got a form that uploads a file. It's an AJAX form, initialized by the
following code:
$(document).ready(
function()
{
$('#filer').ajaxForm(
{
target: '#vars',
beforeSubmit: function(formData, jqForm, options) { alert('sending'); },
success: function(responseText, statusText)
Hi Mike,
Thank you for your prompt response! Unfortunately, I'm still in a
development stage and won't be able to provide you a link to a
publicly accessible page.
However if I may, I'd like to provide some code snippets and hopefully
it might help. First off, the code for the form is derived
Hi Mike,
To hopefully add some more insight into this, I took the form out of
the SimpleModal jQuery plugin and placed it into its own JSP page, and
when I tried to submit the Form, the browser is reporting an error in
line 334 of the jquery.form.js file, stating that:
form.submit is not a
form.submit is not a function
This happens in both Firefox 2.0 and IE6.
That error is usually the result of having a form element with an id
or name of 'submit'. That is not a valid name for a form element (at
least not when using JavaScript).
Dave, have you tried removing the plugin
Mike,
That was it! Indeed there was a form element with the name submit
and like you said, was causing that error. Renaming it allowed the
plugin to do its job.
Thank you again!
Best,
Dave
On May 5, 7:03 am, Mike Alsup [EMAIL PROTECTED] wrote:
form.submit is not a function
This
I'm attempting to use the jQuery Form Plugin on a page that has
multiple forms. The particular form I am using to allow the uploading
of files is the third form on the page. I'm also using that form
within a modal dialog box, using the SimpleModal jQuery plugin. I
have a Java Servlet
1 - 100 of 172 matches
Mail list logo