Re: [jQuery] JQuery Form plugin

2007-03-17 Thread George Moschovitis
 AJAX can't be used to upload files. Systems that look like they do use
 an iframe (e.g. Gmail)

I managed to do it with an iframe like you suggested. It seems to work
great. View the source of the page in http://www.nitroproject.org/fora
to see how my hack-solution works.

thanks for the idea,
George.

-- 
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] JQuery Form plugin

2007-03-15 Thread Mike Alsup
 I am using the JQuery forms plugin and I have a problem. I would like
 to post a form that containse a file, ie I have to use
 enctype=multipart/form-data. How can I set this up when using
 ajaxForm()?

 Is there an example how you can upload files using ajaxForm()?

 thanks in advance for any help,
 George.

George,

The form plugin does not currently support file uploads.

Mike

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] JQuery Form plugin

2007-03-15 Thread George Moschovitis
 The form plugin does not currently support file uploads.

Is this something easy to fix? Any workaround?

-g.

-- 
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] JQuery Form plugin

2007-03-15 Thread Rob Desbois
George,

Just set the 'enctype' attribute of the form as usual:
form id='my_form' action='x.php' method='POST' 
enctype='multipart/form-data'.../form

$(#my_form).ajaxForm({dataType: ..., success: onFormSubmitSuccess});

Rob


 Dear devs,

I am using the JQuery forms plugin and I have a problem. I would like
to post a form that containse a file, ie I have to use
enctype=multipart/form-data. How can I set this up when using
ajaxForm()?

Is there an example how you can upload files using ajaxForm()?

thanks in advance for any help,
George.

-- 
http: //blog.gmosx.com
http: //cull.gr
http: //nitroproject.org
http: //www.joy.gr

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__




-- Original Message --

FROM:  George Moschovitis [EMAIL PROTECTED]
TO:discuss@jquery.com
DATE:  Thu, 15 Mar 2007 18:12:31 +0200

SUBJECT:   [jQuery] JQuery Form plugin

Dear devs,

I am using the JQuery forms plugin and I have a problem. I would like
to post a form that containse a file, ie I have to use
enctype=multipart/form-data. How can I set this up when using
ajaxForm()?

Is there an example how you can upload files using ajaxForm()?

thanks in advance for any help,
George.

-- 
http: //blog.gmosx.com
http: //cull.gr
http: //nitroproject.org
http: //www.joy.gr

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] JQuery Form plugin

2007-03-15 Thread George Moschovitis
 Just set the 'enctype' attribute of the form as usual:
 form id='my_form' action='x.php' method='POST' 
 enctype='multipart/form-data' ...
 /form

Have you actually tried this? This doesn't work for me :(

-g.

-- 
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] JQuery Form plugin

2007-03-15 Thread Rob Desbois
Sorry, no I haven't.
And apologies for being totally wrong - I didn't know the Form plugin can't do 
file uploads.
I was just working on the fact that the plugin uses the attributes of the form, 
so should (might...) include the enctype.
If it doesn't support file uploads though it's not that relevant :-(

--rob

  Just set the 'enctype' attribute of the form as usual:
 form id='my_form' action='x.php' method='POST' 
 enctype='multipart/form-data' ...
 /form

Have you actually tried this? This doesn't work for me :(

-g.

-- 
http: //blog.gmosx.com
http: //cull.gr
http: //www.joy.gr
http: //nitroproject.org

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__




-- Original Message --

FROM:  George Moschovitis [EMAIL PROTECTED]
TO:discuss@jquery.com
DATE:  Thu, 15 Mar 2007 18:26:56 +0200

SUBJECT:   Re: [jQuery] JQuery Form plugin

 Just set the 'enctype' attribute of the form as usual:
 form id='my_form' action='x.php' method='POST' 
 enctype='multipart/form-data' ...
 /form

Have you actually tried this? This doesn't work for me :(

-g.

-- 
http: //blog.gmosx.com
http: //cull.gr
http: //www.joy.gr
http: //nitroproject.org

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] JQuery Form plugin

2007-03-15 Thread Sam Collett
On 15/03/07, George Moschovitis [EMAIL PROTECTED] wrote:
  The form plugin does not currently support file uploads.

 Is this something easy to fix? Any workaround?

 -g.

 --
 http://blog.gmosx.com
 http://cull.gr
 http://www.joy.gr
 http://nitroproject.org

