By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,590 Members | 663 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,590 IT Pros & Developers. It's quick & easy.

On-page link?

P: n/a
Hello,

I have a blog with all of the archives contained in a drop down menu. At the
end of the page, I have a "More Articles" link which I want to link to the
Archives Menu. I just want to hyperlink More Articles to the On-Page
Archives Menu.

The Archive Menu is script written by someone else and I can't see where to
put the ID so it associates with the menu. The script is shown below.

I am using:
<a href="#archive">More Articles</a and
<p id="archives"xxxxxxxxx </p>

Can anyone see how to set this up so More Articles jumps to the Archives
Menu?

Thanks a lot,

Bob

---

<MainOrArchivePage>

<select name="archivemenu" onchange=
"document.location.href=this.options[this.selectedIndex].value;">

<option selected="selected">- Archives -</option>

<BloggerArchives>
<option value="<$BlogArchiveURL$>"><$BlogArchiveName$></option>
</BloggerArchives>

</select>

</div>
Sep 13 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hymer <ergobob@sonic[REMOVE].netscripsit:
I have a blog with all of the archives contained in a drop down menu.
Excuse me while I yawn.
At the end of the page, I have a "More Articles" link which I want to
link to the Archives Menu.
So why don't you make it so?
The Archive Menu is script written by someone else and I can't see
where to put the ID so it associates with the menu.
Still less can we. We don't even have your URL.
The script is shown below.
You should have posted the URL, you know.
I am using:
<a href="#archive">More Articles</a and
<p id="archives"xxxxxxxxx </p>

Can anyone see how to set this up so More Articles jumps to the
Archives Menu?
Have you considered making the link point to the _right_ anchor, namely with
href="#archives"?
<select name="archivemenu" onchange=
"document.location.href=this.options[this.selectedIndex].value;">
That's ridiculous, though it may match the content of the blog, so perhaps
no problem. HTH.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Sep 13 '06 #2

P: n/a
>
>I have a blog with all of the archives contained in a drop down menu.

Excuse me while I yawn.
>At the end of the page, I have a "More Articles" link which I want to
link to the Archives Menu.

So why don't you make it so?
>The Archive Menu is script written by someone else and I can't see
where to put the ID so it associates with the menu.

Still less can we. We don't even have your URL.
>The script is shown below.

You should have posted the URL, you know.
>I am using:
<a href="#archive">More Articles</a and
<p id="archives"xxxxxxxxx </p>

Can anyone see how to set this up so More Articles jumps to the
Archives Menu?

Have you considered making the link point to the _right_ anchor, namely
with href="#archives"?
><select name="archivemenu" onchange=
"document.location.href=this.options[this.selectedIndex].value;">

That's ridiculous, though it may match the content of the blog, so perhaps
no problem. HTH.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Hello Jukka,

Thanks for your reply.

As you detected, my knowledge is clearly lacking in setting up this thing. I
appreciate all the help I can get.

The URL is: http://www.usernomics.com/news/user-...sign-news.html

If you could show me an example of how you would do that it would help a
lot.

Thanks Again,

Bob
Sep 13 '06 #3

P: n/a
Hymer wrote:
Hello,

I have a blog with all of the archives contained in a drop down menu. At the
end of the page, I have a "More Articles" link which I want to link to the
Archives Menu. I just want to hyperlink More Articles to the On-Page
Archives Menu.

The Archive Menu is script written by someone else and I can't see where to
put the ID so it associates with the menu. The script is shown below.

I am using:
<a href="#archive">More Articles</a and
<p id="archives"xxxxxxxxx </p>

Can anyone see how to set this up so More Articles jumps to the Archives
Menu?

Thanks a lot,

Bob

---

<MainOrArchivePage>

<select name="archivemenu" onchange=
"document.location.href=this.options[this.selectedIndex].value;">

<option selected="selected">- Archives -</option>

<BloggerArchives>
<option value="<$BlogArchiveURL$>"><$BlogArchiveName$></option>
</BloggerArchives>

</select>

</div>

Hymer,

