Hi All,
I got a form that when submit, I''d like to display a message
''please
wait'', and its content become blank to avoid user clicking gain, it
might take the server a little while to send back a response, so the
''please wait'' message will be replaced. I use following
approach, got
some problems:
1) when msg(m) is called, it displays the message, but the box size is
reduced, I''d like it maintains its original size, just like when we
post an email in gmail.
2) since myform was ''updated'' with the message, the form is
not
submitted
Any ideas? Thanks
function msg(m) {
$(''myform'').update( m );
}
<div id="myform">
<form>
... something more here
<input type="submit"
onclick="msg('Processing,
please wait')"/>
</form>
</div>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
<div id="myform">
<form>
... something more here
<input type="submit" onclick="msg(''Processing,
please wait'')"/>
</form>
</div>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
Here''s what I do:
$(''myform'').observe(''submit'',function(){ $
(''id_of_submit_button'').update(''Please
wait...'').disable();});
Puts it all in one place, and keeps the button from being click-able
any more, too.
Walter
On Mar 16, 2008, at 3:37 AM, Angelo Chen wrote:
>
> <div id="myform">
> <form>
> ... something more here
> <input type="submit" onclick="msg(''Processing,
please wait'')"/>
> </form>
> </div>
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---