Welcome Guest, Not a member yet? Register   Sign In
Internal Links problem
#1

[eluser]phpLearner[/eluser]
I am trying to use html internal links in codeigniter web application.

at the top of the page I used
Code:
<a name='editable'></a>

at the bottom of the page i used
Code:
<a href='#editable'>Click Here</a>

When i click on the click here, it is not navigating to the top.

What did i do wrong.
I can post the whole code but it is way big.
#2

[eluser]boltsabre[/eluser]
Try changing it to:
Code:
<a id='editable'></a>
I don't think using "name" was ever valid mark-up, it's meant to be "id" (or maybe that is just from html5?).

However, I doubt that that is what is causing your problems, you see internal hyperlinks using name all the time, but perhaps a super weird browser and a html5 doctype may break if you use name... worth trying anyway.

Oh... maybe try changing it from an <a> tag to a <div> or something, perhaps linking from an <a> to an <a> is causing something, but again I this is more wishful thinking.
Also copy and past your reference "editable" just to be 100% sure that you have the same spellings...

Apart from that, I cannot think of anything else, it looks fine to me...
#3

[eluser]TheFuzzy0ne[/eluser]
What you've got should work. The only reason I can think of that would cause it not to work, is that your page is not being parsed properly, as a result of not being formatted correctly.

I suggest you try validating your HTML: http://validator.w3.org.
#4

[eluser]phpLearner[/eluser]
I changed it
Code:
id='editable'.

The problem is when i hover on the link

it points to
Code:
www.expense-book.com/#editable

and when i click nothing happens.


#5

[eluser]TheFuzzy0ne[/eluser]
Are you sure it's not because your page just isn't long enough (i.e, the vertical scroll bar is not visible)? If your page does not scroll, I wouldn't expect it to do anything when you click on the hash.
#6

[eluser]boltsabre[/eluser]
Quote:Are you sure it’s not because your page just isn’t long enough (i.e, the vertical scroll bar is not visible)? If your page does not scroll, I wouldn’t expect it to do anything when you click on the hash.
That's a very good point!
And the html validation is also a very good idea

Quote:The problem is when i hover on the link it points to
www.expense-book.com/#editable
Is that the correct page? Are you already on the page www.expense-book.com? Or is it pointing to a different page from what the hyperlink is on?
#7

[eluser]phpLearner[/eluser]
I want it to point to a name/id. Not to a hyperlink.

If you have time please check this on www.expense-book.com

the first page itself.
Please view the source code and see.

I can also post the source code but unless you can see the functionality, the problem aint be cleared.

Help me.
#8

[eluser]boltsabre[/eluser]
Okay, visited the page there is NO "click here" and there is no "editable" in your source code... not sure what you are trying to do, there is nothing to click!!!




Theme © iAndrew 2016 - Forum software by © MyBB