/    Sign up×
Community /Pin to ProfileBookmark

Submit and Popup window problem.

Hi ,
please help me to solve this problem.

The whole application is written in inline code(V? and javascript (No code behind)

On submit click, I am calling a method in javascript where form is getting submitted

btnSubmit()
{
//Here form is getting submitted
frmParent.submit();

setTimeout(‘openSummaryPage()’,300);

}

openSummaryPage()
{
window.open(frmpopup.aspx,width=750,height=600);

}

when frmParent.submit is getting executed, i am capturing the folliwng

If request.Form.Item(“txt_hdn_submit_form”) = “Submit”
{
Here I am doing all database operations.
Insert statement1
Insert statement2
Insert statement3
Insert statement4
Now, we have got a value from database which is needed in child window.
This value is stored in hidden variable in parent window and it should be accessible to the child window also
e.g window.opener.document.frmParent.hdnvalue.value

}

When form is getting submitted in te statement “frmParent.submit();”, simultaneously openSummaryPage() is also getting execeuted.
And thereby popup window is getting opened and trying to access the hidden variable even before it is being set in the parent window.

I tried to increase the SetTimeOut, but unfortunately pop up is not coming up at all in such cases ?

Does anyone know how to resolve this ??

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@gil_davisAug 15.2006 — What is the "action" of the form?
×

Success!

Help @wowrang spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...