Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

goback & goforward multiple times

0 views
Skip to first unread message

Elan Dekel

unread,
Jan 10, 1999, 3:00:00 AM1/10/99
to
I'm creating a web browser using the internet control with a "back" and
"forward" dropdown menu, like Explorer 4.0. The user should be able to
select a page that is a certain number of places forwards or backwards in
the history. However the internet control only provides Goback and
GoForward, which only works one step at a time. How can I instantly jump
more than one place forwards or backwards??
I tried looping through Goback and Goforward, as follows:

for i = 1 to num
webbrowser.goback
next i

The problem is that this loses the history of all the pages in between the
current page and the page we are jumping to.
I even tried:

for i = 1 to num
webbrowser.goback
doevents
next i

This keeps the history intact, but all the pages appear on the browser
one-by-one!

Any ideas?

Thanks,

Elan

Murali Krishna Devarakonda

unread,
Jan 10, 1999, 3:00:00 AM1/10/99
to
How about using two Stacks, one for Back, and one for Forward?
You could store the history in the Stack, and when the user selects, say the
4th item in Back,
you just pop 4 times from the Back Stack(and push into Forward Stack).

Now you have the URL you want to go to, and can call Navigate.

Regards,
Murali Krishna Devarakonda

Daolin Yang

unread,
Jan 11, 1999, 3:00:00 AM1/11/99
to
You should use the interface:
IOmHistory

if you back num step, you only need call like this:
COleVariant var = (short)num;
back(&var);

But I don't know how to find history's content, thanks.

Daolin Yang

unread,
Jan 11, 1999, 3:00:00 AM1/11/99
to
Thanks.
But how to record the user operation?

Regards.

Murali Krishna Devarakonda

unread,
Jan 11, 1999, 3:00:00 AM1/11/99
to
> But how to record the user operation?

I'm not sure what you mean by that. You can create Back/Forward buttons with
Dropdowns, just like in IE4.
You must be able to identify how far Back or Forward in history the user
wants to go.

Admittedly, calling Navigate again is not identical to going Back, as in
IE4.
Any other suggestions will be appreciated.

Regards,
Murali Krishna Devarakonda

Elan Dekel

unread,
Jan 13, 1999, 3:00:00 AM1/13/99
to
Murali Krishna Devarakonda wrote

>Admittedly, calling Navigate again is not identical to going Back, as in
>IE4.


Exactly, this is the problem! It shows up especially in frames. If you do a
navigate, then it replaces the entire frameset, while a back goes to the
previous page you viewed in the frameset. This is why it is important to me
to use back and forward.

Any other ideas?

Thanks,

Elan


Elan Dekel

unread,
Jan 13, 1999, 3:00:00 AM1/13/99
to
Think I've found a solution.
Try:

frmWorkSpace.WebBrowser.Document.parentWindow.history.go(-num)

Good luck,

Elan

Elan Dekel wrote in message ...

nat

unread,
Feb 8, 1999, 3:00:00 AM2/8/99
to

Elan Dekel wrote in message
> Try
>frmWorkSpace.WebBrowser.Document.parentWindow.history.go(-num)
>

Does anyone know how to do this in J++, the getDocument method returns an
Object. This probably needs casting to something but what ?

Nathan

0 new messages