CodeIgniter Forums
Internal Links problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Internal Links problem (/showthread.php?tid=58136)



Internal Links problem - El Forum - 05-20-2013

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


Internal Links problem - El Forum - 05-21-2013

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


Internal Links problem - El Forum - 05-21-2013

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


Internal Links problem - El Forum - 05-21-2013

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





Internal Links problem - El Forum - 05-22-2013

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


Internal Links problem - El Forum - 05-22-2013

[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?


Internal Links problem - El Forum - 06-05-2013

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


Internal Links problem - El Forum - 06-06-2013

[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!!!