Hi rekha,
You are calling the function jss() while submitting the child form, the data is not being set because the php variable $array is only available only after submitting the form, so its of no use calling the function jss() when submitting the form.
As a result of this, when you submit the child form the 2nd time, the value is set to parent window.