Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro substitution in javascript
Message
 
To
16/03/2002 11:46:01
General information
Forum:
Internet
Category:
Javascript
Miscellaneous
Thread ID:
00633553
Message ID:
00633890
Views:
16
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
Previous
Reply
Map
View

Click here to load this message in the networking platform