[jQuery] Jquery form plugin can't find resolution

2010-02-14 Thread NHARRY
I have a form that is loaded using .load it is then posted using the
jquery form plugin. But it won't post see code:


 
$(document).ready(function() {
//shows loading screen whilst posting via ajax
$().ajaxStart($.blockUI).ajaxStop($.unblockUI);

//post form add_customer ajax
var options = {
target: '#alert',
};
   $('#add_customer').submit(function() {
$(this).ajaxSubmit(options);
return false;
});

//load form
$('#theform').hide().load('form.php', function() {
$(this).fadeIn();
 return false;
});

});


I am sure there are others that have had this problem. Help ismuch
appreciated.


[jQuery] jQuery Form Plugin

2010-01-13 Thread solich
Hello.
I have a form:


Nadpis:

Text:










and this form i want tu send trough jQuery plugin:


$(document).ready(function() {

$('#mujform1').ajaxForm({

target: '#odezva',

   success: function() {
$('#odezva').fadeIn('slow');
}
   });
});



in update_homepage.php i save data to mysqldb.

But if i click to submit buton, i see in  OK
echo from update_homepage.php, but in db is only first (Nadpis) field
of form. And (!!!) if i click to this button second time go to db also
second field!
If i close Javascript - all is right - the page is reloaded and all
data are in db.

Can you help me? I want ofcourse send all data of first click.
Zhank you very much!


[jQuery] jQuery Form plugin and IE

2009-12-13 Thread michaelF
I've been working on an upgrade to my site that includes a quick form
for one or two image uploads and contact info. the form is included
via php in some of the internal pages.

I've tested in several Browsers, but have problems with IE. it seems
to process the js but doesn't submit the form. i'm using jquery form
plugin and trigger ajaxSubmit() function after a simple validation.

A few people have successfully submitted the form using IE. but not
all.

Any ideas or suggestions? The site is at: www.msfaron.com


[jQuery] Jquery form plugin and accessing formData

2009-11-25 Thread Mark J
I am using the excellent jquery form plugin to obtain form data, do
some pre-submission processing, and pass the altered form on to a
django view via ajax for some additional processing.

I have a jQuery form plugin "beforeSubmit" function to basically
divide a form field by 12 if another "monthly/yearly" checkbox is
checked, and pass the altered value on to django.

I have a html form called "myForm" with a bunch of text inputs
"amount1",  "amount2", "amount3", etc. and two checkboxes for each
text input "amount1my", "amount2my", "amount3my" etc. for the user to
select whether "amount" fields are monthly or annual amounts (the
checkbox values are "m" and "y")

I bind the form in

$(document).ready(function() :
   var options = {
 ...
beforeSubmit:  myBeforeSubmit,
 ...
   }
   $('#myForm').ajaxForm(options);
}

What I want to do is search the form data for a "y" value in any of
the checkboxes, and if present, get the related amount field and
divide by 12.

the beforeSubmit function is basically this:

function myBeforeSubmit(formData, jqForm, options) {

  //for loop to get the name of each formData name field containing
"y" - I get this using match(/y/) - so far, so good

  ///strip the field name of the "my" to get the underlying "amount"
field name and create new variable "theFieldName" for the resulting
stripped string - so far, so good.

  //This all works to this point, but when I try to do the math on the
field:

  formData.theFieldName.value = formData.theFieldName.value/12;

 // the jQuery Form plugin sees "theFieldName" as a form field name
which of course does not exist

}

Question:  it is possible to insert a variable in the formData.[field
name].value statement?

Mark


[jQuery] jQuery Form Plugin

2009-11-15 Thread BarsMaster
Firs of all, perfect work.

But I have problems with file uploads in opera 10.

I found the reason. It is here:

if (--domCheckCount) {
// in some browsers (Opera) the iframe DOM is not always traversable
when
// the onload callback fires, so we loop a bit to accommodate
cbInvoked = 0;
setTimeout(cb, 100);
return;
}
But we have only 5 secs... It is not enough...
I propose to modify it so:

if (true) {
// in some browsers (Opera) the iframe DOM is not always traversable
when
// the onload callback fires, so we loop a bit to accommodate
cbInvoked = 0;
setTimeout(cb, 100);
return;
}

So, we will have the iframe DOM in any way even if the uploading of
file lasts for example 3 minutes...


[jQuery] jQuery form plugin and document.domain failure

2009-11-11 Thread Vaclav Kohout
The situation comes like this using form plugin from
http://plugins.jquery.com/project/form :

$('#photoform').ajaxForm({
dataType  : 'json' ,
success: function(data){
alert( data.result ) ;
},
error: function(){
alert('error');
}
});

this starts to send file input with post method via hidden iframe. The
result json data can be read with small workarround with 
{jsondata}. If I use in any of my other js file the
document.domain definition, the success callback never came, and
allways the error callback is risen. Any how the post ajax submit is
done well, only the success callback never comes. Without
document.domain definition this came back and everything fine. Any
idea? Plugin improovment?

Thanks Vaclav.


[jQuery] Jquery Form Plugin not sending name of button in Safari

2009-11-04 Thread petersendidit
I have a form with 2 button elements in it.  Button elements are used
because they are much easier to style as needed.



Save
Save As Copy


