Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
|
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 4th, 2007, 03:42 PM
Registered User
 
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Convert JavaScript OK/CANCEL to VBScript

Greetings,
Can anyone help me convert this from Javascript to VBScript ?


HTML:
<form id="Form1" method="post" runat="server">
<asp:Button ID="btnTest" Runat="server" Text="Click Here" />
<script type="text/javascript" language="javascript">

function bntTestClicked()
{
var result = confirm('Are you sure you want to do this?');
if(result)
{
//user clicked OK button
alert("User Clicked OK");
}
else
{
// user hit cancel button
alert("User Canceled");
}
}
</script>
</form>


Code behind file:
private void Page_Load(object sender, System.EventArgs e)
{
btnTest.Attributes["onclick"] = "return bntTestClicked();";
}

Happy Programming...
:Timmy D from Big D:
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
JavaScript OK/Cancel msgbox in ASP.Net LenexaKS ASP.NET 1.0 and 1.1 Professional 3 February 5th, 2007 03:06 PM
Convert a batch file to run in VBscript - WSH issu malcomm VBScript 0 October 25th, 2006 12:35 AM
JavaScript to VBScript Thomas82 Classic ASP Basics 1 July 29th, 2006 07:03 PM
vbscript and javascript together erin VBScript 1 October 21st, 2003 02:48 PM
Convert JPG to GIF using ASP/VBScript bosboom Classic ASP Components 0 July 10th, 2003 02:45 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.