IE does not open at bookmark!

  • Thread starter Thread starter Jack
  • Start date Start date
J

Jack

Hello
I have this problem.
When starting new IE page programmatically, the IE page opens the proper
page but it ignores bookmark, however when I insert the same address
directly into IE, the webpage opens properly at bookmark.
Why is that difference?

rtn = ShellExecute(Me.hwnd, "Open", "IExplore.exe", App.Path &
"\options_help.htm#HARDWARE", App.Path, vbNormalFocus)
 
Hello
I have this problem.
When starting new IE page programmatically, the IE page opens the proper
page but it ignores bookmark, however when I insert the same address
directly into IE, the webpage opens properly at bookmark.
Why is that difference?

rtn = ShellExecute(Me.hwnd, "Open", "IExplore.exe", App.Path &
"\options_help.htm#HARDWARE", App.Path, vbNormalFocus)

Hi,
you hadn't precise if you use a script or ASP and where you putted
this text
Omar Abid
 
I've noticed that IE is buggy in that regard. For my
own website I use PHP includes to insert a menu, etc.
based on the browser. When I click an in-page link on
a local (on my own PC), menu-less page in IE it doesn't
work. But if I use a normal HTML page it does. I wonder
if IE gets confused by the fact that the pre-include page
is not properly formatted.
That's not an answer to your question, but maybe it will
provide a clue.
 
PHP is a server-side scripting language, therefore unless you are accessing the page via http from a
web server that supports the specific server-side script, then the functions will not work.

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage

http://www.Ecom-Data.com
==============================================
 
PHP is a server-side scripting language, therefore unless you are
accessing the page via http from a
web server that supports the specific server-side script, then the functions will not work.
Yes, but I'm not talking about that. As I said, the problem
happens for me with *local* files. If I open the PHP file
without the extra PHP include added then IE gets confused
by in-page links. But if I put the include code in "by hand" and
create a "finished" HTML file, it does work. In both cases I'm
talking about a file opened on my own PC.
 
Jack said:
I have this problem.
When starting new IE page programmatically, the IE page opens the proper
page but it ignores bookmark, however when I insert the same address
directly into IE, the webpage opens properly at bookmark.
Why is that difference?

rtn = ShellExecute(Me.hwnd, "Open", "IExplore.exe", App.Path &
"\options_help.htm#HARDWARE", App.Path, vbNormalFocus)

My first suggestion would be that you are calling explorer and attempting to
pass it a parameter, when what you may really want to do is just open the
page using the default browser:

http://support.microsoft.com/kb/224816

Something like:

rtn = ShellExecute(Me.hWnd, "open", App.Path & "\options_help.htm#HARDWARE", 0, 0, vbNormalFocus)

See if that works for you....
LFS
 
Nope.
The line:
rtn = ShellExecute(Me.hwnd, "open", App.Path & "\options_help.htm#HARDWARE",
0, 0, vbNormalFocus)
does not invoke IE at all.
I have tried also:
rtn = ShellExecute(Me.hwnd, "open", App.Path & "\options_help.htm",
"#HARDWARE", 0, vbNormalFocus)
and that line invokes IE but not at the bookmark.
The interesting part is that it was working properly before (a year ago)
Jack
 
I just tested this and it's not quite as I'd thought.
It's more strange: On my PC I store a copy of
my website files. I have php3 files, assigned to
IE. I also created a .phi extension for testing
IE-specific pages. In-page links do not work in
either file when loaded in IE, regardless of whether
the include code has been added. But they do work if
I rename the .php3 file with an HTML extension! And
they work online, when a .php3 page is loaded from
my web server.
 
Jack said:
I have tried also:
rtn = ShellExecute(Me.hwnd, "open", App.Path & "\options_help.htm",
"#HARDWARE", 0, vbNormalFocus)
and that line invokes IE but not at the bookmark.
The interesting part is that it was working properly before (a year ago)

OK, see if this gets you farther along:

rtn = ShellExecute(Me.hwnd, "open", "iexplore.exe", file:/// & App.Path & "\options_help.htm#HARDWARE", 0, vbNormalFocus)

Note: Calling IE specifically, and using the file:/// identifier....

(It worked here)
LFS
 
Jack said:
I have tried that already.
It invokes IE all right, but it ignores bookmark.

I tested it on W2K SP4 using IE 6.0.2800.1106 and just a short
htm file that had a bookmark. It went to the bookmark.

What system are you working with?

LFS
 
Jack said:
I have tried that already.
It invokes IE all right, but it ignores bookmark.
rtn = ShellExecute(Me.hwnd, "open", "iexplore.exe", file:/// & App.Path &
"\options_help.htm#HARDWARE", 0, vbNormalFocus)


Is it likely that your App.Path has spaces in the name? If so,
you may need to surround that entire parameter in qu0tes.

LFS
 
Larry Serflaten said:
I tested it on W2K SP4 using IE 6.0.2800.1106 and just a short
htm file that had a bookmark. It went to the bookmark.

What system are you working with?

LFS

The problem is IE7. It has a problem with anchors. At least mine won't go
to them.
 
Frank Saunders said:
The problem is IE7. It has a problem with anchors. At least mine won't go to them.


Yes. The same thing happens sometimes with links from OE messages.
I have wondered if the characterset of the source of the link has something
to do with it? E.g. maybe doublebyte characters don't work or vice versa?

Also, since it is probably some kind of parser problem what happens
if you encode the # as %23 and try with that instead?
E.g. the % would have to be more allowed by a scan of a URL
than a # would be, so maybe that would get the # and its label
through to a different processing layer where both could be interpreted
as intended? Etc.


FWIW

Robert
---
 
Ok.
Now I know why it worked before but not now.
I have upgraded my IE to version 7 several months ago.
Jack
 
Hi Robert,
I have tried your suggestion using %23 instead of # but IE cannot find file.
I've also pasted the full address directly into IE:
file:///I:/Documents%20and%20Settings/jastrzebiec/My%20Documents/My%20Progs/PhoneDialer40/options_help.htm%23HARDWARE"
with the same result >>> IE cannot find file.
Jack
 
Yes there are spaces, but IE converts them to %20 anyway.
just like that:
file:///I:/Documents%20and%20Settings/jastrzebiec/My%20Documents/My%20Progs/PhoneDialer40/options_help.htm#HARDWARE

It is purely IE7 problem.
Jack
 
Back
Top