This is a somewhat complicated question for me to explain but I am going to do my best. I am currently in the process of rewriting an intranet based web application that was used to launch various pages and systems. Since it is going to be a phased implementation the first phase was to replace the basic entry point to all pages which I have successfully done, bar 2 entries that I am having trouble handling. What makes them so difficult is that they are really 2 step entries...
Essentially the first step is to enter a modal popup page where an order is entered. After the order is entered the modal popup's response text is the orderId which is then used to navigate away from the home page (entry to systems page) to the order details page. The code from the homepage currently looks like this:
function orderModal(url,altUrl)
{
var intOrderID = window.showModalDialog('/OrderEntry/'+url+'?Editing=0','','dialogWidth:1022px;dialogHeight:600px;scroll:yes;status:no;help:no;center:yes');
if(parseInt(intOrderID))
{
window.open('/OrderEntry/'+altUrl+'?OrderID=' + intOrderID + '&NewMode=1','_self');
}
}
Basically what I have opted to do is create a form that uses the webbrowser component and navigates to the url. However when they click save on that page I need to intercept the javascript execution or webresponse text and parse out the intOrderId variable so that I can then navigate the webbrowser control to the 2nd altUrl.
Does anyone have any suggestions or know of a way of doing this? I would assume that it is possible because I have written code to call javascript functions within a webbrowser.document before. I have just never pulled a value from a webbrowser.document after execution has been performed.
Thanks in advance,
Matt Colin