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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:53:25+00:00 2026-05-23T14:53:25+00:00

183| }); 184| >> 185| <% if(just_registered) { %> 186| alert(Welcome!); 187| <% }

  • 0
    183|             });
    184| 
 >> 185|             <% if(just_registered) { %>
    186|                 alert("Welcome!");
    187|             <% } %>
    188| 

just_registered is not defined

Basically, I want to say: if just_registered is defined and is true, then alert. However, I want want to set everything to false…I just want to leave it undefined (i have like 100 variables)

  • 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-05-23T14:53:26+00:00Added an answer on May 23, 2026 at 2:53 pm

    <% if(typeof just_registered !== "undefined") { %>

    Basically your checking whether a local variable exists. To do this you have to use the typeof operator since accessing just_registered which is an undeclared local variable creates a reference error.

    This is best compared to

    var foo;
    if (foo) { }
    

    vs

    //var foo;
    if (foo) { } // ReferenceError
    

    Where as

    //var foo
    if (typeof foo !== "undefined") { } 
    

    Will work because accessing an undeclared variable with the typeof operator just returns "undefined" rather then throwing a ReferenceError

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

Sidebar

Related Questions

On pages 183 and 184 there is the following code : def edit_snippet(request, snippet_id):
http://demo.thethemefoundry.com/traction/#post-183 Which wordpress plugin is this, to have post image on the left side
I want to get some textarea text and replace all bullet point html entities
My program calls function 183 (getcwd) of interrupt 80h which copies an absolute pathname
/* 180 * Create a regular file 181 */ 182 static int 183 ufs_create(ap)
I defined a macro as follows: #define ccpd(__X__, __Y__) (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) ? CGPointMake(__X__
If I have 20 pairs of coordinates, whose x and y values are say
If I have a table like this (where I do not know the name
I want an algorithm to simulate this loaded die: the probabilities are: 1: 1/18
Command @D:\Program Files\Python26\Lib\site-packages\django\bin\django-admin.py startproject mysite causes error 183 without any useful information. System path

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.