Click here to Skip to main content
15,886,919 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Web design template. Pin
sarahxbox200910-Nov-09 10:25
sarahxbox200910-Nov-09 10:25 
Questionasp coding working in http but not working in https Pin
keerthis16-Sep-09 23:23
keerthis16-Sep-09 23:23 
AnswerRe: asp coding working in http but not working in https Pin
Richard MacCutchan18-Sep-09 4:04
mveRichard MacCutchan18-Sep-09 4:04 
AnswerRe: asp coding working in http but not working in https Pin
Richard MacCutchan22-Sep-09 1:46
mveRichard MacCutchan22-Sep-09 1:46 
QuestionWeb Service "arg0" wrapper around our properties Pin
Alaric_16-Sep-09 3:17
professionalAlaric_16-Sep-09 3:17 
QuestionBulk Phone Call from Website Pin
Ra-one15-Sep-09 21:59
Ra-one15-Sep-09 21:59 
AnswerRe: Bulk Phone Call from Website Pin
Christian Graus16-Sep-09 11:55
protectorChristian Graus16-Sep-09 11:55 
Questionhave to handle timer on text changed event Pin
omkar mhaiskar15-Sep-09 19:56
omkar mhaiskar15-Sep-09 19:56 
hiiii friends

i have created   one text box name txtemail id so i have create this function which is provided in
http://my.naukri.com/manager/createacc2.php?othersrcp=5423&wExp=N

for username like this

i have tried many thing like onblur.onkeypress i have provided timer and in timer events   have taken   Boolean result but this is when timer is going start is not stooping.......

I'll provide whole code to here....

so plz help me

page code
____________________________________________________________________________________________________
js

function startTimer(lblerror) {
                  var timer = $find('<%= TimerEmail.ClientID %>');
                  var labelmes = lblerror.toString();
                  if (labelmes == "Available U can use !!") {
                        timer._enabled = false;
                    
                  }
                  else {
                        //timer._startTimer();
                        timer._enabled = true;
                  }
            }

            function stopTimer() {
                  var timer=$find('<%=TimerEmail.ClientID%>');

              
                 
              
            }

html code

                              <asp:UpdatePanel ID="udpanelEmail" runat="server" UpdateMode="Conditional">
                                    <ContentTemplate>
                                          <asp:Timer ID="TimerEmail" runat="server" Enabled="False" Interval="3000" OnTick="TimerEmail_Tick">
                                          </asp:Timer>
                                          <asp:TextBox runat="server" ID="txtEmailId" CssClass="TextBoxClass" AutoPostBack="true" OnTextChanged="txtEmailId_TextChanged"> </asp:TextBox>
                                               
                                      
                                          <asp:RequiredFieldValidator ID="ReqVEmailId" runat="server" ControlToValidate="txtEmailId"
                                                Display="None" Enabled="true" ErrorMessage="Enter Email Id" SetFocusOnError="True"
                                                > </asp:RequiredFieldValidator>
                                         
                                          </ajax:ValidatorCalloutExtender>
                                          <asp:RegularExpressionValidator ID="RegexEmailId" runat="server" ControlToValidate="txtEmailId"
                                                Display="None" ErrorMessage="Enter valid Email Id" SetFocusOnError="True" ValidationExpression="^[-a-zA-Z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|in|co.in|co.uk|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$"> </asp:RegularExpressionValidator>
                                         
                                          <asp:Label ID="lblerrormes" runat="server" Font-Names="arial,sans-serif;"></asp:Label>
                                    </ContentTemplate>
                                    <Triggers>
                                          <asp:AsyncPostBackTrigger ControlID="txtEmailId" EventName="TextChanged" />
                                    </Triggers>
                              </asp:UpdatePanel>

code behind


page load
txtEmailId.Attributes.Add("onkeypress", "startTimer('" + lblerrormes.Text + "')");
                  txtEmailId.Attributes.Add("onblur", "stopTimer()");


