Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Problem with inpage link

Reply
Thread Tools

Problem with inpage link

 
 
Darko
Guest
Posts: n/a
 
      07-30-2007
Hi,

I have a problem with <a name="..."></a>, <h2 id="...">...</h2>, or
whatever I put it like. This is the scenario:

I page 2.html, I have the following code:
<a name="video"></a>
<h2>Video</h2>

I would like to jump from page 1.html into 2.html, to location video.
So I put the code:
<a href="2.html#video">video</a>
into 1.html.

Now, these are just examples, actually it's help.php?
sec=mainPage#structure, but I hope that doesn't matter. The problem
is, when I click on the link "video" in 1.html, I get transferred to
2.html, but on the top of the page. The absurd thing is that now when
I'm on the top of this page, when I just focus on the address bar as
it is and press enter, it jumps into right position. What do I do
wrong?

 
Reply With Quote
 
 
 
 
rf
Guest
Posts: n/a
 
      07-30-2007

"Darko" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hi,
>
> I have a problem with <a name="..."></a>, <h2 id="...">...</h2>, or
> whatever I put it like. This is the scenario:
>
> I page 2.html, I have the following code:
> <a name="video"></a>
> <h2>Video</h2>
>
> I would like to jump from page 1.html into 2.html, to location video.
> So I put the code:
> <a href="2.html#video">video</a>
> into 1.html.
>
> Now, these are just examples, actually it's help.php?
> sec=mainPage#structure, but I hope that doesn't matter. The problem
> is, when I click on the link "video" in 1.html, I get transferred to
> 2.html, but on the top of the page. The absurd thing is that now when
> I'm on the top of this page, when I just focus on the address bar as
> it is and press enter, it jumps into right position. What do I do
> wrong?


1) Provide a URL that demonstrates the behaviour, or the misbehaviour, you
are experiencing.

2) Try to provide some coherant explanations of what your problem is.

--
Richard.


 
Reply With Quote
 
 
 
 
Darko
Guest
Posts: n/a
 
      07-30-2007
On Jul 30, 2:37 pm, "rf" <(E-Mail Removed)> wrote:
> "Darko" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) oups.com...
>
>
>
> > Hi,

>
> > I have a problem with <a name="..."></a>, <h2 id="...">...</h2>, or
> > whatever I put it like. This is the scenario:

>
> > I page 2.html, I have the following code:
> > <a name="video"></a>
> > <h2>Video</h2>

>
> > I would like to jump from page 1.html into 2.html, to location video.
> > So I put the code:
> > <a href="2.html#video">video</a>
> > into 1.html.

>
> > Now, these are just examples, actually it's help.php?
> > sec=mainPage#structure, but I hope that doesn't matter. The problem
> > is, when I click on the link "video" in 1.html, I get transferred to
> > 2.html, but on the top of the page. The absurd thing is that now when
> > I'm on the top of this page, when I just focus on the address bar as
> > it is and press enter, it jumps into right position. What do I do
> > wrong?

>
> 1) Provide a URL that demonstrates the behaviour, or the misbehaviour, you
> are experiencing.
>
> 2) Try to provide some coherant explanations of what your problem is.
>
> --
> Richard.


I can't provide any address, since the site isn't published yet, and
it's inside our local network.

What does "coherant" mean? Did you mean coherent? Just kidding. I
don't know what else to say except for what I've already said. I show
you the source of both files and described the behaviour. What else?

I even thought my browser makes the problem, but it doesn't - for
other sites it works fine. I think it's just some sort of stupid
problem.

 
Reply With Quote
 
Darko
Guest
Posts: n/a
 
      07-30-2007
On Jul 30, 2:37 pm, "rf" <(E-Mail Removed)> wrote:
> "Darko" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) oups.com...
>
>
>
> > Hi,

>
> > I have a problem with <a name="..."></a>, <h2 id="...">...</h2>, or
> > whatever I put it like. This is the scenario:

>
> > I page 2.html, I have the following code:
> > <a name="video"></a>
> > <h2>Video</h2>

>
> > I would like to jump from page 1.html into 2.html, to location video.
> > So I put the code:
> > <a href="2.html#video">video</a>
> > into 1.html.

>
> > Now, these are just examples, actually it's help.php?
> > sec=mainPage#structure, but I hope that doesn't matter. The problem
> > is, when I click on the link "video" in 1.html, I get transferred to
> > 2.html, but on the top of the page. The absurd thing is that now when
> > I'm on the top of this page, when I just focus on the address bar as
> > it is and press enter, it jumps into right position. What do I do
> > wrong?

>
> 1) Provide a URL that demonstrates the behaviour, or the misbehaviour, you
> are experiencing.
>
> 2) Try to provide some coherant explanations of what your problem is.
>
> --
> Richard.


Yeah, it was stupid problem. I had a div that I put all the contents
into, and made that div display:none. When the page loaded, I made the
div visible so the user doesn't see elements arranging while the page
is not fully loaded. So, the Firefox probably tried to go to '#video'
the moment it got on the page, but it wasn't there until I showed the
div.

Thanks anyway

 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      07-30-2007

"Darko" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> On Jul 30, 2:37 pm, "rf" <(E-Mail Removed)> wrote:
>> "Darko" <(E-Mail Removed)> wrote in message


