Solved

Check with JavaScrip then PostBack

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

832 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