Update main form with data added in a pop-up form

E

Elad Frid

HI

I have a form with a many dropdownlist that are populated with
SqlDataReader
I have also insert an "--- Add New ---" value to be the first item in
each dropdownlist
The user can choose an item or choose add new in this case I'm opening
a new form ( with JavaScript )
and ask him to add a new value to the database.

The problem now is that I can't access \ refresh the data in the
dropdownlist from the pop-up form I have opened

Any idea how to do that ?

Elad.
 
C

CMA

try with this type of code in the opened window...

onunload of the page call to javascript "refreshParent()"

in the <head> put this function...

function refreshParent()
{
window.opener.document.reload();
}

this will refresh the main page.
so u can see updated values in the lists now.
(hope u already added the new item to database before unload the page)

hope this helps,
CMA
 
N

Nikerz Inc

Hi there,

What you need to do is have the webform update the database, after that call
a procedure to refresh of the dataset to your control and you should be
finished!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top