Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

java script confirm box

Posted on 2004-09-16
10
Medium Priority
?
403 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 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

972 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