similar to: Element extending problem

Displaying 20 results from an estimated 4000 matches similar to: "Element extending problem"

2007 Jun 09
23
hoverclass on droppable zone
Hi guys, I''m trying to make a drag''n''drop portal using sortable element. I would like to apply the "hoverclass" option only on the droppable zone instead of the column border. Any idea a about the solution? Thanks for any help, Sabri --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups
2007 Apr 23
3
getElementsBySelector problem in IE
I''m having this problem with IE and getElementsBySelector, but am a relative js novice, so quite possible -- likely even -- that I''m doing something stupid. Either way, a fresh pair of eyes would help. Basically I''m duplicating a fieldset within a form (so you can upload more than one photo). [BTW, the fieldsets have a CSS id which relates to the object id of the
2007 Jan 22
11
getElementsBySelector broken in IE
Hi all: getElementsBySelector appears to be broken in 1.5 final on IE. getElementsBySelector works as expected in FF 1.5 final and also it works correctly in IE in 1.5 RC2. Here''s my simple code fragment: var els = element.getElementsBySelector(''[recnum]''); The variable els is undefined in 1.5 final on IE. --~--~---------~--~----~------------~-------~--~----~ You
2007 Jun 09
4
Prototype Question
I''m trying to apply a css class to all LI elements that are children of an element with the ID "idSelector". This is what I did and it works. But I was wondering if there was an easier way without having to use an anonymous function? $$("#idSelector li").each(function() { arguments[0].addClassName("myClass") }); Thanks in advance.
2005 Sep 25
2
Preventing/allowing exceptions to occur in Element.add/remove ClassName
Hello everyone ! Thomas asked me to discuss here the behavior of Element.addClassName, as relating to ticker #2232 [1]. In HEAD, if the element passed-in to Element.addClassName does not exist, an exception is thrown, and script execution stops there. I believe this is inconsistent with other functions: Object.extend(Element, { hasClassName: function(element, className) { element =
2007 Jun 28
2
img element inside div not accessible with $$() or getElementsBySelector
I can''t access an img inside a div using the $$() syntax. Using getElementsBySelector doesn''t work either. Both return empty arrays. I can access it with getElementById, however. <div id="foo"> <img id="image" src="blah.jpg"> <div id="bar" </div> - Using $$(''#foo img'') returns an empty array - Using
2007 Apr 10
1
bug: Element.getElementsBySelector on internet explorer
Hi, in ie7 I can''t use Element.getElementsBySelector to select elements in a xml document --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this
2007 Nov 09
1
Prototype API Docs inconsistency
Hi, If you follow those two links (watch the case difference) : - http://www.prototypejs.org/api/element/getElementsBySelector - http://www.prototypejs.org/api/element/getelementsbyselector You''ll see that the first one does not indicate the 1.6 deprecation even though it is the same method. I guess those docs where generated, so the problem might exists elsewhere in the docs. Thanks
2008 Mar 19
4
$("xxx") has no properties
hi! I must miss something really essential that the following doesnt work: I have a haml layout which includes the default javascripts, and the application.js looks like this: $("foobar").addClassName(''blue''); the view looks like this: <div id="foobar" class="green">testtest</div> if I navigate to the site, I get the error
2006 Feb 10
13
Element.observe () binding
Hey all, I working on a project, but I am not sure I can do what I want to do. The following works beautifully: Event.observe(el, ''click'', function () { this.className += " myClass"; return false; }); I have also tried doing this: this.varname = ''test''; Event.observe(el, ''click'', function () { alert (this.varname); }.bind
2008 Jan 04
7
1.6 cheatsheet
Hey has anyone seen a 1.6 cheatsheet around? Johnathan Snook did a nice 1.5 one but I''ve been working with 1.6 for a while and while I can use prototypejs.org, cheatsheets are handy for jogging memories.. I checked his blog, nothing there for 1.6. Gareth --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups
2007 Oct 24
3
addClassName and removeClassName
Hi, and sorry for the noob question! I have an unordered list of 4 links where the links use Ajax.Updater in the onclick: onclick="new Ajax.Updater(''ajaxarea'', ''link1.php'', {asynchronous:true, evalScripts:true }); return false;" How would I go about using addClassName and removeClassName to show the current link? Thanks for any help with this.
2007 Feb 02
2
Quick Element.getElementsBySelector() question
Hi, Does this code should works ? elm.getElementsBySelector(''UL.class1 > LI.class2''); I have an error caused by "UL.class1 > LI.class2" - Does CSS Selector ">" works ? - What is the exact ? may be "UL.class1>LI.class2" Regards, -- Jean-Philippe Encausse - R&D Jalios SA Jp [at] encausse.net - http://www.encausse.com -
2007 Oct 19
2
string.prototype.isNumeric
Hey all, Just had a need for this, wondering if it is a candidate for inclusion as it is only a single line and I can''t seem to spot any other way of acheiving the same functionality in less code. String.prototype.isNumeric = function() { return (this.match(/^\d+$/) != null); } I used it in the context of: Event.observe(el,''keypress'',function (e) { if
2007 Apr 20
4
prototype addClassName, toggleClassName
I have a question about prototype''s addClassName, removeClassName, and toggleClassName. As expected, these functions add or remove a class name from an element. When adding, the class names are appended to the end of the class list of the element. Could this affect the rendering of the element? Does the order of css class names in the element''s class attribute matter?
2006 Mar 31
2
RE: drag and drop sorting with an empty lis
I ran into this issue too. My solution was to add an "onUpdate" function to the sortable that tests the container to see if it''s got any children or not: function is_empty(container) { if ($(container).hasChildNodes()) { Element.removeClassName($(container),''empty''); } else if (!$(container).hasChildNodes()) {
2007 Jun 24
2
function Element.isParent argument order?
I was trying to troubleshoot "jumpy" Sortables and noticed that when the function Element.isParent is called from onHover (line 749 in dragdrop.js v. 1.7.1_beta3) and from onEmptyHover (line 781), the arguments seem to be in reverse order. Element.isParent (line 944) expects "child, element(parent)" but is called with "dropon(parent), element(child)", making it
2006 Dec 13
4
Effect.Opacity on Firefox Mac Dims text
Hey everyone, I have a series of thumbnails that have a loading overlay placed over them when they''re clicked on. The overlay is set to an opacity of .7.. .The onclick code looks basically does this: var loading = document.createElement(''div''); loading.id = ''loading_image''; $(loading).addClassName(''thumb_loading'');
2006 Aug 07
5
RJS Change Background Color
What''s the page.method to change the background color of a DOM element? I''m trying to change the background color of a couple of styled <li>''s when an Ajax link is clicked. Thanks, David -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060807/63de04bf/attachment.html
2007 Oct 06
3
Prototype: resp.getHeader('Location'); redirects browser
Why when I call resp.getHeader(''Location''); after my ajax call does the browser get redirected to the location header. I just want to get the value of it. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to