spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / dhtml / column22
Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

Logo

JavaScript Enhancement with VBScript
final comments


A Note on Return Values

If you use IEbox() for custom Explorer-only dialogs, with multiple buttons and a return value, it would be a good idea to use the switch statement to process the return value and execute the relevant statements. In the following example, an IEBox is created with a Critical icon and Yes/No/Cancel buttons, which return values of 6, 7, and 2, respectively, when clicked:

myIntegerVariable = IEBox(
     'My IE Box Title',
     'My IE Box Message',
     1,3,1,0)

switch (myIntegerVariable) {
   case 2: // 'Cancel'
      // statements to execute if Cancel pressed
      break;
   case 6: // 'Yes'
      // statements to execute if Yes pressed
      break;
   case 7: // 'No'
      // statements to execute if No pressed
      break;
}

DHTML Lab and VBScript

This column has been a change of pace for DHTML Lab. Hopefully, it was a welcome one. If the feedback warrants it, we might include future articles on VBScript. It's up to you.

Related Dynomat Tool

To assist you in the creation of JS-VB dialogs, our DHTML Dynomat section will shortly include a cross-browser tool to generate all code automatically. Check back soon.

The complete code required for our technique is included in our usual code page.


Produced by Peter Belesis and

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business

All Rights Reserved. Legal Notices.
Created: Nov. 18, 1998
Revised: Nov. 18, 1998

URL: http://www.webreference.com/dhtml/column22/js-vbFinal.html