Forum Moderators: open

Message Too Old, No Replies

Bookmark ¦ <a name="123">Tag Issue

         

Tricker

11:56 am on Jul 8, 2008 (gmt 0)

10+ Year Member



In my current project i am using ajax which carries the same url through out the journey..

but recently i stuck with an issue which is related to the bookmark.
which appends the #xyz in the url..

for example http://www.example.com/xyz.html#123
i know it is just because of the bookmark added in the page.but i don't want it to append in the url..

Is there any workaround for this or any alternate of <a name="123"> tag

Thanks
Muckoda

[edited by: BlobFisk at 11:59 am (utc) on July 8, 2008]
[edit reason] Examplified URL [/edit]

webfoo

11:00 pm on Jul 9, 2008 (gmt 0)

10+ Year Member



What exactly are you trying to accomplish? It seems a little vague.

Tricker

5:12 am on Jul 10, 2008 (gmt 0)

10+ Year Member



Currently i am working on a project which is an ajax based website.

In which user enter the url of the site like www.example.com url remains the same in the whole user journey.. nothing adds up in the browser address bar..

so here my dilemma is

In a page i added a bookmark which added #something in the url.
and i dont want it to be added in the url

coz after added bookmark url looks like (www.example.com/example.html#something)and i dont want it.

any pointer or help regarding the same is higly appreciable.

Thanks,
Muckoda

eelixduppy

2:18 pm on Jul 10, 2008 (gmt 0)



This is one of the disadvantages of using AJAX in that bookmarks and the history features of browsers and rendered practically useless. The following, however, should do as you want.


<script type="text/javascript">
var url = "http://www.example.com/";
var Name = "Example.com";
function addFavorite() {
if (window.external) {
window.external.AddFavorite(url,Name)
} else {
alert("Sorry! Your browser doesn't support this function.");
}
}
</script>

webfoo

5:33 pm on Jul 10, 2008 (gmt 0)

10+ Year Member



I think we're confusing terminology here. Tricker (OP) seems to be refering to "anchors" as "bookmarks". Eelix, you seem to interpret "bookmarks" as meaning "Add to Favorties".

The way I understand it, Tricker does not want "#blah" on the end of the URL. Tricker wants a solution that navigates to a certain place on the page without changing the URL. Correct?

DrDoc

3:39 pm on Jul 11, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It is not possible to navigate to an on-page anchor without appending the
#foo
to the URL.

You can play with

scrollTo
and such, but that will be very unreliable. Or, you can use AJAX to serve the content in an overlay div.

pageoneresults

3:44 pm on Jul 11, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Be Specific, Use Fragment Identifiers
On page targeting for users
2008-04-25 - [webmasterworld.com...]

Fragment Identifiers
2007-03-02 - [webmasterworld.com...]

They are a client side function so if you are concerned about anything from the search side, don't worry about it.

But, I do have my theories about using Fragment Identifiers, they are a big plus!

Could I ask why you are wanting to hide them? I don't think you can...

It is not possible to navigate to an on-page anchor without appending the #foo to the URL

BTW, the name attribute has been deprecated in favor of id="".

Tricker

4:29 am on Jul 14, 2008 (gmt 0)

10+ Year Member



yes you are right webfoo..

i want a solution that navigates to a certain place on the page without changing the URL. without appending #something in the url.

Thanks,
muckoda