[jQuery] Send a file, receive data and populate form

2009-02-19 Thread guix69

Hello,

I need to build a page with a form to send a file to a server and take
the (XML) data sent back from this server and dispatch them to several
form fields.
How can I do that with jQuery and its Ajax functions ?

Thanks a lot
G.


[jQuery] Possible to update form inputs after ajax request ?

2009-02-16 Thread guix69

Hello,

I know that thanks to jQuery's ajax functions it's possible to modify
part of a webpage after an ajax request. But is it possible to change
the text inside the input elements of a form after a request ?
What I need to do is the following :
- I have 2 forms on a page. One to send a file and one with data
inputs
- A file is sent to a server to be processed and XML is sent back from
the server
- I need this XML data to be distributed to several fields of the main
form.

How can I do this last part ? (I hope I'm clear enough   ;) )

Thanks for your advice
G.


[jQuery] Re: fadeout a div after a few seconds

2007-11-27 Thread guix69

I had tried that also, somewhere around my second post:)
But it doesn't fade out my pdresult DIV.


[jQuery] Re: fadeout a div after a few seconds

2007-11-27 Thread guix69

Almost found the solution...
You were right about the use of success: fadeOutResponse.
I had tried success: fadeOutResponse() and believe it or not it
doesn't produce
the same result !
I don't know why but when I use success: fadeOutResponse() the
function is
executed as soon as I load the page. (Without the () it works and the
function
is executed when the form is submitted succesfully).
BUT this means that I cannot make this fadeOutResponse function work
for
any div I would like to hide. fadeOutResponse(#anyelement) is executed
when
the page is loaded.

I would obviously like to avoid having one function per div I have to
hide so do you
think there is a solution ?

Thanks.


[jQuery] Re: fadeout a div after a few seconds

2007-11-24 Thread guix69

Thank you for your detailed answer which fits what I had understood
from the documentation.

So the #pdresult div is updated with
div id=pdresult1Your personal details have been saved/div

and I use
var pdoptions = { target: '#pdresult', success:function(response)
{ setTimeout(function(){ $('#pdresult div').fadeOut('slow'); },
2000);
}};
(also tried $(#pdresult1).fadeOut('slow');)

but the div pdresult1 doesn't get faded out. What am I missing ?
Thanks


[jQuery] Re: fadeout a div after a few seconds

2007-11-23 Thread guix69

Thanks for your reply but it doesn't work.
I'm using the form plugin with its ajaxForm method so I have these
options :
var pdoptions = { target: '#pdresult', success:
hidediv('pdresult')};
and I bind them to the form with :
$('#pdform').ajaxForm(pdoptions);

the hidediv function contains the code you gave me :
function hidediv(name) {
setTimeout(function(){ $('#'+name).fadeOut('slow'); }, 2000);
};

But with all that, the hidediv function is executed as soon as I load
the page with the form
and I can see my empty 'pdresult' div disappear...

So, to sum things up, I would say that I need the CONTENT of the div
to be faded out a few seconds
AFTER the form has been succesfully submitted  :)

Thanks again.


[jQuery] Re: How to concatenate all the OPTIONs of a SELECT to a text field ?

2007-11-22 Thread guix69

Great !  Thanks !:D


[jQuery] fadeout a div after a few seconds

2007-11-22 Thread guix69

Hello all !

I have a DIV which I update after an ajax form submit (form plugin).
This DIV is filled with a message like Your details have been saved.
I would like to fade out the text in this DIV after a few seconds.
How can I do that ?

Thanks !
G.


[jQuery] Re: How to concatenate all the OPTIONs of a SELECT to a text field ?

2007-11-21 Thread guix69

My select looks like this :

select multiple= size=6 name=locations[] id=locations
option value=parisparis/option
option value=londonlondon/option
option value=madridmadrid/option
/select

I would like to have this in the textfield
paris;london;madrid
or even
;paris;london;madrid
since it would be easier  :)

The goal is to have one variable with all the options of my SELECT so
that I can pass the
values to a php script... Maybe someone has a better idea...


[jQuery] Re: How to concatenate all the OPTIONs of a SELECT to a text field ?

2007-11-21 Thread guix69

Thanks for your reply !
But firebug says join is not a function..what the...


[jQuery] Re: fadeout response div after form submission

2007-11-13 Thread guix69

Juste adding some info:)

I also use the Validate plugin to validate the form before submission.
$(#pdform).validate({
  event: blur,
  debug : true,
  rules: {
  },
  messages: {
  }
});



[jQuery] Re: fadeout response div after form submission

2007-11-13 Thread guix69

Partially replying to myself :
I now use this success: cachepd() inside pdoptions and cachepd is this
simple function :
function cachepd() {
  $('#pdresult').fadeOut(5000);
};

But it seems like fadeOut deletes the div from the DOM because it's
not updated anymore
if I submit the form again...



[jQuery] Re: fadeout response div after form submission

2007-11-13 Thread guix69

another weird thing is that the cachepd function is executed as soon
as the page loads
so the #pdresult div gets hidden after 5 seconds... why is that ?   :)