By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,382 Members | 1,631 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,382 IT Pros & Developers. It's quick & easy.

javascript include files

P: n/a
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.
Jul 20 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
"JohnS" <Pl**********@myaccount.com> writes:
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
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

P: n/a
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
--
==================================================
Cell Phone Batteries at 30-50%+ off retail prices!
http://www.pocellular.com
==================================================
"Lasse Reichstein Nielsen" <lr*@hotpop.com> :d6**********@hotpop.com...
"JohnS" <Pl**********@myaccount.com> writes:
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
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'


Jul 20 '05 #3

P: n/a
JohnS wrote on 11 jul 2003 in comp.lang.javascript:
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....


just type the complete url in the IE addrressbar:

http://myorg.org/jslib/myjslib.js

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #4

P: n/a
"Alex Shi" <ch****@eol.ca> writes:
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
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #5

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

But, ...Bedankt (thanks in Dutch)

John.

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
JohnS wrote on 11 jul 2003 in comp.lang.javascript:
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....


just type the complete url in the IE addrressbar:

http://myorg.org/jslib/myjslib.js

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Jul 20 '05 #6

P: n/a
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
"Lasse Reichstein Nielsen" <lr*@hotpop.com> wrote in message
news:d6**********@hotpop.com...
"JohnS" <Pl**********@myaccount.com> writes:
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
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'

Jul 20 '05 #7

P: n/a
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.

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
JohnS wrote on 11 jul 2003 in comp.lang.javascript:
> 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....
>


just type the complete url in the IE addrressbar:

http://myorg.org/jslib/myjslib.js

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.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #8

P: n/a
Correct!

Thanks,

John.
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
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.

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
JohnS wrote on 11 jul 2003 in comp.lang.javascript:

> 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....
>

just type the complete url in the IE addrressbar:

http://myorg.org/jslib/myjslib.js

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.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Jul 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.