similar to: Why won''t this work - simple helper text ??

Displaying 20 results from an estimated 9000 matches similar to: "Why won''t this work - simple helper text ??"

2005 Oct 17
11
a better question
I''m trying to call a click() event on an <a href> that has an Observable registered for it. Something like: <a href="#" id="toggle_1929">show</a> ... Event.observe("toggle_1929", ''click'', function(event){ Element.toggle ("group_1929"); return false; }); ... $("toggle_1929").click(); //this throws
2008 Mar 25
4
Prototype: toggle() not supported on TD in IE?
The following line causes trouble both with IE 6&7: cels[i].toggle(); It tells me that this element does not support the property or method. The element is a cell (TD) which I checked by outputting the tagName and it works with FF, Opera and Safari. The IE script debugger stops at this line but I didn''t find a single posting on the net with a similar problem which is kind of strange.
2006 Jun 20
4
AJAX effects make browser jump to top of page
I''ve been having this really annoying issue with any visual effect that I use in Rails. Say, for instance, that I have an Element.show or Element.hide link to expose a hidden div. Well, the effects work great, but if they are located far enough down on the page to necessitate scrolling, the effect makes the browser jump to the top of the page. This is basically the source output that
2006 Sep 14
10
scriptaculous Toggle Appear rate
I have the following code to toggle a basic appear of a div: <a href="#" onclick="Effect.toggle(''d3'',''appear''); return false;">Toggle appear</a> I want to edit the rate in which the effect runs. I can''t for the life of me figure it out. I would like to make the effect complete faster, like .5 seconds. I''ve
2009 Aug 11
5
Hiding views before using toggle
Hi, I want to hide some of my html in my view before toggling. In my css I tried setting the display:none; but then when I would run my toggle function it wouldn''t toggle. Is there an easy solution out there besides having to render javascript everytime to hide this html before toggling it? -- Posted via http://www.ruby-forum.com/.
2010 Aug 31
6
ajax and partials
Hello all, I am still very new to programming and wonder if I could get some help. I have tried to figure this out myself but still having trouble with some of the concepts. I’ll do my best to explain the problem and include the code. I may be completely off track, so ANY direction offered would be deeply appreciated. I have a question model / object which consists of a question, answers, and
2006 Feb 01
1
Combine Ajax call with an effect.
Hello list. I am a newbie with prototype, scriptaculous and with JS. Right now, I have a successful ajax call that appears in my div (thedescription) when I mouse over the link, and disappears when I click on the link. What I would like to have happen is to combine this with an effect (ie, onclick="new
2006 Jul 18
2
Turn element hidden by default (ajax question)
(this is my first post on the ruby forum. If this is not the right place for this type of question please let me know). Ajax question I have a checkbox that toggles the visibility of another element (a text field) with the code: --- <p><label for="checkbox">Appear!</label> <%= check_box :object_name, :method, :onClick =>
2006 Jul 19
2
Mouse Location
Is the only way to get the mouse location by using javascript? Or does rails do it for me?!? :) Does anyone have a simple script that they use? I''m trying to put a div right where the mouse is clicked on a link... so I''m looking for it to work like this: a hre f=. onclick=Element.setStyle(''title_login'', {left: MOUSEX,top: MOUSEY;});new
2006 Mar 18
3
Weird stylesheet_link_tag issue after moving servers
Dear experts, I am in the process of switching servers for my application. Before the move everything was working properly. After the move <%= stylesheet_link_tag ''/stylesheets/styles.css'' %> generates <link href="//stylesheets/styles.css" media="screen" rel="Stylesheet" type="text/css" />
2007 Jun 26
3
what is the :or parameter in a submit_tag ?
I read the following tag in teh Beast example <%= submit_tag''Login'', :or => link_to_function(''forgotten password'', "$(''reset-password'').toggle();") %> I understand the link_to_function, but what is this :or parameter used for ? the link doesn''t appear, so it cannot be used... thanks for your lights kad --
2010 Jul 06
4
how to make confirm boxes conditional?
Hi, I''d like to make the :confirm option in my link_to/button_to erb elements conditional. So, if the page is in some state, no confirmation is requested, but not otherwise, etc. So far, my only (ugly) approach is to replace the linker html itself depending on changes in state, but I believe there must be an easier way to ''toggle'' the confirmation option on/off. Can
2006 Apr 26
8
Newbie: Hide div I''ve just show using link_to_remote?
I''m using link_to_remote to show details for an item that''s clicked. I''d like to hide the div with the next click, or alternatively have a "Hide" link within my div. What is the best way to accomplish this? Here''s my existing code: <% for task in @mytasks %> <div class="rowFormat"> <%= link_to_remote(
2006 Aug 08
1
link_to_function
Hello I wonder why this happens: this: <%= link_to_function image_tag("chart_bar.png"), :onclick=>"new Effect.toggle(''bar-project#{project.id}'')" %> outputs this: a href="#" onclick="onclicknew Effect.toggle(''bar-project188''); return false;"><img alt="Chart_bar"
2008 Aug 20
1
Facebook javascript (FBJS) library
I wrote an fbjs library to help speed up development of some of my applications. I plan to have some sort of "official" release with a blog entry and github repository at some point, but I thought you guys might want to have it earlier. It''s still a work in progress. I''ve been using every method at least once in my application but it''s still possible there is
2005 Sep 21
9
Ajax.Updater
Hi all, I was wondering if one could pull a completely separate web site into a div, e.g. <a href="#" onclick="new Ajax.Updater(''artifact'', ''http://www.vivisimo.com/'', {asynchronous:true, evalScripts:true, onLoading:function(request){Toggle.display(''message2body'')}}); return false;">&raquo;</a> it fails
2006 Mar 28
2
JS Toggle graphics on action / click
I''ve got a simple toggle option (On/Off) in my admin GUI list action. I would like to click on this graphic and change the status of the option. I got the whole thing working in the controller & db through this beautiful one-liner @item = Item.find(params[:id]).toggle!(''display_status'') The thing I can''t achieve - even after several hours of labouring
2006 Mar 31
4
I feel stupid - help with Element.show
This isn''t Rails-specific, and I''m sorry for that, but I haven''t been able to get a response in the #prototype/#javascript/#ror channels, nor find anything via Google. I have a form element that I want to be hidden when the page first loads, and appear when a user clicks the link. Here''s the code: <div id=''signin-link''><%= link_to
2006 Feb 21
11
helper for models?
Is there such a thing? I have some duplicate methods in my models, can I place them somewhere and call them in to my models, thus keeping DRY? -- Posted via http://www.ruby-forum.com/.
2006 Apr 03
7
Javascript helpers not updating table row in IE6
Trying to replace a table row with an id using both RJS templates and normal link_to_remote :update. Neither work in IE6, fine in FF etc. If I use the same code but target a div with an ID it works. This is tricky as I have a table with edit buttons, when the button is pressed that row gets updated with a partial containing a form for update. I need this to work as II don''t fancy