Connecting Tech Pros Worldwide Forums | Help | Site Map

Part of URL is getting discarded

Howard Kaikow
Guest
 
Posts: n/a
#1: Jul 23 '05
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#...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.html#FailureToDeleteToolbar">#FailureT oDeleteToolbar</a></p>
<p><a
href="links.html?FailureToDeleteToolbar">?FailureT oDeleteToolbar</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");
}






--
http://www.standards.com/; See Howard Kaikow's web site.





McKirahan
Guest
 
Posts: n/a
#2: Jul 23 '05

re: Part of URL is getting discarded


"Howard Kaikow" <kaikow@standards.com> wrote in message
news:ck9pii$rsv$1@pyrite.mv.net...[color=blue]
> How do I find where I am screwing up?
>
> Using the following in Eudora, and equivalent links elsewhere, the URLs[/color]
with[color=blue]
> the # get truncated just before the #.
>
> <a href="http://www.standards.com/links.html?FailureToDeleteToolbar"
>[/color]
eudora="autourl">http://www.standards.com/links.html?FailureToDeleteToolbar<[color=blue]
> br><br>
> </a><a href="http://www.standards.com/links.html#FailureToDeleteToolbar"
>[/color]
eudora="autourl">http://www.standards.com/links.html#FailureToDeleteToolbar<[color=blue]
> 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#...oDeleteToolbar[/color]
gets[color=blue]
> 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">#FailureT oDeleteToolbar</a></p>
> <p><a
> href="links.html?FailureToDeleteToolbar">?FailureT oDeleteToolbar</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");
> }
>
>
>
>
>
>
> --
> http://www.standards.com/; See Howard Kaikow's web site.
>
>[/color]


McKirahan
Guest
 
Posts: n/a
#3: Jul 23 '05

re: Part of URL is getting discarded


"Howard Kaikow" <kaikow@standards.com> wrote in message
news:ck9pii$rsv$1@pyrite.mv.net...[color=blue]
> How do I find where I am screwing up?
>
> Using the following in Eudora, and equivalent links elsewhere, the URLs[/color]
with[color=blue]
> the # get truncated just before the #.
>
> <a href="http://www.standards.com/links.html?FailureToDeleteToolbar"
>[/color]
eudora="autourl">http://www.standards.com/links.html?FailureToDeleteToolbar<[color=blue]
> br><br>
> </a><a href="http://www.standards.com/links.html#FailureToDeleteToolbar"
>[/color]
eudora="autourl">http://www.standards.com/links.html#FailureToDeleteToolbar<[color=blue]
> 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#...oDeleteToolbar[/color]
gets[color=blue]
> 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">#FailureT oDeleteToolbar</a></p>
> <p><a
> href="links.html?FailureToDeleteToolbar">?FailureT oDeleteToolbar</a></p>
>
> I expect that I am doing something wrong.
> Any pointers?[/color]


For me these all returned the entire link.

<html>
<head>
<title>HK.htm</title>
<script type="text/javascript">
alert(location.href)
</script>
</head>
<body>
<br><a href="http://localhost/HK.htm#Test">http://localhost/HK.htm#Test</a>
<br><a href="http://localhost/HK.htm?Test">http://localhost/HK.htm?Test</a>
<br><a href="HK.htm#Test">HK.htm#Test</a>
<br><a href="HK.htm?Test">HK.htm?Test</a>
</html>


Howard Kaikow
Guest
 
Posts: n/a
#4: Jul 23 '05

re: Part of URL is getting discarded


"McKirahan" <News@McKirahan.com> wrote in message
news:zC_9d.363482$Fg5.201272@attbi_s53...[color=blue][color=green]
> > </a><a href="http://www.standards.com/links.html#FailureToDeleteToolbar"
> > </a><a href="http://www.standards.com/links.html#HowardKaikow"
> > For example, http://www.standards.com/links.html#...oDeleteToolbar[/color]
> For me these all returned the entire link.[/color]

THe only ones that fail for me are those above.

For example, all links in http://www.standards.com/testrefs.html work, or
not, as expected.

Sumptin's not right somewhere.
[color=blue]
>
> <html>
> <head>
> <title>HK.htm</title>
> <script type="text/javascript">
> alert(location.href)
> </script>
> </head>
> <body>
> <br><a[/color]
href="http://localhost/HK.htm#Test">http://localhost/HK.htm#Test</a>[color=blue]
> <br><a[/color]
href="http://localhost/HK.htm?Test">http://localhost/HK.htm?Test</a>[color=blue]
> <br><a href="HK.htm#Test">HK.htm#Test</a>
> <br><a href="HK.htm?Test">HK.htm?Test</a>
> </html>
>
>[/color]


Lee
Guest
 
Posts: n/a
#5: Jul 23 '05

