?
Solved

For some reason this doesn't seem to be working

Posted on 2013-12-11
2
Medium Priority
?
212 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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 …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…
Suggested Courses

800 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