I want the confirm dialog box with "yes/no" buttons rather than the default "ok/cancel" buttons of confirm dialog box. what is the syntax for getting that .
P.S: one thing don't tell me the about the vbscript embeded in the javascript.it's looking odd "with a vbscript prompt"
21 14502 hsriat 1,654
Recognized Expert Top Contributor
I want the confirm dialog box with "yes/no" buttons rather than the default "ok/cancel" buttons of confirm dialog box. what is the syntax for getting that .
P.S: one thing don't tell me the about the vbscript embeded in the javascript.it's looking odd "with a vbscript prompt"
Thats not possible with that typical confirmation box. You will need to change your message so that it fits ok and cancel.
But you can build popup DIVs as the same purpose.
Have a look at this.
Thats not possible with that typical confirmation box. You will need to change your message so that it fits ok and cancel.
But you can build popup DIVs as the same purpose.
Have a look at this.
No that is possible..!!! because we are using one application which has the popup with yes/no buttons(for internet explorer) but the code is not available for me son only i'm asking.
acoder 16,027
Recognized Expert Moderator MVP
No that is possible..!!! because we are using one application which has the popup with yes/no buttons(for internet explorer) but the code is not available for me son only i'm asking.
Why is the code not available? Just do a "view source".
hmm tat one i have done already. but that is not the complete code..i can't generate dialog box after clicking a link.
acoder 16,027
Recognized Expert Moderator MVP
hmm tat one i have done already. but that is not the complete code..i can't generate dialog box after clicking a link.
Post your code.
rnd me 427
Recognized Expert Contributor
the yes no is a vbscript function: messageBox.
it is not available outside of IE.
hey wat abt that dialog box with yes/no buttons which is displayed while we are trying to close a window???
if tat is possible y can't we use the same ??
just check this dialog box of iexplorer.how come you are getting a dialog box with yes/no buttons?? -
<html>
-
<head>
-
</head>
-
<body text="#000000" bgcolor="#007BFF">
-
<form method="post" action="" name="closee">
-
<input type="button" onclick="window.top.close()" value="Close" class="BUTTON"></form>
-
</body>
-
</html>
-
hsriat 1,654
Recognized Expert Top Contributor
just check this dialog box of iexplorer.how come you are getting a dialog box with yes/no buttons?? -
<html>
-
<head>
-
</head>
-
<body text="#000000" bgcolor="#007BFF">
-
<form method="post" action="" name="closee">
-
<input type="button" onclick="window.top.close()" value="Close" class="BUTTON"></form>
-
</body>
-
</html>
-
Alert boxes, and confirmation boxes are something which are inbuilt. You can use them, and we have been given the right to change the message inside it. NO COLORS, NO YES/NO, NO HTML INSIDE IT!!
That may happen later, but according to my knowledge, with the current version, you can NOT change OK, Cancel with Yes, No just by providing an extra flag like confirm('Is this confirm box using Yes No?', USE_YES_NO);
Although I guess it would have been quite good if we were able to do such changes with these flags.
If you really and badly need to change it to YES/NO, read the code at the link I provided you in the second post, and be innovative!
And as for as that prompt box shown at the window-closing is concerned, that is something used by the browser itself, not JavaScript. You may get similar prompt messages in may other events, like when you download something, when you enter an encrypted page etc.
Alert boxes, and confirmation boxes are something which are inbuilt. You can use them, and we have been given the right to change the message inside it. NO COLORS, NO YES/NO, NO HTML INSIDE IT!!
That may happen later, but according to my knowledge, with the current version, you can NOT change OK, Cancel with Yes, No just by providing an extra flag like confirm('Is this confirm box using Yes No?', USE_YES_NO);
Although I guess it would have been quite good if we were able to do such changes with these flags.
If you really and badly need to change it to YES/NO, read the code at the link I provided you in the second post, and be innovative!
And as for as that prompt box shown at the window-closing is concerned, that is something used by the browser itself, not JavaScript. You may get similar prompt messages in may other events, like when you download something, when you enter an encrypted page etc.
the thing you are talking abt the below line is possible only in java that is java gui applications like Jdialog box or someting but it is not intended for the javascript.and one thing we can get that dialog box using vbscript in javascript confirm('Is this confirm box using Yes No?', USE_YES_NO); acoder 16,027
Recognized Expert Moderator MVP
the thing you are talking abt the below line is possible only in java that is java gui applications like Jdialog box or someting but it is not intended for the javascript.
The code is JavaScript, so it should work.
and one thing we can get that dialog box using vbscript in javascript confirm('Is this confirm box using Yes No?', USE_YES_NO);
vbscript only works in IE.
ceck this thing please help me urgent.. this hsriat 1,654
Recognized Expert Top Contributor
ceck this thing please help me urgent..this
Sorry, thats JAVA and I'm not master of all!
Actually, I'm not even master of one. :D acoder 16,027
Recognized Expert Moderator MVP
ceck this thing please help me urgent..this
Java != JavaScript. Asking for Java help in the JavaScript forum is not a good idea. A Java expert should get to it soon enough (hopefully).
The code is JavaScript, so it should work.
vbscript only works in IE.
Any way this is the solution by using the VB code..!!! -
function window.confirm(str)
-
{
-
execScript('n = msgbox("'+str+'","4132")', "VBScript");
-
-
}
-
-
hsriat 1,654
Recognized Expert Top Contributor
Any way this is the solution by using the VB code..!!! -
function window.confirm(str)
-
{
-
execScript('n = msgbox("'+str+'","4132")', "VBScript");
-
-
}
-
-
Thats good!
But did you check its working on Firefox?
acoder 16,027
Recognized Expert Moderator MVP
Any way this is the solution by using the VB code..!!! -
function window.confirm(str)
-
{
-
execScript('n = msgbox("'+str+'","4132")', "VBScript");
-
-
}
-
-
A tip: don't test in IE first. Test in a (more) standards-compliant browser, e.g. Firefox, Opera, then test in IE.
Thank you for the tip..!!!
acoder 16,027
Recognized Expert Moderator MVP
This is not working in FF
acoder 16,027
Recognized Expert Moderator MVP
If you read the whole thread (or even part of it), you'll realise that the "working" solution is not actually JavaScript, but VBScript which is only supported in IE (last I checked). Use the link posted by hsriat to help make your own DHTML version if it's critical to have a Yes/No confirm box.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Hans |
last post by:
Basically what I would like to do is my own confirm dialog so I can choose
the text on the buttons etc. My code looks something like this today
if (confirm("Do you want to save?"))
//do some...
|
by: Tony Baker |
last post by:
Wow. I finally found out the easiest way to display a yes/no (well,
yes/cancel) dialog pop up from ASP.Net.
Turnes out to be really easy. Just add the following in you Page_Load
method (C# code...
|
by: Patrick Delifer |
last post by:
Hi,
I am trying to implement a JS confirm dialog when a user is deleting
something off my Datagrid.
The problem is that I don't have a Delete button in which case I could write
the following...
|
by: ad |
last post by:
I want user can confirm before delete records ?
How can I show a confirm dialog when users press a button?
|
by: zhuang |
last post by:
With Javascript, i know I could create confirm dialog in ASP.NET
app.But
the button is yes and cancel, is there anyway to change it to yes and
no
Thanks
zhuang
|
by: mamun |
last post by:
Hi All,
I have the following situation and am looking for answer in C#.
I have a datagrid and putting checkbox next to each record. In the
header I have a Delete button.
I want users to...
|
by: =?Utf-8?B?UmFq?= |
last post by:
In my user control, I have included javascript code using
ScriptManager.RegisterClientScriptBlock(). JavaScript code has a confirm
message dialog box and we store the message value in a hidden...
|
by: marksommerville |
last post by:
Can anyone help?
I have a Delete button that processes a request to delete 1 or more
records.
I want to be able to issue a custom javascript confirm dialog message
before I go through my save...
|
by: 00steve |
last post by:
Hi,
I am using a confirm dialog to display a list of altered records when
the user submits changes. I would like it displayed in the following
format:
Student ...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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...
|
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,...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 ...
| |