Hi,
In my application, I call one popup winodow by using this link..
[HTML]<a href="#" onClick="return showWindow('1', 'XYZ');">
<img src="images/magnifier.gif" ALT="Chemicals" width=18 height=20 border=0>
</a>[/HTML]
In this showWindow function....
[CODE=javascript]
var newWindow = '';
var url='jsp/DEPO/Chemicals/ProductConfigTa bs.jsp';
function showWindow(data 1, data2)
{
if (!window.focus) {return true;}
if (!newWindow.clo sed && newWindow.locat ion)
{
newWindow.locat ion.href = url;
}
else
{
newWindow=windo w.open(url+'?ab c=ABC&Id='+data 1,'NewWin','too lbar=no,status= yes,width=520,h eight=440');
if (!newWindow.ope ner) newWindow.opene r = self;
//Set value into Child window element.
setTimeout("Sen dToChild('" + data1.toLocaleS tring() + "','" + data2.toLocaleS tring() + "')",20);
if (window.focus){ newWindow.focus ();}
}
}
//Pass value to child window..
function SendToChild(dat a1,data2)
{
//Set Hidden value into child Window
newWindow.docum ent.getElementB yId("hiddenDivI d1").value=data 1;
newWindow.docum ent.getElementB yId("hiddenDivI d2").value=data 2;
}[/CODE]
//In child window JSP i use this div for storing parent window passed values.
[HTML] <div id='hiddenDivId 1'></div>
<div id='hiddenDivId 2'></div>
[/HTML]
** But Some time i can access this hidden div of child window and some time not..
Please help me to pass parent window element values to child and vice-versa Or Any other way to pass value,
like what i did with url, by using parameter.. please check is this way correct to pass and get value in request
[HTML]<input type="hidden" name="Id" id="Id" value="<%=reque st.getParameter ('Id')%>">[/HTML]
Please use code tags when posting code - moderator
I dont know what i am doing wrong in it. please help me in this problem.
Thanks,
Gajendra
In my application, I call one popup winodow by using this link..
[HTML]<a href="#" onClick="return showWindow('1', 'XYZ');">
<img src="images/magnifier.gif" ALT="Chemicals" width=18 height=20 border=0>
</a>[/HTML]
In this showWindow function....
[CODE=javascript]
var newWindow = '';
var url='jsp/DEPO/Chemicals/ProductConfigTa bs.jsp';
function showWindow(data 1, data2)
{
if (!window.focus) {return true;}
if (!newWindow.clo sed && newWindow.locat ion)
{
newWindow.locat ion.href = url;
}
else
{
newWindow=windo w.open(url+'?ab c=ABC&Id='+data 1,'NewWin','too lbar=no,status= yes,width=520,h eight=440');
if (!newWindow.ope ner) newWindow.opene r = self;
//Set value into Child window element.
setTimeout("Sen dToChild('" + data1.toLocaleS tring() + "','" + data2.toLocaleS tring() + "')",20);
if (window.focus){ newWindow.focus ();}
}
}
//Pass value to child window..
function SendToChild(dat a1,data2)
{
//Set Hidden value into child Window
newWindow.docum ent.getElementB yId("hiddenDivI d1").value=data 1;
newWindow.docum ent.getElementB yId("hiddenDivI d2").value=data 2;
}[/CODE]
//In child window JSP i use this div for storing parent window passed values.
[HTML] <div id='hiddenDivId 1'></div>
<div id='hiddenDivId 2'></div>
[/HTML]
** But Some time i can access this hidden div of child window and some time not..
Please help me to pass parent window element values to child and vice-versa Or Any other way to pass value,
like what i did with url, by using parameter.. please check is this way correct to pass and get value in request
[HTML]<input type="hidden" name="Id" id="Id" value="<%=reque st.getParameter ('Id')%>">[/HTML]
Please use code tags when posting code - moderator
I dont know what i am doing wrong in it. please help me in this problem.
Thanks,
Gajendra
Comment