M
Mel
Hi, I have two text boxes and two image buttons. When I click either
image button the same popup window is shown. When I click image
button #1 the returning data is put in text box #1 (txtAng1.Text).
When I click image button #2 the returning data is also put in text
box #1; it should be placed in text box #2 (txtAng2.Text)! How do I
fix my code to put the returned data into the correct text box?
-------------------------------------------------------------------------
(using Asp.net 2.0, vb.net, javascript)
PARENT WINDOW ASPX CODE SNIPPET
<script language="javascript" type="text/javascript">
function update(elemValue)
{
document.getElementById;
document.getElementById('<%=txtAng1.ClientID
%>').innerText=elemValue[0];
}
</script>
PARENT WINDOW ASPX.VB PAGE_LOAD() SNIPPET
OpenPopUp(imgAng1, "AngleCalc.aspx", "", 420, 250)
OpenPopUp(imgAng2, "AngleCalc.aspx", "", 420, 250)
POPUP WINDOW ASPX CODE SNIPPET:
<script language="javascript" type="text/javascript">
function Done()
{
var Angle=document.getElementById('txtAng').value;
var ret= new Array(Angle);
window.opener.update(ret);
window.close();
}
</script>
image button the same popup window is shown. When I click image
button #1 the returning data is put in text box #1 (txtAng1.Text).
When I click image button #2 the returning data is also put in text
box #1; it should be placed in text box #2 (txtAng2.Text)! How do I
fix my code to put the returned data into the correct text box?
-------------------------------------------------------------------------
(using Asp.net 2.0, vb.net, javascript)
PARENT WINDOW ASPX CODE SNIPPET
<script language="javascript" type="text/javascript">
function update(elemValue)
{
document.getElementById;
document.getElementById('<%=txtAng1.ClientID
%>').innerText=elemValue[0];
}
</script>
PARENT WINDOW ASPX.VB PAGE_LOAD() SNIPPET
OpenPopUp(imgAng1, "AngleCalc.aspx", "", 420, 250)
OpenPopUp(imgAng2, "AngleCalc.aspx", "", 420, 250)
POPUP WINDOW ASPX CODE SNIPPET:
<script language="javascript" type="text/javascript">
function Done()
{
var Angle=document.getElementById('txtAng').value;
var ret= new Array(Angle);
window.opener.update(ret);
window.close();
}
</script>