chetang / calendardateselect

Automatically exported from code.google.com/p/calendardateselect
Other
0 stars 0 forks source link

onchange this.form.submit loose ajax functionallity #145

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. <%= calendar_date_select_tag "cal_nav_date", "", :hidden => true,
:onchange => "this.form.submit()"%>
2. selecting a date from the popup calendar
3. using a regular submit button works

What is the expected output? What do you see instead?
the onchange event should act as if the submit came from a submit button
instead of submitting remotely (form_remote_tag) it doesnt event submit it
just put the url to the form action and then it complains it can't find the
view, when there is no view only an rjs that load a partial

What version of the product are you using? On what operating system?
Rails 2.2 RC 1
OSX 10.5.5

here's my code:
<% form_remote_tag :url => {:action => "calendar_popup_selected"}, :html
=>  {:id => 'cal_select'} do %>
    <%= calendar_date_select_tag "cal_nav_date", "", :hidden => true,
:onchange => "this.form.submit()"%>
    <% end %>

please help me get it to work, i've been googling for 3 hours

Please provide any additional information below.

Original issue reported on code.google.com by Ami.mahl...@gmail.com on 23 Nov 2008 at 8:26

GoogleCodeExporter commented 8 years ago
Please use the mailing list

Original comment by timchar...@gmail.com on 23 Nov 2008 at 9:04