You need to use ==
or ===
for comparison instead of =
.
x = y
assignsy
tox
x == y
checks ify
andx
are loosely equalx === y
checks ify
andx
are equal and of the same type
So what you need to do is replacing if (hv.val = "1")
with if (hv.val == "1")
More Related Contents:
- What is the difference between client-side and server-side programming?
- How to create a file in memory for user to download, but not through server?
- How to export JavaScript array info to csv (on client side)?
- Access Java / Servlet / JSP / JSTL / EL variables in JavaScript
- JavaScript: Passing parameters to a callback function
- Call Servlet and invoke Java code from JavaScript along with parameters
- jQuery’s .click – pass parameters to user function
- Sending emails with Javascript
- Passing parameters to JavaScript files
- In Javascript/jQuery what does (e) mean?
- How to pass JavaScript variables as parameters to JSF action method?
- Accessing control client name and not ID in ASP.NET
- How to pass event as argument to an inline event handler in JavaScript?
- Is it possible to check dimensions of image before uploading?
- How do I pass JSF managed bean properties to a JavaScript function?
- Single Page Application: advantages and disadvantages [closed]
- How can I run a program or batch file on the client side?
- Catch all JavaScript errors and send them to server [closed]
- how to make sure only my own website (clientside code) can talk to Firebase backend?
- Can you get a public Facebook page’s feed using Graph API without asking a user to allow?
- Pagination: Server Side or Client Side?
- Removing elements with Array.map in JavaScript
- Javascript multiple dynamic addEventListener created in for loop – passing parameters not working
- Save to Local File from Blob
- AngularJS: Understanding design pattern
- Image brightness detection in client side script
- Getting the text from a drop-down box
- How to store persistent data client side
- Reading line-by-line file in JavaScript on client side
- Exploiting JavaScript’s eval() method