Javascript Validation not working on .Net Content Pages -


I'm wondering if anyone else has experience the following problem.

.aspx page on a single link (on a master page), I am performing general JS assumptions:

  Verify the function Maxtrans (Sender, Args ) {// requires at least one digit; numeric only characters var error = true; Var regexp = New RegExp ("^ [0- 9] {1,40} (\ [0- 9] {1,2})" $ "); var txtAmount = document.getElementById ('TxtMaxTransAmount'); if ( TxtAmount.value.match (regexp) & amp; parseInt (txtAmount.value)> = 30) {document.getElementById ('maxTransValMsg'). InnerHTML = "" args.IsValid = true;} and {document. GetElementById ('maxTransValMsg'). InnerHTML = "*"; Args.IsValid = Incorrect;}}  

Then as soon as I take it to the content page of a master page, let me txtAmount Get zero.

Any other way to access the DOM when trying to perform client-side JS verification with master / content pages Look at the source of your rendered page in the master page. There is a ControlX $ SubControlY $ on many elements. The txtMaxTransAmount ID will be ... you will need to adjust your accreditation accordingly. I will inject the ID into customer ID often.

  

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -