search for: setstyl

Displaying 20 results from an estimated 51 matches for "setstyl".

Did you mean: setstyle
2006 Sep 06
2
RJS Javascript oddity - trying to call Element.setStyle
...n and a square div. What I want to do is to change the background color of the div to red when the button is clicked. My form code looks like this: <%= form_remote_tag :url => {:action => ''color_show''} %> color_show.rjs looks like this: page << "Element.setStyle(''show_color'', {backgroundColor: ''blue''})" When I click the button, the page elements go away and I just get this screen of text: try { Element.setStyle(''show_color'', {backgroundColor: ''blue''}) } catch (e) { alert('&...
2007 Nov 09
1
!important modifier in setStyle
Does anyone know a way to set the !important modifier when using setStyle to change the css of an element? It throws errors in IE but works fine in FF. Any insight is appreciated. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this g...
2009 May 15
1
[PATCH server] First round of (largely) cosmetic changes to flexchart.
...rotected function initializeDataSource():void { dataSource = new BarChartDataSource(this); } @@ -186,19 +226,20 @@ package org.ovirt.charts { chartArea = new Canvas(); chartArea.percentHeight = 100; chartArea.percentWidth = 100 - yLabelPercentWidth; - chartArea.setStyle("backgroundColor","0xbbccdd"); + chartArea.setStyle("backgroundColor","0xffffff"); chartArea.verticalScrollPolicy = ScrollPolicy.OFF chartFrame.addChild(yScale); chartFrame.addChild(chartArea); - this.container.addChild(cha...
2007 May 06
2
prototype setStyle (background-image) relative url problem
Hi there, hope I can explain this one! When I try to use a setStyle call and set the backgroundImage property of an element, I''m having some problems using a relative URL. my directory structure is this: SERVER_ROOT/context/javascript/tree.js SERVER_ROOT/context/style/tree/tree.css SERVER_ROOT/context/images/node_icons/open.png SERVER_ROOT/context/image...
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'') }); }); And it kind of works--I see a style change--but even though I declare the a:ho...
2006 Jan 12
1
Effect.Puff Problem - first frame is wrong size
...the effects. Stepping through the code the issue occurs in the ''render'' when it calls this.update. Digging into the update (which is in Effect.Scale) it calls the setDimensions and passes in reasonable values, in this case 144 high, 421 wide. Inside of there it does the setStyle passing in again, correct values. This is where it goes fishy. Inspecting the element before the setStyle I can see the correct values for ''currentHeight'' and ''currentWidth''. But as soon as the setStyle happens, the size gets messed up (i.e. 204 & 4...
2006 Dec 19
2
Effect.Pulsate on last scriptaculous
Somone have tested the last scriptaculous version that ships with last prototype? I you make an Effect.Pulsate, the element stays hidden after the effect finish if the element don''t have opacity stablished. This is for the changes on the setStyle method on prototype. The original code is: --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- setStyle: function(element, style...
2006 Jul 19
2
Mouse Location
...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 Effect.toggle(''title_login'',''appear'');return false;">Login</a The other thing I''m wondering, is how would I reference the javascript variables MOUSEX and MOUSEY in that line o...
2007 Jan 11
3
Strange behaviour with Scriptaculous v 1.7.0 beta 2
Hello, I''m testing beta of scriptaculous and I''ve got a stange behaviour. I''m using this RJS : page << "$(''content'').morph({width:''308px''}, {duration:0.5});" page.replace_html ''subcontent'', :partial => ''sub'' page.replace_html ''nav_path'', nav_path
2006 Aug 24
5
TreeCtrl background?
On my windows build, I just noticed that the background of my TextCtrl''s is grey by default, and when I try to set the default style I get the error: TestTextCtrl.rb:15:in `set_default_style'': undefined method `'' for #<Wxruby2::TextCtrl:0x360a0c4> (NoMethodError) from TestTextCtrl.rb:15:in `initialize'' from TestTextCtrl.rb:24:in
2006 Apr 08
0
MSN like blind - BottomToTop
...originalWidth]; }, update: function(position) { var currentScale = (this.options.scaleFrom / 100.0) + (this.factor * position); this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale); }, finish: function(position) { if (this.restoreAfterFinish) this.element.setStyle(this.originalStyle); }, setDimensions: function(height, width) { var d = {}; d.height = height + ''px''; d.top = (this.originalTop + (this.originalHeight - height) ) + ''px''; this.element.setStyle(d); } }); Effect.BlindBottomUp = function(ele...
2008 Jan 16
2
Firebug alert issue workaround required
HI there, here is a basic piece of HTML/JavaScript that duplicates something similar in an application we''re working on: <html> <head> <script src="prototype.js" type="text/javascript" ></script> </head> <body> <div id="ST_1">ST_1</div> </body> <script> var widgetId = "ST_1";
2007 Mar 13
3
Prototype question invalid error in IE6
...ight = d.documentElement.clientHeight } else { if (d.body && typeof d.body.clientWidth!=''undefined'') { winWidth = d.body.clientWidth winHeight = d.body.clientHeight } } } var new_margin = (winHeight/2)-268; function init() { $(''timeline'').setStyle({ marginTop: new_margin + ''px'' }); } window.onload = init; </script> And heres my link in the body that moves it: <a href="javascript:void(0)" onclick="new Effect.MoveBy(''timeline'',0, - winWidth);">Click</a> The whol...
2008 May 02
2
making an element draggable after it's been dropped in a drop zone
...cument.observe(''dom:loaded'', function() { new Draggable(''draggable'', { revert: true}); Droppables.add(''dropp'', { accept: ''accept'', hoverclass: ''dropallowed'', onDrop : function(obj){ obj.setStyle(''width: 100px; height: 100px; background: blue;''); } any ideas? Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send...
2006 Jul 17
2
RE: scriptaculous appear effect and tiny_mce bug onopera 9
...iv with a tinymce control appear with the effect ( Effect.Appear ), tinymce is appear weird. There is some problem with opacity styles on tinymce. But these errors, only appear if the opacity has an intermediate value. A workaround to this is, after the Effect.Appear, set the opacity to 1 ( Element.setStyle( $( div ), {opacity:1} ) ). This seems to correct the problem... or I think... PD: excuse me for my bad english PD2: I don''t know if this is the place to comment this... if not, excuse me again. _______________________________________________ Rails-spinoffs mailing list Rails-spinoff...
2006 May 30
0
problem with effect toggle - please help
...function() { if (this.bContainerId == ''fm-box-0'') { var oHeight = this.originalHeight; this.resize(oHeight); this.boolUpdate = false; } this.update(); }.bind(this) }) }, resize: function(oHeight) { if (!this.boolUpdate) { Element.setStyle(treeBox.bContentWrap, {height: (Element.getHeight(treeBox.bContentWrap) > 0) ? (Element.getHeight(treeBox.bContentWrap) + oHeight) + ''px'' : 0 + ''px''}); Element.setStyle(treeBox.bContent, {height: (parseFloat(Element.getStyle(treeBox.bContent, ''hei...
2005 Nov 24
1
Extended $ function called $$
...H>ColdFusion</COUGH> use the # symbol and it has to be escaped as ##, I also allow for % to be used in place of #. You can also easily add your own replacements as it is defined in a separate array named $$.hashes (it''s about half way down the code). I also added a custom Element.setStyle() function that takes an array of elements and styles them. This is not part of the code I''m submitting (though you can use it). It just shows you an example of how useful the $$ function can be. I use $$() a lot in my code. It is as useful as $(). I''d like to see it in scriptacu...
2005 Dec 28
1
Problem with IE
...innerHTML = $(''editTexto'').innerHTML; izq = findPosX(element) - 400 + ''px''; sup = findPosY(element) + ''px''; nodoContenedor = Builder.node(''div'',{id:''div_''+id_elemento}); Element.setStyle(nodoContenedor, {position: ''absolute'', left: izq, top: sup, border:''1px solid #091C5A'', width:width,...
2006 Apr 25
12
RE: Element.scrollTo duration isn''t working
I thought the duration parameter was only used with Effect functions, but I could be wrong. Greg > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs- > bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Joe Hudson > Sent: Tuesday, April 25, 2006 8:37 AM > To:
2008 Jun 15
11
[PATCH] helper to create fb css stylized table
I attached a rails helper implementation of the fb_table described here: http://wiki.developers.facebook.com/index.php/Facebook_Styles I included testing and comments. I hope you find it useful. Curiously, it''s really a small extension of FBML. Richard -------------- next part -------------- Index: test/rails_integration_test.rb