Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Protecting JavaScript (JS file) Source Code
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
01139451
Message ID:
01147292
Vues:
21
Again Rick - Thanks,

The project assigns a JavaScript function object as an API. It is assigned without a var argument (I guess that is public).

With IE I can cycle up (ancestery) through the frames. The [public] variable assigned in the frame seems to be treated like IE document object - but it does not require a "getDocumentID". THe "findAPI" routine simply ask if the variable name is an object in that frame.

But with Netscape (or firefox) the "findAPI" routine does not locate (or so it seems) and allow my project to reference it as an object.

In the parent window to create the inital object the code is:
theAPI=createMyAPI();

But in Netscape this code will not work. In fact, in Netscape I have not been able to create an object reference even when the reference in in the same frame:
theAPI=createMyAPI();
myAPI=theAPI;
//Then run an API request
myAPI.someRequest(""); //Request is a function contained in theAPI

I think NetScape has "Layers" but still the reference would not fire the contained "someRequest()" fuction.

Thanks



>>Thanks Rick,
>>
>>I will need to distribute an IE client. I was hoping not to "have" to distribute a particular JS (JavaScript) file.
>>
>>I don't know how a JS works - for example - is it all cached on the client's browser, or is it like the old PRG procedure files, where the "file" would be re-queried again?
>
>Depends on browser settings but normally JS files load once and then are cached.
>
>>
>>My hope was that I could distribute the IE client and have the "HTML" reference this "particular" JS file on my server.
>
>You can, but that doesn't protect it. Anybody with an HTTP analyzer or even anybody looking at the source will be able to find the file and download it directly.
>
>>Can I look at a JS file associated with the content of a web site. I know I can view source for the HTML, but was not aware that their may be a way to expose the contents of a JS file. How is that done?
>
>A JS file is just a linked resource so it's downloaded separately. It's a link in the page basically. So if you view source you find the link and then download the file by typing the URL into the browser.
>
>If you have the IE Developer Toolbar or the Mozilla WebDeveloper tool, they let you view the JS files in the browser without the extra download step. Those tools are invaluable for all sorts of things really...
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform