TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Manoj Maharana
NA
362
128.5k
validation javascript(clientside) not working in html editor
Aug 20 2016 7:00 AM
function ValidateFrom() {
debugger;
var editor1 = $find("<%=Editor1.ClientID%>");
var content1 = editor1.get_content();
if (content1.trim() == "") {
document.getElementById("<%=divDesMsg.ClientID %>").innerHTML = "Please enter Description.";
document.getElementById("<%=divDesMsg.ClientID %>").style.display = 'block';
document.getElementById("<%=Editor1.ClientID %>").focus();
return false;
}
}
here i am checking value is available or not:
<script>
function checkfunction(val) {
if (val != "") {
document.getElementById("<%=divDesMsg.ClientID %>").style.display = 'none';
}
here is editor:
<div id="divDesMsg" runat="server" style="color: Red;">
</div>
<label>
Description: <em>*</em></label>
<div>
<HTMLEditor:Editor ID="Editor1" runat="server" onkeyup="checkfunction(this.value)" Height="300px" Width="500px" AutoFocus="true"
NoUnicode="false" />
</div>
<div class="clear"></div>
The problem is that while checking the value it will show error message...but after fill up the text in editor lable shows ..
i want to disappear the level after checking when value is available in html editor
Reply
Answers (
2
)
mvc4 cascading dropdownlist
Session example on strongly typed object