amieAp
08-04-2006, 07:40 AM
Hello Everyone,
I have a page(Page A) which has user profile details like username, password etc , all Labels. Each label has a link called "Edit". When user clicks on Edit, the label changes to a textbox so that the user can modify his details. For this iam using AJAX. To change the label to a textbox, im using another page(Page B) which takes the request from Page A using AJAX, and sends the textbox's <input> tag in the response to Page A. After this im placing the response in PageA using innerHTML. Thats fine. Now i need to perform validations when the user submits the page. For this im tryin to use document.formname.fieldname.value in the javascript to get that value after editing, so that i can check that value for validations. Now the problem is, after Edit is clicked the document.formname.fieldname.value returns undefined, eventhough value is present in the textbox. I need to know the reason for that. I have tried using getElementById(), and i was successful in retrieving the value. But thats not the concern. I need to use document.formname.fieldname.value to get that value. Plz help. Thanks in advance.
I have a page(Page A) which has user profile details like username, password etc , all Labels. Each label has a link called "Edit". When user clicks on Edit, the label changes to a textbox so that the user can modify his details. For this iam using AJAX. To change the label to a textbox, im using another page(Page B) which takes the request from Page A using AJAX, and sends the textbox's <input> tag in the response to Page A. After this im placing the response in PageA using innerHTML. Thats fine. Now i need to perform validations when the user submits the page. For this im tryin to use document.formname.fieldname.value in the javascript to get that value after editing, so that i can check that value for validations. Now the problem is, after Edit is clicked the document.formname.fieldname.value returns undefined, eventhough value is present in the textbox. I need to know the reason for that. I have tried using getElementById(), and i was successful in retrieving the value. But thats not the concern. I need to use document.formname.fieldname.value to get that value. Plz help. Thanks in advance.