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

I

Indu

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
 
T

Thomas 'PointedEars' Lahn

Indu said:
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
 
M

Matt Kruse

Thomas said:
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.
 
T

Thomas 'PointedEars' Lahn

Indu said:
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>
 
M

Matt Kruse

Thomas said:
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.
 
R

Randy Webb

Thomas 'PointedEars' Lahn said the following on 11/19/2005 9:37 PM:
Matt Kruse wrote:




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.
Yes, if one will use his brain.

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

Randy Webb

Matt Kruse said the following on 11/19/2005 10:06 PM:
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.
 
I

Indu

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top