Reputation: 47945
Suppose I get, on a page, this simple html/script :
<a id="hey" href="#">try</a>
var myvar=false;
$('#hey').click(function () {
if(myvar)
{
alert("Well! You change it!");
}
});
clicking on the link, I won't never get the alert show up! So, how can I edit JS (changing myvar=true;
) on browser? I use Firebug... I need these details to test a security-side of my own application.
Upvotes: 0
Views: 140
Reputation: 148524
first warp with :
<script type="text/javascript">
var myvar=false;
$('#hey').click(function () {
if(myvar==true)
{
alert("Well! You change it!");
}
});
</script>
I readlly think you have a problem somewhere else. ...
take this code and save it in a file.
this is what youll get
myvar is false ( beginning)
now set it to true :
and click and see :
Upvotes: 4