You may be able to use this plugin:
http://www.pixeline.be/experiments/jqUploader/

AJAX can't be used to upload files. Systems that look like they do use
an iframe (e.g. Gmail) or an object on the page (Flash, ActiveX
control, Java etc). But I have never tried to myself.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] JQuery Form plugin

2007-03-15 Thread limodou
On 3/16/07, George Moschovitis [EMAIL PROTECTED] wrote:
  Just set the 'enctype' attribute of the form as usual:
  form id='my_form' action='x.php' method='POST' 
  enctype='multipart/form-data' ...
  /form

 Have you actually tried this? This doesn't work for me :(

There is a ajaxUpload plugin in Jquery, you can find:

plugins page: http://docs.jquery.com/Plugins
example: http://fivethreeo.dynalias.org/uploadtest/
code: http://fivethreeo.dynalias.org/media/ajaxupload.js

And I used it, it's cool. So so just need to do is replace $.ajax call
with $.ajaxupload call, it's similar, but has some little differences.

-- 
I like python!
UliPad The Python Editor: http://wiki.woodpecker.org.cn/moin/UliPad
My Blog: http://www.donews.net/limodou

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jquery form plugin

2007-02-19 Thread Mike Alsup
Hi Tim,

Do you have a sample page?  fieldValue should never return undefined
for a password field.  You can see examples of fieldValue in action on
this page:  http://www.malsup.com/jquery/form/#fields

Mike

 I have tryed this and if I use alert, the value is undefined. The form has
 both name and id, also the text box
 has the correct name.

 Any suggestions?

 Thanx


  --
 ___
 Timothy M Bowler BSc(Hons) MSc MIET | Technology Director


 Or Media
 Unit 5 Elm Court
 156 -170 Bermondsey Street
 London
 SE1 3TQ

 T: 020 7939 9540
 F: 020 7939 9541

 ___

 The information in this e-mail and any attachments is confidential and is
 intended solely for the addressee.
 The material may not be reproduced either in whole or in part without
 permission and may not be used or disclosed
 without permission. No copies of the entirety or part of the information set
 out in this email or any attachment
 may be made without our prior approval. Any views or opinions presented are
 solely those of the author and do not
 necessarily represent those of Or Multimedia Limited. If you are not the
 intended recipient of this email, please
 contact us at [EMAIL PROTECTED]

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jquery form plugin

2007-02-19 Thread Timothy Bowler

Hi Mike,

I am trying to get the value of a name field - below is part of the form 
and the JS


Thanx


from page:


form name=contactForm id=contactForm action= method=post
..
Your Namebr /
input type=text name=name /
/form


from JS
$(document).ready(function(){
  
  
   var options = {

   url: /contactusSubmit,
   type: 'post',
   success: contactCompleted
   };
  
   $('#contactForm').ajaxForm(options);
  
});   
   $('#contactForm').submit(function() {
  
   //check it's working

   alert($('#contactForm :a').fieldValue());
  
   //$.blockUI( { backgroundColor: '#231b1a', color: '#ff', 
height:'100px', padding:'20px' ,width:'300px'} );
   //$.blockUI( 'table cellpadding=0 cellspacing=0 border=0 
width=280trtdimg src=/assets/images/4hp_load_logo_3_36.gif 
/\/tdtdPlase Wait...\/td\/tr\/table' );
  
   //$(this).ajaxSubmit(options);
  
   return false;
  
   });
  
  
   function contactCompleted(responseText, statusText){
  
   if(responseText == true){

   $('#contactForm').clearForm();
   //$.blockUI( 'table cellpadding=0 cellspacing=0 
border=0 width=280trtdimg 
src=/assets/images/4hp_load_logo_3_36.gif /\/tdtdThank you. We 
will be in contact soon.\/td\/tr\/table' );

   }else{
   //$.blockUI( 'table cellpadding=0 cellspacing=0 
border=0 width=280trtdimg 
src=/assets/images/4hp_load_logo_3_36.gif /\/tdtdThere is a 
problem with the server, please try to re-submit the 
form\/td\/tr\/table' );
  
   }


  
   var unblock = function(){

   $.unblockUI();
   }
  
   setTimeout(unblock, 1500);

   }




