[jQuery] Re: [forms] [ajax] Form submits, success message displayed but no data seems to be passed to php file

2009-09-16 Thread HairyJim

hmmm Im getting nowhere with this :/

So following the code on the page you suggested and the notes made
about .ajaxSubmit I transpose it like thus but nothing happens, it
does not even call the referenced thanks.php.

jQuery(function(){

var options = {
type: "POST",
url: "thanks.php",
success: function() {
$('#contact_form').html("");
$('#message').html("Contact Form 
Submitted!")
  .append("We will be in touch soon.")
  .hide()
  .fadeIn(1500, function() {
  $('#message').append("");
  });
}
};


jQuery("#myform").validate({
submitHandler: function(myform) {
// inside event callbacks 'this' is the DOM 
element so we first
// wrap it in a jQuery object and then invoke 
ajaxSubmit
jQuery(myform).ajaxSubmit(options);
}
});
});

On Sep 16, 11:52 am, Jörn Zaefferer 
wrote:
> Here is an 
> example:http://jquery.bassistance.de/validate/demo/ajaxSubmit-intergration-de...
>
> Jörn
>
> On Wed, Sep 16, 2009 at 12:39 PM, HairyJim  wrote:
>
> > Sorry, I have no idea where to use the .ajaxSubmit() option in the
> > code. What do I need to change to pass the data over to the processing
> > file?
>
> > Thanks
> > James
>
> > On Sep 16, 10:49 am, Jörn Zaefferer 
> > wrote:
> >> You don't specify any data to submit in your ajax call. Use the data
> >> option, or better yet, the form's plugin ajaxSubmit method. It will
> >> handle the form serialization for you.
>
> >> Jörn
>
> >> On Wed, Sep 16, 2009 at 11:42 AM, HairyJim  wrote:
>
> >> > Hi all,
>
> >> > I have this Jquery code, below, which I was hpoing would pass the data
> >> > from the form over to form processing script  but the problem I have
> >> > is that the success is returned but the processing script does not
> >> > seem to get the form data passed to it.
>
> >> > I have tested the script is called by just firing a success email off.
> >> > What am I doing wrong, I'm lost in the forest and can't see the trees!
>
> >> > I am including jquery, jquery.validate and jquery.form
>
> >> > $(document).ready(function()
> >> > {
> >> >        $("#myform").validate({
> >> >                submitHandler: function() {
> >> >                        $.ajax({
> >> >                                type: "POST",
> >> >                                url: "thanks.php",
> >> >                                success: function() {
> >> >                                        $('#contact_form').html(" >> > id='message'>");
> >> >                                        $('#message').html("Contact 
> >> > Form Submitted!")
> >> >                                  .append("We will be in touch 
> >> > soon.")
> >> >                                  .hide()
> >> >                                  .fadeIn(1500, function() {
> >> >                                          $('#message').append(" >> > id='checkmark' src='/images/
> >> > check.png' />");
> >> >                                  });
> >> >                                }
> >> >                        });
> >> >                }
> >> >        });
> >> > });


[jQuery] Re: [forms] [ajax] Form submits, success message displayed but no data seems to be passed to php file

2009-09-16 Thread Jörn Zaefferer
Here is an example:
http://jquery.bassistance.de/validate/demo/ajaxSubmit-intergration-demo.html

Jörn

On Wed, Sep 16, 2009 at 12:39 PM, HairyJim  wrote:
>
> Sorry, I have no idea where to use the .ajaxSubmit() option in the
> code. What do I need to change to pass the data over to the processing
> file?
>
>
> Thanks
> James
>
> On Sep 16, 10:49 am, Jörn Zaefferer 
> wrote:
>> You don't specify any data to submit in your ajax call. Use the data
>> option, or better yet, the form's plugin ajaxSubmit method. It will
>> handle the form serialization for you.
>>
>> Jörn
>>
>> On Wed, Sep 16, 2009 at 11:42 AM, HairyJim  wrote:
>>
>> > Hi all,
>>
>> > I have this Jquery code, below, which I was hpoing would pass the data
>> > from the form over to form processing script  but the problem I have
>> > is that the success is returned but the processing script does not
>> > seem to get the form data passed to it.
>>
>> > I have tested the script is called by just firing a success email off.
>> > What am I doing wrong, I'm lost in the forest and can't see the trees!
>>
>> > I am including jquery, jquery.validate and jquery.form
>>
>> > $(document).ready(function()
>> > {
>> >        $("#myform").validate({
>> >                submitHandler: function() {
>> >                        $.ajax({
>> >                                type: "POST",
>> >                                url: "thanks.php",
>> >                                success: function() {
>> >                                        $('#contact_form').html("> > id='message'>");
>> >                                        $('#message').html("Contact 
>> > Form Submitted!")
>> >                                  .append("We will be in touch 
>> > soon.")
>> >                                  .hide()
>> >                                  .fadeIn(1500, function() {
>> >                                          $('#message').append("> > id='checkmark' src='/images/
>> > check.png' />");
>> >                                  });
>> >                                }
>> >                        });
>> >                }
>> >        });
>> > });


[jQuery] Re: [forms] [ajax] Form submits, success message displayed but no data seems to be passed to php file

2009-09-16 Thread HairyJim

Sorry, I have no idea where to use the .ajaxSubmit() option in the
code. What do I need to change to pass the data over to the processing
file?


Thanks
James

On Sep 16, 10:49 am, Jörn Zaefferer 
wrote:
> You don't specify any data to submit in your ajax call. Use the data
> option, or better yet, the form's plugin ajaxSubmit method. It will
> handle the form serialization for you.
>
> Jörn
>
> On Wed, Sep 16, 2009 at 11:42 AM, HairyJim  wrote:
>
> > Hi all,
>
> > I have this Jquery code, below, which I was hpoing would pass the data
> > from the form over to form processing script  but the problem I have
> > is that the success is returned but the processing script does not
> > seem to get the form data passed to it.
>
> > I have tested the script is called by just firing a success email off.
> > What am I doing wrong, I'm lost in the forest and can't see the trees!
>
> > I am including jquery, jquery.validate and jquery.form
>
> > $(document).ready(function()
> > {
> >        $("#myform").validate({
> >                submitHandler: function() {
> >                        $.ajax({
> >                                type: "POST",
> >                                url: "thanks.php",
> >                                success: function() {
> >                                        $('#contact_form').html(" > id='message'>");
> >                                        $('#message').html("Contact Form 
> > Submitted!")
> >                                  .append("We will be in touch soon.")
> >                                  .hide()
> >                                  .fadeIn(1500, function() {
> >                                          $('#message').append(" > id='checkmark' src='/images/
> > check.png' />");
> >                                  });
> >                                }
> >                        });
> >                }
> >        });
> > });


[jQuery] Re: [forms] [ajax] Form submits, success message displayed but no data seems to be passed to php file

2009-09-16 Thread Jörn Zaefferer
You don't specify any data to submit in your ajax call. Use the data
option, or better yet, the form's plugin ajaxSubmit method. It will
handle the form serialization for you.

Jörn

On Wed, Sep 16, 2009 at 11:42 AM, HairyJim  wrote:
>
> Hi all,
>
> I have this Jquery code, below, which I was hpoing would pass the data
> from the form over to form processing script  but the problem I have
> is that the success is returned but the processing script does not
> seem to get the form data passed to it.
>
> I have tested the script is called by just firing a success email off.
> What am I doing wrong, I'm lost in the forest and can't see the trees!
>
> I am including jquery, jquery.validate and jquery.form
>
> $(document).ready(function()
> {
>        $("#myform").validate({
>                submitHandler: function() {
>                        $.ajax({
>                                type: "POST",
>                                url: "thanks.php",
>                                success: function() {
>                                        $('#contact_form').html(" id='message'>");
>                                        $('#message').html("Contact Form 
> Submitted!")
>                                  .append("We will be in touch soon.")
>                                  .hide()
>                                  .fadeIn(1500, function() {
>                                          $('#message').append(" id='checkmark' src='/images/
> check.png' />");
>                                  });
>                                }
>                        });
>                }
>        });
> });


[jQuery] Re: Forms and Dialog UI

2009-08-12 Thread Richard D. Worth
Here are a couple things you might try:
1. make sure your  is completely contained within your #dialog element

2. call .ajaxForm after the dialog is opened, like so:

$("#dialog").dialog({
  bgiframe: true,
  autoOpen: false,
  width: 620,
  modal: true,
  open: function(event, ui) {
$('#myForm2').ajaxForm(function() {
  alert("Thank you for your comment!");
});
  }
});

I'm guessing the issue you're seeing may be related to the fact the a dialog
is placed at the end of the body when it is opened to get around a stacking
issue in IE. If that doesn't do it:

3. Try with modal: false instead of modal: true

4. Try your code without a dialog at all, to make sure your .ajaxForm is
working

If none of those work, please share a sample page or reproduce one on
jsbin.com:

http://jsbin.com/

Thanks.

- Richard

On Tue, Aug 11, 2009 at 5:30 PM, apadley  wrote:

>
> I am using the Dialog UI and want to post a very simple form. In add
> browsers tested (Windows & Mac), the form data does post to the action
> page, but there is no response so the callback fails. However, one Mac
> G5 computer running 10.5.8 and Firefox 3.5.2 or Safari 4.0.2
> everything works perfectly. Data posts properly and I receive the
> anticipated response triggering the callback.
>
> Looking at Firebug (novice user here) I see a discrepancy between the
> one computer that works and the others that don't. On the G5 that
> works, under the Net tab, I see the normal "POST" designation followed
> by the action page's url. On all other computers (various Macs and
> Windows) "POST" is missing and is replaced by "OPTIONS". I haven't
> been able to figure out what that means. Anyway, the jquery code is
> below and I'd appreciate comments.
>
> $(document).ready(function() {
>$('#myForm2').ajaxForm(function() {
>alert("Thank you for your comment!");
>});
>
>$("#dialog").dialog({
>bgiframe: true,
>autoOpen: false,
>width: 620,
>modal: true
>});
>
>$('#create-user').click(function() {
>$('#dialog').dialog('open');
>});
>
>});
>


[jQuery] Re: forms :: fire javascript on enter (without reloading the whole page)

2009-01-30 Thread dirk w

hey bohdan,
thanks, works fine!

dirk

On 30 Jan., 11:51, Bohdan Ganicky  wrote:
> Hi,
> just stick with the submit event. It's fired either when user presses
> Enter or clicks the submit button:
>
> $("#searchForm").submit(function() {
>         var url = 'http://gdata.youtube.com/feeds/api/videos?q='+ $
> ('#searchText').val() + '&alt=json-in-script&callback=showMyVideos&max-
> results=7&format=5';
>         $.getScript(url);
>
>         return false;
>
> });
>
> --
> Bohdan
>
> On Jan 30, 11:25 am, dirk w  wrote:
>
> > hello,
> > i've a text inpput field and a button. if you click on the button a
> > java script gets called (and all works fine) but if you type some text
> > and push the enter button than the whole page gets reloaded on the
> > form submit. i know how to prevent the browser to reload the whole
> > page (by catching the enter button action) but i don't know how to
> > make it do the same like pressing the submit button:
>
> > # HTML
> > 
> >       > size="50" maxlength="50"/>
> >       > class="button buttonText" value="Search" />
> > 
>
> > # JS
> >         $("form:first").submit(function()
> >         {
> >                 return false;
> >                /* INSTEAD OF DOING NOTHING THIS SHOULD DO THE SAME
> > THAN THE FOLLOWING ACTION */
> >         });
>
> >         // fire the search when people click on the search button
> >         $("#searchButton").click(function()
> >         {
> >                 var url = 'http://gdata.youtube.com/feeds/api/videos?q='+
> >                 $('#searchText').val() +
> >                 
> > '&alt=json-in-script&callback=showMyVideos&max-results=7&format=5';
>
> >                 $.getScript(url);
>
> >         });
>
> > your help is much appreciated. i really love jquery, especially
> > because of it's community, never got so great responses than in this
> > user group.
>
> > thanks in advance!
> > dirk


[jQuery] Re: forms :: fire javascript on enter (without reloading the whole page)

2009-01-30 Thread Bohdan Ganicky

Hi,
just stick with the submit event. It's fired either when user presses
Enter or clicks the submit button:

$("#searchForm").submit(function() {
var url = 'http://gdata.youtube.com/feeds/api/videos?q=' + $
('#searchText').val() + '&alt=json-in-script&callback=showMyVideos&max-
results=7&format=5';
$.getScript(url);

return false;
});

--
Bohdan

On Jan 30, 11:25 am, dirk w  wrote:
> hello,
> i've a text inpput field and a button. if you click on the button a
> java script gets called (and all works fine) but if you type some text
> and push the enter button than the whole page gets reloaded on the
> form submit. i know how to prevent the browser to reload the whole
> page (by catching the enter button action) but i don't know how to
> make it do the same like pressing the submit button:
>
> # HTML
> 
>       size="50" maxlength="50"/>
>       class="button buttonText" value="Search" />
> 
>
> # JS
>         $("form:first").submit(function()
>         {
>                 return false;
>                /* INSTEAD OF DOING NOTHING THIS SHOULD DO THE SAME
> THAN THE FOLLOWING ACTION */
>         });
>
>         // fire the search when people click on the search button
>         $("#searchButton").click(function()
>         {
>                 var url = 'http://gdata.youtube.com/feeds/api/videos?q='+
>                 $('#searchText').val() +
>                 
> '&alt=json-in-script&callback=showMyVideos&max-results=7&format=5';
>
>                 $.getScript(url);
>
>         });
>
> your help is much appreciated. i really love jquery, especially
> because of it's community, never got so great responses than in this
> user group.
>
> thanks in advance!
> dirk


[jQuery] Re: forms validation problem

2009-01-16 Thread Jörn Zaefferer

Please take a look at this section:
http://docs.jquery.com/Discussion#Support_Questions
What you provided so far isn't enough to help you debug the issue..

Jörn

On Fri, Jan 16, 2009 at 9:27 AM, vierda  wrote:
>
> dear all,
>  I'm new with jquery and I have problem with my code for forms
> validation. the error message cannot show up. I build the web site
> using django. my code as per following below:
>
> {% extends 'base_site.html' %}
> {% load i18n %}
>
> {% block breadcrumbs %}{% trans
> 'Home' %} a> › {% trans 'Update Profile' %}{% endblock %}
>
> {% block head %}
> {% block title %}{% trans "Update Profile" %}{% endblock %}
> 
> >
> 
> 
>   $(document).ready(function(){
>  $('.update').validate({
> rules:{
>email:{
>   required: true,
>   email: true
>}
> }
> message:{
>email: "e-mail field is required"
> }
>  }).addClass("error");
>   });
> 
> {% endblock %}
>
> {% block content %}
>  Update My Profile 
> 
> 
>   
>  
> e-mail:
> 
>  
>   
>   
> 
> {% endblock %}
>
> kindly advice and really appreciate for your help
>
> best regards,
> -Vierda-
>


[jQuery] Re: forms

2008-09-22 Thread david

Hi,
The easy option is if you could define what the maximum number of
addresses you can enter. For this you would not need javascript. CGI
(for example perl) would be sufficient. You would create a table of
input elements where each row represents an address.
If not it is a little complicated. You have to make a table with one
input row. Then when clicking on a button you have to add another row
in the table with input fields (with the append function).

Anyway on the server side you would get them in input fields (cgi-
>param). Afterwards you could push them into a hash.
This is a general answer.
Hope it helps,
David


On Sep 21, 10:58 pm, johnmiller <[EMAIL PROTECTED]> wrote:
> hello,
>
> right upfront, please let me apologize for my ignorance. i'm a server
> dude and got stuck with some front end work and obviously too stupid
> not only to figure it out but even to formulate the question. hence,
> let me give my "need" statement:
> i need an input form that gathers user info including one or more
> addresses. on top of it, i need to return these inputs in a hash table
> -like structure, e.g. {'username':'joe', ...{'street':"some lane',
> 'city':'some town', ...}, {'street':'dad's place', 'city':'boring
> village', ...}, ..., 'dob':'02/02/1985', ...}.
>
> as i said, i don;t even know what i need to type into google to find
> what i'm looking for. so any help, search terms, etc. are massively
> appreciated.
>
> many thanks,
> johnny


[jQuery] Re: Forms and syntax: Radio buttons and tutorials?

2008-07-21 Thread Micky Hulse

Ok, I need to stop floundering around!

Hehe... This is what I wanted:

if($('#option02').is(':checked'))

I think I need to read the docs... jQuery site is down for me
though... Anyway, I am still looking for links to jQuery form
tutorials! :)

Have a great day all.

Micky

On Jul 20, 11:57 am, Micky Hulse <[EMAIL PROTECTED]> wrote:
> I guess this would be even better:
>
> $("#option01:checked")
>
> Not sure why I did not think of that earlier. :)
>
> On Jul 20, 11:53 am, Micky Hulse <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I have a form (#fmSearch) with three radio buttons:
>
> >  ...
> >  ...
> >  ...
>
> > When testing for a specific radio button, which of the below
> > techniques is faster/better?
>
> > $('#option01').attr('checked', 'checked');
>
> > or
>
> > $("[EMAIL PROTECTED]'option01']:checked")
>
> > If I had to guess, I would say the the first option is faster... but I
> > like the readability of the second one better.
>
> > Anyone know of a good tutorial that details how to wok with forms
> > using jQuery (sans-plugins)?
>
> > Many thanks in advance!
>
> > Cheers,
> > Micky


[jQuery] Re: Forms and syntax: Radio buttons and tutorials?

2008-07-20 Thread Yehuda Katz
This would work too:

if($("#option02:checked").length)

-- Yehuda

On Sun, Jul 20, 2008 at 3:51 PM, Micky Hulse <[EMAIL PROTECTED]>
wrote:

>
> Ok, I need to stop floundering around!
>
> Hehe... This is what I wanted:
>
> if($('#option02').is(':checked'))
>
> I think I need to read the docs... jQuery site is down for me
> though... Anyway, I am still looking for links to jQuery form
> tutorials! :)
>
> Have a great day all.
>
> Micky
>
> On Jul 20, 11:57 am, Micky Hulse <[EMAIL PROTECTED]> wrote:
> > I guess this would be even better:
> >
> > $("#option01:checked")
> >
> > Not sure why I did not think of that earlier. :)
> >
> > On Jul 20, 11:53 am, Micky Hulse <[EMAIL PROTECTED]> wrote:
> >
> > > Hi,
> >
> > > I have a form (#fmSearch) with three radio buttons:
> >
> > >  ...
> > >  ...
> > >  ...
> >
> > > When testing for a specific radio button, which of the below
> > > techniques is faster/better?
> >
> > > $('#option01').attr('checked', 'checked');
> >
> > > or
> >
> > > $("[EMAIL PROTECTED]'option01']:checked")
> >
> > > If I had to guess, I would say the the first option is faster... but I
> > > like the readability of the second one better.
> >
> > > Anyone know of a good tutorial that details how to wok with forms
> > > using jQuery (sans-plugins)?
> >
> > > Many thanks in advance!
> >
> > > Cheers,
> > > Micky
>



-- 
Yehuda Katz
Developer | Engine Yard
(ph) 718.877.1325


[jQuery] Re: Forms: Convert spaces to +'s, and how to GET only certain form elements?

2008-07-20 Thread Micky Hulse

Thank you all Much much appreciated!!!

Have a great day!
Cheers,
Micky

On Jul 20, 2:52 am, Mickster <[EMAIL PROTECTED]> wrote:
> I think you can use .replace(/%20/g, "+") after
> encodeURIComponent(String) to replace the %20 with a +.
> Like:
> var encodedString = encodeURIComponent("dog cat horse whale");
> encodedString.replace(/%20/g, "+");
>
> Good Luck!
> //Mickster
>
> On Jul 20, 3:24 am, spicyj <[EMAIL PROTECTED]> wrote:
>
> > encodeURIComponent("dog cat horse whale")


[jQuery] Re: Forms: Convert spaces to +'s, and how to GET only certain form elements?

2008-07-20 Thread Micky Hulse

This worked perfectly:

HTML:


...


JS:
$(function() {
...
...
$('form#fmSearch').submit(function() {
var encodedString = encodeURIComponent($('#fmSearchKeywords').val());
encodedString.replace(/%20/g, "+");
});
...
...
});

Thanks for the specific coding Mickster! Ya'll rock!! :)

On Jul 20, 2:52 am, Mickster <[EMAIL PROTECTED]> wrote:
> I think you can use .replace(/%20/g, "+") after
> encodeURIComponent(String) to replace the %20 with a +.
> Like:
> var encodedString = encodeURIComponent("dog cat horse whale");
> encodedString.replace(/%20/g, "+");
>
> Good Luck!
> //Mickster
>
> On Jul 20, 3:24 am, spicyj <[EMAIL PROTECTED]> wrote:
>
> > encodeURIComponent("dog cat horse whale")


[jQuery] Re: Forms and syntax: Radio buttons and tutorials?

2008-07-20 Thread Micky Hulse

I guess this would be even better:

$("#option01:checked")

Not sure why I did not think of that earlier. :)

On Jul 20, 11:53 am, Micky Hulse <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a form (#fmSearch) with three radio buttons:
>
>  ...
>  ...
>  ...
>
> When testing for a specific radio button, which of the below
> techniques is faster/better?
>
> $('#option01').attr('checked', 'checked');
>
> or
>
> $("[EMAIL PROTECTED]'option01']:checked")
>
> If I had to guess, I would say the the first option is faster... but I
> like the readability of the second one better.
>
> Anyone know of a good tutorial that details how to wok with forms
> using jQuery (sans-plugins)?
>
> Many thanks in advance!
>
> Cheers,
> Micky


[jQuery] Re: Forms: Convert spaces to +'s, and how to GET only certain form elements?

2008-07-20 Thread spicyj

> encodedString.replace(/%20/g, "+");

Or simply decodeURIComponent("dog+cat%20horse+whale").


[jQuery] Re: Forms: Convert spaces to +'s, and how to GET only certain form elements?

2008-07-20 Thread Mickster

I think you can use .replace(/%20/g, "+") after
encodeURIComponent(String) to replace the %20 with a +.
Like:
var encodedString = encodeURIComponent("dog cat horse whale");
encodedString.replace(/%20/g, "+");

Good Luck!
//Mickster

On Jul 20, 3:24 am, spicyj <[EMAIL PROTECTED]> wrote:
> encodeURIComponent("dog cat horse whale")


[jQuery] Re: Forms: Convert spaces to +'s, and how to GET only certain form elements?

2008-07-19 Thread spicyj

encodeURIComponent("dog cat horse whale")


[jQuery] Re: Forms: Convert spaces to +'s, and how to GET only certain form elements?

2008-07-19 Thread intrader

Disable the form elements you don't want submitted.

On Jul 19, 3:07 pm, Micky Hulse <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am working on a search form where I need to convert the spaces of
> the submitted data (using GET form method) to +...
>
> For example:
>
> Search term: dog cat horse whale
>
> would be
>
> Search term: dog+cat+horse+whale
>
> Any tips for doing this using jQuery?
>
> Additionally, is there a good way (using jQuery) to not submit certain
> fields? For example, when I submit my form using GET form method, I
> see all of the unwanted fields showing up in the resulting URL search
> page.
>
> I assume that probably the best solution is to use two different
> forms... But if I can avoid re-tooling my current single-form setup
> (using jQuery), that would be the best! :)
>
> Thanks in advance!
>
> Cheers,
> Micky


[jQuery] Re: Forms: Email before submit

2008-04-25 Thread Scott González

Can you just bind a function to the submit event which makes an ajax
call to your server with all the data you need?

On Apr 24, 7:41 am, Carlos Escuriola <[EMAIL PROTECTED]> wrote:
> Hello everybody.
>
> I have a form which data has to be sent to a CRM (salesforce), so in
> the form action I have to include "https://www.salesforce.com/
> servlet/...", but I need to send emails before the form submits,
> because how the form is in an external url, I can't manage the data
> once the form is submitted.
>
> Any idea of how can manage that?
>
> Thanks a log.


[jQuery] Re: Forms

2008-04-23 Thread Nathaniel Whiteinge

kippi wrote:
> I have built a form and now I would like to add some ajax to it. Is it
> possible with jquery so load information into the form and also take
> the information from the form and update the database (PHP script for
> mysql part)

If you can already submit the form (without Ajax) and have it save to
the database, then adding an Ajax submission on top of that is way
easy with the $.ajax() function [1]::

$(document).ready(function(){
function successfulSubmit(data) {
alert("Submitted!");
}

$('form').submit(function(){
$.ajax({
type: $(this).attr('method'),
url: $(this).attr('action'),
data: $(this).serialize(),
success: successfulSubmit
});
return false;
});
});

Loading data into the form is a little more complex and depends on
what you're trying to load and what you're comfortable working with on
the server-side of things (such as XML, JSON, or just sending text or
HTML fragments). Have you seen the jQuery Ajax tutorials [2]? What are
you trying to load into the form?

- whiteinge

.. [1] http://docs.jquery.com/Ajax/jQuery.ajax
.. [2] http://docs.jquery.com/Tutorials#Ajax


[jQuery] Re: Forms AjaxSubmit: no error handling?

2008-01-15 Thread [EMAIL PROTECTED]

Hi all,

I struggled with this one all day. Could it be that error is broken
when you try to do a file upload in FireFox?

My HTML (fragment):

  Batch type:
  
  
  1
  
  
  


  Bestand:
  


  


My script:

$(document).ready(function(){
var options = {
error: function(){
alert('Error loading XML document');
},
success: function(){
alert('Success loading XML document');
}
};
$('#myForm').ajaxForm(options);
});


Seems to work in IE (7), but not in FF (2).


Groeten,

Friso


[jQuery] Re: Forms AjaxSubmit: no error handling?

2008-01-15 Thread [EMAIL PROTECTED]

To add to my previous post: in FF I always get the 'success' alert.

Groeten,

Friso


[jQuery] Re: Forms AjaxSubmit: no error handling?

2007-12-03 Thread Josh Nathanson
I figured out the problem...I had some server error handling that was doing a 
redirect, so it was returning status 302 instead of 500...it's working now.

-- Josh


  - Original Message - 
  From: Mike Alsup 
  To: jquery-en@googlegroups.com 
  Sent: Monday, December 03, 2007 3:27 PM
  Subject: [jQuery] Re: Forms AjaxSubmit: no error handling?


  You can supply an error handler to ajaxSubmit.  You can use any of the 
options supported by $.ajax since eventually the call is delegated to that 
method.

  $('#myForm').ajaxSubmit({
  success: function() { alert('hooray!'); }, 
  error: function() { alert('boo'); }
  });

  Mike



  On Dec 3, 2007 4:47 PM, Josh Nathanson <[EMAIL PROTECTED]> wrote: 


Hey all,

In using the AjaxSubmit method of the Forms plugin, I notice that there is 
no error param to allow for the handling of an server side error after
submission of the form.

How are people handling this?  I was thinking about just using ajaxForm and
then doing the submit using the jquery $.ajax method, which does have error 
handling?  How are other people doing this?

-- Josh






[jQuery] Re: Forms AjaxSubmit: no error handling?

2007-12-03 Thread Josh Nathanson
Hi Mike,

I thought I tried that, and I was pretty sure that the error handler didn't 
fire when a 500 status code was returned...I'll give it another try though.

-- Josh


  - Original Message - 
  From: Mike Alsup 
  To: jquery-en@googlegroups.com 
  Sent: Monday, December 03, 2007 3:27 PM
  Subject: [jQuery] Re: Forms AjaxSubmit: no error handling?


  You can supply an error handler to ajaxSubmit.  You can use any of the 
options supported by $.ajax since eventually the call is delegated to that 
method.

  $('#myForm').ajaxSubmit({
  success: function() { alert('hooray!'); }, 
  error: function() { alert('boo'); }
  });

  Mike



  On Dec 3, 2007 4:47 PM, Josh Nathanson <[EMAIL PROTECTED]> wrote: 


Hey all,

In using the AjaxSubmit method of the Forms plugin, I notice that there is 
no error param to allow for the handling of an server side error after
submission of the form.

How are people handling this?  I was thinking about just using ajaxForm and
then doing the submit using the jquery $.ajax method, which does have error 
handling?  How are other people doing this?

-- Josh






[jQuery] Re: Forms AjaxSubmit: no error handling?

2007-12-03 Thread Josh Nathanson


Hi Rick,

Yeah, I need to alert the user in some way if the client validates ok but 
the server bombs for some reason (no connection or whatever)...because when 
you do an ajax post, you're not actually refreshing the page, so the client 
will do the right thing, and the user won't know that an error occurred on 
the server.


-- Josh


- Original Message - 
From: "Rick Faircloth" <[EMAIL PROTECTED]>

To: 
Sent: Monday, December 03, 2007 3:49 PM
Subject: [jQuery] Re: Forms AjaxSubmit: no error handling?




Hi, Josh.

I've only used the validation plug-in a couple of times so far,
but I use the jQuery validation client side, and then once the
validation passes the client side, I run server side validation
again, as a separate function.  I program in ColdFusion, so I can
use my skills there for validation as well as validate against
data in a database on the server side.

My server side validation will also work if someone disables Javascript.

Rick



-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On 
Behalf Of Josh

Nathanson
Sent: Monday, December 03, 2007 4:47 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Forms AjaxSubmit: no error handling?


Hey all,

In using the AjaxSubmit method of the Forms plugin, I notice that there 
is

no error param to allow for the handling of an server side error after
submission of the form.

How are people handling this?  I was thinking about just using ajaxForm 
and
then doing the submit using the jquery $.ajax method, which does have 
error

handling?  How are other people doing this?

-- Josh









[jQuery] Re: Forms AjaxSubmit: no error handling?

2007-12-03 Thread Rick Faircloth

Hi, Josh.

I've only used the validation plug-in a couple of times so far,
but I use the jQuery validation client side, and then once the
validation passes the client side, I run server side validation
again, as a separate function.  I program in ColdFusion, so I can
use my skills there for validation as well as validate against
data in a database on the server side.

My server side validation will also work if someone disables Javascript.

Rick


> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Josh
> Nathanson
> Sent: Monday, December 03, 2007 4:47 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Forms AjaxSubmit: no error handling?
> 
> 
> Hey all,
> 
> In using the AjaxSubmit method of the Forms plugin, I notice that there is
> no error param to allow for the handling of an server side error after
> submission of the form.
> 
> How are people handling this?  I was thinking about just using ajaxForm and
> then doing the submit using the jquery $.ajax method, which does have error
> handling?  How are other people doing this?
> 
> -- Josh
> 





[jQuery] Re: Forms AjaxSubmit: no error handling?

2007-12-03 Thread Mike Alsup
You can supply an error handler to ajaxSubmit.  You can use any of the
options supported by $.ajax since eventually the call is delegated to that
method.

$('#myForm').ajaxSubmit({
success: function() { alert('hooray!'); },
error: function() { alert('boo'); }
});

Mike


On Dec 3, 2007 4:47 PM, Josh Nathanson <[EMAIL PROTECTED]> wrote:

>
> Hey all,
>
> In using the AjaxSubmit method of the Forms plugin, I notice that there is
> no error param to allow for the handling of an server side error after
> submission of the form.
>
> How are people handling this?  I was thinking about just using ajaxForm
> and
> then doing the submit using the jquery $.ajax method, which does have
> error
> handling?  How are other people doing this?
>
> -- Josh
>
>
>


[jQuery] Re: Forms with asp.net

2007-10-04 Thread Sharique

Thanks man. I have play it with more. I want to replace update panel
with jquery forms.

On Oct 5, 12:09 am, seedy <[EMAIL PROTECTED]> wrote:
> Ok so I haven't tested this , but I notice a few things right away.
> Your  tags point to different paths, jquery seems to be in /js and
> the forms plugin is in /.  This is ok if those are the paths to those files,
> I just mentioned it as I was not sure if this was intentional or not.
>
> However, the real problem I see is in this:
> $('#myForm').ajaxForm
> and
> 
> > when you do $('#myForm') you are looking for a dom element with an id of > 'myForm'. Your forms id is 'form1'. > $('#form1').ajaxForm should be what you want. > > Also, and this is just nitpicking, but your css Link should be inside your > head tag, and you should put all your scripts after your closing form tag. > This is just to optimize the page loading. > > > > Sharique Farooqui wrote: > > > I have one textbox, one button, one label- all asp.net controls. > > What I trying to do : > > when user click button text of text box is displayed on label. > > > Here is the code > > - > > <%@ Page Language="C#" AutoEventWireup="true" > > CodeFile="Forms1.aspx.cs" Inherits="Forms" %> > > > >www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > http://www.w3.org/1999/xhtml";> > > > > Untitled Page > > > >