Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7802959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:25:01+00:00 2026-06-02T01:25:01+00:00

How to check if input=text value is not NULL and then move to page?

  • 0

How to check if input=”text” value is not NULL and then move to page?

<input TYPE="text" name="textbox2" align="center">
........
function HomeButton()
                {
                    <!--if textbox1 value and textbox2 value not null-->
                        location.href="registration.html";
                }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T01:25:03+00:00Added an answer on June 2, 2026 at 1:25 am

    Just check that both their values are truthy.

    var textbox1 = document.getElementsByName('textbox1')[0];
    var textbox2 = document.getElementsByName('textbox2')[0];
    
    if(textbox1.value && textbox2.value) {
        location.href = "registration.html";
    }
    

    Of course, you can make things easier by giving them ids:

    <input type="text" name="textbox2" id="textbox2" align="center">
    

    and

    var textbox2 = document.getElementById('textbox2');
    

    for example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Input values <input type=hidden name=service_row[1]['row'] value=1 /> <input type=checkbox name=service_row[1]['check'] /> <input type=text name=service_row[1]['observation']
I have some input fields like below: <input type=text name=date_1 class=dataList value=2009-12-30 /> <input
i want to check users' input value when he input his name, if his
I have form like this: <input type='text' name='people' id='namepeople'> <input type='hidden' name='idpeople' id='idpeople'> <input
I generated automatically with PHP form, for example: <form id=stack> <input type=text name=aaa pos=one>
Let's assume we have a text-box on the page: <input type=text> The visitor types
function drawLabel(labelsIndex) { // Check not deleted Label data:(DBID, text, styling, x, y, isDeleted)
I have the following code snippet in my page. <script type=text/javascript> function expandCollapse(id){ var
What is the easiest way to check in Javascript whether the input text field
I'm trying to check if a form input has any value (doesn't matter what

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.