[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 361
  • Last Modified:

javascript alert not showing up

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
lantervj
Asked:
lantervj
1 Solution
 
Mark GilbertSenior Performance EngineerCommented:
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
 
leakim971PluritechnicianCommented:
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
 
lantervjAuthor Commented:
quick and correct. Thanks.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now