[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

forms and extra actions

misiek

1/27/2006 9:35:00 PM

how to do a form only with RoR
I got
<%= form_remote_tag(:update => "update_div",
:url => { :action => :add_user, :controller => "user" } ) %>
<%= text_field("user", "name",:size => 20) %> fullname
<input type="submit" value="Add User">
</form>

but there is part of html code
=> <input type="submit" value="Add User">
=> </form>


I need to create only with ruby
and more qestion:
I need to do some extra action for example by pressing on Add User I
need to do :action => :add_user and also call some script with
javascript like onclick=""

it is possible ?

thanks for help
1 Answer

misiek

1/27/2006 9:59:00 PM

0

misiek wrote:
> how to do a form only with RoR
> I got
> <%= form_remote_tag(:update => "update_div",
> :url => { :action => :add_user, :controller => "user" } ) %>
> <%= text_field("user", "name",:size => 20) %> fullname
> <input type="submit" value="Add User">
> </form>
>
> but there is part of html code
> => <input type="submit" value="Add User">
> => </form>
>
>
> I need to create only with ruby
> and more qestion:
> I need to do some extra action for example by pressing on Add User I
> need to do :action => :add_user and also call some script with
> javascript like onclick=""
>
> it is possible ?
>
> thanks for help


ok I got that
<%= submit_tag("Save" , :onclick => " " )%>
but how to put the javascript function into onclick ?
I need to by pressing Save button call for example that =>

onclick="Effect.Fade('id',{duration:0.6});"