Jump to content

Hide you Javascript code??


php_guy

Recommended Posts

Hello all,

 

I have a website where I do not want the Javascript to be viewable by the client right-clicking and choosing "View source".

 

I am using specific Google Maps API so it has to be Javascript, there is unfortunately no server side equivalent.

 

Is there a way for me to have a skeleton webpage that sends the data to a severside page -- where the javascript is processed -- then returned somehow back to the client?

 

Forget for a second that I'm using Google Maps, but just looking at it from a higher level view: Is it possible to have a webpage where I submit data -> goes to the server where it's processed using javascript -> then returns HTML to the client?

 

Thanks!!

 

Link to comment
https://forums.phpfreaks.com/topic/226473-hide-you-javascript-code/
Share on other sites

javascript is processed client-side so not an *easy* way to do it.  But it IS possible see example

 

However with google maps specifically, depending on what exactly your needs are, you can use server-side scripting to build a url with query string to output as an img and google will process it and return a map based on parameters you sent in img src.  It is of course a static image, so that may or may not work for you, but if it does, there you have it.

 

http://code.google.com/apis/maps/documentation/staticmaps/

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.