I am using the jquery form plugin (http://jquery.malsup.com/form/) to
submit the form by ajax.  Everything works great in all browsers
except for Safari and Chrome.  The problem in Safari and Chrome is
that the name of the button that was pressed does not get sent back.
My guess is that the form plugin is getting confused by the span
inside the button and not grabbing the name from the button element.
Is there a way to fix this?


[jQuery] jQuery form plugin?

2009-11-01 Thread Jim Byrnes
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:


Print Items Due Report

Date to Print




If I put this in the ready function: $('#printForm').ajaxForm();

Firebug shows show a response and post that seem correct, but 
printRenge.php does not format a page to print.


If I put anything in front of #printForm like this: 
$('XX#printForm).ajaxForm() firebug says "reload to activate window 
console" and printRange.php formats a page.


Can anyone tell me what I am doing wrong?

Thanks,  Jim


[jQuery] jQuery Form plugin and jQuery File Tree plugin

2009-10-26 Thread Julien

Hi,

I can upload a file with this setup :

- the "form.js" jQuery Form plugin script
http://jquery.malsup.com/form/jquery.form.js?2.33

- the "files.php" which upload my files and print a validation
message
...
move_uploaded_file($_FILES["file"]["tmp_name"], $_POST
["destinationpath"].$_FILES["file"]["name"]);
echo ($_POST["destinationpath"].$_FILES["file"]["name"]);
...

- an "index.php" with html upload form and a div who receive the
message.
...

  
  
  
  


...

- my script to manage the upload :
...
$('#upload').bind('submit', function() {
  $(this).ajaxSubmit({
target: '#output',
url: 'files.php',
beforeSubmit: clearOutput,
success:  writeOutput
  });
  return false;
});
...


It works, I mean "files.php" is called, the file is uploaded and I
stay on the "index.php" which receive the message.

Well, now I want to insert the html form on a node of the file tree.
Same setup, except I got a js script where I create nodes :
...
$node.append('');
...

Every thing works fine, my form appear on the tree, my file is
uploaded, i got the message BUT on "http://address/files.php"; (which
contains only the message...) instead of "http://address/index.php"; !

I don't understand why are there differents results...

Could you help me ? Tanks.


[jQuery] jQuery form plugin

2009-10-17 Thread Boray Eris

http://www.pidizayn.com/virtualsub/jqform

First form is ok. But second one that pulled with jquery not working.
What's wrong?


[jQuery] jQuery Form Plugin - File upload with JSON response

2009-10-14 Thread Florent Paillard

Hi,

I'm trying to use the jQuery Form Plugin for file upload with JSON
response (basically, I need to get an uploaded file ID back from the
server after upload)

I have a problem when getting the data from the iframe back to the
javascript in the main page because the json string is wrapped in a
.
I tried to find where those  tag are added to the response but
found nothing in the jquery.form.js

So the plugin script fail when trying to evaluate the json string at
the following line in the cb function :
eval("data = " + data);
That's normal, because the data is not a correct json string, because
of those  tags

The form I use contains only a  and a submit
button :




  Attach file



Here is how I setup my ajaxForm :

$(document).ready(function () {
var options = {
dataType : "json",
iframe : true,
success : function(data) {
alert("success");
},
error : function(data) {
alert("error");
}
};
$('#uploadForm').jsonForm(options);
});

After selecting a file and push the "Attach file" button, the "error"
function is launched because the eval() function failed in the cb
function.

As a temporary workaround, I added the following line the the
jquer.form.js before the eval call :
data = data.replace("", "").replace("", "");

But I should not be using the plugin the right way... I'll appreciate
a lot your help if see something wrong or forgotten in my code.

I also had to set no content-type in the response header to avoid the
browser download manager to open the download window caused by a
"application/json" content-type.

Thanks for your support

Florent Paillard


[jQuery] jquery form plugin upload problem

2009-09-11 Thread Jack Killpatrick


Hi All,

Hoping someone can help me out with this, been stuck on it for a while:

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 in the success function. Maybe someone knows what I'm missing. 
Here's my latest attempt:


html:


   enctype="multipart/form-data">

   
   
   
   
   


js:

this.$upload = $('#upload');

$('[name=uploadForm]', this.$upload).ajaxForm({
   clearForm: true,
   iframe: true,
   beforeSubmit: function(a,f,o) {
   // tested stuff in here, it works
   },
   success: function(data) {
   alert('made it here'); 

[jQuery] Jquery Form plugin : Multiselect problem

2009-09-11 Thread kaiser Zaido

Hi,

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).


[jQuery] jquery form plugin. IE doesnt work

2009-08-22 Thread markstegg...@googlemail.com

Hello,

Im using ajaxForm to submit my contact form at futurekode.com:

$('#contactForm').ajaxForm(function(data) {}

--

This works fine in all browsers except IE7/8. IE error says theres a
problem with jquery 1.3.2 and highlights this line:

return"submit"===T.type


Could someone take a look at my contact form in IE and see if there is
a fix for this?

Thanks
Mark


[jQuery] jQuery Form Plugin ajax submit

2009-08-21 Thread Chris Hall

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?


[jQuery] jquery form plugin ajaxSubmit / fieldvalue inconsistent behaviour [jquery form]

2009-07-31 Thread rekna

if you have in html the following:




ajaxSubmit will submit :

check : true
check : false

$("#check").fieldValue() will return
[ true ]

so, this is inconsistent with the result of ajaxSubmit, it should
return  [true,false]


[jQuery] [jquery form plugin] run function in success event

2009-07-30 Thread orangdalam

i wrote this code:

function HidePreloader($idPreloader){
  $($idPreloader).hide();
   }
$("#formPassword").ajaxForm({
 target:'#container',
 clearForm:true,
 success: HidePreloader("#bluePreloader")
   });
--
when it came to success event, the preloader image still there. did i
write it wrong ? it worked fine if the function has no passing argumen
like this:
---
function HidePreloaderBlue(){
  $("#blue").hide();
   }
$("#formPassword").ajaxForm({
 target:'#container',
 clearForm:true,
 success: HidePreloaderBlue()
   });
---


[jQuery] jQuery Form plugin with Yahoo UI

2009-07-17 Thread debussy007


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 ?

Thank you for any help.
-- 
View this message in context: 
http://www.nabble.com/jQuery-Form-plugin-with-Yahoo-UI-tp24530556s27240p24530556.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] jQuery Form Plugin help

2009-06-22 Thread capnhud

I am having a problem using the jquery Form Plugin. I have a form that
is setup to animate the errors when on submits incorrect information
or gives you a succes message when you enter correct information.
Howvever my problem is that the messages do not animate  when being
displayed they just pop into view. How do I make it animate? The page
is question is http://capnhud.host22.com/sampleform2.html


[jQuery] jquery form plugin and firebug conflict

2009-06-11 Thread Val

Hi,

I am using Jquery form plugin to interact with PHP server code. When
firebug is on, the code correctly sends the data and processes the
reply from the server in Json format.
Here's the code:

var options = {
beforeSubmit:  showRequest,  // pre-submit callback
success:   processJson,  // post-submit callback
dataType: 'json',
target:   '#feedback',
clearForm: true
};
//form submit
$('#create_project_fm').ajaxSubmit(options);

function process(data){
console.log("process");
   if (data.error== "") {
   window.location.reload(true);
 } else if(data.error!="") {
 $('#feedback').addClass('error');
 $('#feedback').text('error: ' + data.error + '');
 }else {
 //feedback here
  $('#feedback').addClass('success');
  $('#feedback').text('error: ' + data.feedback + '');
 }
}

However, I have noticed that when I turn Firebug off, the server code
prints out the echo statement instead of this being parsed by the
javascript function "process" as Json.

Any help would be really appreciated.

Val


[jQuery] jQuery Form Plugin with a submit button outside of the form

2009-06-08 Thread johnHoysa

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?

Sample code and diagrams are below.

I appreciate your help!

John

Hopefully this will help show you what I need -->

my form here

 
 Submit button 


Working code to submit Form. Lets call this Example A Code-->

$('#addNewTasks').ajaxForm(function() {
   $.get('includes/tasks.cfm',{},function(data){
  $('#newTasks').html(data);
   })
});

Also I have this code which works as well if this will make life
easier for me in the long run. Lets call this Example B Code -->




 
 
 
 
 
#chooseForm.formNames#
 
 
 
 
 
 
 
#assignTo.assignPerson#
 
 
 



 

  


Some code I tried that did not work with Example A Code -->

$('#AddToQuery').click(function() {
   $('#addNewTasks').ajaxSubmit(function() {
  $.get('includes/tasks.cfm',{},function(data){
 $('#newTasks').html(data);
  })
   });
})

And here is some code for submitting Example B Code -->
$("#AddToQuery").click(function() {
   $('#addNewTasks').ajaxSubmit(options);
  return true;
})

Thanx for reading!
John


[jQuery] JQuery Form plugin AND DataTables plugin

2009-06-04 Thread brilang

I am using the DataTables Plugin on a table. Each row in the table
contains a form.
I am using the sAjaxSource initialisation option to retrive a JSON
string from the server.
I now want to add the JQuery Form event ajaxform to each form in the
table.
I think I have to use JQuery's Live event but I need some help in
writing the correct javascript for the Live event.
==
Here's my xhtml code right now:
==



Active
Full Name
Email










==
Sample JSON returned by members-get.cfm:
==
{ "aaData": [
[ "", "Jane Doe", "j...@example.com" ],
[ "", "John Doe", "j...@example.com" ],
[ "", "Jack Smith", "j...@example.com" ],
[ "", "Janet Smith",
"ja...@example.com" ]] }


[jQuery] JQuery Form Plugin

2009-05-20 Thread Dez

I've been using the Form plugin for a while a just recently (within
the last week) something has gummed up the works and I'm not sure
what. Here is my code.

$().ready( function(){
$('#productListForm').ajaxForm({
target: '#toolList',
error: function(request, textStatus, errorThrown){
$("#toolList").html( request.responseText );
}
 });

$('.oep_search').autocomplete('consolidator/fetch_oep.asp', {
width: 250,
minChars: 2,
cacheLength: 1
});

$(".oep_search").result(function(event, data, formatted) {
if (data){
table = $(this).parents("table");
table.find('input[name=oepid]').val( data[1] );
sel = table.find('.lruSelector');
sel.show();
$.ajax({type: "POST",
url: "consolidator/fetch_lru.asp",
data: { id: data[1] },
success: function(data){
sel.html( data );
$("#toolList").html( ajaxloader );
$("#productListForm").submit();  // this call
works
   },
   error: function(request, textStatus, errorThrown){
   sel.html( request.responseText );
   }
   });
}
});

});

function fetchTools(){
 $("#toolList").html( ajaxloader );
 $("#productListForm").submit(); // this call does not
}


The ajax call in $('#oep_search').result() (from an autocomplete
plugin) adds some checkboxes to the form. Each checkbox has an
onclick="fetchTools()" on it. The first call to submit the form in the
ajax success function works. It doesn't change the page and populates
the output div like it should. However, any subsequent attempts to
submit the form don't work. There are two possible ways to trigger a
submit. Either clicking on a checkbox or triggering the autocomplete
result function again. Neither works the second time around. The form
is submitted the old fashioned way and I'm taken away from the page.

This used to work like a champ. I have no idea what has changed. I
haven't been mucking about with the javascript code. No need. I was
using jquery 1.2.6 and form plugin 2.17. I updated to 1.3.2 and 2.18
respectively, but that did not help. This happens both in Firefox and
IE.

Does this ring bells for anyone? Can someone give me some ideas on
what I should be looking for?

-Sean


[jQuery] jQuery form plugin file upload failure

2009-04-27 Thread Jim

I'm using the latest version of the form plugin from 
http://jquery.malsup.com/form/
and am having problems with a form that has an input of type "file".

I have read all the info about how to return JSON and such, how an
iframe is used, etc.  I've Googled around and searched this list, but
m not seeing anything relating to my problem.

I have a series of forms which pop up in a modal dialog and are
submitted view the ajaxSubmit method.  Only one of these forms has a
file field in it, and it does not work at all.  Upon hitting submit, I
see no network activity in the Firebug console, though I didn't really
expect any given that this uses the iframe.   However, the Net panel
of Firebug shows no activity either.  Further, the PHP file at which
this form is pointed has a LOT of debug statements in it, and none of
them show up in the logs when I it submit.

I added some debugging to the ajax-on-error method I'd set for this
call by adding a console.log() of the error text and the error object
which are passed to the error function and they say

"error"

and

"SyntaxError"  "()@:0\neval(\"()\")@:0\n([object Object],\"json\")
@https://jauldridge.yakabod.net/js/vne/jquery/core/jquery.js:29\ncb(-5)
@https://jauldridge.yakabod.net/js/vne/jquery/plugins/form/
jquery.form.js:305\n"

respectively.adding a consol.log() of the XHR object which is
passed to the error function shows the mock object and it is still
empty.

Line 305 of the form plugin seems to be what is referenced in the odd
output of the error object, along with line 29 of jQuery.  Line 305 of
the form plugin is a call to jQuery's httpData method which is defined
on line 29 of jQuery.  Line 305 of the form plugin is supposed to be
taking what was retrieved from the textarea (I'm using JSON) of the
iframe and passing it to jQuery with my specified data type for
parsing.  Since this is all happening without any network activity,
and the mock object shows it is empty including its responseText, I
imagine that is why jQuery's httpData method is getting an error in
trying to parse JSON.

I just cannot figure this out, and I'd really like some help.  Why is
the plugin acting like it is done submitting when it hasn't even tried
to talk to the server?  This system is on a private network so I
cannot link to it, but I will provide as much info as is asked for and
I can obtain.

Thanks,
Jim


[jQuery] jquery form plugin not working in IE8

2009-04-16 Thread adaa

I'm using http://malsup.com/jquery/form  plugin but it is not working
on IE8 but all other browsers. Pls help..

thanks
adnan


[jQuery] jQuery Form Plugin Problem: IE7 gives Object doesn't support property or method

2009-04-13 Thread MeanStudios

Greetings,

I'm using jQuery 1.3.2 and jQuery Form Plugin 2.25.
My code:
$('#msre_file').change(function(){
el = $(this);
target = el.next();
$('#entryform').ajaxSubmit({
url: '&ms_rel_file=upload',
type: 'post',
iframe: true,
success: function(response) {
el.attr('value', '');
target.append(''+response+'');
target.children('.msre_tmp_upload').fadeIn();
}
});
return false;
});

The form tag looks like:


It works in FF2/3, Safari, IE8 but not in IE7.  I get an error on line
257 which is:
form.submit();

I've changed that line to document.entryform.submit(); just for kicks
and it still throws the error message.
I've also done window.document.getElementById('entryform').submit();
and it still doesn't work.
I've done alert(document.entryform.msre_file.value); and it gives me
the value of the file input correctly so I know it's referencing the
form correctly.
Yes I've changed the name attribute of the submit button to something
other than "submit".

I've also scrapped the jQuery Form Plugin and wrote my own form submit
function using the iframe method and it too worked in FF, Safari and
IE8 but still threw the same error in IE7.

I'm getting rather frustrated with this :(.

Any help would be hugely appreciated.


[jQuery] jquery form plugin problem

2009-03-28 Thread dth

Hi,

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);
});

This does not work (nothing happens):

$("#loginform").ajaxSubmit({
dataType: "json",
success: function(obj, statusText) {
alert(obj);
}
});

Oh, and by the way. Is there any way to get access to the request in
the 'success' function - to obtain status codes, content-type header
etc.?

Thanks,

-dennis


[jQuery] jquery form plugin problem

2009-03-28 Thread dth

Hi,

I'm having a problem with the jquery (ajax) form plugin. It says on
the page (malsup.com) to seek help here :)

When I invoke ajaxSubmit() with a function it is called on success.
But when I invoke ajaxSubmit() with a Options object with success:
function() {..} the function is not invoked. Any help appreciated!

By the way: is there any (good) way to access the response status code
and content type from the "success" callback function?

Thanks,

-dennis


[jQuery] jquery form plugin problem

2009-03-28 Thread dth

Hi,

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);
});