I think you've complicated things as a result of a simple typographical
error. You create a paragraph and assign it an ID of 'archives'
(plural), then try to refer to it with href="#archive" (singular). To a
browser, those two strings are as different as "cat" and "dog".

You've also forced us to guess where you PUT the <pand it isn't
present in the URL you provided in a later post. In the future, you
should post a URL which actually contains the code that your tried, but
could not get to work. That let's us really see what is wrong.

In this case, however, the solution is simple. Your archive is
represented as a Select list, which starts, in the HTML, with a select
element. That's where you want the user to be taken when they click on
your "Archives", so all you have to do is give it an ID (must be unique
on the page), thus:
<select id="archives" name="archivemenu" ....

Your link should then refer to this ID, thus:
<a href="#archives">MORE ARTICLES...</a>
[Tested with IE 6 and Firefox]

NO need for an enclosing paragraph, unless you are prevented by the
mechanics of your tools from adding the id= to the <select>.

Why doesn't the name= on the select work as a target, i.e. why can't you
say <a href="#archivemenu">MORE ARTICLES...</a>? Because name= means
different things depending on which element it is used within. It
becomes a target ONLY when used on the anchor (<a>) element. For a
<select>, the name= value becomes the 'control name' for the select;
this name is passed to the server along with the currently selected
value, so the server can pick out the right archive, but it has no
effect on the browser.

id= ALWAYS specifies an identifier that can be used as a target, so it's
the better attribute to use.

Chris Beall


Sep 13 '06 #4

P: n/a

"Chris Beall" <Ch*********@prodigy.netwrote in message
news:C1***************@newssvr25.news.prodigy.net. ..
Hymer wrote:
>Hello,

I have a blog with all of the archives contained in a drop down menu. At
the end of the page, I have a "More Articles" link which I want to link
to the Archives Menu. I just want to hyperlink More Articles to the
On-Page Archives Menu.

The Archive Menu is script written by someone else and I can't see where
to put the ID so it associates with the menu. The script is shown below.

I am using:
<a href="#archive">More Articles</a and
<p id="archives"xxxxxxxxx </p>

Can anyone see how to set this up so More Articles jumps to the Archives
Menu?

Thanks a lot,

Bob

---

<MainOrArchivePage>

<select name="archivemenu" onchange=
"document.location.href=this.options[this.selectedIndex].value;">

<option selected="selected">- Archives -</option>

<BloggerArchives>
<option value="<$BlogArchiveURL$>"><$BlogArchiveName$></option>
</BloggerArchives>

</select>

</div>

Hymer,

I think you've complicated things as a result of a simple typographical
error. You create a paragraph and assign it an ID of 'archives' (plural),
then try to refer to it with href="#archive" (singular). To a browser,
those two strings are as different as "cat" and "dog".

You've also forced us to guess where you PUT the <pand it isn't present
in the URL you provided in a later post. In the future, you should post a
URL which actually contains the code that your tried, but could not get to
work. That let's us really see what is wrong.

In this case, however, the solution is simple. Your archive is
represented as a Select list, which starts, in the HTML, with a select
element. That's where you want the user to be taken when they click on
your "Archives", so all you have to do is give it an ID (must be unique on
the page), thus:
<select id="archives" name="archivemenu" ....

Your link should then refer to this ID, thus:
<a href="#archives">MORE ARTICLES...</a>
[Tested with IE 6 and Firefox]

NO need for an enclosing paragraph, unless you are prevented by the
mechanics of your tools from adding the id= to the <select>.

Why doesn't the name= on the select work as a target, i.e. why can't you
say <a href="#archivemenu">MORE ARTICLES...</a>? Because name= means
different things depending on which element it is used within. It becomes
a target ONLY when used on the anchor (<a>) element. For a <select>, the
name= value becomes the 'control name' for the select; this name is passed
to the server along with the currently selected value, so the server can
pick out the right archive, but it has no effect on the browser.

id= ALWAYS specifies an identifier that can be used as a target, so it's
the better attribute to use.

Chris Beall

Hello Chris,

Thanks so much. That worked like a charm.

Much Appreciated,

Bob
Sep 13 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.