similar to: Extracting the current value of a DOM element

Displaying 20 results from an estimated 2000 matches similar to: "Extracting the current value of a DOM element"

2006 Jan 06
12
Auto refreshing a page based on select change
Hi all, I have a select helper form on a web page which contains a list of dates. When the user selects a date, one of the other forms on the page needs to be updated based on the newly selected date. Is there a way to catch this event in Rails? Are we talking Ajax here? Or is there a simpler way? Thanks, Dan
2006 Jul 02
6
remote form w/ evalScripts:true
Hello. I want to select an item from a select list and have that result in an ajax call that updates two sections on the page. Here is the code in the controller def create ... render :update do |page| page.replace_html ''list_items'', :partial => ''lists/list_items'' page.replace_html ''add_item'', :partial =>
2007 Jan 25
2
React on select_tag (onchange)
Hi, I''m new in developint rails (but I love rails). I would like to react on changing a field in the view (no model field) from a selection box to show the number of rows (which I used in the controller). In the controller I read the params-hash: ... @rowsperpage = params[''rowsperpage''].to_i ... In the view I have the field, where I like to react directly. ...
2008 Apr 24
2
select_tag and link_to
Does ROR allow passing the chosen value from a drop down using select_tag into link_to ? Basically I want to do something like: <%= select_tag( "name", options_for_select(%w{John Doe Jane })) %> <%= link_to "Delete", { :controller => "myname", :action => "add", :id => name },
2006 Aug 16
1
how to update a collection_select from another
I have two collection_select in my list.rhtml: <%= collection_select (:region, :id, @regionall, :id, :title,html_options={:onChange => "new Ajax.Updater(''related_provinces'',''/categories/related_provinces/" + "?id=''+this[this.selectedIndex].value, {asynchronous:true, evalScripts:true});"}) %><br> <%= render :partial =>
2008 May 08
2
DOM builder and HTML events
Hey guys, My team is have an issue using the Prototype DOM builder. For some reason, the onchange event isn''t being registered for an input box. $(''targetDiv'').update(new Element(''input'',{type:''text'', id:''blah'', onchange:''alert();''})); When we insert via the .innerHTML parameter, it works just
2007 Aug 25
2
insert HTML <select> value into a textarea - Works in IE6, not in FireFox or Opera
I have a simple form at http://mstramba.com/fb5.html It''s just a <select> and a textarea. The idea is to be able to either type into a text area directly or choose from a list of saved words in the select box. When a new choice is made from the select, it automatically gets inserted into the text area. This code DOES work in I.E6 (on my machine (XP pro), but doesn''t
2006 Jun 10
3
Agile Web Development p.89
I''ve been following along just fine with the depot app, up until I make the catalog, where, when the price is displayed with formatting, the price shows up underneath the <div> bar for the next item in the catalog. If, in index.rhtml, I change the <span class="price"> to just <span>, or equivalently, remove the entire <span...> tag, it works just
2006 Jun 08
1
built-in dropdown jumps?
Hey everybody! I was just wondering if Rails'' javascript library includes something as simple as making a dropdown that jumps to the link when selected without needing a "submit" button. I see a bunch of AJAX effects and draggable-element stuff, but all i need is a simple dropdown... should I code it myself? -- Posted via http://www.ruby-forum.com/.
2007 Feb 21
8
Element.addMethods() is not a function after upgrade to 1.7.0
After upgrading to prototype 1.5.0 and scriptaculous 1.7.0 my autocompleter.local died... firebug reports that effects.js is to blame calling Element.addMethods(); I can not find out why cause as far as I can see it does exist in prototype.js. Any pointers anyone :( --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups
2007 Nov 04
2
Extending DOM elements addressed by "this"
I have a function that needs to be attached to a bunch of text fields when the page loads. I would like to use the Prototype methods that are added to DOM elements by using the $() function, but I in the function it refers to things with "this". For example, this.style.borderColor. Is there a way to extend elements from the kind of scope I am looking at? For example, is there a way to
2009 Jan 08
4
Problem with disable_with
Hi Group, I have a registration.html.erb page with the following JavaScript at the top which I use to validate form fields: <script type="text/javascript"> <!-- function validate(){ if ((document.myForm.email_projectname.value=="")|| (document.myForm.email_projecttype_id.selectedIndex<1)|| (document.myForm.email_region_id.selectedIndex<1)) { alert
2006 May 20
3
in_place_editor and no access to value
I have the following in my rhtml and I get an error that ''value'' does not exist. This looks like the examples that I have seen so I am not sure what I am doing wrong. If I take off the :with part, I get a value parameter passed to my controller, but then I can''t figure out how to get the country id passed like I need to. <%= in_place_editor
2001 Sep 26
2
comments+tags CD data
Hi, I was wondering if there is a standised way of recording the CDDA database number (the information stored on a CD to help look up the CDs details on the net)in the tags? -- Jon Brightwell <jon.brightwell@atd.co.uk> Baby Code Monkey '"Be excellent to each other." - Bill S. Preston, Esq., & "Ted" Theodore Logan' --- >8 ---- List archives:
2006 Feb 09
5
Ajax.Updater not populating element - please help
Hello everyone, This is related to my post a few days ago regarding multi select lists. I''ve rewritten the code and now can''t seem to get the Ajax.Updater in getModels() to "execute", and the element never gets populated. I know it''s something obvious and hope someone could point it out to me. Thanks for any help. Here''s my code: <script
2007 Mar 26
1
Handling Multiple Select Lists
Hi All, After much searching and head scratching I post you this! I can''t seem to find a generic way to handle multiple select data. The function I use to receive form values will only pass the first selected value from a multiple select. I have pasted part of the form and the function below. Thanks for any pointers, Vince // Example selectbox <select
2005 Oct 01
8
Ajax.InPlaceEditor on Safari & Firefox
Hi, I''ve downloaded the latest svn trunk and was glad to see that Ajax.InPlaceEditor forms can now be correctly submitted on Safari as well, with the server response being correctly displayed as well. The problem is, however, that clicking again on the same element (after sumbitting it first) will duplicate the submit form. The next attempt will triplicate it etc, etc... Could
2012 Apr 24
2
Use quotes on a FOR LOOP R
Hello All! I need some help to get a FOR LOOP to print the interactor with the quotation mark. Let me be more specific: I have the following: cbind("Michael","Dana","Rob")->LIST outcome: [,1] [,2] [,3] [1,] "Michael" "Dana" "Rob" UNFORTUNATELY, I need to do the following: as.data.frame.list(LIST)->LIST2 rm(LIST)
2006 Mar 07
6
how to add onchange javascript event to select field
I would like to add javascript ''onChange'' event handling for a select field, such as <%= collection_select("job", "client_id" , @clients, "id", "name") %> with onChange="xxx" Anyone know how to make this work? Thank you, Scott -- Posted via http://www.ruby-forum.com/.
2006 Feb 07
1
onHover: can u explain me this function ?
In Sortables, we have a function onHover: onHover: function(element, dropon, overlap) { if(overlap>0.5) { Sortable.mark(dropon, ''before''); if(dropon.previousSibling != element) { var oldParentNode = element.parentNode; element.style.visibility = "hidden"; // fix gecko rendering