Solved

Check with JavaScrip then PostBack

Posted on 2007-03-21
1
165 Views
Last Modified: 2010-04-23
I have a button that will postback and perform code behind functions but what I want to do is check to see if my txtTitle box is emty first and if it is, alert the user and if not go ahead an do the postback. Can anyone show me how to do this one? THanks
0
Comment
Question by:wilcor14
1 Comment
 
LVL 13

Accepted Solution

by:
jeebukarthikeyan earned 500 total points
ID: 18875354
hi,

function Go()
{
    var txt= document.getElementById('txtTitle').value;
    if(txt=='' )
    {
      alert('Title should not be null')
      return false;
    }  
    else
    {
      __doPostBack('','');
      return true;
    }
}

b u d d h a
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

706 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

19 Experts available now in Live!

Get 1:1 Help Now