similar to: Get width of an element using javascript

Displaying 20 results from an estimated 3000 matches similar to: "Get width of an element using javascript"

2008 Jun 05
0
Javascript & Scrolling
I am currently in the middle of creating a horizontal scrolling product list with page buttons that use effects to scroll from one page to another using scriptaculous. I am having problem that when the window is resized, so only the viewable area of the div changes, this causes the width to change and then because of that the scroll effect will scroll to position 2000 but then when the scroll bar
2005 Dec 24
2
Ajax Help: Multiple Updates - ?
Hi! Wondering if anyone can tell me what''s wrong with my code? I''m trying to use the onChange event of a select list to update multiple divs... Agile Web Development with Rails (p. 403) suggests using ":complete => eval(request.responseText) instead of :update" I''ve attempted the following test code: # in the view <select name="plist",
2011 Mar 09
1
Javascript call from view.
Hello All, I am working on a Microblogging application.(majorly written in Ruby on Rails).(the application is similar to twitter) .There is a timeline showing messages by the logged-in user and his/her followers. Each message has a reply link which has been coded as follows <%=link_to "Reply" ,{},:href=>"#",:class => "replyMessage noBackgroundImage" ,:title
2006 Jun 23
0
Re:(RESOLVED, KIND OF) auto complete and after update element
Well, I did finally get the after_update_element to call my controller action with the following syntax: <%= text_field_with_auto_complete ( :customer, :company_name, { :size => "45" }, :after_update_element => "function(element,value){" + remote_function( :url => { :action => :get_customer_info }, :with =>
2006 Jan 21
3
Passing ruby variable via remote_function (JavaScript)
Hi, Brand new to this so please excuse anything obvious that I don''t yet get. Here''s what I''m trying to do (This is all in a .rhtml file): As a simple test I create a local variable called ''localVariable'' and give it the string "Hello" like this; <% $localVariable = ''Hello'' %> Next I want to call a function
2006 Mar 31
5
RoR 1.1 RJS problem
I''ve been playing with the new RJS stuff in RoR1.1, and I have to say that I''m am extremely impressed, NICE! work guys. However, I seem to be having a bit of a problem. I promise, I''ve googled the hell out of it and haven''t found an answer. Set up: Putting together a little proof of concept app. Display a form (index.rhtml) that just has a button to
2006 Jul 10
2
inline javascript in partials
When rendering the following partial, the <script> block isn''t getting rendered at all. Does rails strip this out or is it some limitation of the browser? <% remote_options = { :update => update, :with => "Form.serialize(''#{form}'')", :url => { :action => "process_multiple" } } %> <% do_before ||= nil %> <% click_fn =
2006 Jan 14
3
link_to_remote where the url contain a javascript variable
Ok, so I am basically trying to use ''link_to_remote'' and pass the value of a javascript variable as an argument. Something like that: link_to_remote "my_link", :update => ''my_div'', :url => { :action => "my_action", :var => ''my_var'' } Basically,
2007 Nov 22
0
wujinja@yahoo.com.tw
Welcome to the R-help@r-project.org mailing list! To post to this list, send your email to: r-help@r-project.org General information about the mailing list is at: https://stat.ethz.ch/mailman/listinfo/r-help If you ever want to unsubscribe or change your options (eg, switch to or from digest mode, change your password, etc.), visit your subscription page at:
2008 May 10
0
can javascript handle 422 response
I''m toggling a check box via ajax using: application_helper.rb: ............................................................... def toggle_value(object) remote_function(:url => url_for(object), :method => :put, :before => "Element.show(''spinner- #{object.id}'')", :complete
2008 Jun 30
1
javascript onclick for thumbnails
Hi, i was struggling for a function where only 1 thumbnail should be active and others inactive when clicked on the particular thumbnail. code: 1. view: 2. <script type="javascript"> 3. function PlayVideo_options(videoFile, id) { 4. document.getElementById(id).className = ''video_option active_video''; 5. } 6. </script> 7. 8.
2005 Oct 11
2
Pushing Javascript Helper to external file.
I have a table and when I mouseover a row I want a pop-up with some additional information for that specific row (called remotely). I can do this easily with something along the lines of... onmouseover="<%= remote_function(:updated => "notediv", :loading => " Element.show(''note'');", :url => {:action => ''get_note'', :id
2006 Jun 07
0
javascript that remote_function creates
I''m tring to use remote_function instead of writing all the javascript out, but am having difficulties.. I have this code in a layout: <body onload="<%= remote_function(:update => ''show_active'', :url => {:action => ''show_active_bugs''}, :complete => visual_effect(:blind_down, ''show_active'')) %>">
2006 May 26
0
I can not get any scriptaculous effects to finish with items visible
I''m sorry I can''t seem to get any of the scriptaculous effects to work correctly. I''ve searched on the web forum but found nothing relevant. The only time I get an HTML element to fade or shrink gracefully is when I use them as inline handlers and feed them ''this'' instead of the HTML element id. But I can not get anything to appear. Things disappear but
2006 Jun 13
1
Element.remove parent div
Hi all, Currently I am using Element.remove like so: <div class="blurb" id="drag_1"> <a onclick="Element.remove(''drag_1'');" class="remove"></a> </div> However I would like to just create a function since I''ll be removing multiple DIVs and updating the sortable order. I just can''t get some version
2011 Feb 02
0
Converting rails 2 to 3 remote_function error
I''m still very new to RoR and had built a site for a friend. I''m now trying to port it to version 3 and am having an issue with remote_function. Right now, in a layout file, I have an image_tag and for :onclick I am using the following: :onclick => remote_function(:url => { :controller => ''rcg'', :action => ''nav_click''}, :with
2005 Nov 29
0
Behaviour and scriptaculous
I have a <div> that I want to toggle its visibility. I have "hide" text which makes it hide an makes the text "show" visible. My problem is I don''t want the "hide" text to display if javascript is disabled. So it starts out as display:none. I can then make it visible by window.onload. The problem is when I use the onload handler then the text does
2006 May 31
1
Problem with combining rails helper and javascript
Hi! I''d like to make ajax request after effect fade finishes. There''s a callback in Effect class - afterFinish, but it requires the code to be in function() {*here*}. When i write :afterFinish => remote_function() it generates following javascript code: afterFinish: new Ajax.Updater() and i need: afterFinish: function() {new Ajax.Updater()} How can i do it? I need to
2006 Mar 22
1
Lightning Fast Javascript Auto complete
<%= javascript_tag("new AutoCompleter.Local(''search_start_station'',''start_station_auto_complete'', stations);") %> I have <%= javascript_include_tag :defaults %> in the head of my layout. But I always get an Error: "AutoCompleter is not defined". Im using Rails 1.0, so I should have the latest javascript files. The tag
2006 Feb 03
2
JavaScript Prototype Help?
I have a form with a text area. I want to have an observer watch the text area and update a div with the running count of characters in the text area. I tried "onchange" but that doesn''t update until you leave the text area. I was able to get it working using AJAX, but it''s silly to make a needless round trip to the server, when the page already knows