so I have datepicker working just fine in a normal window but I cannot
for the life of me get it to work within a dialog.
I have some javascript that opens a dialog in my application.js file
as well as the datepicker js
is as follows:
$(function() {
$("#version_release_date").datepicker({dateFormat:
''yy-mm-dd''});
});
$(document).ready(function() {
$(''a.popup'').click(function() {
$(''<div
/>'').appendTo(''body'').load($(this).attr(''href'')
+ ''
form'').dialog({
title: $(this).text()
}
});
return false;
});
});
now the first function works fine if I just go straight to that page
but if the page is rendered via the second function in a dialog the
datepicker no longer appears.
this is where the dialog is created:
<%= link_to ''Close Escalation'', new_version_path, :class
=> ''popup'' %>
these are my includes
<%= stylesheet_link_tag "http://ajax.googleapis.com/ajax/libs/
jqueryui/1.7.2/themes/redmond/jquery-ui.css", "application" %>
<%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/
jquery/1.4.2/jquery.min.js", "http://ajax.googleapis.com/ajax/libs/
jqueryui/1.8.1/jquery-ui.min.js", "application" %>
<%= javascript_include_tag "jquery.rails.js" %>
any help is appreciated. basically from what I can tell I can''t get
any javascript to work in the dialog.
I even tried adding the script to the page but that didn''t work
either.
Thanks,
Dal
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.