Linked Questions
89 questions linked to/from How do I check for an empty/undefined/null string in JavaScript?
0
votes
2
answers
4k
views
Add condition to a html form`
I have the following simple HTML code and want to add a condition, like if fname <> a then display a
comment "Wrong first name". I have the following code and am unsure where to put ...
0
votes
1
answer
3k
views
Disabling button depending if variable is empty or NULL
I currently have a several input fields and using ajax to assign values to the php variables. In my javascript code I have function saveThem which stores the values. At the end there is a button that ...
user avatar
user1261800
0
votes
1
answer
3k
views
check the data of ckeditor is null or not
I'm using the ckeditor 3.4 as text editor for my website, and want to validate the data at client side first, before submitting the data to server.
I can get the data of editor by using this code:
...
1
vote
2
answers
806
views
After form validation, form doesn't submit
So my issue is this. I have some "validation" on my email and checkbox to check whether they are empty. That seemed to work, but after they have been filled in and checked I still get my warning ...
0
votes
1
answer
2k
views
How to check if the value of id is empty or null? using react native
I just want that if the valuesToSubmit.personID or valuesToSubmit.dataID == '' is empty , it will
enter to if condition and if not it will go to else
if (valuesToSubmit.personID == '' || ...
1
vote
1
answer
2k
views
How to test for `0` and `false` in TOML files?
I would like to be able to check TOML files for undefined or empty strings. So in the below example 0 and false should have returned that they have been set, where test4 is clearly not defined, but ...
0
votes
2
answers
2k
views
How can i display an element with a ternary operator
I am trying to display a special instruction section only if a user has entered one. I am trying to do it with a condition statement but it just prints out
?
Special Instructions
: "";
I ...
-3
votes
2
answers
3k
views
How To Check For Empty Fields In HTML Form With JavaScript
I'm checking a website registration form with JavaScript code and onchange listeners.
Empty fields/spaces need to be checked for first before checking for illegal characters, too long strings, etc.
I'...
0
votes
1
answer
2k
views
Google Tag Manager - Parse Dynamic Data Layer Variable
I want to parse a 'pushed' data layer string. I intend to use it to track click events and setup the appropiate funnels in Google Analytics, it looks as follows: products.view.19|view recent product|...
3
votes
3
answers
788
views
How to check ajax data.d is null in append?
I am trying to append some data in html table using jquery that is working fine but when the data is null or empty i have to append another div to that html table.
Am trying like this
$("#table")....
1
vote
2
answers
673
views
enable checkbox only when textbox is not empty asp.net
I need to make visible a checkbox and a text near it only when the textbox is filled. Otherwise it should be invisible.
<p>Telefon:<asp:TextBox ID="txtPhone" runat="server"></asp:...
2
votes
6
answers
804
views
Difference between exclamation equals sign and exlamation 2x equals sign when checking with null
What is the difference between next if statements in javascript when checking with null?
var a = "";
if( a != null ) // one equality sign
....
if( a !== null ) // two equality sign
....
When ...
-1
votes
1
answer
3k
views
How to convert request file to base64 string in nodejs
I have file coming in request.file object. If I console.log(request.file)
It prints
{
fieldname: 'file',
originalname: 'Screenshot from 2021年06月23日 18-34-25.png',
encoding: '7bit',
mimetype: '...
-4
votes
2
answers
2k
views
check if a value is string in an object javascript
I have this code. I need to write a validation for this object. if any of the property is empty or not a string console log an error or console log a message.
var obj = {
"val1" : "test1",
"val1"...
0
votes
1
answer
1k
views
Internet Explorer javascript value NULL, or not object
I saw this and this topics, but not solved my problem.
Here is my code what is working fine in Chrome and Firefox, but in Internet Explorer not working (tested only in IE8):
var myjson = {'dat':[
...