473,406 Members | 2,336 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,406 software developers and data experts.

confirm window with (Y) & (N) ????

anyone know how to pop up a confirm window with (Y) & (N)??
I want to pop up a "Do you want to continue?" message box (javascript
only, can't use vbscript) with (Y) & (N). when click (N), then close
the current window. If click (Y), then back to server side to
continue. Is it possible?? Thanks a lot.
Jul 23 '05 #1
2 3267
try this
http://www.codeave.com/javascript/code.asp?u_log=7035

"Terry" <dr*********@aol.com> wrote in message
news:3a**************************@posting.google.c om...
anyone know how to pop up a confirm window with (Y) & (N)??
I want to pop up a "Do you want to continue?" message box (javascript
only, can't use vbscript) with (Y) & (N). when click (N), then close
the current window. If click (Y), then back to server side to
continue. Is it possible?? Thanks a lot.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.744 / Virus Database: 496 - Release Date: 8/24/2004
Jul 23 '05 #2
Hal Rosser wrote:
"Terry" <dr*********@aol.com> wrote in message
news:3a**************************@posting.google.c om...
anyone know how to pop up a confirm window with (Y) & (N)??
I want to pop up a "Do you want to continue?" message box (javascript
only, can't use vbscript) with (Y) & (N). when click (N), then close
the current window. If click (Y), then back to server side to
continue. Is it possible?? Thanks a lot.

No, you can not change the confirm dialog window.
try this
http://www.codeave.com/javascript/code.asp?u_log=7035
Here is the code from that page:

<script language="JavaScript">
language is deprecated, use the type attribute instead.
<!--
SGML Delimiters are not needed.
function confirm_entry()
{
input_box=confirm("Click OK or Cancel to Continue");
if (input_box==true)
confirm returns only two values, true and false. You can simply test
input_box:

if(input_box)
{
// Output when OK is clicked
alert ("You clicked OK");
}

else
{
// Output when Cancel is clicked
alert ("You clicked cancel");
}

}
Every bit of that code could be written as:

function confirm_entry(){
if (confirm("Click OK or Cancel to Continue"){
alert("You clicked OK")
}else{
alert("You didn't click OK")
}
}
-->
Thats technically a syntax error that browsers correct. If you are
intent on using SGML Delimites, the closing one must be //--> for it to
be correct.
</script>
Click <a href="javascript:confirm_entry()">here</a>


And if javascript is disabled? Your link doesn't work. See:
http://jibbering.com/faq/#FAQ4_24

All in all, the code you linked to is pretty shabby.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #3

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

Similar topics

5
by: Phil Powell | last post by:
<script> <!-- function willProceedToPay() { var willPay = window.confirm('Vill du g' . String.fromCharCode(229) . ' till betaling?'); if (willPay) return true; return false; }
2
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...
3
by: Doug O'Leary | last post by:
Hey, all; Apparently, I'm missing the concept. I'm writing a web app in perl to manage nagios configuration files. One of the things I'd like to do is to confirm an update via a popup window...
2
by: phil2phil | last post by:
hi, is there anyway to make certain text in the confirm window, the one what comes up when i call confirm(text) in javascript? I'm displaying a message in the confirm window to the user and...
7
by: aroraamit81 | last post by:
Can I have a confirm alert with *Yes* *No* button istead of *Ok* *Cancel* buttons. Any help................ Regards, Amit Arora
1
by: Doo0592 | last post by:
Hi all, Judging by the topics in here this should be a snap for all of you! Can any one explain why when i use the window.confirm in an if else statement it behaves like this: if (var ==...
4
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I change the confirm box to say yes/no or default to cancel?...
3
by: tshad | last post by:
Is there a way to do a Javascript confirm box when an aspx page initially loads (not postback)? I can make the confirm box come up by doing the following:...
2
by: wreed06 | last post by:
Hello, I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully...
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: 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
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
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...
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...
0
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...
0
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...
0
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,...
0
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...

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.