Accessing parent window form from child window in html


Accessing parent window form from child window in html

window.parent.document.parentFormName.submit();

Here parentFormName is the name of Form of parent window that you want to submit from child window.
Ex, <form name="parentFormName".....>


Accessing parent window's form input parameters to child window,

var userName= window.parent.document.getElementById('userName').value;

Here userName is the id element of input field on parent form.
Ex.
    <form name="parentFormName".....>
<input type="text" id="userName" />
</form>
---------------------------------------------------------------------------------------------------------------

Comments

Popular posts from this blog

Read Images from a xlsx file using Apache POI

Struts 2 : Warning :No configuration found for the specified action: 'Login.action' in namespace: '/'

How to create mail message in FRC822 format