﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebInput - How can I change the background of a WebInput control from Javascript</title><link>http://www.intersoftsolutions.com/Community/WebInput/How-can-I-change-the-background-of-a-WebInput-control-from-Javascript/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>How can I change the background of a WebInput control from Javascript</title><link>http://www.intersoftsolutions.com/Community/WebInput/How-can-I-change-the-background-of-a-WebInput-control-from-Javascript/</link><pubDate>Thu, 18 Feb 2010 23:07:26 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Below is the snippet code that will apply style in inner frame of WebInput.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&amp;lt;script type="text/javascript"&amp;gt;
    &amp;lt;!--
    function Button100_onclick() {
        var WebInput1 = ISGetObject("WebInput1");
        &lt;span style="color: #00b050"&gt;WebInput1.GetFrameElement().childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.backgroundColor = "Red";&lt;/span&gt;

        return true;
    }
    --&amp;gt;
&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;This inner frame element is the parent of parent element of the control element that I mention on my previous post. I enclosed the screenshot of the WebInput that has been set its background color to red. It has no padding or margin or white border around the red color.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;WebInput has its own dynamic style (active, normal, and over) applied by using css class. If you find that your own style is not seems to be applied, please try to use “!important” behind the style declaration (as seen on the sample below).&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;wiCity.GetFrameElement().childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.backgroundColor = "Red" &lt;span style="color: #00b050"&gt;!important&lt;/span&gt;;&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Since WebInput has its own dynamic style, I suggest you to apply the style directly (not using css class). I don’t try to say that it is not possible to apply css class over WebInput control, but it’s kind of fussing since you’ll need to override the default css class or redefine your style on active, normal, and over.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>How can I change the background of a WebInput control from Javascript</title><link>http://www.intersoftsolutions.com/Community/WebInput/How-can-I-change-the-background-of-a-WebInput-control-from-Javascript/</link><pubDate>Thu, 18 Feb 2010 18:38:50 GMT</pubDate><dc:creator>mitch.constantine@gmail.com</dc:creator><description>&lt;p&gt;This is not quite what I wanted.&lt;/p&gt;
&lt;p&gt;If I apply the first method I get the look in the attached file ( image1.gif). I don't want to have white borders around my control.&lt;/p&gt;
&lt;p&gt;If I use the second method, I simply get nothing (the control looks just like without our style).&lt;/p&gt;
&lt;p&gt;Neither of the two methods seems to be working, and I don't understand what is wrong. &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Could you please suggest a method that works or attach a working sample? Thank you!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>How can I change the background of a WebInput control from Javascript</title><link>http://www.intersoftsolutions.com/Community/WebInput/How-can-I-change-the-background-of-a-WebInput-control-from-Javascript/</link><pubDate>Tue, 09 Feb 2010 23:27:01 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Below is the snippet javascript code that shows how to change background color or applying a css class of WebInput.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;function Button1_onclick() {
    var wiAddress = ISGetObject("wiAddress");

    wiAddress.GetControlElement().style.backgroundColor = [define your color in here];
    wiAddress.GetControlElement().className = [define your css class name in here];

    return true;
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>How can I change the background of a WebInput control from Javascript</title><link>http://www.intersoftsolutions.com/Community/WebInput/How-can-I-change-the-background-of-a-WebInput-control-from-Javascript/</link><pubDate>Tue, 09 Feb 2010 18:33:56 GMT</pubDate><dc:creator>mitch.constantine@gmail.com</dc:creator><description>&lt;p&gt;I would need to mark some WebInput controls on my page by changing their background color (ideally by applying a CSS class). All other controls on the page should remain unaffected.&lt;/p&gt;
&lt;p&gt;How can I do this from Javascript?&lt;/p&gt;</description></item></channel></rss>