Hi,
I've seen a couple of posts relating to window.opener and fields but none of the methods tried solve my problem so:
I've got a hidden field:
I add to the value of this field at various points. I have a link on my page that opens a blank pop-up window. I then write to this window using javascript. Including a line making another link that should open an alert box with the value of the hidden field (on the parent page). The resulting link in the pop-up looks like this:
If I click this link I get an error: "window.opener.document.forms.h_PageUI.PGText.value is not an object"
However, if I just reference the form(window.....h_PageUI) then it returns [object] and if I leave off the '.value' at the end (window......h_PageUI.PGText) I get "undefined".
So my question is, can you see anything wrong? Also Why does the error only occur when I try to get the value of the field, I must be referencing it correctly because I recognises the form (h_PageUI).
Any ideas?
TIA,
Iain X-)
I've seen a couple of posts relating to window.opener and fields but none of the methods tried solve my problem so:
I've got a hidden field:
Code:
<input type="hidden" name="PGText" value ="">
I add to the value of this field at various points. I have a link on my page that opens a blank pop-up window. I then write to this window using javascript. Including a line making another link that should open an alert box with the value of the hidden field (on the parent page). The resulting link in the pop-up looks like this:
Code:
<a href='#' onClick='javascript: alert(window.opener.document.forms["h_PageUI"].PGText.value); return false;'>2</a>";
If I click this link I get an error: "window.opener.document.forms.h_PageUI.PGText.value is not an object"
However, if I just reference the form(window.....h_PageUI) then it returns [object] and if I leave off the '.value' at the end (window......h_PageUI.PGText) I get "undefined".
So my question is, can you see anything wrong? Also Why does the error only occur when I try to get the value of the field, I must be referencing it correctly because I recognises the form (h_PageUI).
Any ideas?
TIA,
Iain X-)