473,378 Members | 1,119 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,378 software developers and data experts.

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 13991
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.javascript 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.javascript 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
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...
4
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,...
4
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 =...
6
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...
15
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: ...
89
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
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...
7
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...
4
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...
20
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.