Jump to content

Help with ClientSide Scripting


cristianotestai

Recommended Posts

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

Link to comment
Share on other sites

  • Administrators

 

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?!

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...