This does not work (nothing happens):

$("#loginform").ajaxSubmit({
dataType: "json",
success: function(obj, statusText) {
alert(obj);
}
});

Oh, and by the way. Is there any way to get access to the request in
the 'success' function - to obtain status codes, content-type header
etc.?

Thanks,

-dennis


[jQuery] jQuery Form plugin, the checkbox and the formData array

2009-03-22 Thread MarkZ

Hi
I am using jQuery's 'Form Plugin' (available at 
http://www.malsup.com/jquery/form)
to submit my form.
Just before submitting form the plugin runs (using 'beforeSubmit:'
option) validation
callback function. This CB function uses 'formData' - an array of
objects representing the name and value
of each field that will be sent to the server.
The problem is that this CB function finds only checked checkboxes.
Due to this issue
the array 'formData'  index of all form elements changes depending on
the checked or not
checkbox input.
The code of the input is:
Whole
day
Any one could help me here please?
All I want is to get the checkbox indexed no matter if it is checked
or not.
Best regards


[jQuery] jQuery Form Plugin Ajax Problem

2009-03-05 Thread makrohaus

Hi.

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!


[jQuery] jQuery Form Plugin ROOKIE in need of help :(

2009-02-25 Thread Brian Long

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 callback:

function showResponse(responseText, statusText)  {

$('#myForm').html('Submission was successful' +
responseText);

}

I do see the HTML change in the browser / firebug for this element:


but when I view source (in Firefox) ---> I see the HTML that would of
existed before the AJAX submission.

Is this normal?

Thanks in advance
Brian Long


[jQuery] jQuery Form Plugin not working in Mozilla 3.0.6!!

2009-02-25 Thread antcj...@gmail.com

Hi,

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, It fails. ( I am
getting redirected
to the sell.php5 page )

Can anyone help me please?

Thanks,
Antony Johnson


And here is what I wrote
-



 

function processXml(responseXML) {

var message = $('message', responseXML).text();
alert(message);
}


$(document).ready(function() {

  var options = {

success:   processXml  // post-submit callback

};

$('#htmlForm').submit(function() {

$(this).ajaxSubmit(options);

alert('Sending...');

return false;
});

});







http://myserver.com/sell.php5";
method="post">
Message: 



 



' . $_POST['message'] . '';
?>
-


[jQuery] jQuery Form Plugin redirects even if I use return false in $('#myForm2').submit(function()

2009-02-23 Thread antcj...@gmail.com

Hi all,

I am using jQuery Form Plugin to submit a form to my php.

I am using ajaxSubmit to achieve the same. But when I used it like
this,
---

$(document).ready(function() {
var options = {
target:'#output2',
beforeSubmit:  showRequest,
dataType:  'xml',
success:   showResponse,
url: 'index.php'
};

 $('#myForm').submit(function() {

$(this).ajaxSubmit(options);

return false;
});
});
---
index.php content...
Info';
?>


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.

Can anyone pleass help me ??

I am using Mozilla 3.0.6,


Thanks in advance.


[jQuery] jQuery Form Plugin redirects even if I use return false

2009-02-23 Thread antcj...@gmail.com

Hi all,

I am using jQuery Form Plugin to submit a form to my php.

I am using ajaxSubmit to achieve the same. But when I used it like
this,
---

$(document).ready(function() {
   var options = {
   target:'#output2',
   beforeSubmit:  showRequest,
   dataType:  'xml',
   success:   showResponse,
   url: 'index.php'
   };

$('#myForm').submit(function() {

   $(this).ajaxSubmit(options);

   return false;
   });
});
---
index.php content...
Info';
?>


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.

Can anyone pleass help me ??

I am using Mozilla 3.0.6,


Thanks in advance.


[jQuery] jQuery Form Plugin

2009-02-19 Thread Paul

Hi there, I am using jQuery Form Plugin with Matt's Script Formmail,
and I simply cannot get it to work. Rather than showing up with the
ajax form, it still just default redirects me to a success or error
page.

I am not jQuery expert, but I was hoping someone can point me in 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.


// wait for the DOM to be loaded
$(document).ready(function() {
// bind 'myForm' and provide a simple callback function
$('#myForm').ajaxForm(function() {
alert("Thank you for your comment!");
});
});











Thanks in advance!


[jQuery] jQuery Form Plugin

2009-02-19 Thread Paul

Hi there, I am using jQuery Form Plugin with Matt's Script Formmail,
and I simply cannot get it to work. Rather than showing up with the
ajax form, it still just default redirects me to a success or error
page.

I am not jQuery expert, but I was hoping someone can point me in 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.


// wait for the DOM to be loaded
$(document).ready(function() {
// bind 'myForm' and provide a simple callback function
$('#myForm').ajaxForm(function() {
alert("Thank you for your comment!");
});
});











Thanks in advance!


[jQuery] Jquery Form Plugin issues

2009-02-18 Thread Daniel

I'm going nuts here, and I think i've been staring at this far too
long. I have done more than one of these in my day, but for some
reason this just isn't working. I'm hoping a fresh set of genius eyes
can help me out here.

Everything has been checked for validation and so on. Doesn't work in
IE or FF. Thanks in advance!


$(document).ready(function() {
var submitoptions = {
target:'#loading'
};

$('#e2').submit(function(){
$(this).ajaxSubmit(submitoptions);
return false;
});
});



Photo # 2






[jQuery] jQuery Form Plugin - after ajaxSubmit call, ajax submitting seems to be disabled

2009-01-12 Thread Isaac Raway


I have a situation where I have a form that remains on a page even after a
successful submit - it is used to add items to a list of existing items.

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 ajaxSubmit IS
being fired (added an alert to the beginning to confirm this). The form is
instead submitted as a regular POST form, replacing the entire page.

Any ideas why this would happen?

Handler:
function edit_card_jq() {
$('#edit_card form').ajaxSubmit('#edit_card', function() {
edit_card_jq();
});
}
edit_card_jq();
-- 
View this message in context: 
http://www.nabble.com/jQuery-Form-Plugin---after-ajaxSubmit-call%2C-ajax-submitting-seems-to-be-disabled-tp21424793s27240p21424793.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] jquery form plugin: fieldValue vs. val

2008-11-27 Thread Stanislav Ievlev

Greetings!

I've seen
http://docs.jquery.com/JQuery_1.2_Roadmap#Form.2FField_Serialization
http://docs.jquery.com/Release:jQuery_1.2/Attributes.


Is fieldValue() still better then standard val()?


[jQuery] jQuery Form Plugin using keyUp() or change() instead of submit

2008-10-27 Thread brian mahoney

> 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?




[jQuery] jQuery Form Plugin - "success" callback function isn't called

2008-10-23 Thread Sebastian

Hey guys,

I'm working with the "jQuery Form Plugin" and I'm having some trouble
with it.
In my HTML I have a button, which, when clicked, inserts a form via
jQuery. To then register the form's submit event, I use the
"livequery" plugin in my "(document).ready" function:

(document).ready(function($) {
  var options = {
target: '#editable_content',   // target element(s) to
be updated with server response
success:   function(responseText, statusText)
{ alert(responseText); },  // post-submit callback
};
  $('.edit_contact').livequery('submit', function() {
$(this).ajaxSubmit(options);
return false;
  });
});

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.

Can anyone help???

Regards,

Sebastian


[jQuery] jQuery Form Plugin - File Upload Issues

2008-10-12 Thread JustinScheetz

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 documentation on how to handle the uploads, but the page
gives no samples of code to actually use. Am I missing something?

http://www.malsup.com/jquery/form/#code-samples

Any help would be HUGELY appreciated!


[jQuery] jQuery Form Plugin

2008-10-02 Thread André Cassal

Hey Folks,

Can I cancel a connection during an upload?

I'm using this form plugin http://www.malsup.com/jquery/form/ and a
dialog showing the process, but the dialog needs to have a cancel
button to trigger a client-side cancel.

As this plugin uses an iframe to target a form, I need just change the
iframe src to 'about:blank'. But it seems not to have an "open way" to
control the iframe.

any thoughts?


[jQuery] jQuery Form Plugin - success callback problem with FF/Chrome

2008-09-29 Thread Clemens

Hi,

I'm using the jQuery Form Plugin to submit my form (#load), which then
loads data from the server. Heres the JS:

jQuery().ready(function() {
// ... some code
jQuery("#load").ajaxForm({
dataType: "json",
success: function(data) {
displayData(data);
},
});
// ... some other code
});

The corresponding html code is


Content-ID:




Now, after clicking "Load", data identified by a corresponding content
id should be loaded from the server. The Ajax Request executes
correctly, and the server provides the data as requested. This works
every single time I try in Internet Explorer 7, but not with FF3 or
Chrome. After adding alert("hello"); to the success callback function,
just before calling displayData() FF3 and Chrome will work fine too,
even if I remove the alert call afterwards. When I reload my page,
having no alert() within the success callback, the whole thing starts
again.

Hints are much appreciated :)
Thanks for your help!

Best regards,
Clemens


[jQuery] Jquery Form Plugin - tags are removed

2008-09-21 Thread theaska

I am using the Jquery Form pluging version 2.12 to submit a form with
a response of another form:


$(document).ready(function(){
 $("[EMAIL PROTECTED]'formHello']").ajaxForm({
   success:function(response){
$("div#formContainer").html(response);
   }
 });
});


   
   




When sent, it should have a response like such:





But instead, i got this:




as you can see, the starting  tag is missing.

The only hack i have found so far is to wrap the form within a 
tag or put an " " just within the opening form tag. These are
both not feasible as we have to modify hundreds of files to add these.
The only option to fix is the javascript Jquery Form plugin. This is
only a problem within IE6/7 and works fine in Firefox, Safari, Opera,
and Google Chrome.

It seems that the problem is with IE explorer XHTML parsing from an
AJAX response. When you check the IFRAM that Form plugin uses, there
is no discrepancy, it gave me the correct response I want, but the
Form plugin seems to have a bug on this one.

Any help on this?


[jQuery] jQuery Form Plugin

2008-09-13 Thread René

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 pre-submit check).

   For reference: http://malsup.com/jquery/form/#code-samples

