473,811 Members | 2,979 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

pop-up with yes-no button instead of confirm() with ok-cancel button

How can I customise something that a standard confirm() function gives
us. I need to do something like if a user clicks on a link, a popup
should say, "do you want to leave this page" and the buttons that we
need is "yes - no" instead of "ok - cancel". I tried doing it with
window.open() but without any success. I couldn't figure out how to
make a pop-up window return true or false to the main window. Anyone
got any ideas?!!

thank you,

Indu

Nov 23 '05 #1
9 14007
Indu wrote:
How can I customise something that a standard confirm() function gives
us. I need to do something like if a user clicks on a link, a popup
should say, "do you want to leave this page" and the buttons that we
need is "yes - no" instead of "ok - cancel".


You don't need that, trust me.
PointedEars
Nov 23 '05 #2
Is it impossible to do it? Is there no way I can implement it?

-Indu

Nov 23 '05 #3
Thomas 'PointedEars' Lahn wrote:
Indu wrote:
How can I customise something that a standard confirm() function
gives us. I need to do something like if a user clicks on a link, a
popup should say, "do you want to leave this page" and the buttons
that we need is "yes - no" instead of "ok - cancel".

You don't need that, trust me.


Do you think posts like this actually help anyone or add value at _all_?
And you accuse others of wasting usenet bandwidth? Posts like yours are
useless.

To the OP, there are a couple of options:
1) Re-word your statement to something that an ok/cancel response would fit
with
2) Use a modal dialog if your environment is IE-only
3) Use a DHTML popup or window popup, and change how your onclick handlers
in links work, so the link doesn't actually fire until the user clicks yes
or no in the popup.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Nov 23 '05 #4
Matt Kruse wrote:
Thomas 'PointedEars' Lahn wrote:
Indu wrote:
How can I customise something that a standard confirm() function
gives us. I need to do something like if a user clicks on a link, a
popup should say, "do you want to leave this page" and the buttons
that we need is "yes - no" instead of "ok - cancel". You don't need that, trust me.


Do you think posts like this actually help anyone


This is not a support forum.
or add value at _all_?


Yes, if one will use his brain.
PointedEars
Nov 23 '05 #5
Indu wrote:
Is it impossible to do it?
No.
Is there no way I can implement it?


AFAIK, you can implement it in IE/Windows (and of course in any UA you
wrote ;-). But I strongly recommend against it.

There is a saying in my native language (German) that perhaps cannot be
translated accordingly: "Don't stop a rolling stone."[1]

If people decide to leave your Web site, let them. Getting on their nerves
with popping-up questions like "Do you really want to leave?" will only
make them never come back again and recommend that to all their family,
friends and colleagues. I am probably exaggerating but I think you see
the point.

If you want to notify people that the link will take them to another Web
site, mark the link accordingly which can be automated through both
server-side scripting and CSS. People will be far more thankful for that.
HTH

PointedEars
___________
[1] <URL:http://dict.leo.org/cgi-bin/dict/urlexp/20040721101342>
Nov 23 '05 #6
Thomas 'PointedEars' Lahn wrote:
This is not a support forum.


Then why bother to reply at all, other than to badger and annoy people?

Even if you thought that the OP was treating this like a "support forum",
why would you even spend the time typing a response? To prove to them that
they're stupider than you, ala Nick Burns? Yours didn't even explain to the
OP what you thought was wrong with his post. Furthermore, you're not the
newsgroup police (despite what you think). In many ways, this *is* a support
forum, in addition to a discussion forum, etc.

Posts like yours are much worse than the original post, IMO.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Nov 23 '05 #7
Thomas 'PointedEars' Lahn said the following on 11/19/2005 9:37 PM:
Matt Kruse wrote:

Thomas 'PointedEars' Lahn wrote:
Indu wrote:

How can I customise something that a standard confirm() function
gives us. I need to do something like if a user clicks on a link, a
popup should say, "do you want to leave this page" and the buttons
that we need is "yes - no" instead of "ok - cancel".

You don't need that, trust me.
Do you think posts like this actually help anyone

This is not a support forum.


Nobody ever said it was, and, where did Matt say that? He didn't. Before
you use that argument on anybody, be careful of what you say.
or add value at _all_?

Yes, if one will use his brain.


