Data not saving during postback

G

Guest

I have the user selecting a record on one page of the web app I'm working on.
After they select a record, I save the record into a session variable and
submit the main page (in another window). In the main page I then set some
edit boxes to the values contained in the record.

The only problem with this scenario is that the data is not being saved in
the edit boxes during the postback. Here's the javascript code I'm using to
submit the main form:

window.opener.document.forms["Form1"].submit();
window.close();

I was wondering if anyone would be able to offer any suggestions about this
problem.

Thanks!
 
K

Karl

If you put a breakpoint in the save method, is it being called? My guess is
that calling window.opener..submit() indeeds submits the form, but won't let
the save button's eventhandler get hooked up. You might be able to
manipulate the __EVENTTARGET hidden field to achieve what you want.

Karl
 
G

Guest

The record is getting saved into a session variable in the child window (via
the datagrid itemcommand handler). After this a hidden control value is set
so that client-side javascript knows when to submit the form on the main
window and close the child window.

I'm setting the values in the edit boxes during the page load handler in the
main window. During debugging, the values in the edit boxes are set
correctly. However, when the page loads there is nothing in the controls.

What I am wondering is if submitting the form directly is causing problems
with the postback process.

Karl said:
If you put a breakpoint in the save method, is it being called? My guess is
that calling window.opener..submit() indeeds submits the form, but won't let
the save button's eventhandler get hooked up. You might be able to
manipulate the __EVENTTARGET hidden field to achieve what you want.

Karl

Paul K said:
I have the user selecting a record on one page of the web app I'm working on.
After they select a record, I save the record into a session variable and
submit the main page (in another window). In the main page I then set some
edit boxes to the values contained in the record.

The only problem with this scenario is that the data is not being saved in
the edit boxes during the postback. Here's the javascript code I'm using to
submit the main form:

window.opener.document.forms["Form1"].submit();
window.close();

I was wondering if anyone would be able to offer any suggestions about this
problem.

Thanks!
 

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,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top