Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alert with Yes No

Status
Not open for further replies.

guitardave78

Programmer
Joined
Sep 5, 2001
Messages
1,294
Location
GB
Is it possible to have an alert with a yes/no

I dont want a confirm ok/cancel

:)
 

You could write your own HTML page to look like a dialog, and then use the showModalDialog function to display it... Unfortunately, this would only work in IE, I believe.

Dan
 
Doesn't the vb message box allow yes / no - of course this would only work on ie as well.
 
Create a new function using vbscript to do this.

for example

Code:
<script language=&quot;vbscript&quot;>
function myYesNo(textPrompt,boxTitle)
  dim result
  result = msgbox(textPrompt,vbYesNo,boxTitle)
  if result = vbYes then
    myYesNo = true
  else
    myYesNo = false
  end if
end function
</script>

You can then call it just like you would with any other javascript function.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top