<script type = "text/javascript">
function RedirectParent(tbl)
{
var inputs = tbl.getElementsByTagName("input");
for(var i=0;i<inputs.length;i++)
{
if(inputs[i].checked)
{
var lbl = inputs[i].parentNode.getElementsByTagName("label")[0];
yea.. i tried this code.. when i select an optipn from radiobuttonlist it shows a msgsbox addcontacts.aspx?="the selected value"
and when i ok it then it closes but in parent form txtOrganizaton control is still empty.
hey tried this..
<script type = "text/javascript">
function RedirectParent(tbl)
{
var inputs = tbl.getElementsByTagName("input");
for(var i=0;i<inputs.length;i++)
{
if(inputs[i].checked)
{
var lbl = inputs[i].parentNode.getElementsByTagName("label")[0];
window.parent.location.href="addContacts.aspx?id=" mce_href="addContacts.aspx?id=" + encodeURIComponent(lbl.innerHTML);
}
}
}
I remove window.close() function from this ..it worked.. but the problem is that when i select radiobuttonlist it fills the txtOrganization control within child from it shows parent form.. but the original parent form's txtOrganization control remain empty.
and the child from convert into parent from with value. I want to close it..
i think we are very near to the sulution..
thanx
just be there...i want to make it work now..
It is our choices that show what we truly are, far more than our abilities...
I guess... you might be a very busy person. And even it's late night, you have given me yours valuable time. I had its requirement.. and you filled it.
Thank you so much..have a gud time
I'll be always here to tease you.. haa. haa...haa.
It is our choices that show what we truly are, far more than our abilities...
I guess... you might be a very busy person. And even it's late night, you have given me yours valuable time. I had its requirement.. and you filled it.
Thank you so much..have a gud time
I'll be always here to tease you.. haa. haa...haa.
pls reply..
It is our choices that show what we truly are, far more than our abilities...
A new issue arises with this. When I fill all the fields to save ant record and then select organization button the samll form opens and i select the organization then it back to parent form with the selected value it's fine. But the issue is
that when it back to parent form, the all field i have already fill become blank. cos page reload that y it become blank...I guess.
So any solution for this.
thanx
It is our choices that show what we truly are, far more than our abilities...
There are others fields also with txtOrganization. i fill other values like Name, Address, Phone ect.
and when i come to Organization field and click button the child form comes after selecting a value from this child form it closes and fill the parent form's txtOrganization textbox with selected value. That's fine but other fields which i filled already
become blank. I need to refill these fields.
..thanx
It is our choices that show what we truly are, far more than our abilities...
demoninside9
Participant
1260 Points
1721 Posts
Re: How to move value from one form to another
May 22, 2009 06:18 PM|LINK
yes i have removed already
<
asp:RadioButtonList ID="RadioButtonList1" onclick ="RedirectParent(this)" runat="server" CssClass="ver11" DataTextField="OrgnizationName" DataValueField="OrgId" RepeatColumns="2"> </asp:RadioButtonList>mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: How to move value from one form to another
May 22, 2009 06:44 PM|LINK
try this
<script type = "text/javascript">
function RedirectParent(tbl)
{
var inputs = tbl.getElementsByTagName("input");
for(var i=0;i<inputs.length;i++)
{
if(inputs[i].checked)
{
var lbl = inputs[i].parentNode.getElementsByTagName("label")[0];
alert("addcontacts.aspx?id=" + encodeURIComponent(lbl.innerHTML));
window.parent.location.href = "addcontacts.aspx?id=" + encodeURIComponent(lbl.innerHTML);
window.close();
}
}
}
</script>
Tell me what message you get
Contact me
demoninside9
Participant
1260 Points
1721 Posts
Re: How to move value from one form to another
May 22, 2009 07:12 PM|LINK
yea.. i tried this code.. when i select an optipn from radiobuttonlist it shows a msgsbox addcontacts.aspx?="the selected value"
and when i ok it then it closes but in parent form txtOrganizaton control is still empty.
hey tried this..
<script type = "text/javascript">
function RedirectParent(tbl)
{
var inputs = tbl.getElementsByTagName("input");
for(var i=0;i<inputs.length;i++)
{
if(inputs[i].checked)
{
var lbl = inputs[i].parentNode.getElementsByTagName("label")[0];
window.parent.location.href="addContacts.aspx?id=" mce_href="addContacts.aspx?id=" + encodeURIComponent(lbl.innerHTML);
}
}
}
I remove window.close() function from this ..it worked.. but the problem is that when i select radiobuttonlist it fills the txtOrganization control within child from it shows parent form.. but the original parent form's txtOrganization control remain empty.
and the child from convert into parent from with value. I want to close it..
i think we are very near to the sulution..
thanx
just be there...i want to make it work now..
mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: How to move value from one form to another
May 22, 2009 07:21 PM|LINK
Now it will work try this
<script type = "text/javascript">
function RedirectParent(tbl)
{
var inputs = tbl.getElementsByTagName("input");
for(var i=0;i<inputs.length;i++)
{
if(inputs[i].checked)
{
var lbl = inputs[i].parentNode.getElementsByTagName("label")[0];
window.opener.location.href = "addcontacts.aspx?id=" + encodeURIComponent(lbl.innerHTML);
window.close();
}
}
}
</script>
Contact me
demoninside9
Participant
1260 Points
1721 Posts
Re: How to move value from one form to another
May 22, 2009 07:34 PM|LINK
Thank you so much Dear.....[:)]
It worked...[:D]
I guess... you might be a very busy person. And even it's late night, you have given me yours valuable time. I had its requirement.. and you filled it.
Thank you so much..have a gud time
I'll be always here to tease you.. haa. haa...haa.
demoninside9
Participant
1260 Points
1721 Posts
Re: How to move value from one form to another
May 22, 2009 07:35 PM|LINK
Thank you so much Dear.....[:)]
It worked...[:D]
I guess... you might be a very busy person. And even it's late night, you have given me yours valuable time. I had its requirement.. and you filled it.
Thank you so much..have a gud time
I'll be always here to tease you.. haa. haa...haa.
pls reply..
demoninside9
Participant
1260 Points
1721 Posts
Re: How to move value from one form to another
May 26, 2009 06:06 AM|LINK
Hi Dear
A new issue arises with this. When I fill all the fields to save ant record and then select organization button the samll form opens and i select the organization then it back to parent form with the selected value it's fine. But the issue is that when it back to parent form, the all field i have already fill become blank. cos page reload that y it become blank...I guess.
So any solution for this.
thanx
mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: How to move value from one form to another
May 26, 2009 07:06 AM|LINK
What becomes blank and how you go back?
Contact me
demoninside9
Participant
1260 Points
1721 Posts
Re: How to move value from one form to another
May 26, 2009 07:15 AM|LINK
There are others fields also with txtOrganization. i fill other values like Name, Address, Phone ect.
and when i come to Organization field and click button the child form comes after selecting a value from this child form it closes and fill the parent form's txtOrganization textbox with selected value. That's fine but other fields which i filled already become blank. I need to refill these fields.
..thanx
mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: How to move value from one form to another
May 26, 2009 07:49 AM|LINK
If you click back button the values stored by javascript will be lost hence when updated store value in session or disable back button
Contact me