javascript include files

J

JohnS

Hello:

Can a javascript file that is included with a webpage with SRC="filename.js"
be read and/or saved by a user?

I thought not, but now I wonder....

Thanks

John.
 
L

Lasse Reichstein Nielsen

JohnS said:
Can a javascript file that is included with a webpage with SRC="filename.js"
be read and/or saved by a user?

Ofcourse.
There might not be a direct way to see it (like View Source), but if he
wants to see it, he can, due to all the usual reasons.
I thought not, but now I wonder....

Anything that is sent by a server can be inspected by a user.

/L
 
A

Alex Shi

THanks for your reply! But I found an easy way to do the trick:

1. For links within the site add a "onClick='console=false'".
2. In the popup window function, before open window, check if the
'console' is true, and before the function set console as true.

Alex
 
L

Lasse Reichstein Nielsen

Alex Shi said:
THanks for your reply! But I found an easy way to do the trick:

1. For links within the site add a "onClick='console=false'".
2. In the popup window function, before open window, check if the
'console' is true, and before the function set console as true.

I am not sure exactly what you are suggesting to do, or what it is
supposed to have as effect.

Are you trying to prevent people from opening more than one window at
the time or something?

/L
 
J

JohnS

No, actually that just renders a page with just <html></html>.

But, ...Bedankt (thanks in Dutch)

John.
 
J

JohnS

Ok, that makes sense. The question then becomes... how?

I have some code (partnumbers) in my javascript that I would like to be
"secret"

When I incude the js files,with only functions, I cannot see them with my
regurlar IE6 browser.

How could I see them? or again... could I?

Thanks,

John.

p.s
 
E

Evertjan.

JohnS wrote on 11 jul 2003 in comp.lang.javascript:
No, actually that just renders a page with just <html></html>.

But, ...Bedankt (thanks in Dutch)

John.


No, actually that just renders a page with just <html></html>.

Not here, the file opens in Notepad.
But perhaps this depands on your windows .js-file execution settings.

view-source:http://myorg.org/jslib/myjslib.js

however should always work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top