H
Howard Kaikow
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.com/links.html?FailureToDeleteToolbar"
eudora="autourl">http://www.standards.com/links.html?FailureToDeleteToolbar<
br><br>
</a><a href="http://www.standards.com/links.html#FailureToDeleteToolbar"
eudora="autourl">http://www.standards.com/links.html#FailureToDeleteToolbar<
br><br>
</a><a href="http://www.standards.com/links.html?HowardKaikow"
eudora="autourl">http://www.standards.com/links.html?HowardKaikow<br><br>
</a><a href="http://www.standards.com/links.html#HowardKaikow"
eudora="autourl">http://www.standards.com/links.html#HowardKaikow<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#FailureToDeleteToolbar 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.html#FailureToDeleteToolbar">#FailureToDeleteToolbar</a></p>
<p><a
href="links.html?FailureToDeleteToolbar">?FailureToDeleteToolbar</a></p>
I expect that I am doing something wrong.
Any pointers?
function CompareBookmarks(bmkTarget)
{
return (locSearch== bmkTarget.toLowerCase());
}
var locHash=location.hash.toLowerCase().slice(1);
var locSearch=location.search.toLowerCase().slice(1);
var lenHash=locHash.length;
var lenSearch=locSearch.length;
var blnStatus=Boolean(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(CompareBookmarks("HowardKaikow")){
location.replace("HowardKaikow.html");
}
else if(CompareBookmarks("HowardKaikowServices")){
location.replace("HowardKaikowServices.html");
}
else if(CompareBookmarks("SortPerformanceComparison")){
location.replace("Sorting/SortPerformanceComparison-Description.html");
}
else if(CompareBookmarks("ThisandThat")){
location.replace("index.html#ThisandThat");
}
else if(CompareBookmarks("CopyFileToPrinter")){
location.replace("ThisAndThat/CopyFileToPrinter.html");
}
else if(CompareBookmarks("WordVBABooks")){
location.replace("OhMyWord/WordVBABooks.htm");
}
else if(CompareBookmarks("WordBasicBooks")){
location.replace("OhMyWord/WordBasicBooks.htm");
}
else if(CompareBookmarks("FailureToDeleteToolbar")){
location.replace("OhMyWord/VBABugsFeatures/FailureToDeleteToolbar.html");
}
else if(CompareBookmarks("SetReferenceInWordProject")){
location.replace("OhMyWord/SetReferenceInWordProject.html");
}
else {
alert(location.href + " is not a valid URL.\n" +
"You will be taken to http://www.standards.com/index.html.");
location.replace("index.html");
}
}
else {
alert(location.href + " is not a valid URL.\n" +
"You will be taken to http://www.standards.com/index.html.");
location.replace("index.html");
}
Using the following in Eudora, and equivalent links elsewhere, the URLs with
the # get truncated just before the #.
<a href="http://www.standards.com/links.html?FailureToDeleteToolbar"
eudora="autourl">http://www.standards.com/links.html?FailureToDeleteToolbar<
br><br>
</a><a href="http://www.standards.com/links.html#FailureToDeleteToolbar"
eudora="autourl">http://www.standards.com/links.html#FailureToDeleteToolbar<
br><br>
</a><a href="http://www.standards.com/links.html?HowardKaikow"
eudora="autourl">http://www.standards.com/links.html?HowardKaikow<br><br>
</a><a href="http://www.standards.com/links.html#HowardKaikow"
eudora="autourl">http://www.standards.com/links.html#HowardKaikow<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#FailureToDeleteToolbar 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.html#FailureToDeleteToolbar">#FailureToDeleteToolbar</a></p>
<p><a
href="links.html?FailureToDeleteToolbar">?FailureToDeleteToolbar</a></p>
I expect that I am doing something wrong.
Any pointers?
function CompareBookmarks(bmkTarget)
{
return (locSearch== bmkTarget.toLowerCase());
}
var locHash=location.hash.toLowerCase().slice(1);
var locSearch=location.search.toLowerCase().slice(1);
var lenHash=locHash.length;
var lenSearch=locSearch.length;
var blnStatus=Boolean(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(CompareBookmarks("HowardKaikow")){
location.replace("HowardKaikow.html");
}
else if(CompareBookmarks("HowardKaikowServices")){
location.replace("HowardKaikowServices.html");
}
else if(CompareBookmarks("SortPerformanceComparison")){
location.replace("Sorting/SortPerformanceComparison-Description.html");
}
else if(CompareBookmarks("ThisandThat")){
location.replace("index.html#ThisandThat");
}
else if(CompareBookmarks("CopyFileToPrinter")){
location.replace("ThisAndThat/CopyFileToPrinter.html");
}
else if(CompareBookmarks("WordVBABooks")){
location.replace("OhMyWord/WordVBABooks.htm");
}
else if(CompareBookmarks("WordBasicBooks")){
location.replace("OhMyWord/WordBasicBooks.htm");
}
else if(CompareBookmarks("FailureToDeleteToolbar")){
location.replace("OhMyWord/VBABugsFeatures/FailureToDeleteToolbar.html");
}
else if(CompareBookmarks("SetReferenceInWordProject")){
location.replace("OhMyWord/SetReferenceInWordProject.html");
}
else {
alert(location.href + " is not a valid URL.\n" +
"You will be taken to http://www.standards.com/index.html.");
location.replace("index.html");
}
}
else {
alert(location.href + " is not a valid URL.\n" +
"You will be taken to http://www.standards.com/index.html.");
location.replace("index.html");
}