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
Solved

javascript alert not showing up

Posted on 2013-01-17
3
338 Views
Last Modified: 2013-01-17
I can set a breakpoint on the alert th see that it does indeed get fired, but it never shows up.
function btnScan_onclick(divToRefresh)
{
TheDivToRefresh = divToRefresh;
WebTWAIN.IfShowUI = false;
IfDisableSourceAfterAcquire = true;
WebTWAIN.AcquireImage();
if (WebTWAIN.HowManyImagesInBuffer == 0){
Alert('No image was scanned');
Return();
}
} 

Open in new window

0
Comment
Question by:lantervj
3 Comments
 
LVL 18

Expert Comment

by:Mark Gilbert
ID: 38789766
Check your javascript console output. It will tell you if you have errors. It's possible it's bombing out on something else before getting to this...especially if the javascript had a fatal exception due to missing terminators etc.
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 38789826
the "a" of "alert" is lowecase :

alert('No image was scanned');

function btnScan_onclick(divToRefresh)
{
TheDivToRefresh = divToRefresh;
WebTWAIN.IfShowUI = false;
IfDisableSourceAfterAcquire = true;
WebTWAIN.AcquireImage();
if (WebTWAIN.HowManyImagesInBuffer == 0){
alert('No image was scanned');
Return(); // is this a function or the keyword? all javascript keyword are lowercase : return;
}
}
0
 

Author Closing Comment

by:lantervj
ID: 38789966
quick and correct. Thanks.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

839 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