I am trying to create a hidden form with some data, which needs to be submitted to a jsp page (gets open in a new window), but all this needs to happen programatically, without user pressing submit button.
My Sample code
the last statement does not submit the form automatically, but if I click the submit button provided, it works perfectly as needed.
Update
I am trying the above code replacing the "kbUrl" with a internal url here, http://smartclient.com/index.jsp#textItem
The submit button click opens a new window and does exactly what is expected, but please provide me a solution which will help me simulate "submit" type button functionality to submit the form.
My Sample code
Code:
var fsquery = "abcd"; var emailId = "as@gmail.com"; var portalPsswd = "password"; var projectId = "123"; var kbUrl = "some url which will consume form post parameters"; var pv="1.2",pn="ADA"; this.kbform=isc.DynamicForm.create({ width: 300, fields: [ {type: "hiddenitem", name: "EMAIL_ID", defaultValue:emailId }, {type: "hiddenitem", name: "PORTAL_PASSWORD", defaultValue:portalPsswd}, {type: "hiddenitem", name: "PROJECT_ID", defaultValue:projectId}, {type: "hiddenitem", name: "FSQUERY", defaultValue:fsquery}, {type: "hiddenitem", name: "PRODUCT_VERSION", defaultValue:pv}, {type: "hiddenitem", name: "PRODUCT_NAME", defaultValue:pn}, {type: "hiddenitem", name: "ORIGIN", defaultValue:"Administrator"}, {type: "submit", name: "submit", defaultValue: "submit"} ], action: kbUrl, target: "_blank", method: "POST", canSubmit: true }); this.kbform.submit();
Update
I am trying the above code replacing the "kbUrl" with a internal url here, http://smartclient.com/index.jsp#textItem
The submit button click opens a new window and does exactly what is expected, but please provide me a solution which will help me simulate "submit" type button functionality to submit the form.
Comment