MarkNalley
New Member
- Joined
- Feb 17, 2016
- Messages
- 1
Question: I'm looking for ideas or methods on how to handle a child window opened by a JavaScript function on a .aspx webpage. I've run down every rabbit hole I can find and hit a road block each time.
The problem: I have a website that creates orders and part of the webpage requires a button 'Click' event. The 'Click' event fires a JavaScript doPostBack function that builds a popup window where more information is entered and another 'Click' event posts the relevant address information back to the original webpage and refreshes the page (with a slight change to the .aspx address parameters - addition of an ID field). The problem occurs after the first 'Click' event. The VBA script pauses while the JavaScript function runs and isn't resumed until after the second 'Click' event.
Workaround: Run the VBA script to just before the first 'Click', copy the needed information into the clipboard via VBA, fire the first 'Click'. Manually paste the information into the popup window, manually fire the second 'Click' event. This occurs 2-14 times for any given order.
What I've tried:
Rabbit Holes I'm currently looking down:
Why I suck at this: I know almost nothing about ASP and too little about JavaScript to make this easy.
The problem: I have a website that creates orders and part of the webpage requires a button 'Click' event. The 'Click' event fires a JavaScript doPostBack function that builds a popup window where more information is entered and another 'Click' event posts the relevant address information back to the original webpage and refreshes the page (with a slight change to the .aspx address parameters - addition of an ID field). The problem occurs after the first 'Click' event. The VBA script pauses while the JavaScript function runs and isn't resumed until after the second 'Click' event.
Workaround: Run the VBA script to just before the first 'Click', copy the needed information into the clipboard via VBA, fire the first 'Click'. Manually paste the information into the popup window, manually fire the second 'Click' event. This occurs 2-14 times for any given order.
What I've tried:
- NewWindow withEvents trigger: doesn't work. There is no NewWindow2 event triggered. Ditto for BeforeNavigation2, NewProcess, BeforeScriptExecute or any other InternetExplorer Object event. The events occur at other points in the process but not for the first 'Click' event described above.
- Looked into XMLHTTP functions but stopped early. Per Wireshark, there are no GET or POST messages IN or OUT during the first 'Click' event. The first POST event occurs after the manual paste of information into the new popup window.
Rabbit Holes I'm currently looking down:
- Is it possible to edit the JavaScript (spread out over 8 different text files) in the Temporary Internet Files to force a New Window event or is the script held in IE volatile memory.
- Is it possible to run JavaScript from VBA that will simulate the results of the first 'Click' event.
Why I suck at this: I know almost nothing about ASP and too little about JavaScript to make this easy.