Solved

javascript alert not showing up

Posted on 2013-01-17
3
333 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:ingwa
Comment Utility
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
Comment Utility
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
Comment Utility
quick and correct. Thanks.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
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 …
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now