Solved

Check with JavaScrip then PostBack

Posted on 2007-03-21
1
192 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

856 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