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
Aman Jen
NA
141
40.6k
Validation using javascript
Sep 4 2013 8:45 AM
Hi, Plz have look @ this..it working..not getting wat is going wrong here...its simple validation code using JSP;
<form id="form1" runat="server">
<div>
<script>
function IsValidUser()
{
var uid;
var temp = document.getElementById("<%=tbtest.ClientID%>");
uid = temp.valueOf();
if (uid == "")
{
alert("Plz Enter User ID");
return false;
}
else
{
return true;
}
}
</script>
</div><br />
<asp:TextBox ID="tbtest" runat="server"></asp:TextBox>
<asp:Button ID="btJavSctest" runat="server" Text="Script Test" OnClientClick="IsValidUser();"/>
</form>
Not showing message even if I click button with empty textbox
Plz help
Reply
Answers (
2
)
display table data in jsp by paasing text
how to save image path in database using jsp???