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 8816267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:34:55+00:00 2026-06-14T04:34:55+00:00

console.log(value); does not log anything but the number on the left is incrimented everyime

  • 0

console.log(value); does not log anything but the number on the left is incrimented everyime i click and it indicates that the console.log() call is made, just not showing what I put into it.

Also, a side question is how could I do this if the javascript is in a different file? Thank you

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
    <title>Star Delete</title>
    <!--<script type="text/javascript" src="StarDelete.js"></script>-->
</head>
<body>OKAY DELETE STAR YES ;D!
        <form>
            <input type="text" id="formValueId" name="valueId"/>
            <input type="button" id="theButton"/>
        </form>
    <script type ="text/javascript">
    var button = document.getElementById("theButton"),
    value =  button.form.valueId.value;
    //value = document.getElementById("formValueId").value;
    button.onclick = function() {
            console.log(value);
    }
    </script>
</body>
</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-14T04:34:56+00:00Added an answer on June 14, 2026 at 4:34 am

    http://jsfiddle.net/3wjRJ/1/

    var button = document.getElementById("theButton"),
    value =  button.form.valueId.value;
    

    Here you go, the issue was that you were declaring the value variable when the javascript was first loaded, therefore it was always blank.

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

Sidebar

Related Questions

I know that the android browser for 2.3 does not support SVG, but I'd
From the node repl: foo = { bar: 'baz'}; console.log (Object.getOwnPropertyDescriptor(foo, 'bar')) Returned value:
I am using log4net to log to the console, and the %date conversionPattern value
Any advice how to console.log the element that fired an hover action? This is
I'm trying to debug some pretty simple Javascript using console.log, but it's outputting values
Consider the following HTML: <select> <option value=hasAttr>Has a value attr</option> <option>Does not have a
Just came across this. It's not affecting anything really but i'm wondering why it's
Any ideas why this does not pass 'id' form value? <script src=http://code.jquery.com/jquery-latest.min.js></script> <script type=text/javascript
Update : This works in firefox, but does not work on chrome 6, still
Why does this return a syntax error: function(foo){console.log(foo)} I'd expect this to return the

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.