> Yeah, it was stupid problem. I had a div that I put all the contents
> into, and made that div display:none. When the page loaded, I made the
> div visible so the user doesn't see elements arranging while the page
> is not fully loaded


WHAT?

I can only presume you make the div visible using javascript. That means
that the 10% or so of people who don't have javascript will never see your
div. Just like turning your server off for one month a year.

BTW coherant was a typo. We all make them sometimes. The polite people don't
notice them, except if they are in a web page up for review

--
Richard.


 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      07-30-2007
Darko wrote:
> On Jul 30, 2:37 pm, "rf" <(E-Mail Removed)> wrote:
>> "Darko" <(E-Mail Removed)> wrote in message
>>
>> news:(E-Mail Removed) oups.com...
>>
>>
>>
>>> Hi,
>>> I have a problem with <a name="..."></a>, <h2 id="...">...</h2>, or
>>> whatever I put it like. This is the scenario:
>>> I page 2.html, I have the following code:
>>> <a name="video"></a>
>>> <h2>Video</h2>


For what it is worth, rather than use the named empty anchor, just set
the H2 element's ID to the fragment:

<h2 id="video">Video</h2>

then link <a href="2.html#video">video</a> should work. Why you are
currently having problem one can only guess because we cannot *see* what
you are doing....

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
Darko
Guest
Posts: n/a
 
      07-31-2007
On Jul 30, 3:19 pm, "rf" <(E-Mail Removed)> wrote:
> "Darko" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) oups.com...
>
> > On Jul 30, 2:37 pm, "rf" <(E-Mail Removed)> wrote:
> >> "Darko" <(E-Mail Removed)> wrote in message

> > Yeah, it was stupid problem. I had a div that I put all the contents
> > into, and made that div display:none. When the page loaded, I made the
> > div visible so the user doesn't see elements arranging while the page
> > is not fully loaded

>
> WHAT?
>
> I can only presume you make the div visible using javascript. That means
> that the 10% or so of people who don't have javascript will never see your
> div. Just like turning your server off for one month a year.
>
> BTW coherant was a typo. We all make them sometimes. The polite people don't
> notice them, except if they are in a web page up for review
>
> --
> Richard.


Yes, I agree anyone who doesn't have javascript will not see my page,
but my page
is such that even if they *say* my div, not having javascript they
will have absolutely
no use of it, since the page uses around 160KB of javascript code.
It's aimed only at
people who have it, and if they turned it off they can turn it on, and
if they don't have
it then they can get it

The notice of the typo was just a joke.

 
Reply With Quote
 
Darko
Guest
Posts: n/a
 
      07-31-2007
On Jul 30, 4:51 pm, "Jonathan N. Little" <(E-Mail Removed)>
wrote:
> Darko wrote:
> > On Jul 30, 2:37 pm, "rf" <(E-Mail Removed)> wrote:
> >> "Darko" <(E-Mail Removed)> wrote in message

>
> >>news:(E-Mail Removed) groups.com...

>
> >>> Hi,
> >>> I have a problem with <a name="..."></a>, <h2 id="...">...</h2>, or
> >>> whatever I put it like. This is the scenario:
> >>> I page 2.html, I have the following code:
> >>> <a name="video"></a>
> >>> <h2>Video</h2>

>
> For what it is worth, rather than use the named empty anchor, just set
> the H2 element's ID to the fragment:
>
> <h2 id="video">Video</h2>
>
> then link <a href="2.html#video">video</a> should work. Why you are
> currently having problem one can only guess because we cannot *see* what
> you are doing....
>
> --
> Take care,
>
> Jonathan
> -------------------
> LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com


Yes, I know, but as far as I can remember, some browsers (was it IE6?
I can't remember) had problems with just ids. So I ended with
giving both id and name to h2, if that won't work, I will make it
<a name="..."></a>
<h2 id="...">...</h2>

Hopefully that'll work. Thanks

 
Reply With Quote
 
Bergamot
Guest
Posts: n/a
 
      07-31-2007
Darko wrote:
> On Jul 30, 4:51 pm, "Jonathan N. Little" <(E-Mail Removed)>
> wrote:
>> For what it is worth, rather than use the named empty anchor, just set
>> the H2 element's ID to the fragment:

>
> Yes, I know, but as far as I can remember, some browsers (was it IE6?
> I can't remember) had problems with just ids.


FYI, it was Netscape 4.x, a browser (thankfully) long dead and buried.

--
Berg
 
Reply With Quote
 
Information Man
Guest
Posts: n/a
 
      07-31-2007
l o l

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using AJAX to do inline, inpage file uploads JMB Javascript 10 01-04-2006 02:29 PM
NEED help is it a virus KERNEL DATA INPAGE =?Utf-8?B?TXVyY28=?= Windows 64bit 3 06-09-2005 05:09 AM
RE: Link Link Link =?Utf-8?B?REw=?= Windows 64bit 0 05-17-2005 12:15 PM
Re: Link Link Link DANGER WILL ROBINSON!!! Kevin Spencer ASP .Net 0 05-17-2005 10:41 AM
D-LINK DWL-AG650 doesn't work with WinXP - Zero Configuration Service (WZCSVC) / D-Link AirXpert nearly works Johannes Rosenstock Wireless Networking 0 08-27-2004 11:49 PM



Advertisments