hi,
i have a Project-Task model association. The Project: SHOW & EDIT list
the tasks…now:
i want to have a pop-up-window triggered in the edit view. the
pop-up-window should show a basic Task-NEW form, BUT with some
information about the Project, eg the title of the project. after
submitting i want to get the Project -EDIT View to be reloaded.
- i have the pop-up window:
<%=link_to_remote “Add Tasks”, :url => { :action => “open_new_window”,
:projectid=>@bol.id } %>
2)controller
def open_new_window
p “>>Open Window: #{params[:projectid]}”
render :update do |page|
page << “window.open(’/bol_lines/new’, ‘A Window’,
‘left=20,top=20,width=500,height=500,toolbar=1,resizable=0’ );”
end#end render page
end
- how do i get the projectid into the new pop-upwindow to to show the
title and ultimately into the db to store the right foreign-key?
thx
tom