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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:02:09+00:00 2026-06-18T15:02:09+00:00

What I am attempting to discover is how to set a value when the

  • 0

What I am attempting to discover is how to set a value when the function inside
and Event Listener gets executed. If that can be done, then that value, could be used
to control other potential actions. Not having found precise material about this, I have
been experimenting. The below code, doesn’t raise any alarms with the Chrome
JS Console, and it does perform the alert(77) when the mouse leaves
MoscowNights Div, but there is no value on the backend of the whole claptrap
codeblock.

function IsolateThaBUG() {
  var MoscowNights = document.getElementById("MoscowNights");

  MoscowNights.addEventListener("mouseout", function(evt) {
    var MaloMaloJavaScript = 77;
    alert(MaloMaloJavaScript);
    return MaloMaloJavaScript;
  }, false);

  var Convoluted = MoscowNights;
  return Convoluted;
}

var GotAnythingYET = IsolateThaBUG();
alert('Got This NONSENSE Instead : ' + GotAnythingYET);

Right, well… this next block also does not give up a value… or so it would seem. If it was accessible, it should be showing up in the div, but it reads undefined so… maybe there is no way to do this in one go.

    function IsolateThaBUG(){
       var MoscowNights = document.getElementById('MoscowNights');
        var MaloMaloJavaScript; // temp undefnd
        MoscowNights.addEventListener("mouseout", function (evt) {
            var MaloMaloJavaScript=77;   <<<<<<<<<<<<<<<<<<<<<<<    THAT,
            }, false);
        return MaloMaloJavaScript;   >>>>>>>>>>>>    is just NOT getting OUTSIDE!!
    }
     var GotAnythingYET = IsolateThaBUG();
     function WritetestValue() {
        var artfulArtificial = document.getElementById("whattheSAMHILLsigoinon");
        var TitleWrite = artfulArtificial.appendChild(document.createTextNode(testValue));
        return TitleWrite;
    }
    WritetestValue();

The answer I accepted, does the job as I discovered when I studied it, got it installed and tested it.

  • 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-18T15:02:11+00:00Added an answer on June 18, 2026 at 3:02 pm

    The function you wrote IsolateThaBug is returning the value of MoscowNights, which is an element.

    I’m surmising that you wish to retrieve the value of MaloMaloJavascript. In order to accomplish this, you need to pass in a callback or some other variable with which to mutate.

    Here are a few examples.

    function testMouseout() {
      var element = document.getElementById('MoscowNights'); 
      var testValue;  // undefined currently.
      element.addEventListener('mouseout', function(e) {
        testValue = 77;
      }, false);
      return testValue;
    }
    
    var mouseoutTest = testMouseout(); 
    console.log(mouseoutTest); // undefined
    // perform the mouseout action. If you did, the value will be 77.
    window.setTimeout(function(){
      console.log(mouseoutTest) // 77
    }, 5000)
    

    If you want to wait till fire the alert until the mouseout has happened, you can pass in a callback function. This takes advantage of JavaScript’s first-class functions.

    function testMouseout(callback) {
      var element = document.getElementById('MoscowNights'); 
      var testValue;  // undefined currently.
      element.addEventListener('mouseout', function(e) {
        testValue = 77;
        callback(testValue);
      }, false);
      return testValue;
    }
    
    // we pass in a function that will 
    // be executed when the event fires.
    testMouseout(function(value) {
      alert(value); // 77
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Attempting to set up an automated texting service for customers, where people can text
Attempting something like public string MyText { get {return lbl.Text;} set {lbl.Text = value;}}
In trying to answer this question , I was surprised to discover that attempting
Attempting to make a NSObject called 'Person' that will hold the login details for
I am attempting to contact everyone on a LAN to discover which devices are
Attempting to move an uploaded file so that it is saved in the directory,
Attempting to set up Samba + OpenLDAP using nss_ldap. After joining Windows7 to Samba
I'm attempting to start a fresh project that hopes to use GWT 1.7.1, the
Attempting to use asp.net mvc's Action Result of File. So it would seem that
Attempting to set the tabIndex for date_select has proven to be difficult out of

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.