protected void TimerEmail_Tick(object sender, EventArgs e)
            {
                  CheckForAvailability();

            }

            private void CheckForAvailability()
            {
                  string emailmatchString = string.Empty;
                  string script = string.Empty;

                  btnSave.Enabled = false;
                  emailmatchString = @"^[-a-zA-Z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|in|co.in|co.uk|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$";

                  if (txtEmailId.Text.Trim() != string.Empty)
                  {
                        if (Regex.IsMatch(txtEmailId.Text.ToLower().Trim(), emailmatchString))
                        {
                              if (BusinessLogicLayer.CreateNewUser.IsEmailIdAlreadyExist(txtEmailId.Text.ToLower().Trim()))
                              {
                                    _Emailinfo = false;
                                    lblerrormes.ForeColor = System.Drawing.Color.FromArgb(255, 0, 0);
                                    lblerrormes.Text = "Not Available Choose another   !!";
                                    txtEmailId.Focus();
                              }
                              else
                              {
                                    _Emailinfo = true;
                                    lblerrormes.ForeColor = System.Drawing.Color.FromArgb(1, 0, 255, 0);
                                    lblerrormes.Text = "Available U can use !!";
                                
                                    btnSave.Enabled = true;
                                    //btnCancel.Enabled = true;
                              }
                        }
                        else
                        {
                              _Emailinfo = false;
                              lblerrormes.Text = "";
                             
                        }

                  }
            }


            protected void txtEmailId_TextChanged(object sender, EventArgs e)
            {
                  TimerEmail.Enabled = true;


            }
AnswerRe: have to handle timer on text changed event Pin
Abhijit Jana15-Sep-09 20:04
professionalAbhijit Jana15-Sep-09 20:04 
AnswerRe: have to handle timer on text changed event Pin
Christian Graus15-Sep-09 20:13
protectorChristian Graus15-Sep-09 20:13 
AnswerRe: have to handle timer on text changed event Pin
omkar mhaiskar15-Sep-09 20:26
omkar mhaiskar15-Sep-09 20:26 
GeneralRe: have to handle timer on text changed event Pin
Christian Graus15-Sep-09 21:22
protectorChristian Graus15-Sep-09 21:22 
QuestionI have some queries related to the navigation feature on the different sites? Pin
nowrocktheworld15-Sep-09 4:45
nowrocktheworld15-Sep-09 4:45 
AnswerRe: I have some queries related to the navigation feature on the different sites? Pin
Not Active15-Sep-09 6:57
mentorNot Active15-Sep-09 6:57 
AnswerRe: I have some queries related to the navigation feature on the different sites? Pin
Christian Graus15-Sep-09 11:28
protectorChristian Graus15-Sep-09 11:28 
QuestionInetpub Pin
Yonathan111114-Sep-09 21:48
professionalYonathan111114-Sep-09 21:48 
AnswerRe: Inetpub Pin
SeMartens14-Sep-09 22:08
SeMartens14-Sep-09 22:08 
GeneralRe: Inetpub Pin
Yonathan111114-Sep-09 23:09
professionalYonathan111114-Sep-09 23:09 
GeneralRe: Inetpub Pin
SeMartens14-Sep-09 23:14
SeMartens14-Sep-09 23:14 
QuestionIframe access denied Pin
kKamel14-Sep-09 21:14
kKamel14-Sep-09 21:14 
AnswerRe: Iframe access denied Pin
Marc Firth14-Sep-09 22:47
Marc Firth14-Sep-09 22:47 
GeneralRe: Iframe access denied Pin
kKamel14-Sep-09 23:07
kKamel14-Sep-09 23:07 
GeneralRe: Iframe access denied Pin
Marc Firth14-Sep-09 23:10
Marc Firth14-Sep-09 23:10 
GeneralRe: Iframe access denied Pin
kKamel14-Sep-09 23:19
kKamel14-Sep-09 23:19 
GeneralRe: Iframe access denied Pin
Marc Firth14-Sep-09 23:20
Marc Firth14-Sep-09 23:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.