re: Part of URL is getting discarded


Howard Kaikow said:[color=blue]
>
>"McKirahan" <News@McKirahan.com> wrote in message
>news:zC_9d.363482$Fg5.201272@attbi_s53...[color=green][color=darkred]
>> > </a><a href="http://www.standards.com/links.html#FailureToDeleteToolbar"
>> > </a><a href="http://www.standards.com/links.html#HowardKaikow"
>> > For example, http://www.standards.com/links.html#...oDeleteToolbar[/color]
>> For me these all returned the entire link.[/color]
>
>THe only ones that fail for me are those above.
>
>For example, all links in http://www.standards.com/testrefs.html work, or
>not, as expected.[/color]

All of them that are valid URL's work fine for me in Firefox.
Some that are not valid are:
#NoSuchBookmark
?HowardKaikow#HowardKaikow
#HowardKaikow?HowardKaikow

Michael Winter
Guest
 
Posts: n/a
#6: Jul 23 '05

re: Part of URL is getting discarded


On 9 Oct 2004 21:57:24 -0700, Lee <REM0VElbspamtrap@cox.net> wrote:

[snip]
[color=blue]
> Some that are not valid are:
> #NoSuchBookmark
> ?HowardKaikow#HowardKaikow[/color]

I'm not sure if that is invalid. According to a quick read of RFC 2396[1],
that URI would refer to the current resource with a respecified query
string and fragment identifier. Still, it should probably be avoided just
like the empty URI. Whilst IE does apply "?query" properly (though not
""), NN4 doesn't and other browsers might fail, too.
[color=blue]
> #HowardKaikow?HowardKaikow[/color]

This is certainly invalid. If a fragment identifier is specified, it
should be the last part of the URI.

Mike


[1] Currently a draft standard, but I expect earlier standards agree here.

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Howard Kaikow
Guest
 
Posts: n/a
#7: Jul 23 '05

re: Part of URL is getting discarded


"Lee" <REM0VElbspamtrap@cox.net> wrote in message
news:ckaffk012p8@drn.newsguy.com...[color=blue]
> Howard Kaikow said:[color=green]
> >For example, all links in http://www.standards.com/testrefs.html work,[/color][/color]
or[color=blue][color=green]
> >not, as expected.[/color]
>
> All of them that are valid URL's work fine for me in Firefox.
> Some that are not valid are:
> #NoSuchBookmark
> ?HowardKaikow#HowardKaikow
> #HowardKaikow?HowardKaikow[/color]

Yes, the script specifically disallows the above 3. The ones in
testhref.html all work as expected.
What I do not understand is why the following two fail:

<a href="http://www.standards.com/links.html#FailureToDeleteToolbar"</a>
</a><a href="http://www.standards.com/links.html#HowardKaikow"</a>

I can understand if we found an error in the script, but
alert(location.href) returns a truncated URL upon entering the script for
the two cases above. So the issue boils down to, why is the URL getting
truncated?


Howard Kaikow
Guest
 
Posts: n/a
#8: Jul 23 '05

re: Part of URL is getting discarded


"Michael Winter" <M.Winter@blueyonder.co.invalid> wrote in message
news:opsfndk3iix13kvk@atlantis...[color=blue]
> On 9 Oct 2004 21:57:24 -0700, Lee <REM0VElbspamtrap@cox.net> wrote:
>
> [snip]
>[color=green]
> > Some that are not valid are:
> > #NoSuchBookmark
> > ?HowardKaikow#HowardKaikow[/color]
>
> I'm not sure if that is invalid. According to a quick read of RFC 2396[1],
> that URI would refer to the current resource with a respecified query
> string and fragment identifier. Still, it should probably be avoided just
> like the empty URI. Whilst IE does apply "?query" properly (though not
> ""), NN4 doesn't and other browsers might fail, too.
>[color=green]
> > #HowardKaikow?HowardKaikow[/color]
>
> This is certainly invalid. If a fragment identifier is specified, it
> should be the last part of the URI.[/color]

My script excludes any URL with both a # and a ? because those would not be
valid for redirections I am doing.


Howard Kaikow
Guest
 
Posts: n/a
#9: Jul 23 '05

re: Part of URL is getting discarded


To simplify isolating the problem, I've created the following test.

Using http://www.standards.com/test.html, I find that ALL URLs that have a #
get truncated by location .href (see
http://www.standards.com/testlinnks.html).


Howard Kaikow
Guest
 
Posts: n/a
#10: Jul 23 '05

re: Part of URL is getting discarded


"Howard Kaikow" <kaikow@standards.com> wrote in message
news:ckbl43$m52$1@pyrite.mv.net...[color=blue]
> To simplify isolating the problem, I've created the following test.
>
> Using http://www.standards.com/test.html, I find that ALL URLs that have a[/color]
#[color=blue]
> get truncated by location .href (see
> http://www.standards.com/testlinnks.html).[/color]


http://www.standards.com/testlinnks.html should have been
http://www.standards.com/testlinks.html.

I just tried from IE 4 on an old Win 95 system, same problem, location.href
truncates the # and anything to the right.
Normally, I (ab)use IE 6 on Win 2000.

Could this be an Apache server issue??


Howard Kaikow
Guest
 
Posts: n/a
#11: Jul 23 '05

re: Part of URL is getting discarded


I've further isolated the problem

If I use http://www.standards.com/test.html, the # and everything to the
right gets truncated by location.href.
No problem if I use http://www.standards.com/local.html.

--
http://www.standards.com/; See Howard Kaikow's web site.
"Howard Kaikow" <kaikow@standards.com> wrote in message
news:ck9pii$rsv$1@pyrite.mv.net...[color=blue]
> How do I find where I am screwing up?
>
> Using the following in Eudora, and equivalent links elsewhere, the URLs[/color]
with[color=blue]
> the # get truncated just before the #.
>
> <a href="http://www.standards.com/links.html?FailureToDeleteToolbar"
>[/color]
eudora="autourl">http://www.standards.com/links.html?FailureToDeleteToolbar<[color=blue]
> br><br>
> </a><a href="http://www.standards.com/links.html#FailureToDeleteToolbar"
>[/color]
eudora="autourl">http://www.standards.com/links.html#FailureToDeleteToolbar<[color=blue]
> 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#...oDeleteToolbar[/color]
gets[color=blue]
> 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">#FailureT oDeleteToolbar</a></p>
> <p><a
> href="links.html?FailureToDeleteToolbar">?FailureT oDeleteToolbar</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");
> }
>
>
>
>
>
>
> --
> http://www.standards.com/; See Howard Kaikow's web site.
>
>[/color]


Philip Ronan
Guest
 
Posts: n/a
#12: Jul 23 '05

re: Part of URL is getting discarded


On 11/10/04 10:33 pm, Howard Kaikow wrote:
[color=blue]
> I've further isolated the problem
>
> If I use http://www.standards.com/test.html, the # and everything to the
> right gets truncated by location.href.
> No problem if I use http://www.standards.com/local.html.[/color]

I've been looking back through your posts and I'm afraid I don't see what
the problem is.

If you want to pass information from one page to another, then adding a
search string to the URL is certainly one way of doing it. And you seem to
have demonstrated that it works perfectly for this purpose.

But why are you also trying to do the same thing with hashes? They aren't
supposed to be used for this purpose, so I'm not in the least bit surprised
they aren't working the way you want them to.

Phil

--
Philip Ronan
phil.ronanzzz@virgin.net
(Please remove the "z"s if replying by email)


Howard Kaikow
Guest
 
Posts: n/a
#13: Jul 23 '05

re: Part of URL is getting discarded


"Philip Ronan" <phil.ronanzzz@virgin.net> wrote in message
news:BD90BD87.236BD%phil.ronanzzz@virgin.net...[color=blue]
> On 11/10/04 10:33 pm, Howard Kaikow wrote:
>[color=green]
> > I've further isolated the problem
> >
> > If I use http://www.standards.com/test.html, the # and everything to the
> > right gets truncated by location.href.
> > No problem if I use http://www.standards.com/local.html.[/color]
>
> I've been looking back through your posts and I'm afraid I don't see what
> the problem is.
>
> If you want to pass information from one page to another, then adding a
> search string to the URL is certainly one way of doing it. And you seem to
> have demonstrated that it works perfectly for this purpose.
>
> But why are you also trying to do the same thing with hashes? They aren't
> supposed to be used for this purpose, so I'm not in the least bit[/color]
surprised[color=blue]
> they aren't working the way you want them to.[/color]

If I use http://www.standards.com/test.html, the # and everything to the
right gets truncated by location.href.

No problem if I use http://www.standards.com/local.html.

I consider that to be a bug since the # is handled inconsistently.

I agree that folkes should be using the ?, but there is no reason why I
should not allow the script to process the alternative with a #.
Some folkes have told me that certain other browsers pass the full URL, I
don't know why IE doesn't, as it does so in some circumstances.



Philip Ronan
Guest
 
Posts: n/a
#14: Jul 23 '05

re: Part of URL is getting discarded


On 12/10/04 1:34 am, Howard Kaikow wrote:
[color=blue]
> If I use http://www.standards.com/test.html, the # and everything to the
> right gets truncated by location.href.
>
> No problem if I use http://www.standards.com/local.html.
>
> I consider that to be a bug since the # is handled inconsistently.[/color]

I still think this is a pointless exercise.

Anyhow, the links on your page at test.html seem to point to a 301 redirect
that tells the browser to go to www.mv.com/ipusers/standards/testlinks.html
instead:
[color=blue]
> HTTP/1.1 301 Moved Permanently
> Date: Tue, 12 Oct 2004 00:46:42 GMT
> Server: Apache
> Location: http://www.mv.com/ipusers/standards/testlinks.html
> Transfer-Encoding: chunked
> Content-Type: text/html; charset=iso-8859-1[/color]

That's probably where things are going wrong. If you have nothing better to
do, perhaps you could write a custom redirect page that adds the hash part
to the Location header.

--
Philip Ronan
phil.ronanzzz@virgin.net
(Please remove the "z"s if replying by email)


Howard Kaikow
Guest
 
Posts: n/a
#15: Jul 23 '05

re: Part of URL is getting discarded


I just figured out what is going on.
The problem is due to IE 6. IE 6 processes the following differently.

<a
href="http://www.standards.com/index-test.html#Sorting">http://www.standards
..com/index-test.html#Sorting</a>
<a href="index-test.html#Sorting">index-test.html#Sorting</a>

Where "Sorting" is a real anchor name in index-test.html.

And, the following are processed differently by IE 6.
<a
href="http://www.standards.com/index-test.html#NoSuch">http://www.standards.
com/index-test.html#NoSuch</a>
<a href="index-test.html#NoSuch">index-test.html#NoSuch</a>

Where "NoSuch" is NOT a real anchor name in index-test.html.

You can see this by trying both:

http://www.standards.com/index-HTTP.html
http://www.standards.com/index-local.html

Which uses http://www.standards.com/index-test.html, which will become my
new index.html shortly.
The script is now http://www.standards.com/links-index.js

IE seems to do this differtently than other browsers.
Folkes have informed there is no problem with Mozilla and Firefox.


Howard Kaikow
Guest
 
Posts: n/a
#16: Jul 23 '05

re: Part of URL is getting discarded


According to my ISP, the problem is a function of the security level set in
IE, but they do not recall which.

Currently, my ISP maps www.standards.com to www.mv.com/ipusers/standards/,
and this seems to be what is confusing IE, tho Mozilla and FireFox have no
problems.

You can see this on http://www.standards.com/index-HTTP.html, which uses
both forms of the URL.

Anybody know which IE option causes this?


Howard Kaikow
Guest
 
Posts: n/a
#17: Jul 23 '05

re: Part of URL is getting discarded


Today, my ISP made a modification to how they map an alias for my web site.
Apparently, howsoever they were previously mapping caused a problem for IE,
but not for Mozilla/FireFox.

Of course, the ISP claims that there was nothing wrong with what they were
previously doing.
In any case, whatever they were doing did cause a problem for IE, so there
remains unanswered the question of why Mozilla/FireFox did not have the same
problem.

I now have my script going thru my index.html and everything is working as
expected.

I will shortly be removing the other files referenced in this thread as the
problem is no longer reproducible since my ISP changed/corrected whatever at
their end.
--
http://www.standards.com/; See Howard Kaikow's web site.


Howard Kaikow
Guest
 
Posts: n/a
#18: Jul 23 '05

re: Part of URL is getting discarded


The explanation I've gotten is the following.

IE sends the url to the server, and the server sends back the redirected url
to the browser.
So IE is preserving queries, but not anchors, when a URL has been
redirected.

I would consider this to be a bug in IE, especially since Mozilla/FoxFire do
preserve the anchors.

I tried calling MSFT To report this problem, but they wanted to charge me
just to talk to the support folkes.
No way will I do that/
--
http://www.standards.com/; See Howard Kaikow's web site.
"Howard Kaikow" <kaikow@standards.com> wrote in message
news:ck9pii$rsv$1@pyrite.mv.net...[color=blue]
> How do I find where I am screwing up?
>
> Using the following in Eudora, and equivalent links elsewhere, the URLs[/color]
with[color=blue]
> the # get truncated just before the #.
>
> <a href="http://www.standards.com/links.html?FailureToDeleteToolbar"
>[/color]
eudora="autourl">http://www.standards.com/links.html?FailureToDeleteToolbar<[color=blue]
> br><br>
> </a><a href="http://www.standards.com/links.html#FailureToDeleteToolbar"
>[/color]
eudora="autourl">http://www.standards.com/links.html#FailureToDeleteToolbar<[color=blue]
> 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#...oDeleteToolbar[/color]
gets[color=blue]
> 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">#FailureT oDeleteToolbar</a></p>
> <p><a
> href="links.html?FailureToDeleteToolbar">?FailureT oDeleteToolbar</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");
> }
>
>
>
>
>
>
> --
> http://www.standards.com/; See Howard Kaikow's web site.
>
>[/color]


Closed Thread