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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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