The problem I'm having with running an Ajax request within
beforeSubmit, for example, is that it returns immediately (normally a
good thing). But beforeSubmit needs to wait for the value before
knowing whether it can return true or false.

Anyone run into this before? I guess, in a nutshell, what I'm trying
to do is validate part of the form data by submitting it to a
different URL, then, depending on the response, submitting (or not
submitting) the entire form to the primary URL.

...Rene



[jQuery] JQuery Form Plugin and json

2008-08-29 Thread Stefan Sturm

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 there a way to do this?

Thanks and greetings,
Stefan Sturm


[jQuery] JQuery form plugin not uploading files

2008-08-19 Thread [EMAIL PROTECTED]

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:



Nombre de la imagen:


Descripción:



  Tu
nick:
  Tu correo:





Buscar imagen:










The php script that sends the data (upload_contrib.php):

cargar_contrib($_POST["img_uploader"],$_POST["img_nick"],
$_POST["img_coment"],$_POST["img_mail"],$_POST["img_gal"],
$_POST["img_ip"],$_POST["img_host"]);
echo "si";

The jquery script to process the form:

$('#form_contribs').ajaxForm({
beforeSubmit: function(a,f,o) {
o.dataType = $('#uploadResponseType')[0].value;
$('#uploadOutput').html('Submitting...');
},
success: function(data) {
var $out = $('#uploadOutput');
$out.html('Form success handler received: ' +
typeof data + '');
if (typeof data == 'object' && data.nodeType)
data = elementToString(data.documentElement, true);
else if (typeof data == 'object')
data = objToString(data);
$out.append(''+ data +'');
alert(data);
}
});

