Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About san1

  • Rank
  1. HiI would need to add an event handler for a double-click event of a text box. I'm trying to trigger the click event of clear button from the handler for the double-click event. This should clear text from the textbox that is double-clickedThe code for the clear button works from the following code:$("#clear_entries").click(function () {$("input[type=text]").val("");$("input[type=text]").after("");$("#email_address1").focus();});$("#email_address1").focus();});I am trying to use the shortcut for trigger method using $("#clear".click();Any help is appreciated. Thanks
  2. The code that I shared is all I have to fulfill this because it has to be with KeyPress and the rest of the code in the click event. I just asked for more clarity, perhaps a code example to guide me in the right direction. If you are going to be so blunt for no reason then I dont need your help. Thanks
  3. Thanks. Could you explain that in code format?
  4. HiI have the following code. I need to test an entry in the textbox to check if entry is a valid date.- I would like to use the MaskedTextBox function in this click event and then limit the entry to date only in the KeyPress event.Private Sub CheckDate_Validating(sender As Object, e As EventArgs) Handles CheckDate.MouseClickDim dt As String = DateTime.NowFormat(dt, "MM/dd/yy")' Configure the message box to be displayedDim messageBox1Text As String = "is Not a valid date"Dim messageBox2Text As String = "IS a valid date"If Date.TryParseExact(txtDoj.Text.ToString(), "MM/dd/yyyy", System.Globalization.CultureInfo.CurrentCulture, Globalization.DateTimeStyles.None, dt) Then' Display message boxMessageBox.Show(messageBox2Text)Else' Display message boxMessageBox.Show(messageBox1Text)EndEnd IfEnd SubPrivate Sub txtDoj_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtDoj.KeyPressEnd SubPlease help. Thanks
  5. HiI need to use the KeyPress eventto restrict date to MM/DD/YYYY format only. Here's my code:Private Sub txtDoj_KeyPress(ByVal sender As System.Object, ByVal e As System Windows.Forms.KeyPressEventArgs) Handles txtDoj.KeyPressIf Not Char.IsDigit(e.KeyChar) And Not Char.IsControl(e.KeyChar) And Not e.KeyChar = "." Thene.Handled = TrueEnd IfI understand that this code allows numbers only. But I do not know how to modify this to allow date format only.Thanks in advance for helping me out.
  6. HiI have enclosed the following code, which I created in two Groups so I can enable clicking one radio button from each group simultaneously. However, I did not succeed and only one or the other is click-able. Please provide assistance. Thanks for your help.Public Class Form1Private Sub GroupBox1_Enter(sender As Object, e As EventArgs) Handles GroupBox1.EnterIf RadioButton1.Checked ThenTextBox1.Text = (1).ToString("G")End IfIf RadioButton2.Checked ThenTextBox1.Text = (2).ToString("G")End IfEnd SubPrivate Sub GroupBox2_Enter(sender As Object, e As EventArgs) Handles GroupBox2.EnterIf RadioButton3.Checked ThenTextBox2.Text = (3).ToString("G")End IfIf RadioButton4.Checked ThenTextBox2.Text = (32).ToString("G")End IfEnd SubEnd Class
  7. That was very elaborate and helpful! Thank you for taking the time...
  8. Thanks that worked! Also, I would need to have the text in the button to change depending on the input in the text area. If I say "Hello World" and if the button says Submit is ....., it should display "Submit is Hello World". I used the following code <button type="text" onclick="checkPhrase(form)"> code to accomplish but it did not happen Also i would need the final output on the same page in the form area and not as a separate window. I used "document.write" instead of alert but the output was showing up in a new page.
  9. If I say "Hello World", it should display the number 43556 96753
  10. I'm required to- ask the user for the phone number phrase using a standard HTML form and followed by a- java script function to convert the number phrase into actual number- the final output must show up without using html input controlsBeen trying to accomplish this using if else statements within the <script> tag but did not succeed.Any help would be greatly appreciated.Thanks
  • Create New...