3.2.0

Hide the source code after binding the data

Hello All,

After Binding the grid, when i right click on any part of the page and click on the view source, all the java script source is visible to the users and also the content in the GRID is visible to the users. How can i make this not visible to the users on the browser?

Currently I'm using the trial version(FYI) and if that all works fine as per my requirement, then i can go with the purchase version.

Thank you very much for your help In Advance...!
Raju
December 11,
You can place all your javascript code in a separate .js file and load it before aw.js and aw.css
HTH
December 12,
Hello,

Thank you for your reply and I'm using the following code for generating the grid... which is written after the form tag in the page

<script type="text/javascript">

// create grid control
var grid = new AW.UI.Grid;
grid.setId("grid");

// set grid text
grid.setHeaderText(myHeaders);
grid.setCellText(myCells);
grid.setCellTooltip(myToolTips);
</script>

And when I place the code in a seperate .js file, then the GRID is not displaying totally...

Also, my primary requirement is after building the grid, when we go to the source, the following data in the GRID must not be visible to the users...

var myData = [
["MSFT","Microsoft Corporation", "314,571.156", "32,187.000", "55000"],
["ORCL", "Oracle Corporation", "62,615.266", "9,519.000", "40650"],
["SAP", "SAP AG (ADR)", "40,986.328", "8,296.420", "28961"],
["KNM", "Konami Corporation (ADR)", "3,710.784", ".000", "4313"]];

If that is visible, then the anonymous users can view the site and run the Cron Jobs in to my website. This must not happen to view the GRID Data by the users.

Pleas suggest.

Thank you very much for your help In Advance...!
Raju
December 17,
Raju,

it is not possible to hide a client-side script from the end user. You can make it more difficult but the experienced user will always be able to find and read it. Any kind of security features should always be implemented on the server, not on the client-side.
Alex (ActiveWidgets)
December 17,
Hi Raju,

One approach that might help is to load the data via ajax (AW.HTTP.Request) rather than direct javascript array. This wont stop a determined expert user from getting at your raw data, but it certainly makes it difficult.
Kalengi
January 7,

This topic is archived.

See also:


Back to support forum