I'm sorrybut nothing happens, when I submit the form, the response
div shows this:

insert into x
(img_name,img_uploader,img_nick,img_coment,img_mail,img_gal,img_date_up,img_time_up,img_ip,img_host)
values ('','nombreq','nick','asdfa
afafaf','correo','2',NOW(),NOW(),'','')

but nothing from the file field, and of course, the data is writen to
the DB, but no file uploaded.

Please advise. Thanks.


[jQuery] jquery form plugin - post method do not work in firefox3

2008-06-18 Thread pratikspace


Hi guys, 

I am just testing my application on firefox3 and found that form data after
doing post do not get submitted correctly ...
I am using APACHE::ASP mod perl. so following code is combination on perl
and javascript. And data posting is done by jquery form plugin. 

Here is my simple test code:
<< this is testPost.asp file
 



 
$(document).ready(
function() { 
  $('#myForm').ajaxForm({ 

dataType:  'json',

beforeSubmit:  
  function() {
alert('going to before submit');
  },

success: 
  function(data) { 
alert('alert after success');
  },

error: 
  function () {
alert('Error in posting current data');
  }
  });

}
);


 



Name: 
Comment: 


>>


And NOW, the submitData.asp file in which i am just printing the post data 

<%
if($Request->Form("name")) { // if we get something in name, then give
proper results
print "{ result: \"ok\"}";
} else {
print "not ok";
}
%>



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. 


Can any please let me know why this could be happening ? 
Anyone getting this issue on firefox3 ?

Please let me know.

thanks, 
P
-- 
View this message in context: 
http://www.nabble.com/jquery-form-plugin---post-method-do-not-work-in-firefox3-tp17991742s27240p17991742.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] jQuery Form Plugin Action with "#"

2008-05-14 Thread Dominik Weiss

Hi,

I'm using the ajaxSubmit() function to submit a form which has
action="index.php#content_jump". The requested URL will be something
like "index.php#content_jump?foo=bar&bar=baz" - which is an invalid
URL.

For the moment I monkeypatched the source to remove the "named
anchor" (line 59 of jquery.form.js):
  url:  this.attr('action').replace(/#.*$/, '') ||
window.location.toString(),

It works, but I am not very happy with it. Is there another way or am
I doing something wrong? Or did I found a bug? ;-)

Dominik


[jQuery] JQuery Form Plugin returns nothing in Opera

2008-05-08 Thread Kosarev Denis

  Hello, Mike!

  You saved my day! :)
  This version worked perfectly for me!
  Thanks for the fast reply!

Thursday, May 8, 2008, 8:05:19 PM, you wrote:

>> 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) { alert(responseText); }
>>  });
>> });
>>
>>  an the form is:
>>
>> > enctype='multipart/form-data'>
>>  
>>  
>> 
>> 
>>
>>  The problem: responseText is empty in Opera after submit. It is filled by
>> the correct response of catcher.php in IE, FF and Safari. The contents of
>> catcher.php means nothing - I tested it with only an 'ok' in that file -
>> Opera shows noting, the other browsers show 'ok'.
>>
>>  I am using the lates stable versions of all browsers and latest jquery.js +
>> jquery.form.js.
>>
>> What could that be?

MA> Thanks for reporting this.  It seems to be a regression (or at least a
MA> timing change) in the Opera 9.2.x line.  If I use Opera v9.1
MA> everything works fine, but the 9.2+ fails.  Can you try this version
MA> of the form plugin to see if it works for you?

MA> http://malsup.com/jquery/form/jquery.form.2.09.js

MA> Mike


-
Denis Kosarev, [EMAIL PROTECTED]



[jQuery] JQuery Form Plugin returns nothing in Opera

2008-05-08 Thread dkosarev


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) { alert(responseText); }
 });
});
  
  an the form is:
  

 
 



 The problem: responseText is empty in Opera after submit. It is filled by
the correct response of catcher.php in IE, FF and Safari. The contents of
catcher.php means nothing - I tested it with only an 'ok' in that file -
Opera shows noting, the other browsers show 'ok'.
 
 I am using the lates stable versions of all browsers and latest jquery.js +
jquery.form.js.

What could that be?
-- 
View this message in context: 
http://www.nabble.com/JQuery-Form-Plugin-returns-nothing-in-Opera-tp17124025s27240p17124025.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] jQuery Form Plugin file upload problem

2008-05-04 Thread dtc

Hi,

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 handling the form submission.

I am having a problem when I try to upload a file.  It looks like the
request never gets to my servlet.  When I fill out the other fields of
the form out, leaving the upload blank, it's working fine.  However,
once I attempt to include a file to upload, the servlet never gets
invoked.

I understand that the XMLHttpRequest cannot send files over, but that
the Forms Plugin utilizes an iFrame to do so.  However, it's not
working in my case.  I've read a blog in which the person is able to
address this, found here:  
http://www.ender.com/2008/04/jquery-the-jquery-form-plugin.html.
I tried his suggestions of including a hidden field in my form, but
it's still not reaching my servlet.

Could the problem actually be the fact that I have more than one form
on the page?  Any help would be greatly appreciated.  Thanks.


[jQuery] jQuery Form Plugin target confusion

2008-04-08 Thread Iasthaai

I'm using the jQuery form plugin and specifying my target as so:

$(function() {
var _options = {
target: $( this ),
beforeSubmit: function(data, set, options) {
  alert( $(set).attr( 'action' ) );
}
}
$( '.form' ).ajaxForm( _options );
});


I've also tried using just the 'this' keyword. Anyway, when I use this
it freezes the browser... My goal is to make the response target
wrapper the same form that I'm submitting (basically a refresh of the
newly updated form). I can't just leave the form as is due to some
extra bits of JS that aren't form elements that will be reset when the
response is loaded.

Am I specifying my target incorrectly for what I want to achieve?

PS: I've changed my target to the specificy form using an id and also
I set the target to $( '.form' ) which posts the response in ALL of my
forms, so I know that it is working, just not with the 'this' keyword
for some reason.


[jQuery] jQuery Form Plugin (jqForm) problem on beforeSubmit callback

2008-02-24 Thread Nazgulled

My question is pretty simple... I have the code posted above and it
doesn't work. To test the problem, load the page (of course lol),
click on "Submit" and you'll see a message stating what the script is
going to do next, then, click on "Show!". You'll see the value "null"
and I don't understand why, I think it should have been "Hello World".

The code:

http://www.w3.org/
TR/xhtml11/DTD/xhtml11.dtd">
http://www.w3.org/1999/xhtml";>


jqForm Test



(function($) {
$.admin = {
init: function() {
$('form#form-login').ajaxForm({
beforeSubmit: this.ajax.request
});
}
}
})(jQuery);

(function($) {
$.admin.ajax = {
someVar: null,
request: function(formData, jqForm, options) {
alert("Setting someVar = Hello World.")

this.someVar = "Hello World";

return false; // we are testing, don't really 
need to submit the
form
}
}
})(jQuery);

$(document).ready(function() {
$.admin.init();

$('input#show').click(function() {
alert("someVar: " + $.admin.ajax.someVar);
});
});





{FormLabel:Username}:


{FormLabel:Password}:








If I replace:

this.someVar = "Hello World";

With:

$.admin.ajax.someVar = "Hello World";

It will work, but this makes no sense to me. I should be able to use
this, that's what makes sense on my head... What am I missing?


[jQuery] jquery form plugin submitting for multiple times after DOM is appended

2008-02-23 Thread pedalpete

I'm using the jquery form plugin from a form which is retrieved via
ajax. I have multiple forms on the page.
I'm using .livequery to make sure the form is only requested once, but
didn't realize my problem is that the submit is actually occuring more
than once.

I've tried adding .livequery to the begging of the .submit function so
that it would hopefully only be triggered once, but that hasn't worked
for me.

I would prefer to not do an 'unbind/bind' function because with
cancelling of the form, etc. it gets a bit complicated.

Is there a simple way to do this?

Here is the code I have to call the form and then to submit it. This
code includes my attempt to use livequery in this, but the form still
submits multiple times.
[code]
$(".addGroup").livequery('click', function(event) {
id = this.id;
var posTop = event.pageY;
var posLeft = event.pageX;
var formID = "#createForm";
$.ajax({
type: "GET",
url: "processes/addType.php",
data: "gid="+id,
success: function(response){
$(formID).css({ position: 'absolute', 
top: posTop, left:
posLeft });
$(formID).fadeIn("slow").html(response);
$("#createForm").livequery('click', 
function(){
addShiftAJAX();
});

cancelForm(formID);
templateShifts();
}
});
});



