Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

java script confirm box

Posted on 2004-09-16
10
Medium Priority
?
397 Views
Last Modified: 2008-02-01
Hi,
In java script in the confirm box the buttons are OK and Cancel.Is there any option to change that to Yes/No
regards
Nebu
0
Comment
Question by:nebujacob2000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 33

Accepted Solution

by:
sajuks earned 200 total points
ID: 12081883
javascript doesnt have the facility to change the option.
What you can do is have something like this
<HEAD>



<SCRIPT LANGUAGE="JavaScript">
function getInfo() {
doyou = confirm("Do you want to continue? (OK = Yes   Cancel = No)");

if (doyou == true)
{

return true
}
else
{

return false
}
}
</script>
<BODY>

<form method="POST"  onSubmit ="return getInfo()">
<input type="text">
  <input type="submit" value="Submit" name="B1">
  <input type="reset" value="Reset" name="B2"></p>
</form>



</BODY>

0
 
LVL 33

Expert Comment

by:sajuks
ID: 12081900
if its IE only, you can use vbscript
rsp = MsgBox("Are you sure?",vbyesno,"Question")
0
 
LVL 1

Expert Comment

by:sumanraj
ID: 12082029
0
Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

 
LVL 6

Expert Comment

by:Fahdmurtaza
ID: 12083650
Yes I think sajuks is right as javascript is object based language not whatsoever called purely object oriented like c++. But you can design something like that using css and javascript combined. I mean dhtml. Its like a popup like when it displys while emptying the junk mail folder.
Regards
Fahd Murtaza
0
 
LVL 15

Expert Comment

by:deepaknet
ID: 12099516
Hi:

JavaScript does not have this feature. VBScript, however, may allow you to declare the button captions of your choice, from the predefined enumeration set.
0
 
LVL 6

Expert Comment

by:Fahdmurtaza
ID: 12515626
Impracticle problem I think so !
Well I think author should reply what he wants now.
Regards,
Fahd Murtaza
0
 
LVL 33

Expert Comment

by:sajuks
ID: 12520496
I've listed the available options. So i feel the question has been answered properly by me and i should be reciving the points
0

Featured Post

Give Your Engineering Team a Productivity Boost

Learn why container technology is so powerful and how it can provide your team with productivity gains and other benefits.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This video teaches users how to migrate an existing Wordpress website to a new domain.
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question