Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

popup window

Status
Not open for further replies.

ludmann

Programmer
Apr 14, 2004
49
GB
In my application I submit some values through a form, which inserts these values into my database. I want to see the updated database 'almost' as soon as I have clicked submit, without the user having to click on anything.

I might be wrong here, but I thought if I have a narrow window on the left handside of my screen with the form, then when I press submit, this can send the information into the database and at the same time open a new window on the right handside of the screen, and display the database content.

How do I open a new 'popup' window from within the private void trayAdminSubmit_Button_Click(object sender, System.EventArgs e)

I tried
Server.Transfer("javascript:popWin('ReceiveTray.aspx',400,450)");

BUt this obviously does not work.

Any suggestions?

Marika
 
Why are you using a popup? Why not just populate a datagrid or datalist to the right on save?
 
if you still need to open a new window using javascript consider this:
Response.Write("javascript:popWin('ReceiveTray.aspx',400,450)");

however this still requires the round trip to the server where the trayAdminSubmit_Button_Click procedure is called. in that procedure you could simply load a different control in your page, or set visible a datagrid that contans the new information

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
Thanks,
I am not sure why I want to display it in a separate window. When the form is submitted, the values update the database table. However there are some business rules which are also executed (not on the client side or serverside), which based on the values also update the same database table.

Then I need to display in a separate window or on the right hand side. But because my the application is stateless, I don't know how to update the datagrid other than at the same time I submit my form.

I don't even know if this is going to work.

 
in order to get the information posted to the server where it's going to be processed, the page has to be submitted. there is no other way to do this. after the data is inserted in the database table, you could have the datagrid's datasource set to a datatable that reads the values from the database.

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
The thing is what happens is when I press the submit button the asp.net page sends a message. this message is then read by another application and this is what updates the database.

My datagrid is bound to the database table.

However the update takes several steps, which is executed within the other application.

Only when all the steps within the updates are done, do I want to display the updated table content within the datagrid.

 
then you might want to use a flag field in the database where you put 1 if the updates are done and 0 if not then check at a given time interval to see if the update was done.

you can do this using a popup window that has a page which verifies if the flag is 1. if it's so, id closes and reloads the main page, if not, in reloads itself after the given interval in order to recheck

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top