// prepare the form when the DOM is ready
function addAJAX(){
var options = {
target:'#createForm',   // target element(s) to be
updated with server response
success:  showResponse
};

// bind to the form's submit event

$('#createForm').submit(function() {
// inside event callbacks 'this' is the DOM element so we
first
// wrap it in a jQuery object and then invoke ajaxSubmit
$(this).ajaxSubmit(options);

// !!! Important !!!
// always return false to prevent standard browser submit and
page navigation
return false;
});


// pre-submit callback
function showRequest(formData, jqForm, options) {
// formData is an array; here we use $.param to convert it to a
string to display it
// but the form plugin does this for you automatically when it
submits the data
var queryString = $.param(formData);

// jqForm is a jQuery object encapsulating the form element.  To
access the
// DOM element for the form do this:
// var formElement = jqForm[0];

  alert('About to submit: \n\n' + queryString);


// here we could return false to prevent the form from being
submitted;
// returning anything other than false will allow the form submit
to continue

}

// post-submit callback
function showResponse(options)  {
// for normal html responses, the first argument to the success
callback
// is the XMLHttpRequest object's responseText property

// if the ajaxSubmit method was passed an Options Object with the
dataType
// property set to 'xml' then the first argument to the success
callback
// is the XMLHttpRequest object's responseXML property

// if the ajaxSubmit method was passed an Options Object with the
dataType
// property set to 'json' then the first argument to the success
callback
// is the json data object returned by the server


$.ajax({

type: "GET",
url: "processes/getGroups.php",
data: "cid="+cid,
success: function(response2){
$(".groups").html(response2);
$("#createForm").fadeOut("slow");
}

});
};
};
[/code]


[jQuery] jQuery Form Plugin help

2008-02-22 Thread hcvitto

hi
i'm trying to use the jQuery Form Plugin from http://www.malsup.com/jquery/form/

it's apparently easy to use but at my first try i can't make anything
out of it!!

this is the page i'm working on

http://www.eco-way.it/projects-and-communication/extra/curriculum.php

In my comuni.js i use

$('#formCurriculum').submit(function() {
$(this).ajaxSubmit();
return false;
});

pretty simple but when i submit nothing shows in firebug and less with
my php file.
Any help out there?
thanks vitto


[jQuery] jQuery form plugin error with examples.

2008-02-09 Thread Sathyakumar


Hi,
I am using jQuery 1.2 with form plugin. Am new to jQuery, so bear with me if
the doubt sounds silly. I was trying out the first example in the form
plugin 


My Html code goes something like this

  
  
  

.Rest of the code containing form data

And my common.js reads

jQuery(document).ready(function() { 
var options = { 
target:'#output1',   // target element(s) to be updated with
server response 
beforeSubmit:  showRequest,  // pre-submit callback 
success:   showResponse  // post-submit callback 
 
// other available options: 
//url:   url // override for form's 'action' attribute 
//type:  type// 'get' or 'post', override for form's
'method' attribute 
//dataType:  null// 'xml', 'script', or 'json' (expected
server response type) 
//clearForm: true// clear all form fields after successful
submit 
//resetForm: true// reset the form after successful submit 
 
// $.ajax options can be used here too, for example: 
//timeout:   3000 
}; 
 
// bind form using 'ajaxForm' 
jQuery('form').ajaxForm(options); 

}); 

Now I am not able to run this succesfully. With FireFox, I get an error
"jQuery("form").ajaxForm is not a function"

Can someone point to me the mistake I'm doing. I've double checked the paths
to the js files. Any help will be greatly appreciated.

Regards
Sathya
-- 
View this message in context: 
http://www.nabble.com/jQuery-form-plugin-error-with-examples.-tp15371332s27240p15371332.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] jQuery Form Plugin, and ajax submit without submit button

2008-01-14 Thread Giovanni Battista Lenoci

Hi, I'm using this fantastic plugin but if I try to submit the form
using

$('#form_id')[0].submit() the ajaxform it's not fired, it behaves like
it's a normal form, and I'm redirected to the ajax page.

What I want to do is to submit the form when I check a checkbox.

Can you help me?

thank you


[jQuery] jQuery Form Plugin - redirect after success

2007-11-29 Thread Web Specialist
Hi all.

I'm using jQuery Form Plugin(http://www.malsup.com/jquery/form/) to validate
a form with ajax.

This is js code:
.ajaxStart(function() {$(this).show();$('#divResposta').hide()})
.ajaxStop(function() {$(this).hide();})
$('#frm').ajaxForm({
target: '#divResposta',
dataType: 'json',
success: function(data) {
$('#confirmar').show();
$('#divResposta').html(data.saida).show();
}
});

User needs to inform a value in form field. After submit I need to check
that value in database. If exists, display related information in a
div(divResposta). User needs to validate that data and after resubmit that
form. Easy. The bottleneck is:

- after validate data I used a redirect ColdFusion(cflocation) function to
send that user to another page. Here IE and FF give me an error:

