php_guy Posted February 2, 2011 Share Posted February 2, 2011 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!! Quote Link to comment https://forums.phpfreaks.com/topic/226473-hide-you-javascript-code/ Share on other sites More sharing options...
.josh Posted February 2, 2011 Share Posted February 2, 2011 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/ Quote Link to comment https://forums.phpfreaks.com/topic/226473-hide-you-javascript-code/#findComment-1168979 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.