similar to: obtaining table cell text data

Displaying 20 results from an estimated 500 matches similar to: "obtaining table cell text data"

2006 Mar 17
10
good javascript xml parser
Anyone know of a javascript function that will take an xml document and turn it into an associative array? Basically it would take something like this: <body> <item> <id>1</id> <name>Bob</name> </item> <item> <id>2</id> <name>John</name> </item> </body> And turn it into something like this: {
2006 Mar 17
6
Updated the xml code to be more object-oriented
I changed the code to be more prototype-esque, and created a class called XMLDoc. I may add more functionality to it later, hence the more generic name, but you do something like this to convert XML to a hash: XMLDoc = Class.create(); Object.extend(XMLDoc.prototype, { initialize: function (xmlDoc) { this.element = xmlDoc; }, asHash: function () { if (! this._xmlHash) {
2007 Dec 21
5
dom movement methods, unattached objects
Hey guys I have a bunch of element fragments (ie this might be a div, with children of an image, another div) etc which aren''t attached to the document yet.. and can''t seem to call the dom manipulation methods on them: down(''img.icon'') returns undefined but if I look at the innerHTML of the element, there is clearly an image there with that class. Is this is
2006 Mar 19
2
Multiple polymorphic belongs_to declarations
I have the following models: class Card < ActiveRecord::Base belongs_to :deck belongs_to :front, :polymorphic => true belongs_to :back, :polymorphic => true end class TextContent < ActiveRecord::Base has_one :card, :as => :front has_one :card, :as => :back end The conflicting has_one declarations don''t work. What I need is
2005 Sep 27
8
prototype.js
Hi *, We don''t know if you guys are the right audience, but we got a problem with prototype.js we need to solve. Essentially, it is a compatibility bug with the IE. We wrote a component so it updates itself periodically using AJAX. we used the prototype.js to accomplish this (using the periodicalUpdater object). now the component works fine using firefox or opera, but NOT with IE. the
2007 Oct 18
4
Polymorphic Association?
Hi there- I''m a newbie to this board, RoR, and web development in general. So please forgive me if this is in the wrong place or if the solution is really simple... I''m trying to conceptualize the relationships between a series of models for a page creation function. What I''d like is to have a Content Page which consists of a series of Content Blocks. The Content
2006 May 19
6
Multiple dynamic Sortables
I''m writing an appliation that contains several dynamically created lists. I had hoped that the following method for using the Sortable library from scriptaculous would work: 1) create the list 2) create a Sortable for it 3) create another list 4) create a Sortable for it and so on. Unfortunately this doesn''t work. I can''t find any info in the documentation for
2006 Mar 23
4
XML parser fixed
Hi, I changed the XML parser who have been write by Greg (Gregory Hill) and changed some things. It did not work in IE and Safari and opera. I fixed some bugs. Now it works fine in IE, Safari, Firefox and Opera. /* --------------------------------------- */ XMLParser = Class.create(); Object.extend(XMLParser.prototype, { initialize: function (XMLFile, options) {
2009 Jul 20
9
Upgrade server to run on Rails 2.3.2/F11
Note that one of the 8 patches (#6) will be sent separately in reply to this email, as some of the replaced lines are too long, so git won't let me send the email. However, there is nothing wrong with that patch, and it should be applied in the sequence listed below. Note also that I assume this will be tested on a clean f11 install, rather than an upgrade of an existing ovirt server
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
2006 Feb 07
2
Question about Classes.
I have the attached class that I''m writing. The problem that I''m running into is that I can not access the options from the createArray function which get called after the ajax request gets done. I want to move the values of the xml file to an array and story it in the options variable. Can someone explain what I''m doing wrong? var LeaderInfo = Class.create();
2008 Jun 19
7
getDimensions() fails for elements with ancestors with display: none
Prototype v1.6.0.2 If any of an element''s ancestors are hidden, Element.getDimensions() returns misleading values. In order to address this in my own project, I made the following modification: getDimensions: function(element) { element = $(element); var display = element.getStyle(''display''); + var hiddenAncestor = element.ancestors().any(function(e) {
2008 May 30
7
Styling an Anchor Tag With Prototype
I have a question: How do you style the various components of the anchor tag? I am doing it this way: $$(''a:link,a:visited'').each(function(link){ //links link.setStyle({ color: ''#''+$F(''cp4_Hex'') }); }); $$(''a:hover'').each(function(link){ //links link.setStyle({ color: ''#''+$F(''cp5_Hex'')
2008 Feb 18
6
inheriting static/class methods with new prototype.js class creation
Hey all. I want something like this to work: var Foo = Class.create(); Foo.myStaticMethod = function(){alert("I''m a static method!")}; Foo.myStaticMethod(); // works var f = new Foo(); f.myStaticMethod(); // doesn''t work, but that''s good--I don''t want it to var Bar = Class.create(Foo); Bar.myStaticMethod(); // doesn''t work, undefined :(
2006 Jan 24
8
scriptaculous sortable
Hi, maybe I am using this the wrong way but I have a list as follows <ul id="secondlist"> <li>bla bla</li> <li> bla bla </li> </ul> and then I add dynamically further <li> elements and create a Sortable but the onUpdate only fires for <li> items that have not been created via Javascript. Any clues? <script
2008 Apr 24
4
Scriptaculous Help (page exit effects)
I was wondering if it was possible in Prototype/Scriptaculous to run an effect when a link is clicked, then go to that page, or if it was possible to have an effect run when the page unloads. I have tried <body onunload="new Effect.Fade("whatever");> and some prototype page exit events, could get a alert("") function to work, but not the effects. Any ideas?
2007 Dec 08
2
Assigning submit handler to form
Hi folks, A quick question for somebody. I''m adding a simple validation JS to my form by attaching it like so: $(''my_form'').observe(''submit'', function(e) { return view_ns.validate_form(Event.element(e)); }); The validate_form() function returns true or false. But regardless of it''s return value, the form is always submitted. ''sup wi
2006 Jun 27
14
iframe ... does it have an innerHTML ?
If I dynamically create a hidden iframe, how could I add a document in a string to that element? e.g., var sDocument = ''<html><head></head><body>Hello world.</body></html>''; I''ve tried several variations of appendChild, innerHTML, document.innerHTML, createTextNode. Argh! _______________________________________________
2008 May 24
5
TypeError : transport.responseText has no properties
Hello all, I''m using prototype in conjunction with Extjs to build out an Ajax- driven app. I''m noticing that occasionally there will be Ajax Requests that will occasionally not complete. After some investigation, I found that when I made a call to String#evalJSON, it would throw a TypeError with the following message : transport.responseText has no properties. When this
2008 May 01
3
Adding script line give errors Help!
I am trying to add this script <script language="javascript" type="text/javascript" src="http:// www.expedia.com/pubspec/scripts/storefront/expe.sf.vertical.350.asp?pid=&aid="></script> To my idex page and it give me errors, when I delete this line <script src="js/lightbox/prototype.js" type="text/javascript"></script>