awakener1986
11-08-2010, 10:46 AM
Hi, im having a little trouble with this hope someone might be able to help me with it.
well first of, i have two text area. one in the parent window the other is in the child window. what i am trying to do is that whenever i saved the values in the child window text area, it would populate in the parent window.
this is the javascript which is called with php ($tmp_desc is a php variable), that i have implemented in the child window:-
echo "<script defer>
o = window.opener.getElement('case_newdeflens_FX_CASE_DESCRIPTION');
if (o) o.value = '$tmp_desc'
setTimeout('window.close()', 500);
</script>";
it seems that when i leave spaces in the text area i will hit the 'unterminated string lateral' error.
Error: unterminated string literal
Source File: http://192.1.7.3/NewCase/_case_description.php?LeNs#LensBM_f1462b72
Line: 21, Column: 19
Source Code:
if (o) o.value = 'DHLDJFL;KFJS;LF<br />
is there a workaround to this problem ? thanks :confused:
well first of, i have two text area. one in the parent window the other is in the child window. what i am trying to do is that whenever i saved the values in the child window text area, it would populate in the parent window.
this is the javascript which is called with php ($tmp_desc is a php variable), that i have implemented in the child window:-
echo "<script defer>
o = window.opener.getElement('case_newdeflens_FX_CASE_DESCRIPTION');
if (o) o.value = '$tmp_desc'
setTimeout('window.close()', 500);
</script>";
it seems that when i leave spaces in the text area i will hit the 'unterminated string lateral' error.
Error: unterminated string literal
Source File: http://192.1.7.3/NewCase/_case_description.php?LeNs#LensBM_f1462b72
Line: 21, Column: 19
Source Code:
if (o) o.value = 'DHLDJFL;KFJS;LF<br />
is there a workaround to this problem ? thanks :confused: