our notes for our youngers

December 30, 2009

developing a site ( part 3 )

Filed under: developing website — Tags: , , — sevenlamp @ 11:59 AM

HISTORY

Dec 30, 2009
– chatbox မွာ validation အပိုင္းထည့္တယ္
– postback ျပန္ေနတာကို ျပင္တယ္။
Dec 28, 2009
– project ျပီးသေလာက္ကို publish လုပ္တယ္။
Dec 27, 2009
– chatbox အပိုင္းေရးတယ္။
Dec 26, 2009
– template လက္စသတ္တယ္။
– database ေဆာက္တယ္။
Dec 23, 2009
– template ျပင္ျပီးသေလာက္ကို publish လုပ္တယ္။
Dec 14, 2009
– template sample ရွာျပီး ေဒါင္းတယ္။
– ပံုေတြျဖတ္တယ္။ templateျပင္တယ္။

****************************************

ကြၽန္ေတာ္ မေန႔ညတုန္းက ChatBox ေလးမွာ က်န္ေနတဲ႔ အပိုင္းေလးေတြ ဆက္ျပင္ပါတယ္။ Send button ေလး click ရင္ server side ကို postback ျပန္ေနေတာ့ နည္းနည္းၾကာေနတယ္။ အဲ့ဒါေၾကာင့္ button ေလးကို update panel ထဲကို ထည့္ေပးလိုက္ပါတယ္။ ေနာက္ျပီး textbox ေတြထဲမွာ data မထည့္ပဲ send ႏွိပ္ရင္ alert ျပဖို႔အတြက္လည္း CustomValidator Control ေလးထည္ျပီးစစ္လိုက္ပါတယ္။ CustomValidator အတြက္ client script ေလးက ဒီလိုပါ။

function CheckMessage(source, arguments)
{
      if(document.getElementById("ctl00_ContentPlaceHolder1_SenderNameTextBox").value=="")
      {
           alert("Enter Your Name First!");
           document.getElementById("ctl00_ContentPlaceHolder1_SenderNameTextBox").focus();
           arguments.IsValid = false;
      }
      else if(document.getElementById("ctl00_ContentPlaceHolder1_SenderLocationTextBox").value=="")
      {
           alert("Enter Your Location First!");
           document.getElementById("ctl00_ContentPlaceHolder1_SenderLocationTextBox").focus();
           arguments.IsValid = false;
      }
      else if(document.getElementById("ctl00_ContentPlaceHolder1_ChatLogTextBox").value=="")
      {
           alert("Enter Message First!");
           document.getElementById("ctl00_ContentPlaceHolder1_ChatLogTextBox").focus();
           arguments.IsValid = false;
      }
      else
      {
           arguments.IsValid = true;
      }
}

ဒီေန႔ ၃၀ ဒီဇင္ဘာ အထိ Latest program ကို ဒီကေန ေဒါင္းလို႔ ရပါျပီ။ http://www.sendspace.com/file/kpywr0

About these ads

1 Comment »

  1. Database normalization lay shin pya br ohn bro
    thank u so much

    Comment by naylinaung — February 11, 2013 @ 10:27 PM


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Silver is the New Black Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: