How do I find where I am screwing up?
Using the following in Eudora, and equivalent links elsewhere, the URLs with
the # get truncated just before the #.
<a href="http://www.standards.c om/links.html?Fail ureToDeleteTool bar"
eudora="autourl ">http://www.standards.c om/links.html?Fail ureToDeleteTool bar<
br><br>
</a><a href="http://www.standards.c om/links.html#Fail ureToDeleteTool bar"
eudora="autourl ">http://www.standards.c om/links.html#Fail ureToDeleteTool bar<
br><br>
</a><a href="http://www.standards.c om/links.html?Howa rdKaikow"
eudora="autourl ">http://www.standards.c om/links.html?Howa rdKaikow<br><br >
</a><a href="http://www.standards.c om/links.html#Howa rdKaikow"
eudora="autourl ">http://www.standards.c om/links.html#Howa rdKaikow<br><br >
If I include alert(location. href), the URL is truncated on input to the
script.
For example, http://www.standards.com/links.html#...oDeleteToolbar gets
truncated to http://www.standards.com/links.html.
No problem if a ? is used instead of a #.
However, the following does not truncate the URL.
<p><a
href="links.htm l#FailureToDele teToolbar">#Fai lureToDeleteToo lbar</a></p>
<p><a
href="links.htm l?FailureToDele teToolbar">?Fai lureToDeleteToo lbar</a></p>
I expect that I am doing something wrong.
Any pointers?
function CompareBookmark s(bmkTarget)
{
return (locSearch== bmkTarget.toLow erCase());
}
var locHash=locatio n.hash.toLowerC ase().slice(1);
var locSearch=locat ion.search.toLo werCase().slice (1);
var lenHash=locHash .length;
var lenSearch=locSe arch.length;
var blnStatus=Boole an(false);
alert(location. href);
if((lenHash != 0) && (lenSearch != 0) || ((lenHash + lenSearch) == 0))
{
blnStatus = false;
}
else
{
blnStatus = true;
if(lenSearch == 0)
{
locSearch = locHash;
}
}
if (blnStatus)
{
if(CompareBookm arks("HowardKai kow")){
location.replac e("HowardKaikow .html");
}
else if(CompareBookm arks("HowardKai kowServices")){
location.replac e("HowardKaikow Services.html") ;
}
else if(CompareBookm arks("SortPerfo rmanceCompariso n")){
location.replac e("Sorting/SortPerformance Comparison-Description.htm l");
}
else if(CompareBookm arks("ThisandTh at")){
location.replac e("index.html#T hisandThat");
}
else if(CompareBookm arks("CopyFileT oPrinter")){
location.replac e("ThisAndTha t/CopyFileToPrint er.html");
}
else if(CompareBookm arks("WordVBABo oks")){
location.replac e("OhMyWord/WordVBABooks.ht m");
}
else if(CompareBookm arks("WordBasic Books")){
location.replac e("OhMyWord/WordBasicBooks. htm");
}
else if(CompareBookm arks("FailureTo DeleteToolbar") ){
location.replac e("OhMyWord/VBABugsFeatures/FailureToDelete Toolbar.html");
}
else if(CompareBookm arks("SetRefere nceInWordProjec t")){
location.replac e("OhMyWord/SetReferenceInW ordProject.html ");
}
else {
alert(location. href + " is not a valid URL.\n" +
"You will be taken to http://www.standards.c om/index.html.");
location.replac e("index.html") ;
}
}
else {
alert(location. href + " is not a valid URL.\n" +
"You will be taken to http://www.standards.c om/index.html.");
location.replac e("index.html") ;
}
--
http://www.standards.com/; See Howard Kaikow's web site.