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

x
?
Solved

Confrim box title

Posted on 2006-11-07
3
Medium Priority
?
2,278 Views
Last Modified: 2008-03-03

Hi Experts,

I am trying to work on the confirm box with "yes" or "no" options and here is my code


<script language="VBScript">
            <!--
            Function makeMsgBox(title,message,icon,buttons,defButton,mode)
               butVal = icon + buttons + defButton + mode
               makeMsgBox = MsgBox(message,butVal,title)
            End Function
            // -->
</script>


<script language="JavaScriptt">
---
----

if state == 'CA'
{                  {
var retVal = makeMsgBox("Confirmation","Delete the Contract?",48,4,256,4096);
      
                        if(retVal == 6){                      
                                  submitMe = true;
                          }
                        else                  
                        {
                              submitMe = false;
                              history.back(-1);
                        
                        }
                  }


I am getting the confirm box with "yes" or "no" option, but the title of the confirm box says
"VBScript:Confirmation". Is it possible to Just have a title "Confirmation" and not say VBscript in the tile ?

Thanks for your help
0
Comment
Question by:Tpaul_10
[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
3 Comments
 
LVL 10

Assisted Solution

by:Dennis Maeder
Dennis Maeder earned 800 total points
ID: 17894231
Tpaul10,

The smart way to get rid of that pesky 'VBScript' in the title is not to use VBScript but javascript.
There is a good workup of the JS alternative at
http://slingfive.com/pages/code/jsMsgbox/
I hope that works for you.

D
0
 
LVL 15

Assisted Solution

by:danrosenthal
danrosenthal earned 400 total points
ID: 17894317
You cannot change remove the VBSCRIPT: from the title. Also VBScript does not work in Firefox. You best bet would be to create a custom Javascript function that builds a window or DIV with your Yes and No options.
0
 
LVL 10

Accepted Solution

by:
iamanindian earned 800 total points
ID: 17895141
Doesn't the default Javascript confirm window work for you? In the simplest form:
------------------------------------------------------------------------------------------
<html>
<head>
<script type="text/javascript">
function disp_confirm()
{
var name=confirm("Press a button")
if (name==true)
{
document.write("You pressed the OK button!")
}
else
{
document.write("You pressed the Cancel button!")
}
}
</script>
</head>

<body>
<form>
<input type="button" onclick="disp_confirm()" value="Display a confirm box">
</form>
</body>

</html>
------------------------------------------------------------------------------------------

Regards
WC
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

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