Displaying 20 results from an estimated 1000 matches similar to: "Accessing AJAX''ed elements via javascript"
2006 Mar 02
0
Help with this comparison and loop
I am sending this information:
<%= observe_field "resource_focus_id",
:frequency => 0.25,
:url => { :action => :add_sub_focus},
:with => "''focus_id=''+ value +
''&sf_id=#{@resource.sub_focus_id}''",
:update => "resource_sub_focus_id" %>
Which turns out to be:
2006 Mar 01
2
Help with Many-To-Many insert
I am having issues with a many-to-many table. The table relates
resources to standards, but in my resources table has one-to-many
relationships so those also appear in my many-to-many table. I am
trying to insert into the table via:
@resource.core_contents << CoreContent.find(params[:core_content_ids])
But I get this error:
Mysql::Error: Duplicate entry
2006 Apr 15
3
Multiple Paramters and observe_field :with
Hi All:
I have searched high and low with no success. Does anyone know of a way
to pass the values of more than one form field through the :with
parameter of observe_field?
Basically I have two fields on the form with number values. When the
user changes the value of one I would like to send the values of both
fields to the controller for calculations and return the result to the
user on
2006 Feb 13
0
(no subject)
If you''ve not bought the Agile Web Development book or the new Rails
Recipes book, you really should. A lot of the questions you''re asking
are in there along with a lot of really important concepts.
You need to look into observe_field which monitors a form field for
changes and then updates an element (usually a div with an id) with the
results from an AJAX call.
Then you
2006 Feb 17
4
Why doesn''t this work!
I have this in my controller...
@tech_standards = TechStandard.find_by_sql("SELECT * FROM tech_standards
WHERE subpoint <> 0")
Everything is fine except when I look at my view I still get supoints
that are 0. When I run this query in my query browser I don''t.
View:
<select name="resource[tech_standard]" id="tech_standard">
2006 Feb 21
7
Validation issues
I have a form. Everything submits into the database if I don''t have any
validation rules. When I put these rules:
validates_uniqueness_of :title, :message => "already exists in
database"
validates_presence_of :title
I get this error (which seems weird because I am not validating against
that):
You have a nil object when you didn''t expect it!
You
2006 Feb 21
4
Error, got String?
I am getting this error.
ActiveRecord::AssociationTypeMismatch in Resources#create
Focus expected, got String
I have a select menu named resource[focus]. My focus (belongs_to
:resources) table has a one-to-many relationship with the resources
(has_one :focus) table (A resource will have only one focus but one
focus will have many resources). I assume this error means that the
focus is
2006 Mar 04
7
Get ID after save
This is simple (I am sure) but how do you get the id of the inserted
element after the element has been save?
I thought it was something like this:
@product = Product.new(params[:product]
if @product.save
add_image(product.id, params["image"])
flash[:notice] = ''Product was successfully created.''
redirect_to :action => ''list_products''
end
2006 Mar 17
7
OT: Subversion folder cleanup
How do you clean up your app folder to place onto the server? I want to
get rid of all the .svn stuff.
Seth Buntin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060317/cc81d9f7/attachment.html
2006 Mar 16
3
ACLSystem and session variables
I am using the ACL System that is described on the Rails wiki and I have
a quick question. I want to set the "role" as a session variable so
that I can display certain navigation schemes and I was doing it like
this:
@session[:user][:role] = @user.roles
When I print out this variable I get:
#<Role:0x3262d80>
How can I turn this into a readable value? I tried .to_i
2006 Feb 10
3
RoR, Apache 2, FastCGI
I have everything working and I am really excited about learning Ruby
and Rails. But whenever I access my different defs in my controller it
takes ~ 5 seconds before they are returned. I am working locally so I
don''t know what the issue is.
System Details:
Windows XP
Apache 2.0.55
Ruby 1.8.2
Rails 1.0
Seth Buntin
Web Resources Coordinator
Kentucky Academy of Technology
2006 Feb 17
2
Helpers?
Would I use a helper for this situation?
I have a layout that is used over two controllers (admin and login).
Each controller has their own navigation. Can I do something like this?
<%= getNavigation("admin") %> or <%= getNavigation("login") %>
And return the navigation list depending on the string sent?
Seth Buntin
-------------- next part
2006 May 30
4
Hide parent element
I have some code that calls a partial to display one or more blocks
within a div tag. I want to have a close button (or cancel link) that
will fade that block but leave the others. Here is the code:
LINK:
<%= link_to_remote "Add Miscellaneous Link", :url => { :action =>
:add_iyc_link } %>
add_iyc_link.rjs:
page.insert_html :bottom, ''links'', :partial
2005 May 09
0
AW: CAPI on ptp with variable length digits inphonenumber: SOLUTION for EICON
the interesting fact is, it works. I dunno why. but it works :o
-----Urspr?ngliche Nachricht-----
Von: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] Im Auftrag von bladerunner
Gesendet: Freitag, 6. Mai 2005 15:56
An: Asterisk Users Mailing List - Non-Commercial Discussion
Betreff: Re: [Asterisk-Users] CAPI on ptp with variable length digits
2006 Feb 21
4
Select error
This code:
<p>
<label for="resource_type">Type</label><br/>
<%= select(:resource, :type, %w{ Web Data }, { :include_blank => true
}) %>
</p>
Produces this error:
TypeError in Resources#new
Showing app/views/resources/_form.rhtml where line #6 raised:
wrong argument type String (expected Module)
Extracted source (around line
2006 Feb 13
7
Concatenation
I have this:
<%= @tech_standard.category + " " + @tech_standard.point + "." +
@tech_standard.subpoint %>
I get this error:
cannot convert Fixnum into String
point and subpoint are number.
How do I concatenate those values?
Seth Buntin
Web Resources Coordinator
Kentucky Academy of Technology Education
Murray State University
--------------
2006 Feb 22
2
Select menu validation
Is there a trick to validating select menus? I have this rule:
validates_presence_of :title, :type
:title is a text box and validates correctly but :type doesn''t:
<p>
<label for="resource_type">Type</label><br/>
<select name="resource[type]" id="resource_type">
<option value=""
2006 Feb 28
1
Accessing form array when errors display
Is there a way to access (from JavaScript preferably) the form array of
the information sent when errors are display? I want to be able to find
out what values were selected on the form before errors.
Seth Buntin
Web Resources Coordinator
Kentucky Academy of Technology Education
Murray State University
On March 1, 2006, Murray State University will begin moving all of its
telephone
2006 Apr 10
2
Fix log files
What is the code I include in one of my files so that my log files are
easier to read? I am using Windows.
Thanks.
Seth
--
Posted via http://www.ruby-forum.com/.
2006 Feb 23
1
OT: Collaboa on Debian
I am running a subversion server (on Windows) but I would like to run
Collaboa. I am pretty familiar with the Linux world (not in a developer
sence) and I am having problems with installing the prereqs for
Collaboa. I have read the article "How to install Collaboa on Debian"
but it doesn''t seem to work for me. Has anyone gotten this working and
can help?
Seth Buntin
Web