Solved

AJAX HTML Editor Extender

Posted on 2011-09-28
6
7,582 Views
Last Modified: 2012-06-27
Hello Experts,

I have the following HTML Markup below. Everything works fine except that the TextBox Control that I have to add based on the information from AJAX website tells you to use a TextBox for the content. My problem is that when I run the page the TextBox Control has a transparent background.

Can someone please tell me if this is true in the fact that I have to use a TextBox Control for Content and also how I can change my Background Color. I tried changing the background color on the TextBox but that did not work.



<%@ Page Language="C#" AutoEventWireup="true" CodeFile="courses_update.aspx.cs" Inherits="CMS_ShapeUp_ghap_one_courses_update" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor"
    TagPrefix="cc1" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Wellness Choice Program - General Health Awareness Program One Update Courses</title>
    <link href="../../../../css/main.css" rel="stylesheet" type="text/css" />
</head>
<body class="info">
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:HtmlEditorExtender ID="HtmlEditorExtender1" TargetControlID="TextBox1" runat="server">
    <Toolbar>
        <asp:Bold />
        <asp:Italic />
    </Toolbar>
</asp:HtmlEditorExtender>
      <div id="wrapper">
          <div id="header">
        <img src="../../../../images/ShapeUpWithoutText_221x89_4_Logo.png" alt="Shape Up Logo" />
            <div id="nav">
                <ul>
                    <li><a href="../../../../index.aspx">HOME</a></li>
                    <li class="current"><a href="../../../../programinfo/index.aspx">PROGRAM INFORMATION</a></li>
                    <li><a href="http://wellness" target="_blank">REPORTING SYSTEM</a></li>
                    <li><a href="../../../../contact/index.aspx">CONTACT</a></li>
                </ul>
            </div>
        </div>
        <div id="content">
            <div id="primary">
                <h1>GENERAL HEALTH AWARENESS PROGRAM ONE - UPDATE COURSES</h1>
                <asp:Label ID="lblCourseUpdate" runat="server"></asp:Label>
                <br />
                <asp:DropDownList ID="ddlCourseUpdate" runat="server"></asp:DropDownList>
                <br />
                <asp:Label ID="lblHTMLCourseUpdate" runat="server"></asp:Label>
                <br />
                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            </div>
            <div id="secondary">
                <h1></h1>
                <ul>
                </ul>
            </div>
        </div>
        <div id="footer">
            <%--<p>&#169;</p>--%>
        </div>
    </div>
</form>
</body>
</html>
0
Comment
Question by:asp_net2
  • 2
  • 2
6 Comments
 
LVL 8

Expert Comment

by:PeteEngineer
ID: 36716354
With CSS.

input[type=text]:focus { background-color: blue; } (needs a modern web
browser).

You could also play with the onfocus and onblur events and set
this.style.backgroundColour using JavaScript.
0
 
LVL 8

Accepted Solution

by:
PeteEngineer earned 500 total points
ID: 36716358
<input type="text" onfocus="this.className+=' focused'"
onblur="this.className=this.className.replace(/\s?focused/g,'')">

and some css:

input.focused {
background-color:#ffe;
}
0
 
LVL 4

Author Comment

by:asp_net2
ID: 36716608
Hi PeteEngineer,

I cannot use an <input> Control I have to use the following control below. Also, what is the other stuff used for ?

<asp:TextBox ID="TextBox1" runat="server" Width="600px" Height="300px"></asp:TextBox>
0
 
LVL 4

Author Closing Comment

by:asp_net2
ID: 36979160
This Post was never followed threw.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now