If we could only get *you* to do that at times.....

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 23 '05 #8
Matt Kruse said the following on 11/19/2005 10:06 PM:
Thomas 'PointedEars' Lahn wrote:
This is not a support forum.

Then why bother to reply at all, other than to badger and annoy people?


Because that is Thomas' well established MO. He thinks (incorrectly)
that he knows more and better than anyone else.
Even if you thought that the OP was treating this like a "support forum", why would you even spend the time typing a response? To prove to them that they're stupider than you, ala Nick Burns? Yours didn't even explain to the OP what you thought was wrong with his post. Furthermore, you're not the
newsgroup police (despite what you think). In many ways, this *is* a support forum, in addition to a discussion forum, etc.
Agreed.
Posts like yours are much worse than the original post, IMO.


100 times worse.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 23 '05 #9
Thank you Matt for your help. It saved my day. I apologise if I
posted something in-appropriate, but you guys helped me a lot.

Thank you Matt and Randy for all you support and help.

-Indu

Nov 23 '05 #10

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

Similar topics

1
7489
by: Pedro | last post by:
Hi all, a friend using Windows wanted to send mail, but he got timeout errors after editing php.ini Mail section smtp = smtp.server.com sendmail_from = friend@server.com I realized that was because of the need to "POP before SMTP", so I made him a function. It's working ... for his server (and
4
2421
by: Roy Smith | last post by:
In the recent "transforming a list into a string" thread, we've been discussing the fact that list.pop() is O(1), but list.pop(0) is O(n). I decided to do a little timing experiment. To be sure, I did verify experimentally the expected result, but along the way, I came upon an interesting artifact that I'm at a loss to explain. I used the following to generate some timing numbers for pop() on various sized lists: import time
4
4708
by: Andre | last post by:
Hi guys, newbie question. I am having trouble with a script that is supposed to login me to my account on yahoo pop server. When i do this: import getpass, poplib, re POPHOST = "pop.mail.yahoo.com" POPUSER = "mylogin" POPPASS = "mypass" pop = poplib.POP3(POPHOST)
6
23211
by: Will | last post by:
Hi, Sorry to be a pest... But I can figure this out. I'm pushing to a stack. then I need to check to see if the word is a palindrome. Is the code below correct? if so, how can I check the entire word?
15
4171
by: Stig Brautaset | last post by:
Hi group, I'm playing with a little generic linked list/stack library, and have a little problem with the interface of the pop() function. If I used a struct like this it would be simple: struct node { struct node *next; void *data; };
89
5637
by: Tak-Shing Chan | last post by:
Dear c.l.c regulars, How about codifying a list of acceptable acronyms on c.l.c? <g> <g,d&r> <VBG> AAMOF AFAIAA AFAIAC
25
4208
by: Nicholas Parsons | last post by:
Howdy Folks, I was just playing around in IDLE at the interactive prompt and typed in dir({}) for the fun of it. I was quite surprised to see a pop method defined there. I mean is that a misnomer or what? From the literature, pop is supposed to be an operation defined for a stack data structure. A stack is defined to be an "ordered" list data structure. Dictionaries in Python have no order but are sequences. Now, does anyone know...
7
24944
by: Scott | last post by:
As said before I'm new to programming, and I need in depth explaination to understand everything the way I want to know it, call it a personality quirk ;p. With pop() you remove the last element of a list and return its value: Now I know list is a bad name, but for the sake of arguement lets assume its not a built in sequence> 'example'
4
2570
by: j_depp_99 | last post by:
The program below fails on execution and I think the error is in my pop function but it all looks correct.Also could someone check my code as to why my print function is not working? I havent included the other parts of my program but will if someone needs it. Please help; I have had it. I have checked all C++ websites and cannot figure it out. <code> template<class Type> void Novice<Type>::Print()
20
5751
by: merrittr | last post by:
I need some C advice I want to read in string commands from a user when the user enters a \n I want to push it on the stac. Then at some point , if the user enters the word print pop off and print each word (or using another stack pointer scan the stack printing each string). here is a stub of what i want to do. (how do I implement this currently my code doesn't work due to my lack of strings and pointers) #include <stdio.h>
0
10644
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10394
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
10127
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...
1
7665
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
6882
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
5552
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4336
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
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.