473,385 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Is there any confirm box with "yes" or "no" option

hi Frnds,
I need Confirm box with "yes" or "no" buttons, Is that
possible in JAVASCRIPT ,
Can anyone tell me the solution for this or anyother way to create
confirm box with "yes" or "no" button?

Thanks & Rgrds
Dinesh...

Dec 20 '06 #1
5 28221
ba*****************@gmail.com wrote:
hi Frnds,
I need Confirm box with "yes" or "no" buttons, Is that
possible in JAVASCRIPT ,
Can anyone tell me the solution for this or anyother way to create
confirm box with "yes" or "no" button?

Thanks & Rgrds
Dinesh...
I've only been able to do this with a little java applet, or by
launching a simple web page containing a form with the relevent buttons.

Dec 20 '06 #2
Rik
ba*****************@gmail.com wrote:
hi Frnds,
I need Confirm box with "yes" or "no" buttons, Is that
possible in JAVASCRIPT ,
Can anyone tell me the solution for this or anyother way to create
confirm box with "yes" or "no" button?
Euhm, perhaps with rephrasing the question, a confirm(); usually does the
trick.... "ok" & "cancel".
--
Rik Wasmus
Dec 20 '06 #3
ba*****************@gmail.com wrote:
hi Frnds,
I need Confirm box with "yes" or "no" buttons, Is that
possible in JAVASCRIPT ,
Can anyone tell me the solution for this or anyother way to create
confirm box with "yes" or "no" button?

Thanks & Rgrds
Dinesh...
No, you can not.
If you must, first try Riks advise, and simply try to rephrase your question
and stick with OK and Cancel.
If that doesn't fit your needs, you can always make a small popup that looks
like a confirm (sort of) with 2 buttons.
But I have never ever had a situation in which rephrasing the question
didn't work..

Regards,
Erwin Moller
Dec 20 '06 #4
ba*****************@gmail.com skrev:
hi Frnds,
I need Confirm box with "yes" or "no" buttons, Is that
possible in JAVASCRIPT ,
Can anyone tell me the solution for this or anyother way to create
confirm box with "yes" or "no" button?
You can't do that with a popup box in JavaScript. You could launch a
web page with window.open, but that would require a trip to the server.
At work many people don't have Java or ActiveX enabled. If you don't
want the confirmation on the "next page" you may use a hidden div
element.

Maybe this code from the archive at www.codingforums.com
(http://www.codingforums.com/archive/...p?t-19975.html) could help
you:

<SCRIPT language="JavaScript">
<!--
function showHide(layerid){
if (document.getElementById(layerid).style.visibility != "hidden"){
document.getElementById(layerid).style.visibility = "hidden";
}
else{
document.getElementById(layerid).style.visibility = "visible";
}
}

function yours(){
alert("This is where your function should be")
}

// -->
</SCRIPT>

<P align="center"><a class=lined href="#null"
onclick="showHide('box2')"><b>Confirm Alert</b></a>

<DIV id="box2" style="position:absolute;left:350;top:150;
width:250;color:#FFFFFF;border-top:2px solid #ffffff; border-left:2px
solid #ffffff; border-right:2px solid #808080; border-bottom:2px solid
#808080; background:#d8cfc8;visibility:hidden;text-align:center">

<div
style="height:18;font-size:12;text-align:left;filter:progid:DXImageTransform.Microsof t.Gradient(GradientType=1,
StartColorStr='#FF005500', EndColorStr='#FF00ff00')">Your Site
Name</div>

<P><center><font color="black" size=2>Is this what your really
want?</font></center>

<form>
<span style="position:relative;left:0;top:0;width:75;hei ght:22;border:1
groove #000000">
<input type=button value="Yes"
style="width:74;height:20;font-size:10;border:1px outset #ffffff;"
onclick="yours();showHide('box2')" >
</span>
<span
style="position:relative;left:10;top:0;width:75;he ight:22;border:1
groove #000000">
<input type=button value="No"
style="width:74;height:20;font-size:10;border:1px outset #ffffff;"
onclick="showHide('box2')">
</span>
</form>
</DIV>

Dec 20 '06 #5

Roy A. skrev:
<div
style="height:18;font-size:12;text-align:left;filter:progid:DXImageTransform.Microsof t.Gradient(GradientType=1,
StartColorStr='#FF005500', EndColorStr='#FF00ff00')">Your Site
Name</div>
You may want to style the contents of det div and span elements so that
they look good in any browser beside of IE. Mayby get rid of that silly
Gradient filter and replace it with background-color: #3333ff, or
something like that; get rid of the font-tag and IE-styles like outset.
Sorry. I hope you can deal with that.

Dec 20 '06 #6

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

Similar topics

10
by: aagee | last post by:
Hi all Can someone clue me in on this? I just noticed that following doesn't work as it used to: window.open(... "fullscreen=yes" ...) Used to get a window that occupied the whole screen;...
5
by: Clint Stowers | last post by:
Access 2k Exporting a Query to as an excel file. No problem. However, I keep getting the warning that the file already exists, Overwrite Yes/No. Yes, I want to overwrite the file. ...
1
by: Grey | last post by:
i use "this.Page.RegisterStartupScript()" to display the client-side script of confirmation box ...but I want to know that how can I know the user was clicked "YES" or "NO" as I need to do different...
1
by: D.M. | last post by:
Hi, One of the people here at work has designed a database that students will be using to enter data. She has Yes/No selection buttons, which start out grayed out with no value. If a student...
7
by: tah | last post by:
Hey, Can someone please clarify, confirm, or set me straight on my understanding of a standalone="yes" attribute in the xml version element? I assume it means that the xml document containing it...
3
by: blakerrr | last post by:
Hello everyone, I am new with access and I am trying to insert my first hyperlink into my form. Here is the situation: I have a checkbox on the form. When it is clicked, a have a messagebox...
6
by: RSbroman | last post by:
I have created an append query that I would like to run when the DB is opened. However I do not want the end user to receive the "yes" "no" confirmation box when the query is being run. Can...
1
by: =?Utf-8?B?U3RldmUgQmVobWFu?= | last post by:
I am using Visual C++ 8.0 Express Edition. On certain events I would like to pop up the standard "Yes/No" dialog -- is this possible and, if so, how is this done?
4
by: senthilkumarb | last post by:
Hi every body, i need a snippet in JavaScript to perform close window(browser) when we close window it should give alert with "YES" & "NO" button if yes the window should stay still otherwise...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.