similar to: Easy RoR <-> Javascript syntax question

Displaying 20 results from an estimated 10000 matches similar to: "Easy RoR <-> Javascript syntax question"

2008 Dec 19
14
Can duplicate "back" browser function in Rails?
In Rails I have a DB Table index.html.erb view. It has 100''s of items. When I gen via scaffold I get index, show, edit, update, etc view. But when I page down several pages, use the "show" link and then the "back" link I do not go back to where I was on the index view. Instead, I go back to the TOP of the index not the place where I clicked on the "show"
2011 Jan 15
3
respond_with javascript
My ajax stopped working when I switched to using respond_with. For my Votes, I have the create action and the corresponding create.js.erb, and respond_to :html, :js, :xml in the controller. Heres the log when I try and create a vote: Started POST "/stories/3-asdfasdf1111/votes" for 127.0.0.1 at Fri Jan 14 20:46:36 -0800 2011 Processing by VotesController#create as */* Parameters:
2010 Aug 02
1
Drop down boxes from table data
Hi I have another question for how best to do this. Now I have been following the tutorial at: http://www.tunaslut.com/learning-ruby-drop-down-lists-in-one-to-many-relationships, however when I change the view over from <% @cities.each do |city| %> <tr> <td><%=h city.city_name %></td> <td><%=h city.country_id %></td> to: <%
2012 May 06
2
autocomplete word by word
Hi, I am trying to implement an autocomplete form with rails, I used jquery in a first version, to suggest phrases to user and it worked Now I am trying to have a service of autocomplete word by word, it means when the user it typing in the text area, I suggest only words and not phrases and when he finishes the word and starts a new one I do the same suggestion for the new word Is there a way to
2011 Jul 07
2
Rails 3.1 + jQuery + jQuery UI = data is null
Trying to get jQuery UI to work with my rails 3.1 setup, but i keep getting errors that i cant see posted anywhere, this is driving my insane so please have a look => [application.js] // This is a manifest file that''ll be compiled into including all the files listed below. // Add new JavaScript/Coffee code in separate files in this directory and they''ll automatically // be
2010 Sep 22
3
how to remote function to get info from url in a javascript function
hey all I am working with a javascript function called Elabel, part of the Google maps api the Elabel has a function called setContents(html) i need to be able to call this function and get new html for it. ( the html is a table that displays weather data) here is what i have so far function replace_weather_table(){ zoomy = map.getZoom(); weather_table_one.setContents(new
2006 Jun 07
9
Unobtrusive Javascript for Rails
I made a brief post on here the other day about this and now I can proudly present the initial release of our unobtrusive_javascript plugin for Rails. We''ll be working with Dan Webb of Vivabit to roll in much of the functionality in his own as-yet unreleased unobtrusive_javascript plugin into a single plugin. This is essentially a preview release and probably not suitable for use on a
2010 Sep 23
8
HowTo; Rails 3, having Tabs that load content via jQuery ... No Page Refesh
Hello, I''m interested in learning the correct/smart approach for implementing a web page with tabs and a content panel... When the tab is clicked by the user the tab''s content is fetched and inserted with jQuery... no page refresh... Example, Facebook, when you click Photos or Events, it doesn''t refresh the browser, just replaces the content with AJAX in the
2010 Jun 16
4
firebug jQuery undefined message in rails app
In rails app, I add the following line of code in application.js and I get jQuery is not defined in firebug console. In application.html.erb, I have the following: <script type="text/javascript" src="../javascripts/application.js"></script> <script type="text/javascript" src="../javascripts/jquery-1.4.2.js"></script> and I installed
2010 Oct 05
2
Is it possible to query on virtual attributes?
I have a Person model with attributes first_name and last_name. I want to implement autocomplete search that looks that the entire name. Hence I have a method: def full_name self.first_name + " " + self.last_name end Is it possible for me to query on full_name and have rails match the first_name and last_name fields? I currently receive this error when I try, because full_name
2010 Sep 15
5
Hide an image in show.html.erb
I have the following "show.html.erb" script, and I get as an output TWO images since I use a method to draw an image. How can I HIDE the RESOURCE image? Thanks. Here is the script: <canvas id="line" height="512" width="512"> </canvas> <p id="notice"><%= notice %></p> <p> <b> Name </b> <%=
2006 Apr 11
4
text_field_auto_complete not working in IE?
Hi all, I''m looking for some insight on why my text_field_with_auto_complete might not work in Internet Explorer. I''m using it in a fairly simple way, without much customization. I''ve broken it down and made a test page at http://realty.colemanation.org/houses/test which shows the behavior I''m having problems with. For me on Windows XP this page works
2011 Jan 10
8
Creating a Dynamic/Custom form
I am pretty new at rails and seem to be stuck on an issue. Trying to find a way to get me app admin to create a form on our rails app. These would include: - Select form control type - Select required validation - Select price change if selected How should I even start going at this? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"
2010 Aug 16
8
Executing js.erb file with :format =>'js'
Hi, I''m trying to get my javascript to execute after clicking a link on my page using :format => "js" here''s my link: <%= link_to image_tag("/images/icons/user_add.png"), add_contact_path(:profile_id => profile.id, :url => request.url, :format => "js"), :title => "Add person to your contacts"%> in my controller i have
2008 Mar 12
1
xapian and autocomplete?
Hi, does anybody know how to realise a autocomplete Searchinput like (for example) google? Thanks. Greetings. Sascha
2009 Dec 23
3
Help with Navigation
I''m currently using CSS to style my navigational menu. I also have jquery at my disposal. The basic structure is like this: <div id="nav"> <div class="inner-container"> <div id="wrap"> <div class="inner"> <h2> <span class="h-ico
2010 Sep 06
5
how to call rails method from javascript method.
hi I wanna call rails method from the javascript method. It should be ajax call for rails method. please help me. -- 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe
2012 Jun 28
2
Best practice on Javascript and rails
Hi, I get constantly nervy whenever trying to implement any javascript / jquery in rails, basically because I''m not sure where to put things in the project! I know the people at rails have thought long and hard about how to best structure an app, so I''d like to learn the correct way. I''m using rails 3.2, ruby 1.9.3 ///////////// 1st situation - using a gem to include
2012 Sep 20
7
jQueryUI autocomplete (Rails 3.1): can't get source as url to work
Hey, I''m able to duplicate everything in Ryan Bates'' screencast on jQueryUI autocomplete (#102<http://railscasts.com/episodes/102-auto-complete-association-revised>), except for the piece that calls the server for completion data. Here is my view html: <input data-autocomplete-source="/searches" id="search-markets"
2010 Dec 06
8
How to add facebook javascript sdk to rails app
Hey, i''m trying to add the facebook javascript SDK to my rails app. How do i do that in the application.html.erb file? -- 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To