imho.ws
IMHO.WS  

Вернуться   IMHO.WS > Веб-мастеру > Веб-программирование
Опции темы
Старый 02.06.2004, 17:29     # 1
_ARMAGEDDON_
Guest
 
Сообщения: n/a

Alert yes/no (Java)

Как на jave сделать alert с кнопками yes/no. Нужен для подтверждения удаления. При нажатии yes удаление подтверждается, при нажатии no alert пропадает и ничего не происходит
 
Старый 02.06.2004, 17:31     # 2
RaZEr
МОД-Оператор ЭВМ
 
Аватар для RaZEr
 
Регистрация: 18.04.2002
Адрес: Питер
Сообщения: 4 343

RaZEr Отец (мать) всех ГуруRaZEr Отец (мать) всех ГуруRaZEr Отец (мать) всех ГуруRaZEr Отец (мать) всех ГуруRaZEr Отец (мать) всех ГуруRaZEr Отец (мать) всех ГуруRaZEr Отец (мать) всех ГуруRaZEr Отец (мать) всех ГуруRaZEr Отец (мать) всех ГуруRaZEr Отец (мать) всех ГуруRaZEr Отец (мать) всех ГуруRaZEr Отец (мать) всех ГуруRaZEr Отец (мать) всех ГуруRaZEr Отец (мать) всех ГуруRaZEr Отец (мать) всех ГуруRaZEr Отец (мать) всех ГуруRaZEr Отец (мать) всех Гуру
На JS - confirm()
RaZEr вне форума  
Старый 09.06.2004, 12:35     # 3
dmitryelf
Junior Member
 
Аватар для dmitryelf
 
Регистрация: 22.04.2004
Сообщения: 99

dmitryelf Молодецdmitryelf Молодецdmitryelf Молодец
Confirm
Displays a Confirm dialog box with the specified message and OK and Cancel buttons. Method of Window

Syntax

confirm("message")

Parameters message A string.

Description
A confirm dialog box looks as follows:

Use the confirm method to ask the user to make a decision that requires either an OK or a Cancel. The message argument specifies a message that prompts the user for the decision. The confirm method returns true if the user chooses OK and false if the user chooses Cancel.

You cannot specify a title for a confirm dialog box, but you can use the open method to create your own confirm dialog. See open.

Examples
This example uses the confirm method in the confirmCleanUp function to confirm that the user of an application really wants to quit. If the user chooses OK, the custom cleanUp function closes the application.

function confirmCleanUp() { if (confirm("Are you sure you want to quit this application?")) { cleanUp() }}
You can call the confirmCleanUp function in the onClick event handler of a form's push button, as shown in the following example:

<INPUT TYPE="button" VALUE="Quit" onClick="confirmCleanUp()">

See also
Window.alert, Window.prompt
dmitryelf вне форума  

Опции темы

Ваши права в разделе
Вы НЕ можете создавать новые темы
Вы не можете отвечать в темах.
Вы НЕ можете прикреплять вложения
Вы НЕ можете редактировать свои сообщения

BB код Вкл.
Смайлы Вкл.
[IMG] код Выкл.
HTML код Выкл.

Быстрый переход


Часовой пояс GMT +4, время: 14:51.




Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.