Jump to content


I am learning javascript now


8 replies to this topic

#1 kcd

    Young Padawan

  • Members
  • Pip
  • 10 posts

Posted 17 November 2005 - 08:40 AM

I know a bit of js and if has alot more stuff to do.
So how can i build my site without the public being abel to see it.
when you click file edit it shows the source.
I plan on mixing php with it but then it will show my js source.

Edited by kcd, 17 November 2005 - 12:13 PM.


#2 Mr. Matt

    Moderator

  • P2L Staff
  • PipPipPipPip
  • 1,945 posts
  • Gender:Not Telling

Posted 17 November 2005 - 11:41 AM

by going :: View - Source :: you cannot see the php coding.

#3 kcd

    Young Padawan

  • Members
  • Pip
  • 10 posts

Posted 17 November 2005 - 11:50 AM

I KNOW
I want to not be abel to see the js.

#4 adam123

    Retired P2L Staff

  • Members
  • PipPipPipPip
  • 2,306 posts
  • Location:London, UK
  • Interests:Programming and stuff.

Posted 17 November 2005 - 11:58 AM

View Postkcd, on Nov 17 2005, 04:50 PM, said:

I KNOW
Actually, in your post you said people would be able to :)

Quote

I plan on mixing php with it but then it will show my php source.


#5 kcd

    Young Padawan

  • Members
  • Pip
  • 10 posts

Posted 17 November 2005 - 12:14 PM

happy read it agen.

#6 Stu

    Retired P2L Staff

  • Publishing Betazoids
  • PipPipPipPip
  • 1,761 posts
  • Gender:Male

Posted 17 November 2005 - 01:15 PM

adjust your attitude - or before long you will lose your ability to post.

#7 Sicloan

    Young Padawan

  • Members
  • Pip
  • 31 posts

Posted 17 November 2005 - 03:59 PM

Javascript is a client side language, it has to be seen. Its also bad for search engines (they cant see it at all), so it will hurt your site. I suggest that you use php as much as possible, and then use javascript if it is absolutely necessary.

#8 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 17 November 2005 - 05:05 PM

He's learning javascript now, so doing everything in php won't help him.

All i can say is this.
JS is client side, no matter what the user can see it. The easiest way to "hide" it is to use an external js file.
<script src="path/to/source.js" type="text/javascript"></script>


#9 Av-

    I Feel Left Out

  • Members
  • PipPipPipPip
  • 1,971 posts
  • Gender:Male
  • Location:10 ft. below sea level

Posted 18 November 2005 - 10:06 AM

still they will be able to see it if they put the path of the file in their adress bar. Theres no workaround as far as i know





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users