Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
Post anchors
Avatar
Peter
Member
Free Members
sp_UserOfflineSmall Offline
Sep 18, 2012 - 5:55 pm

I've noticed that there are two anchors for a post:

p110706 and post110706

<div class='spTopicPostSection spOdd spType-Admin spRank-admin spSpecialRank-sp-master' id='post110706'>
<a id='p110706'></a>

Link anchors generated by sp_build_url use p110706. I've had reports that such anchors don't work in IE8 (apparently due to a bug whereby an empty tag isn't properly recognized as an anchor). The bigger question, though: do we need both anchors? Could we do without the empty <a> tag and just go with post110706 in the div?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 19, 2012 - 3:45 am

The 'pXXX' has been in use since day 1 of SP. Removing it now would cause all kinds of historic links to break and with the exception of what you tell me about IE8, it does work in all decent browsers.

The id in the div has been added as a more useful name and was, I believe, largely put in place to allow for specific styling on a specific post which we have been asked for before now.

I am unsure why you should feel that having both is a problem.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Peter
Member
Free Members
sp_UserOfflineSmall Offline
Sep 19, 2012 - 8:47 am

Not so much a "problem" :)  Was mostly checking to see whether one could have been rendered obsolete, but the answer is a resounding no!  I would love to ignore IE8 (heck, Google Apps is doing so) but to appease my site users, I've switched sp_build_url to link to the id in the div.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 19, 2012 - 8:52 pm

when IE 10 is released in late October, it wont be long until we stop making all the special changes we do now for IE 8...  just not worth the effort...  supporting two versions of IE is enough... hoping IE 10 finally reaches real browser status!

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620