Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Refreshing a parent .ASPX page from a child window

Author  Topic 

vk18
Posting Yak Master

146 Posts

Posted - 2006-10-04 : 13:21:39
Hello Friends

I have 10 text boxes and one drop down on a parent form. When the users entering the data into the form
if they found that the name is not in the dropdown then they will click the button next to it then a child form will
popup and will add the name. after closing the child window i want only this drop down on the parent form to be refreshed with the name they added in the child form and rest of the fields should remain the same. Any Ideas..?
This is the java script i am using for popping up the child form

Thx

Dim popupScript As String

popupScript = "<script language='javascript'>" & _
"window.open('docmin.aspx?id=" & Request.QueryString("id") & "&empid=" & Request.QueryString("empid") & "&t=" & Request.QueryString("t") & "', 'CustomPopUp', " & _
"'status=yes,scrollbars=yes,toolbar=yes,menubar=yes,resizable=yes,width=790,height=500')" & _
"</script>"
Page.RegisterStartupScript("PopupScript", popupScript)

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-10-04 : 14:05:57
in javascript you can use
var ddl = document.getElementById('yourDropDownList')
ddl[0] = new Option("text", "value")

play with it.
but you have to also put this into the database and rebind the ddl in the postback or you'll loose it.
I've tried this and lost my nerves so i took the easy way out.
A textbox with an ADD button on it
when clicek it would add new value and reload the page with properly bound ddl.



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -