Hyperlinks and Bookmarks

J

John

Hello!

I am using FP 2003.

I have a page with a bunch of text. At the top of the page are hyperlinks to
different bookmarks in the text).

When I use preview in FP, the hyperlinks work like they are supposed to
(hyperlinks jump to bookmark and then "top of page" hyperlink jumps up to
the top of page).

When I close FP and open the webpage up in Internet Explorer, when I click
on any of the hyperlinks, it jumps to a blank IE page.

I have looked and re-looked at the code and can't seem to find the problem?

Any ideas on this? Thanks for the help!

VR/

John
 
A

Andrew Bailey

John said:
Hello!

I am using FP 2003.

I have a page with a bunch of text. At the top of the page are hyperlinks
to
different bookmarks in the text).

When I use preview in FP, the hyperlinks work like they are supposed to
(hyperlinks jump to bookmark and then "top of page" hyperlink jumps up to
the top of page).

When I close FP and open the webpage up in Internet Explorer, when I click
on any of the hyperlinks, it jumps to a blank IE page.

I have looked and re-looked at the code and can't seem to find the
problem?

Any ideas on this? Thanks for the help!

VR/

John

Hi John,

I use this...

<a href="#bookmark">Bookmark</a>
blah blah
<a name="bookmark"></a>

Hope this helps

Andy
 
J

John

All,

Thanks for the help!

After printing out the source code for a good page and the code for a page
that wasn't working and going over it line by line, there was only one
difference: the name of the file.

I made up some rough test code below and recreated the error.

1) Open up Notepad.
2) Copy and paste from <! Cut and paste> to <! Cut and paste>.
3) Name this file "test.html". (html file extension)
4) Open the file in IE. Go crazy clicking back and forth.
5) Go back to Notepad, use the same code, but name it "test.asp". (asp file
extension)
6) Open the file in IE. Error time.

Why do hyperlinks and bookmarks not work the same for .asp files than for .
html?? Baffled about this.

VR/

John



<! cut and paste start>
<html>
<head>
</head>
<body>
<a name="up">Up</a>
<p>&nbsp</p>
<a href="#down">Down</a>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<a name="down">Down</a>
<p>&nbsp</p>
<a href="#up">Up</a>
</body>
</html>
<! cut and paste end>
 
B

Beauregard T. Shagnasty

John said:
5) Go back to Notepad, use the same code, but name it "test.asp".
(asp file extension)
6) Open the file in IE. Error time.

Why do hyperlinks and bookmarks not work the same for .asp files than
for . html?? Baffled about this.

Are you running an ASP server? Normally, Windows IIS ...
If you are not, an .asp file will not run on your computer. It is just
text ...
 
J

Jonathan N. Little

John said:
All,

Thanks for the help!

After printing out the source code for a good page and the code for a page
that wasn't working and going over it line by line, there was only one
difference: the name of the file.

I made up some rough test code below and recreated the error.

1) Open up Notepad.
2) Copy and paste from <! Cut and paste> to <! Cut and paste>.
3) Name this file "test.html". (html file extension)
4) Open the file in IE. Go crazy clicking back and forth.
5) Go back to Notepad, use the same code, but name it "test.asp". (asp file
extension)
6) Open the file in IE. Error time.

Why do hyperlinks and bookmarks not work the same for .asp files than for .
html?? Baffled about this.

You doing this on your local hard drive? Of course it would fail as an
ASP... [A]ctive erver [P]ages! Wont work unless you are running from
a webserver, IIS to be exact.
 
A

Andy Mabbett

John said:
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>
<p>&nbsp</p>


Lovely!
 
A

Andy Dingley

Beauregard said:
If you are not, an .asp file will not run on your computer. It is just
text ...

Generally (if you've opened it in a browser, particularly IE) an ASP
page isn't "just text" it's "just HTML". So unless you're generating
these links dynamically (I doubt the OP is doing this) they ought to
work exactly the same as in plain HTML.


Note to the OP: Abandon <a name="foo" ></a> and just use <p
id="foo" > instead.

It works just as well as <a name="..." > does, it works for every
credible browser still in existence, and it avoids having to add extra
tags to your HTML. Just use the tags you already have and add the id
attribute where you want to.

PPS -repeated <p>s to generate big whitespace is very ugly code. If
you're just dummying up pages, you're better with a couple of large
<p>s filles with lorem ipsum text.
 
B

Beauregard T. Shagnasty

Andy said:
Generally (if you've opened it in a browser, particularly IE) an ASP
page isn't "just text" it's "just HTML". ...

If there is no ASP processor to start the page, it won't be HTML.

It's been a few years since I wrote .asp, but my recollection is that IE
would just offer to "download" the file - on a computer without IIS/ASP.
 
A

Andy Dingley

Beauregard said:
If there is no ASP processor to start the page, it won't be HTML.

ASP pretty much is HTML, barring the script fragments. It's not
_labelled_ as HTML unless your Windows desktop has been configured that
way, but that's a common enough scenario if you've got many of the M$
web dev tools installed.
It's been a few years since I wrote .asp, but my recollection is that IE
would just offer to "download" the file - on a computer without IIS/ASP.

I've just tried it (on a desktop WinXP machine without any web server).
IE7 saw it as text, Firefox saw it as HTML.
 
B

Beauregard T. Shagnasty

Andy said:
ASP pretty much is HTML,

Well, if you aren't really doing any asp processing, maybe so.
barring the script fragments.

I suppose that since I always did processing, with the resultant HTML
issued with "Response.Write" - rather than simply renaming an HTML file
to an .asp extension - what we would see is different.
It's not _labelled_ as HTML unless your Windows desktop has been
configured that way, but that's a common enough scenario if you've
got many of the M$ web dev tools installed.


I've just tried it (on a desktop WinXP machine without any web server).
IE7 saw it as text, Firefox saw it as HTML.

For me, changing a pure HTML file to extension .asp, both IE6 and
Firefox displayed it as if it were still an HTML file. That would not
happen with a real asp file.

If the file does no processing, there's no reason to use asp.
 
A

Andy Dingley

Beauregard said:
If the file does no processing, there's no reason to use asp.

It's the typical (although overkill) approach to using SSI under IIS.
Default config process includes in ASP but not in HTML . You can change
this, and you don't need to use the ASP processor to do it either -
there's a simpler ISAPI filter in there that just does SSI.
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top