javascript - Sending data to external js file without it being visible to user (CodeIgniter) -


i want send variable controller view uses variable parameter javascript function found in external file. know that, example, pass variable controller view using array, , use:

var quiz_key = <?php echo $quiz_key; ?>; 

to pass php variable javascript variable, use parameter function. however, in doing this, variable becomes visible if user view source , see html. there way of accomplish variable not visible in context?

thanks in advance! i'm still getting hang of appreciated!

no. javascript not server side language, runs on client's browser, cannot hidden him. can hide piece of code, obfuscate it, minimize it, can found eventually.

you can set node.js server on remote machine, connect it, send variables, process them , return client result, that's more complex sollution.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -