Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. reset button is getting fired 2nd time

reset button is getting fired 2nd time

Scheduled Pinned Locked Moved ASP.NET
helpjavascript
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    peter rankel
    wrote on last edited by
    #1

    hi, I have a problem regarding the reset button on my aspx page. A brief description. I have aspx page on which over 10 text boxes are there with a save and reset button. when I have clicked on the reset button it should clear all values in the text boxes. it is doing the same, but when I click the "Reset" Button second time. I think I made a mistake on the page load while calling the javascript funtions. txtCNumber.Attributes.Add("onKeyPress", "javascript:return Integersonly_special(this, event);"); txtMNumber.Attributes.Add("onKeyPress", "javascript:return Integersonly_space(this, event);"); txtFName.Attributes.Add("onKeyPress", "javascript:return Alphabitsonly_space(this, event);"); txtLName.Attributes.Add("onKeyPress", "javascript:return Alphabits_and_nospace(this, event);"); txtEmpId.Attributes.Add("onKeyPress", "javascript:return Alphabits_and_integers(this, event);"); txtRemarks.Attributes.Add("onKeyPress", "javascript:return Remarks(this, event);"); I have doubt using this Attributes concept. Can any body help me regading this.

    your peter

    modified on Friday, November 21, 2008 8:57 AM

    N 1 Reply Last reply
    0
    • P peter rankel

      hi, I have a problem regarding the reset button on my aspx page. A brief description. I have aspx page on which over 10 text boxes are there with a save and reset button. when I have clicked on the reset button it should clear all values in the text boxes. it is doing the same, but when I click the "Reset" Button second time. I think I made a mistake on the page load while calling the javascript funtions. txtCNumber.Attributes.Add("onKeyPress", "javascript:return Integersonly_special(this, event);"); txtMNumber.Attributes.Add("onKeyPress", "javascript:return Integersonly_space(this, event);"); txtFName.Attributes.Add("onKeyPress", "javascript:return Alphabitsonly_space(this, event);"); txtLName.Attributes.Add("onKeyPress", "javascript:return Alphabits_and_nospace(this, event);"); txtEmpId.Attributes.Add("onKeyPress", "javascript:return Alphabits_and_integers(this, event);"); txtRemarks.Attributes.Add("onKeyPress", "javascript:return Remarks(this, event);"); I have doubt using this Attributes concept. Can any body help me regading this.

      your peter

      modified on Friday, November 21, 2008 8:57 AM

      N Offline
      N Offline
      Nishant Singh
      wrote on last edited by
      #2

      Hi peter, There seems to be no problem with Attributes.Add and any ways events are getting fired on KeyPress so if at all they have any problem it will be evident when u enter any value in textboxes. Are u firing any JavaScript on Reset button , Please check if you are doing so,also debug the code on first click of Reset to check what happens . Regards Nishant

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups