IE does not open at bookmark!

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)
 
O

Omar Abid

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
 
M

mayayana

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.
 
T

Thomas A. Rowe

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
==============================================
 
M

mayayana

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.
 
L

Larry Serflaten

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
 
J

Jack

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
 
M

mayayana

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.
 
L

Larry Serflaten

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
 
L

Larry Serflaten

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
 
L

Larry Serflaten

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
 
F

Frank Saunders, MS-MVP OE/WM

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.
 
R

Robert Aldwinckle

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
---
 
J

Jack

Ok.
Now I know why it worked before but not now.
I have upgraded my IE to version 7 several months ago.
Jack
 
J

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
 
J

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top