Base href and graphic hotspots

Hi all,

I am in the process of trying to revamp an old db developed in r4 and then redeveloped in r5, currently we are using 5.0.10 server. The problem is as follows, when I add a base href to the HTMLHeadContent field of the form it breaks my graphic hotspots, this is an image with multiple anchor links that link to various positions within the same document. Adding the base href variable doesn’t break any other hotspot links( ie text or doclinks) just the graphic ones.

this is my base href declaration

“<base href="http://” + Server_Name + “/” + DBPath + “/" />”

which works fine because the stylesheets, javascript all work ok, but adding the base href to the form affects the hotspot url in the following way.

with base href(not working)

http://server/intranet/internalcommunications.nsf/#1.%20AIB%20International%20Centre,%20IFSC

without base href(works fine)

http://server/intranet/internalcommunications.nsf/Live/97C692929EEF7FCE80257339003D3F82?opendocument&BaseTarget=_blank#1.%20AIB%20International%20Centre,%20IFSC

clearly the view and docid are missing from the url when I add the base href variable to my form.

can anyone explain why this is? and what the solution is to this problem

thanks

p.s. should have added that this db displays documents within a frame in a frameset( iknow don’t get me started on framesets)

Subject: base href and graphic hotspots

So, your css and javascript links look like:

Which are fine becuase the full URL to them is- http://www.test.com/my.nsf/js/common.js The hotspot links must also be relative, something like- #1.%20AIB%20International%20Centre,%20IFSC Which doesn't work when appended to the base URL. So you either need to prepend the view name and document ID when generating the hotspot links, or set the base href to include the view and docID and code your js/css links like this- Hope this helps.

Subject: RE: base href and graphic hotspots

Hi Andrew,

thanks for the response. are there any other downsides to coding the js/css as you have described. i see what you are getting at and am sure that it will fix this problem but not sure that it won’t cause a whole lot more. prepending the view and docid info to the link is not an option for us, these anchor links are ‘native’ notes anchor links and this seems to be the problem, ‘native’ doclinks and other url links are not affected by adding the base href as I have described. is it possible to rewrite the $links field to make the links more ‘relative’?

Subject: RE: base href and graphic hotspots

Hey,

AFAIK, if you are using and you have static links that you can’t change dynamically, then the only option you have is to provide a base URL that completes the whole picture as far as those links are concerned.

The only other option would be to leave base href out together and use a profile document to hold the FQDN of your server and path to the database. Then you can use that when you create the links to your javascript and css resources, in computed text.

URL:=@getprofilefield(“ProfileDoc”;“DBPath”);

“”;

(or something)

This is actually pretty handy, but may not be suitable for you. Maybe someone else has a better idea on this?

HTH

Andrew.

Subject: RE: base href and graphic hotspots

Hi Andrew,

yes i think you are right, omitting the base href and coding the js and css ‘lookups’ as you suggest is the only way to resolve my problem. its just very annoying, i have got used to employing the base href variable in all my apps, still don’t really understand why notes serves up such different html for doclinks and anchor links. Looking at $Links field in my rich text field the details for the doclink and anchor link are identical in the notes client but when the doc is viewed in the browser the ‘complete’ url details are served up for a doclink but for anchor links only the anchor name is served up if the anchor is a link to a location in the same document, interestingly if the anchor link is a link to a location in a different document then it works fine, the ‘complete’ url details for the anchor get served up.

this seems like a bug to me I’m surpised it has not been mentioned before in this forum.

thanks for your suggestion, this is the way to go, i was just hoping for a ‘magic’ solution, employing the base href thingy is just so very handy