Hi, i am creating my own plugin at the moment similar to the inbuilt image dialog. As my dialog opens i wish to have an image which when clicked opens a new window which allows me to select an image and then as i click an on the image it inserts the path back into a textbox on my dialog window. So far i have added the following to my dialog window:
<input id="txtPath" type="text" /> <a href="javascript:window.open('picker.htm', 'mywindow', 'menubar = 0, resizable = 1, scrollbars = 1, width = 750, height = 400');"><img src="picker.gif" alt="Image" border="0" /></a>
Now on the window that opens i need to access the textbox txtPath as the user clicks on an image. I have tried doing:
window.parent.document.getElementById('txtPath').value
and also tried:
window.opener.window.document.getElementById('txtPath').value
But both return null. Javascript is not my strong point and really i am just guessing.
<input id="txtPath" type="text" /> <a href="javascript:window.open('picker.htm', 'mywindow', 'menubar = 0, resizable = 1, scrollbars = 1, width = 750, height = 400');"><img src="picker.gif" alt="Image" border="0" /></a>
Now on the window that opens i need to access the textbox txtPath as the user clicks on an image. I have tried doing:
window.parent.document.getElementById('txtPath').value
and also tried:
window.opener.window.document.getElementById('txtPath').value
But both return null. Javascript is not my strong point and really i am just guessing.