Link to home
Start Free TrialLog in
Avatar of rgke001
rgke001Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Using webbrowser activex object, cannot get bookmarks within page to work if bookmark has space in the name


I am using the MS Web Browser activex object in a form to display context sensitive help.

If I pass a URL using Navigate such as "c:\page.htm#bookmark", it works fine.  However if there is space in the bookmark name ("c:\page.htm#book mark") it doesn't, although the name is valid and exists in the page and works if you type the url direct into an IE address bar.  All it does is display the page starting at the top.

I've tried replacing the space with %20, but still no joy.

Using Windows 2000 Server, Access 2000, IE6

Any thoughts?
Avatar of dqmq
dqmq
Flag of United States of America image

Just a hunch, try putting bookmark path in double-quotes.  If already in quotes then, try triple-double, i.e.
"""c:\page.htm#book mark"""

Try:

'c:\page.htm#bookmark'
ASKER CERTIFIED SOLUTION
Avatar of Markus Fischer
Markus Fischer
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rgke001

ASKER

Fantastic - how do you figure out all this stuff??
Thanks.
Frankly? I didn't believe you and tried it for myself ;)

Then I was hooked and tried other navigations methods, until one worked. The "explanation" is pure guesswork, but this _is_ a bug, no doubt about it.

Anyway, I'm glad you like this workaround. happy automated browsing!
(°v°)