cristianotestai Posted October 20, 2011 Posted October 20, 2011 Hi, I need a help with JS. What I need to do is the following: 1) In a OnMouseOver ExtEvents of the TUniPanel, i need to change the font color of a UniLabel and to change the picture of a UniImage. I tried some alternatives, but without success. What would the syntax for this purpose? 2) In the OnAfterRender Event(UniEdit), I'm setting the following code to assign a background image, but occurs an Ajax Error .. What am I doing wrong? function OnAfterrender (sender) { sender.body.applyStyles('background-image:url("http://localhost:8077/ext-3.3.0/resources/images/search.gif")'; } This same code if i placed directly in the CSS file it works correctly. Thanks Quote
Administrators Farshad Mohajeri Posted October 26, 2011 Administrators Posted October 26, 2011 function Onmouseover(sender) { MainForm.UniLabel1.getEl().setStyle("color","#FF0000"); MainForm.UniImage1.getEl().dom.innerHTML="<img src='files/flower.jpg'/>"; } Quote
Administrators Farshad Mohajeri Posted October 26, 2011 Administrators Posted October 26, 2011 2) In the OnAfterRender Event(UniEdit), I'm setting the following code to assign a background image, but occurs an Ajax Error .. What am I doing wrong? function OnAfterrender (sender) { sender.body.applyStyles('background-image:url("http://localhost:8077/ext-3.3.0/resources/images/search.gif")'; } This same code if i placed directly in the CSS file it works correctly. Thanks Background image to Edit?! Quote
cristianotestai Posted October 26, 2011 Author Posted October 26, 2011 Background image to Edit?! Yes Farshad! If i set the class of the CSS file seen below, is displayed in the UniEdits components the image in the background. .x-form-text, textarea.x-form-field{ background-image:url http://localhost:8077/ext-3.3.0/resources/images/search.gif; } What i'm trying is to do the same thing, but for some "UniEdits" through the ExtEvent AfterRender. Thanks! Quote
Administrators Farshad Mohajeri Posted November 3, 2011 Administrators Posted November 3, 2011 function OnAfterrender(sender) { sender.getEl().dom.style.backgroundImage="url('logo.png')"; } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.