hi,
I have two button in my Rails page. one is submit and other is
delete.
for submit button, I use:
<%= submit_tag "submit" %>
In the case of delete button I place a ''onclick'' javascript
function to
call my ''set_value'' function,
<script language="javascript">
function sel_value(){
var command_del=confirm(''Really?'');
if(command_del==true){
var cell_no=document.forms[0].selcell_id.value;
//I want to open the ''delete_data.rhtml'' page here
where the
// controller name is ''data_trvs'' and action is
''delete_data''
// the have to send the value of cell_no in the controller to
query.
}
}
</script>
In that way I want to open delete_data.rhtml page and send the cell_no
variable in the ''delete_data'' controller method.
please help me in syntax of the code.
Amin
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---