Solved

javascript alert not showing up

Posted on 2013-01-17
3
341 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

Title # Comments Views Activity
Bootstrap Form 16 41
Use "if not" in a condition 2 19
Popup write two lines 3 22
Why am I getting ReferenceError:  boxes is not defined error 5 8
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

733 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