is it possible to change JS variable value from browser console?

PiraTa

If I have in main.js's file, global variable a = 5; and I'm sending this variable with AJAX to PHP, is it possible to change this variable from the console or somehow from the outside and have AJAX send wrong parameter?

Here is an example:

var init = {
    id: null,
    setId: function(i){
        this.id = i;
        alert(this.id);
    },
    callAjax: function(){
        alert(this.id);
    }
};

If I have this, is it still possible to change?

sudipto

If it is accessible from console (since you are stating that its a global variable), it is possible to modify it from console, just by writing a=1 or anything.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

is it possible to change JS variable value from browser console?

From Dev

Is it possible to change the value of environment variable from a bash script so that it persists?

From Dev

Is possible to disable Javascript/Jquery from the browser inspector console?

From Dev

.net variable value change on method call possible?

From Dev

Possible to change PHP variable with array value?

From Dev

Is it possible to change a variable from String to Number in Javascript?

From Dev

Possible to change text color in Bash console from powershell script

From Dev

why arithmetic is not possible after assigning value from js variable to php varible?

From Dev

possible JS "file browser"?

From Dev

AngularJS change variable with console

From Dev

Change hard coded JS variable value

From Dev

How to change element value in JS variable

From Dev

Change js variable value based on date

From Dev

Is it possible to launch a node.js program from outside the console?

From Dev

How to change value of a variable from a file?

From Dev

change value of <meter> dynamically from $scope variable

From Dev

Is it possible change value of Member variable within "const" function?

From Dev

In Scala,Why is it not possible to change the value of var variable with different datatype

From Dev

Mockito: Java - Is it possible to Change a variable value used in an InjectMocks class?

From Dev

Web browser from console CentOS

From Dev

Change Controller variable value from change in isolate scope directive

From Dev

Loss of value of a variable in node.js, how it's possible to solve it?

From Dev

Is possible read the browser history with JS?

From Dev

Logging a variable change to the console in Javascript

From Dev

How to send variable value from php to js

From Java

Clarification for "it should be possible to change the value of 1" from the CPython documentation

From Dev

Clarification for "it should be possible to change the value of 1" from the CPython documentation

From Dev

Is it possible to change EL base on the selected value from dropdown list?

From Dev

javascript ajax returned value "stolen" in browser console

Related Related

  1. 1

    is it possible to change JS variable value from browser console?

  2. 2

    Is it possible to change the value of environment variable from a bash script so that it persists?

  3. 3

    Is possible to disable Javascript/Jquery from the browser inspector console?

  4. 4

    .net variable value change on method call possible?

  5. 5

    Possible to change PHP variable with array value?

  6. 6

    Is it possible to change a variable from String to Number in Javascript?

  7. 7

    Possible to change text color in Bash console from powershell script

  8. 8

    why arithmetic is not possible after assigning value from js variable to php varible?

  9. 9

    possible JS "file browser"?

  10. 10

    AngularJS change variable with console

  11. 11

    Change hard coded JS variable value

  12. 12

    How to change element value in JS variable

  13. 13

    Change js variable value based on date

  14. 14

    Is it possible to launch a node.js program from outside the console?

  15. 15

    How to change value of a variable from a file?

  16. 16

    change value of <meter> dynamically from $scope variable

  17. 17

    Is it possible change value of Member variable within "const" function?

  18. 18

    In Scala,Why is it not possible to change the value of var variable with different datatype

  19. 19

    Mockito: Java - Is it possible to Change a variable value used in an InjectMocks class?

  20. 20

    Web browser from console CentOS

  21. 21

    Change Controller variable value from change in isolate scope directive

  22. 22

    Loss of value of a variable in node.js, how it's possible to solve it?

  23. 23

    Is possible read the browser history with JS?

  24. 24

    Logging a variable change to the console in Javascript

  25. 25

    How to send variable value from php to js

  26. 26

    Clarification for "it should be possible to change the value of 1" from the CPython documentation

  27. 27

    Clarification for "it should be possible to change the value of 1" from the CPython documentation

  28. 28

    Is it possible to change EL base on the selected value from dropdown list?

  29. 29

    javascript ajax returned value "stolen" in browser console

HotTag

Archive