473,804 Members | 2,136 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

alert() and confirm() function

Hi,

now I know what the alert() function does, but can anyone tell me where I
can find the specification or standards for functions like alert() and
confirm().

They don't seem to be part of the ECMAScript language but aren't part of the
DOM either. Now we seem to be finally reaching a stage of
standards-compliant browsers, there seems to be a bit of a gap here.

Andy
Jul 20 '05 #1
7 18443


Andy Fish wrote:
Hi,

now I know what the alert() function does, but can anyone tell me where I
can find the specification or standards for functions like alert() and
confirm().

They don't seem to be part of the ECMAScript language but aren't part of the
DOM either. Now we seem to be finally reaching a stage of
standards-compliant browsers, there seems to be a bit of a gap here.


alert, confirm, prompt are part of the browser object model for client
side JavaScript that hasn't been standardized and will not be
standardized by the W3C as the DOM standard is meant to be independent
of the environment. And the ECMAScript standard is also meant to be
independent of the host environment thus things like alert will never be
part of the ECMAScript standard.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
> so you're saying it's just a convention that browsers provide these
functions?

that doesn't sound like a good thing in the drive for standards-based
platform-independent development :-(


Exactly right. And yet, that is how things are.

Jul 20 '05 #3
Hi,

Andy Fish wrote:
so you're saying it's just a convention that browsers provide these
functions?

that doesn't sound like a good thing in the drive for standards-based
platform-independent development :-(


This can be understood when you know that these methods were actually
planned for development process, to allow easier debugging of JavaScript
applications. The lack of customization of the alert, confirm and prompt
boxes show this clearly as well (you cannot change the texts of the
buttons, for example, or the title).

If you need more specific boxes, you can always do your own in
HTML/JavaScript (small popup) as shown in:
<URL: http://www.galasoft-lb.ch/myjavascript/consulting/2000090401.html >

However, this is a popup, and some users with some browsers can disable
them.

HTH,

Laurent
--
Laurent Bugnion, GalaSoft
Webdesign, Java, javascript: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch

Jul 20 '05 #4


Andy Fish wrote:
so you're saying it's just a convention that browsers provide these
functions?

that doesn't sound like a good thing in the drive for standards-based
platform-independent development :-(


Well, face it, many things like
window.location
or
element.offsetL eft/offsetWidth/offsetParent
are not standardized anywhere

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #5
On Thu, 14 Aug 2003 17:18:10 +0200, Martin Honnen
<Ma***********@ t-online.de> wrote:


Andy Fish wrote:
so you're saying it's just a convention that browsers provide these
functions?

that doesn't sound like a good thing in the drive for standards-based
platform-independent development :-(


Well, face it, many things like
window.location


window.document isn't even standardised anywhere, the idea that
there's some global var pointing at the document which 99% of all
scripts require doesn't exist in any formal spec. It's just de-facto.

The SVG Working Group are standardising a window interface for SVG 1.2
though. (and it's similar to the HTML one, and browsers like SVG
enabled mozillas will have to support it!)

Jim.
--
comp.lang.javas cript FAQ - http://jibbering.com/faq/

Jul 20 '05 #6
Lee
Andy Fish said:

so you're saying it's just a convention that browsers provide these
functions?

that doesn't sound like a good thing in the drive for standards-based
platform-independent development :-(


It's not as unreasonable as you think.

If there was a standard for how automobiles should work,
the features found at roadside rest stops would not be
a part of that standard.

Similarly, the ECMAScript standard describes the language,
only, not the features that the language may find in the
various browsers.

Jul 20 '05 #7
JRS: In article <ie************ ********@news-text.cableinet. net>,
seen in news:comp.lang. javascript, Andy Fish
<aj****@blueyon der.co.uk> posted at Thu, 14 Aug 2003 09:02:06 :-

now I know what the alert() function does, but can anyone tell me where I
can find the specification or standards for functions like alert() and
confirm().


According to my saved copy of a Netscape reference page set, they
are Methods of window, and are explained in the window page.

**TRY** a Google search for Last Updated: 05/28/99 12:00:46

That Web page was probably, at the time, linked from and near to
<URL:http://developer.netscape.com/docs/m...ore/jsguide15/
contents.html>.

Lest the page is updated but not much changed, try a search for
"Displays a Confirm dialog box with the specified message and OK
and Cancel buttons" and/or "You cannot specify a title for an
alert dialog box".

Once you find that page, you have found in effect the whole
cornucopia.
You could also search for "Core JavaScript Guide 1.5" in a subdir
jsg15 of a Netscape site - though that may not contain what you
want.
Reading the c.l.j FAQ suggests trying around
<URL: http://devedge.netscape.com/library/...00/javascript/
1.3/reference/window.htm>.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk DOS 3.3, 6.20; Win98. ©
Web <URL:http://www.merlyn.demo n.co.uk/> - FAQqish topics, acronyms & links.
PAS EXE TXT ZIP via <URL:http://www.merlyn.demo n.co.uk/programs/00index.htm>
My DOS <URL:http://www.merlyn.demo n.co.uk/batfiles.htm> - also batprogs.htm.
Jul 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
6050
by: Slartybartfast | last post by:
I have a link that when clicked does something on another machine, and it all works fine. <a href=http://www.remotedomain.com/cgi-bin/task.cgi?identifier>Do That Thing</a> But I thought it might be a good idea to verify the user is wants to do it (and didn't click on the link by accident), so I added the following javascript:
9
4994
by: Justin Koivisto | last post by:
Is there a way to create an alert-like message box that uses a custom image? Basically, I want to replace the default ! image with something else. -- Justin Koivisto - spam@koivi.com PHP POSTERS: Please use comp.lang.php for PHP related questions, alt.php* groups are not recommended.
7
11153
by: Tasha's Dad | last post by:
A description of the problem: 1) Go to a page with various settings and a timeout (forces re-login if over 10 minutes) 2) Before the timeout, make some changes to settings. 3) Press a "reset to defaults" button that uses a confirmation box to let the user know what is about to be reset (lists items). 4) Walk away while the confirm box is displayed and come back after the page timeout. 5) My screen now has the page, a confirm popup on top...
2
2841
by: Hans | last post by:
Hi! I have an asp application where I use a lot of javascript for validations etc and as it is today I use alert, confirm and prompt dialogs. Now we are adding support for unicode and I have problems with the font used to present messages in alert, prompts and confirm dialogs. If I for examle paste a chinese value in a prompt dialog it is shown om my machine as a vertical bar. When I write the value back to a textbox <input type="text"...
2
2284
by: Little Pete | last post by:
I use a simple .js script to shuffle files on my computer to which I'd like to add alert and confirmation boxes. Unfortunately I haven't been able to figure out what object I need to create that has these methods. What is missing from this .js script: var source = "source.txt"; var destination = "destination.txt"; if (confirm("Make Changes?")) {
4
10390
by: sonu | last post by:
How can we use alert and confirm method in asp.net application. i am working with application where i want to use confirm box before going for any operation. and same for alert box Sonu
3
12652
by: musclehead | last post by:
Hi everyone, I have, what I hope, will be a simple question. I have a basic JS function to pop-up a confirm delete dialog box when deleting a record from a DB: function confirmDelete() { var agree=confirm("Confirm record deletion?"); if (agree) return true ; else
8
1903
by: Guy Cohen | last post by:
Hi all How do I present questions/messages to the user while I am in a CLICK event of a button ? I was told to look for javascript/vbscript but could not make it work. Please advise Guy
0
9715
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10353
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10356
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10099
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9176
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7643
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4314
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.