Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro substitution in javascript
Message
 
À
16/03/2002 11:46:01
Information générale
Forum:
Internet
Catégorie:
Javascript
Divers
Thread ID:
00633553
Message ID:
00633890
Vues:
17
I got it to work using the eval() function in javascript thanks to Randy Pearson on the wwthread. It looks like it may work in NS as well as IE.
<SCRIPT LANGUAGE="JavaScript">

var lctext = ' ';
function ckvar(lctext,i){
var lostrno=eval("userform.strno"+i)
var lostreet=eval("userform.street"+i)
var locity=eval("userform.city"+i)

switch (lctext){
   case "Memphis Police Department" : 
     lostrno.value='201'
     lostreet.value='Poplar';
     locity.value='Memphis';
     break;
   case "Shelby County Sheriff's Office" : 
     lostrno.value='201'
     lostreet.value='Poplar';
     locity.value='Memphis';
      break;
 etc, etc, etc.
John Harvey
Shelbynet.com

"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform