# CSP - U5L8 Bubble 9 - Code.org glitchy?

**URL:** <https://forum.code.org/t/csp-u5l8-bubble-9-code-org-glitchy/32365>\
**Category:** CS Principles\
**Tags:** csp-unit-5\
**Created:** [March 2, 2020, 12:40pm UTC](https://forum.code.org/t/csp-u5l8-bubble-9-code-org-glitchy/32365 "2020-03-02T12:40:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mathisd3](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/mathisd3/32/2273_2.png) [@mathisd3](https://forum.code.org/u/mathisd3)\
**Post date:** [March 2, 2020, 12:40pm UTC](https://forum.code.org/t/csp-u5l8-bubble-9-code-org-glitchy/32365/1 "2020-03-02T12:40:25Z")

</div>

Student has this code

var secret = 1;  
onEvent(“login\_btn”, “click”, function() {  
getText(“password\_input”)=secret;  
if (secret==123) {  
showElement(“unlock\_img”);  
hideElement(“lock\_img”);  
console.log(“unlocked”);  
}  
if (secret!=123) {  
showElement(“lock\_img”);  
console.log(“loggin failed”);  
}  
});

and is getting this error on line 3  
ERROR: Line: 3: SyntaxError: Assigning to rvalue (3:0)

---

<div class="post-metadata">

**Author:** ![kookooloopdaking](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/kookooloopdaking/32/5224_2.png) [@kookooloopdaking](https://forum.code.org/u/kookooloopdaking)\
**Post date:** [March 2, 2020, 12:57pm UTC](https://forum.code.org/t/csp-u5l8-bubble-9-code-org-glitchy/32365/2 "2020-03-02T12:57:14Z")

</div>

> [@mathisd3](#):
>
> getText(“password\_input”)=secret;

that there is your problem. you’re setting `getText("password_input")` to `secret` which is assigned 1. you can’t assign a getter a value, if you want to change the text do `setText("password_input",text)` if you want to set `sectet` to `getText("password_input")`, you should do:

```
secret = getText("password_input");

```
