You don't need prototype to do this. You can do it just by setting the
disabled property of the form elements.
document.Form1.Name.disabled=true ... or something like that.
You can do the same with the buttons.
If you want to hide something, put it in a div and use prototype to
hide it:
<div id='something'><input type-submit value=" save "></div>
then use: Element.hide('something')
On Apr 24, 4:29 am, cirpo <[EMAIL PROTECTED]> wrote:
> hi, i'm writing a web application for products insertion, the first
> field is the product name.
> When the product name is typed i check if it already exists with an
> ajax call.
> If it exist i new advice message is create.I would like also to
> disable the other form do fields or hide the submit button until
> the product name is valid .
> What i would like to know is the best, or more elegant way to do that.
>
> thanks.
>
> cirpo
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---