Currently the javascript contains functions for a calendar app so users
do not have to insert the date manually
Here is some of the HTMl
<div>
<form name = "calendar1">
<input type = "text" name = "date1" id = "date1" value = "" size =25
readonly style = "border:0px;">
<A HREF = "#" onclick =
"cal.select(document.forms['calendar1'].date1,'anchor1','MM/dd/yyyy');return
false;" NAME = "anchor1" ID = "anchor1">select date</A>
</form>
</div>
The calendar app works fine, when I test it everything gets inserted
correctly into the entry field/input. Its trying to get the controller
to recognize the value of the input. Here is my controller.
def create
con = Mysql.new 'xx.xx.x.x','xxxx','xxxx', 'worksheet'
date1 = params[:date1]
rs = con.query 'INSERT INTO test VALUES ("'+date1.to_s+'")'
end
I know the method is called and everything is linked because the
database has new entries in it. However, I only see an empty string with
nothing in it.
--
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.