Linked Questions
89 questions linked to/from How do I check for an empty/undefined/null string in JavaScript?
0
votes
2
answers
650
views
error in google apps script if no file upload is specified
I'd like to give the user the option to upload a file, but it's not strictly necessary. This script seems to glitch if there is no file specified. How can I fix that? It seems like the line it really ...
0
votes
2
answers
578
views
React search onChange cancel request
I'm handling search feature onChange using Axios. It works fine.
But the problem is when the user deletes input to empty. The request still sent.
My code.
handleSearch = (e) => {
const ...
0
votes
1
answer
935
views
PHP Ajax live search with load more
I would like if I scroll bottom of .dropdown-menu, load more 7 row in database. I don't know why not using this script.
I'm using bootstrap css and js.
I tried the bootstrap-select.js with live search,...
1
vote
3
answers
469
views
Unable to perform validation using null || undefined || "" values
I have one validation that I need to perform. When a string is null or undefined or "" I need to show a message like "unable to perform further steps". If I do have values I need ...
-1
votes
3
answers
1k
views
checking for empty string in jQuery [duplicate]
I have
<table id="table1">
<tr>
<td> </td>
</tr>
</table>
I check for the value in using
$('#table1 tr').find('td').eq(0).text()
this equates to "...
0
votes
1
answer
508
views
Go to url if value is null
I have a form, an input and a link. If the input has no value, clicking the link would direct to a certain url. If the input is NOT empty, then the click would have to submit the form. This is how the ...
1
vote
6
answers
271
views
How to use JavaScript (or JQuery) to check if an input is empty or has a certain string?
I'm doing some validation on a calculator form I'm building and I want to a show a 'Please fill this field' message if the user hasn't entered a figure into the input.
By default, the field has a '...
0
votes
3
answers
154
views
JSON should be empty, but contains string "[]"
I have checked most of the posted questions, but what I am doing now is to check if JSON is empty. However, after debugging with Chrome, the JSON object contains only "[]" and is not empty. So if ...
-2
votes
3
answers
120
views
Checking whether variable is empty in JavaScript?
There is two kind of JavaScript code for investigating empty/full variable:
if(variable == ''){}
if(!variable){}
I tested both of them, and I achieved identical result. Now I want to know, (first) ...
0
votes
2
answers
582
views
Check if input is empty with jquery
There are several ways to check if a input is empty, for example:
$('input:text').val().length == 0
My problem is that i found no solution how to check if the input is empty or blank?
How can i check ...
1
vote
2
answers
177
views
How to check if an object is empty? [javascript]
I need to evaluate if an object is empty.
For example suppose I have an object:
var home = ....; // this is an object and after I print it
console.log(home) // the result of this option is []
...
0
votes
1
answer
230
views
How to replace a null/blank in Google form response from Apps script
I have a code that checks for the answers in a Google Form, and if they match, it sends an email. The below code is working fine only if there is a value entered in the form. Since this is not a ...
1
vote
2
answers
90
views
How to Return False When Input Doesn't Same or Empty in JavaScript
i want to show alert and return false when the password and confirm password doesnt same or when the password is empty.
here what i try.
<div class="card margin-card-password">
<div ...
1
vote
4
answers
76
views
Javascript disallow space only in input area
I tried using following method to ban users from leaving only space in the input area with no luck:
method one:
var formSub = $('#formsub').val();
if (formSub == null || formSub == "") {
return ...
0
votes
2
answers
164
views
How I can to check in the render that an element is empty (React Native)
I have a file json but sometimes this file json doesn't have the image.
Sometimes this item this empty: item.better_featured_image.media_details.sizes.medium.source_url
render() {
const { ...