on 05-24-2006 8:27 AM
Hi,
I need to reset my form fields. I had achived this previously when my fields were normal "input" type fields.
But I am unable to do so after I changed my fields to the hbj:input types.
I have written the following code:
function resetFields(){
alert("inside reset");
var funName = htmlb_formid+"_getHtmlbElementId";
fun = window[funName];
var inputField1 = eval(fun("contFnameField"));
var inputString1 = inputField1.getValue().toString();
if(inputString1 !=null)
{
contFnameField.setValue("");
}
}
This gives me an error.
How can I achieve this?
Also I have a text area in my form. So I cannot specify "jsObjectneeded = true" for this textarea field of mine. How can i perform validations on this field before form submit.
I have one more query-- I find that when I click on submit button on the page, It does not invoke the associated controller.
The button code is -
<hbj:button id = "Contactus"
text = "SUBMIT"
disabled = "false"
onClientClick="validateFields()" onClick = "SendMail"
design="STANDARD"
/>
I find that validateFields() is invoked, but SendMail() in my controller is not invoked.
Please give me your views on this.
-Ashwini.
Hi Ashwini,
I think it should be
inputField1.setValue(""); instead of contFnameField.setValue("");
There should be some log if onClick event of button is not called though it doesn't give any exception. Check that out.
Regards,
Harini S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashwini,
textarea comes as html tag and not as htmlb tag. So may be u can get its id in normal way. Not sure of this but check out.
http://forums.aspfree.com/html-help-7/textarea-validation-110455.html
Regards,
Harini S
Hi Ashwini,
I just checked out. I think it isn't possible to do client side validation for textEdit. Only server side validation is possible.
Refer to Javascript API.
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/067941a51a1a09e10000000a155106/content.htm
Client side validation can be done to the components mentioned in this only.
Regards,
Harini S
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.