--
___
Timothy M Bowler BSc(Hons) MSc MIET | Technology Director


Or Media
Unit 5 Elm Court
156 -170 Bermondsey Street
London
SE1 3TQ

T: 020 7939 9540
F: 020 7939 9541

___ 

The information in this e-mail and any attachments is confidential and is intended solely for the addressee. 
The material may not be reproduced either in whole or in part without permission and may not be used or disclosed 
without permission. No copies of the entirety or part of the information set out in this email or any attachment 
may be made without our prior approval.  Any views or opinions presented are solely those of the author and do not 
necessarily represent those of Or Multimedia Limited.  If you are not the intended recipient of this email, please 
contact us at [EMAIL PROTECTED]


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jquery form plugin

2007-02-19 Thread Mike Alsup
  I am trying to get the value of a name field - below is part of the form
 and the JS

Tim,

First, don't use ajaxForm and ajaxSubmit together.  Pick one or the
other.  ajaxForm is almost always the best one to choose.

Try this:

html
head
script type=text/javascript src=jquery-1.1.1.js/script
script type=text/javascript src=jquery.form.js/script
script type=text/javascript

$(document).ready(function(){
var options = {
url: /contactusSubmit,
type: 'post',
beforeSubmit: validate,
success: contactCompleted
};

$('#contactForm').ajaxForm(options);
});

function validate(data, $form, opts) {
var name = $('#contactForm [EMAIL PROTECTED]').fieldValue();
alert(name);
if (!name) return false;
}

function contactCompleted(responseText, statusText){
// do stuff
}

/script
/head
body
form name=contactForm id=contactForm action= method=post
Your Namebr /
input type=text name=name /
/form
/body/html

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jquery form plugin

2007-02-19 Thread Timothy Bowler
Thank you very much Mike, ill try that later. One last thing, if i want 
the form to be submitted by an html link rather than a submit button how 
do i do that ?



Thanx in advanced

Tim

--
___
Timothy M Bowler BSc(Hons) MSc MIET | Technology Director


Or Media
Unit 5 Elm Court
156 -170 Bermondsey Street
London
SE1 3TQ

T: 020 7939 9540
F: 020 7939 9541

___ 

The information in this e-mail and any attachments is confidential and is intended solely for the addressee. 
The material may not be reproduced either in whole or in part without permission and may not be used or disclosed 
without permission. No copies of the entirety or part of the information set out in this email or any attachment 
may be made without our prior approval.  Any views or opinions presented are solely those of the author and do not 
necessarily represent those of Or Multimedia Limited.  If you are not the intended recipient of this email, please 
contact us at [EMAIL PROTECTED]


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jquery form plugin

2007-02-19 Thread Mike Alsup
  Thank you very much Mike, ill try that later. One last thing, if i want the
 form to be submitted by an html link rather than a submit button how do i do
 that ?

Tim,

That's a case when you would use ajaxSubmit instead of ajaxForm
because you want to submit the form in response to the anchor's click
event (instead of the form's submit event).

$('#myAnchor').click(function() {
('#myForm').ajaxSubmit();
return false;
});

In general, that's not a great idea because it won't degrade gracefully.

Mike

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jquery form plugin submitting 3 times

2007-02-07 Thread Ⓙⓐⓚⓔ

I hit your site with firefox 2 .. and I see 1 submit for each your turn
click.

But you have problems with the encoding!
(they’re
looks pretty bad!

On 2/7/07, Tom Shafer [EMAIL PROTECTED] wrote:


I am using the jquery form plugin and it seems to submit 3 times. I
have looked at the php code and it should be only submitting it once.
Here is the code

script type=text/javascript//![CDATA[
$('#formTurn').click(function() {
$('#TB_window #yourTurnForm').ajaxForm({
dataType:  'json',
target: '#TB_window #output',
success:   processyourTurnForm
});
});
function processyourTurnForm(data) {
$(#formTurn).fadeOut(fast)
$(data.message).appendTo(#TB_window #TB_output)
}

// ]]
/script
Here is the page it is running on. Click on the your turn link.

http://www.tjshafer.com/mytimes/

Thanks

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/