Solved

java script confirm box

Posted on 2004-09-16
10
382 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
10 Comments
 
LVL 33

Accepted Solution

by:
sajuks earned 50 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

809 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