- in FF
[Exception... "Component is not available" nsresult: "0x80040111
(NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::
file:///C:/Arquivos%20de%20programas/Mozilla%20Firefox/components/nsSessionStore.js
:: sss_saveState :: line 1749" data: no]
oState.session = { state: ((this._loadState == STATE_RUNNING) ?
STATE_RUNNIN...

(error in nsSessionStore.js line 1749).

My question: is it possible to redirect in the middle of an ajax call?

Cheers


[jQuery] JQuery Form Plugin with multiple forms per page

2007-11-29 Thread Tom Duke

Hi all,

New to the list and jquery. I am trying to bind the JQuery form plugin
to multiple forms on a single page.  I can do this but I cannot figure
out how to assign different options for each form.

The form code is :-


...


Where the rid is unique for each form.

My JQuery code is :-

$(document).ready(function() {
var options = {
target: '#td-active-[rid]',
url: 'activeSnippet.tmpl'
};
   $([EMAIL PROTECTED]).ajaxForm(options);
});

I cannot figure out how to set a unique target for each form where the
[rid] in the target matches the [rid] in the form id.

Any help greatly appreciated.

Thanks
- Tom



[jQuery] jQuery Form Plugin > Doesn't execute on returned forms?

2007-11-25 Thread Geoff Millikan

I have a form that is submitted via the jQuery Form Plugin to a PHP
page which then returns another form in its place.  The second form
looks identical to the first however this second form will not submit
via the jQuery Form Plugin.

It's as if the jQuery Form Plugin script at the top of the original
page doesn't exist.

Do I have to somehow reinitialize the jQuery Form Plugin to recognize
the returned form?

http://mammoth.t1shopper.com/voip/ajaxform.html


[jQuery] jQuery Form Plugin > document.myform.submit()

2007-11-24 Thread Geoff Millikan

I love the jQuery Form Plugin!

I want to submit the form using an onClick event instead of making the
User click a  button.  Is that possible?  I tried
the below but no luck:

function submitme(){$('#myform').submit(function() {
$(this).ajaxSubmit();
return false;
});}

Click here to submit
myform.


[jQuery] jQuery Form Plugin with prepended hidden fields

2007-11-13 Thread micha149

Hi!
I prepend some new hidden fields to my form. After that I make the
form to an ajaxform with the jQuery Form plugin. It seems to work, but
I miss the new hidden fields... Somebody knows the Problem?



[jQuery] jQuery Form Plugin fiasco

2007-10-01 Thread roso

The jQuery Form Plugin hosted at http://www.malsup.com/jquery/form/ is
impossible to understand. I wasn't able to replicate any of the
examples listed there. The demo page which also includes the
documentation is bloated with a zillion number of examples and a
zillion scripts. NO, that is NOT the way to go, I would rather see
each example on a separate page. Then I can take them one by one and
run them under my own Web site, with my own version of JQuery and
jQuery Form Plugin.



[jQuery] jQuery Form Plugin and Validation Form

2007-08-15 Thread Freud

Hi,

first of all, excuse me for my language, I'm french ;) so I'll try to
make it simple...

I'm using the JQuery Form Plugin and it works perfectly fine :

$(document).ready(function() {
var options2 = {
target:"#alertes",
url:  "soa.php?action=modif"
};

$("#interv").submit(function() {
$(this).ajaxSubmit(options2);
return false;
});
});

I tried the validation form plugin, which is quite amazing, and it
also works great.

$(document).ready(function() {
$.validator.setDefaults({
errorContainer: $("#alertes"),
errorLabelContainer: $("#alertes ul"),
errorWrapper: "li",
rules: {
   int_societe: { required: true }
  },
  messages: {
int_societe: "Test soc"
}
//,submitHandler: function(form) {$
("#interv").ajaxSubmit(options2);},
   });
  $("#interv").validate();
});


Now, I wanna use both. That's where it started to go wrong. When I
uncomment the SubmitHandler line, the validation is still OK but the
form is submitted normally, not using the Ajaxian method.

Could someone help me on this case ? I spent my night on this stuff
and I start feeling depressed :)

Thx,
Freud



[jQuery] jQuery Form Plugin Repository: Compressed versions?

2007-08-15 Thread Pogo

Anyone know where to get the compressed version of this plugin:

http://www.malsup.com/jquery/form/

???



[jQuery] jQuery - form plugin

2007-07-17 Thread debussy007


Hi,

I am trying to understand the difference between AjaxForm and AjaxSubmit.

There are some examples Here : http://www.malsup.com/jquery/form/#sample1

With some forms.

But for each form, when I click Submit, I get on a dummy.php page with some
text on it.

It doesn't look like an Ajax call. Has the website some problems or maybe I
didn't understand the way it works ?

Thank you for any help.
-- 
View this message in context: 
http://www.nabble.com/jQuery---form-plugin-tf4096402s15494.html#a11647890
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] jQuery form plugin questions

2007-07-13 Thread Chris

Hello everyone,
I'm a bit of a noob to this whole AJAX thing so you'll have to forgive
me.  I've setup a blog, using jQuery the comments are added to mysql
using this form plugin (http://www.malsup.com/jquery/form/#getting-
started).  Posting the comments work great, I was even able to add in
a confirmation saying "Thank you for posting".  My dilemma is showing
the new comment on the page without refreshing.  Here is the page to
test it: (http://www.iphoneappr.com/index.php?post=48).  I was
thinking I could do a  $.get to an external php page that queries
mysql with the most current post and put it in a specific div on the
page.
Here is the function for the form.


// wait for the DOM to be loaded
$(document).ready(function() {
// bind 'myForm' and provide a simple callback function
$('#myForm').ajaxForm(function() {
$('#thankyou').show('slow');
$('#newcomment').hide('fast');

});
});



Thank you for any help!  This is driving me nuts!



[jQuery] jQuery form plugin questions

2007-07-13 Thread Chris

Hello everyone,
I'm a bit of a noob to this whole AJAX thing so you'll have to forgive
me.  I've setup a blog, using jQuery the comments are added to mysql
using this form plugin (http://www.malsup.com/jquery/form/#getting-
started).  Posting the comments work great, I was even able to add in
a confirmation saying "Thank you for posting".  My dilemma is showing
the new comment on the page without refreshing.  Here is the page to
test it: (http://www.iphoneappr.com/index.php?post=48).  I was
thinking I could do a  $.get to an external php page that queries
mysql with the most current post and put it in a specific div on the
page.
Here is the function for the form.


// wait for the DOM to be loaded
$(document).ready(function() {
// bind 'myForm' and provide a simple callback function
$('#myForm').ajaxForm(function() {
$('#thankyou').show('slow');
$('#newcomment').hide('fast');

});
});



Thank you for any help!  This is driving me nuts!



[jQuery] jquery form plugin - double action (fadein) problem

2007-06-12 Thread Sławomir Kozłowski

link to sample page:
http://www.torli.pl/fadein/index.html


Wrocław Non Stop - eksplozja kultury we Wrocławiu! 
22 czerwca - 1 lipca 2007. 
W ramach festiwalu wystąpią m.in. Iggy Pop & The Stooges!
wwW.wroclawnonstop.pl 
http://klik.wp.pl/?adr=http%3A%2F%2Fadv.reklama.wp.pl%2Fas%2Figgypop.html&sid=1189




[jQuery] jquery form plugin - double action (fadein) problem

2007-06-10 Thread slakoz

hello,
i have (very simple) problem.

what i want to do: when form is submited, i must deliver the data from
server to two separate divs (in the same page, one html file)

so i use the code:

$('form#obiekty').ajaxForm({
target: '#oblist , #oblist2',
success: function() {
$('#oblist').fadeIn('slow');
$('#oblist2').fadeIn('slow');
}
});

and later in html i have:



and later



problem: data is delivered to this two divs, but they refresh (fadein)
twice
:/. I try to use this code:

$('#oblist, #oblist2').fadeIn('slow');"

but efect was the same.
if anyone know the solution, please help

best regards
sk



[jQuery] JQuery Form Plugin: encodeURIcomponent/decodeURI with ISO-8859-1

2007-05-11 Thread sithram

Hello!

I need to can use ISO-8859-1 in send data to server with the
(selector).ajaxForm(options). I see that uses encodeURIcomponent in
serialize parameters, and this does that the sending information uses
strange codes.

initial text > recieved text
després > després
informació > informació

 If have this code:

  var opt = {
target: '#avis',
beforeSubmit: showFORM,
success: saveFORM
  };

  $('#frm').ajaxForm(opt);

  function showFORM(formData, jqForm, options) {
var queryString = $.param(formData);
qs=queryString.split('&');
for (var x=0;x, but it
doesn't seem work (I think that is a normal behavior because the ASP
page has to recieve data, it doesn't send data to client).

If you need more information, you don't hesitate to ask me for it.

Thanks a lot!

Xavier



[jQuery] jquery form plugin

2007-04-12 Thread Tom Shafer

I am trying to return html after the form has been processed. I get it
to work with plain text such as echo '{ message: " Thanks " }'; but
html doesnt seem to want to work.

Any thoughts?