search for: edwardfrederick

Displaying 10 results from an estimated 10 matches for "edwardfrederick".

2006 Apr 10
3
form_remote_tag : additional onsubmit funct. possible ?
Is there a way to add onsubmit functionality to a form_remote_tag with an additional javascript directive? eg I''d like for an inline javascript to make the form''s div container hidden as soon as the button is pressed to avoid having it possibly get pressed again ( sometimes the rails response is slow enough for a user to think they need to re-press it ). example: <div
2006 Apr 19
4
RJS replace_html auto-closing tags
I''m using the following RJS template to spit out a div containing a list of projects: page.replace_html ''results'', ''<div>'' @projects.each do |p| page.insert_html :bottom, ''results'', p.name + "<br/>" end page.insert_html :bottom, ''searchresults'', ''</div>'' page.show
2006 Apr 10
2
RJS newbie - need help with iterating / existence test
Greetings! I''m new to Ajax and am trying to get a basic app working as a vehicle for learning it. The app is an extension of the cookbook tutorial. My intent is to be able to add a list of ingredients for a recipe. The page to add ingredients uses Ajax. As ingredients are added to the page they''re displayed in a "green-bar" format like that used in the Depot
2006 Apr 07
2
page.replace_html "#{var_containing_id_name}", :partial => ''edit''
The subject line says it all. -- Is there a way to do something like: page.replace_html "#{var_containing_id_name}", :partial => ''edit'' That line of code does not work, but I would like to pass the name of a variable to page.replace_html. This variable would contain the id of the div I want to update. Anyone know if/how I could do that? Thanks! : ) Jason
2006 Apr 08
2
Multiple submit buttons
Hi, How do i differentiate different submits tags / buttons on one form. Say I want to create an edit form and I want to provide two buttons; one to save and one to cancel. I would have: <%= submit_tag ''Ok'' %> <%= submit_tag ''Cancel'' %> How do I know which button get pressed by the user? One more thing, how to specify the default selection in a
2006 Apr 10
1
column.name question....
rHTML is <% for column in Wizard.content_columns %> <p> <%=h @wizard.send(column.name) %> </p> <% end %> It outputs: Robs Site Heading logo.jpeg London ------ Bascally 1 line for each column in the database. How do I edit the rhtml so I can break up the output? For instance JUST have ''Robs Site'' display nothing else. That mysql column is
2006 Apr 07
3
RJS removing content of div, but not div itself
Hi, I''m creating a list of ingredients on a page. When the user clicks the ''Add Ingredient'' button a record gets added to the db and the ingredient gets added to the page. On the page, each record is represented by a <div> with three <span>s inside. One of the <span>s has a link_to_remote to ''delete'' the ingredient. When the link
2006 Apr 08
1
How To ??? change class of DIV
I''m trying to replicate the "green-bar" effect used in the Depot app using Ajax. And I''m almost there ;-) I''m about to set off on the last stage and would appreciate any advice that would set me off in the right direction. On the page, each record is represented by a <div>. Each <div> has id = "item#{record.id}" with class = either
2006 Apr 10
3
preloading child rows just a level deeper...
hiho. following problem. i have 3 tables in my database with each representing an object. lets say A belongs_to B belongs_to C. when i do my_a = A.find(:all) i can access B as my_a.b and C as my_a.b.c thats fine but rails querys the database each time i do that so is use my_a = A.find(:all, :include => :b) works fine for my_a.b but not for my_a.b.c so i tried my_a = A.find(:all, :include
2006 Apr 10
4
has render_component changed?
I have an application that worked fine, but after the recent updates has broken in some calls to render_component from views. I might be missing something but as far as I remember Rails updates is the only thing I''ve done in between. See the log: *** START LOG SNIPPET Start rendering component ({:params=> {:center_id=>10, :id=>25},