Solved

For some reason this doesn't seem to be working

Posted on 2013-12-11
2
206 Views
Last Modified: 2013-12-11
I have the following JavaScript code here when i call db.save() i get the following error

db is not a constructor any ideas as to why.  

var db = {

  save: function()
  {
    console.log('saved');
  },
  
  get:function()
  {
   console.log('get');	 
  } 

}

db.save();

Open in new window

0
Comment
Question by:stargateatlantis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 500 total points
ID: 39712820
Hi,

first I think that in line 13 you are missing a ";".
Second, this code works on my local IE11.
Do you have any other code on your page?
Which browser?

HTH
Rainer
0
 

Author Comment

by:stargateatlantis
ID: 39712832
for some reason it doesn't work with this

http://bootboxjs.com/

when you use the custom dialog
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need help with this homework problem. 5 76
Hide and Unhide Table 6 42
Add somewhat of a wildcard to your javascript 12 43
sort Multi-dimensional array 6 42
In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question