spacer

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

home / experts / dhtml / column22
Developer News
Google Chrome Playing Catch-Up on Extensions
Open Solutions Alliance Gets New Leadership
Red Hat Spacewalk Expands Linux Management
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.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

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

webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP · Working with the DOM Stylesheets Collection
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
MS Access and MySQL · Cisco AutoQoS: VoIP QoS for Mere Mortals · While VoIP Adoption Explodes in Enterprise, Carrier Spending Lags

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

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