Solved

URL & Parameters (POST)  from IWebBrowser2 current page

Posted on 2002-06-05
7
580 Views
Last Modified: 2013-11-20
Hi there,

I'm looking for a way to query IWebBrowser2 for the current page displayed in it, including any POST parameters that were sent to it.
I've tried using BeforeNavigate2 event and keeping track of the history myself, but it's called for every frame in the page, and if I'm redirected to the same page, it's called, but the browser doesn't add it to its history, and then I lose sync with the back/forward buttons.
Another problem is when the user presses 'backspace' to go back, no event is connected to it.
Access to the history associated with the WebBrowser would have solved it, but seems like there's not such a thing.

Thank you,

Yudi.
0
Comment
Question by:Yudi
  • 3
  • 2
7 Comments
 
LVL 32

Expert Comment

by:jhance
Comment Utility
>>for the current page displayed in it, including any POST
parameters that were sent to it.

I'm not sure I understand your question.  POST data is sent from the browser BACK TO the server, not the other way around.
0
 

Author Comment

by:Yudi
Comment Utility
Oh, sorry, I mean every POST data that were sent to the server before the server returned the page.
0
 
LVL 12

Expert Comment

by:migel
Comment Utility
Hi!
is method I mentoned (beforeNavigate) in the prevous your Q. not working?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:Yudi
Comment Utility
Hi Migel, thanks for remembering :)
Well, after some experiments, I got to the conclusion that it's not enough.
I'm trying to keep my history synchronized with the back/forward buttons, so I can know the POST data that was sent to the server for every page I got till now.
It's getting more complicated when I have more than one frame. And there are some more problems too.
The WebBrowser sometimes add the new page to the history and sometimes not (for examle, when the user clicks a link that brings him to the same page), and then my 'back/forward' buttons go out of sync.
Right now I'm working on a more complicated history tracking, but I think it might be an overkill, cause I know the WebBrowser maintains its own history, including the POST data that was sent for every page.
Sorry for the long story :) Anyway, I need something that will give me the ability to resend the request programatically for a certain page the user has been to, and I need it to work for 99% of the pages.
0
 
LVL 12

Accepted Solution

by:
migel earned 500 total points
Comment Utility
Hi!
you can enum all frames in the current document and catch event in the any frame you want.
IMHO you need to store brief description of the document (at least frames that it hold) and check requests from the frame (store not only post data but document URL and frame that make web request)
0
 

Author Comment

by:Yudi
Comment Utility
Well, that's what I'm trying to do now, get the URL, post data, and every URL and post data for every frame in the current page and store it in my history, but it's a bit wierd that you cannot simply access the history information from the WebBrowser...
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Named range not carried over 10 57
has22 challenge 11 70
twoTwo  challenge 35 86
firstChar challenge 13 83
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now