[jawsscripts] Re: Matching document.location

hi,
Happy new year to all!

it's seems that this is a bug.
I tried with
string url
let url = oDoc.Location
if url == ... then
with the same results.

If You put oDoc.Location in StringLower or in
StringTrimLeadingBlanks () or

StringTrimTrailingBlanks ()

or in some other function wich returns the same string then all is ok.

if  StringTrimLeadingBlanks (oDoc.Location) == http://www.google.ca/ then
another solution is use oDoc.URL property

if oDoc.URL == http://www.google.ca/ then



I guess that JAWS handles oDoc.Location result as type of URL  (original 
type )and not type of String.



HTH

Artur

----- Original Message ----- 
From: "E.J. Zufelt" <everett@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Monday, December 29, 2008 12:37 PM
Subject: [jawsscripts] Matching document.location


Good morning,

I am trying to customize some IE scripts for a couple of particular pages on
an Intranet site.

At the beginning of my scripts I am trying to compare a certain URL with the
document.location.  It doesn't seem to matter what I do, the comparrison
never evaluates to true.  I do not have the same problem with
document.location.

Var
Object oDoc

Let oDoc = IEGetCurrentDocument()





; This never evaluates to true even if I verify the URL in the

; browser and by using the JAWS copy to clipboard command

;on oDoc.location

if oDoc.location == "http://www.google.ca/"; Then

;do something

EndIf



; This will evaluate to true provided that I have given the

; correct domain



If oDoc.domain == "www.google.ca" Then

;do something

EndIf



Any thoughts appreciated,

Everett





__________
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts



__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: