search for: javascripthelp

Displaying 20 results from an estimated 29 matches for "javascripthelp".

Did you mean: javascripthelper
2006 May 19
1
how to access ActionView::Helpers::JavaScriptHelper::escape_javascript in a model (a newbie question)
Hi all, Please forgive me for this newbie question. But I really want to know how how to access ActionView::Helpers::JavaScriptHelper::escape_javascript method in a model. I can access this method in view, but when call it in the model, it ends up with undefined method. It seems to me they are in different scope. So what''s the best way to access view helper methods in model. -- Many thanks, Yi -------------- next...
2005 Jul 12
8
Tip Sheet for AJAX
Hi all, I''m making an Amy Hoy style tip sheet PDF for the Prototype and Scriptaculous AJAX stuff, to be used with Rails. Are there other resources you would suggest besides the websites themselves (the previous thread about Highlight reminded me of this)? Is there a particular focus that would be helpful for such a document? Preferred fonts or colors? I must say, once you get
2006 Mar 15
2
link_to_remote issue after upgrading to rails 1.0
...39;'s related to the upgrade as I noticed it broke when i moved a copy of my app to my server using rails 1.0. As soon as I upgraded the laptop from 0.13 to 1.0 the laptop also started behaving the same. The examples in the api docs at http://rubyonrails.org/api/classes/ActionView/Helpers/JavaScriptHelper.html#M000433 suggest this call is still valid and the parameter should be passed. Am I misunderstanding the docs? Or just plain doin something wrong? Cheers Dave Smylie
2005 Aug 17
5
asynchronous Ajax.Updater
I had one point in my project where I needed a synchronous Ajax call; in other words, I wanted the Ajax.Updater call to not return until the content of my page had been updated. However, I found that if you call Ajax.Updaterwith the {asynchronous: false} option, the onComplete() function would never be called and your content would not be updated. Was this the intended behavior? I added the
2006 Mar 29
4
Why doesn''t Rails 1.1 have all the Script.aculo.us 1.6 files?
Why aren''t builder.js, slider.js, and scriptaculous.js part of the Rails 1.1 javascripts? rab:javascripts $ pwd /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/html/javascripts rab:javascripts $ ls -l total 288 -rw-r--r-- 1 root wheel 148 Mar 28 08:56 application.js -rw-r--r-- 1 root wheel 28036 Mar 28 08:56 controls.js -rw-r--r-- 1 root wheel 23613 Mar 28 08:56 dragdrop.js
2005 Oct 11
5
show message while loading - ajax
Hello, Could anybody please tell me how I would show a message or an image while the ajax request gets processed? thank you in advance for your help. this is what I came up with but it doesn''t really work: function getHTML() { var url = "./scripts/rfiles.php"; var par = ""; var myAjax = new Ajax.Updater("fm-viewdetails", url, {method:
2005 Dec 30
11
Losing my mind with Ajax link_to_remote
I''m playing around with Rails, and I can''t get this to work. I just can''t seem to wrap my brain around it. I''m having some trouble doing an Ajax navigation column. Here''s what I have: view layout: <div id="navigation"> <%= render(:partial => "navigation", :collection => @categories) %> </div> My
2006 Feb 16
1
Draggable Window
Is there any component in rails that makes a draggable window? My current application needs to have windows containing controls that can be moved to new locations on the browser. Thanks Rob -- Posted via http://www.ruby-forum.com/.
2006 Feb 24
1
Form within table?
Ok, I figured out my problem (kind of) from "Help a n00b?" The problem was that (at least in Firefox) you can''t have a form within a table, it has to be the other way around. Once I put the form on the outside everything started to work. w00t! -- David Olbersen dave@toasterwaffles.com
2006 Jan 12
0
testing
I''m looking for a good way to make all of Rails'' inbuilt helpers available to my custom Helper while I''m testing it. The Helper I''m testing is EditorHelper. EditorHelper itself relies on some of Rails'' inbuilt Helpers, such as JavaScriptHelper and UrlHelper. These are automagically available when called on within an ERB template, but not when called by my EditorHelper inside a unit Test. I can manually include each of the required Helpers in my editor_helper_test file: ... require ''action_view/helpers/url_helper'' mo...
2006 Jan 13
0
testing Helpers
...;'testing'')] I''m looking for a good way to make all of Rails'' inbuilt helpers available to my custom Helper while I''m testing it. The Helper I''m testing is EditorHelper. EditorHelper itself relies on some of Rails'' inbuilt Helpers, such as JavaScriptHelper and UrlHelper. These are automagically available when called on within an ERB template, but not when called by my EditorHelper inside a unit Test. I can manually include each of the required Helpers in my editor_helper_test file: ... require ''action_view/helpers/url_helper'' mo...
2006 Jan 14
2
link_to_remote and an id that points to a text_field
Hi! I''m having trouble with the following thing: I have a view with a text_field. What I want is to call a remote method with the value of the text_field as the :id I supply to link_to_remote. How do I do this? It''s about an empty form, so the text_field doesn''t have a value when the page is loaded. Grtz, Wouter -- Posted via http://www.ruby-forum.com/.
2006 Nov 04
0
testing actionpack (for patch)
...39;'ve read the file on running tests for actionpack (I''m working on a patch), but I''m getting this error... ./test/controller/../../lib/../../activesupport/lib/active_support/dependencies.rb:240:in `load_missing_constant'': uninitialized constant ActionView::Helpers::JavaScriptHelper::PrototypeHelper (NameError) I''ve tried... rake test_action_pack rake test and ruby test/templates/date_helper_test.rb (the file that my tests need to go in) How do I resolve this missing constant problem? Thanks, Andrew
2006 Oct 23
0
Using ActiveSupport::JSON in PrototypeHelper, ScriptaculousHelper
...et: http://dev.rubyonrails.org/ticket/6265 and it got me thinking: is there any reason we''re not using the tasty ActiveSupport::JSON encoder to assemble options for the various helper methods in PrototypeHelper and ScriptaculousHelper? At the moment, they use options_for_javascript() in JavaScriptHelper, which is a half-hearted JSON generator that doesn''t handle strings vs. literals very well, let alone nested hashes, arrays, etc. The result is a bunch of scattered JSON-generating code in the individual helper methods (e.g. visual_effect()). It would seem logical to make use of ActiveS...
2005 Sep 14
1
Question on selection box
Sorry if this message appears twice, I sent one last night but it didn''t show up. I remember in excel something like this can happen, there is a job no. and job title, I assume they are under one table, and in a selection form, if one select a job no., let say, 11111, the other side will automatically show up the title of the job , is there a easy way to do this in rail also? Thank
2005 Oct 22
1
basic subscribe-unsubscrube button
(beginners question) I couldn''t find this on the site/email archive. I want to do a basic ajax subscribe-unsubscribe button. Any links/hints to get me started? Thanks, Peter
2006 Mar 24
2
ajax redirection
Hi, Is there a simple way to redirect towards another page (controller, action) when using form_remote_tag ? I used it tipically to check fields of a account login form. I''d like if the user exists, he''s redirected towards another page, otherwise I display some error div''s. Any ideas ? Thanks a lot. Seb
2006 Feb 17
4
Best practice for showing errors AND updating list
Morning/Afternoon/Evening All, This is my first post to the ruby message board so if my request is better suited to another location just let me know, The problem I keep coming up against is with a listing of objects and updating that list via AJAX (for arguments we are talking about a list of users). As it stands I can currently submit a form, and update the list (using :update
2006 Jun 15
1
UI Libraries/Frameworks + Rails
For discussion... I was talking about with a colleague the other day, the single biggest problem with replacing traditional client/server apps, is the lack of a unified front end UI library. Rails is absolutely fantastic and a breath of fresh air, for doing back end work and AJAX. RJS rocks for transforming HTML elements, but one of the big stumbling blocks will be how do I simply, drop a
2006 Jan 04
4
HOWTO: Render partial in div
Hey- I''m using ROR 1.0 and script.aculo.us 1.5.1. I''ve been trying unsuccessfully to render a partial in a DIV, but can''t seem to get the right combination of stuff to make it work. There seems to be a few different ways of going about it. Right now I can render a partial. What do I need to to render the partial in a div? Here is what it looks like so far: #