Calling a function in one page from another

  • Thread starter Thread starter wberg
  • Start date Start date
W

wberg

Guest
I am opening a modal window from one web page, doing what I need to do on it and then closing it. Is it possible to call a function from the modal form that is sitting on the main form? If so, how do you do it?
 
Question: How can I call a function on one web page from another web page?
Obviously, my code is just to simplfy the question.
The broader picture is:
page1 opens page2 (page1 remains open also)
page2 does some work, then calls function on page1, then closes itself(page2)
function on page1 opens page3 which does some work, then refreshes page1 and closes itself (page3)
page1 is now refreshed, displaying the result of work done by page 3.
page2 gets user input required for the work which page 3 will do.
page1 is inside frame
 
"ASP.NET is compiled on the server, so to answer your question, no, you can't." and JavaScript can not do this either as it'd be a serious security hole.

What you could do.

page1 opens page2 (page1 remains open also)
page2 does some work, posts back to the server and stores the information in the session, then closes itself(page2)
page1 uses refresh or AJAX to check for updated status on the server. page1 then refreshes itself etc.


Maybe a wizard control would be easier?
 
Back
Top