Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro substitution in javascript
Message
 
À
15/03/2002 14:12:19
Information générale
Forum:
Internet
Catégorie:
Javascript
Divers
Thread ID:
00633553
Message ID:
00633727
Vues:
17
>If I got the clue right, then I think you should produce the form elements through a loop. Basically:
>
>< script language="Javascript" >
>for (var iloop = 1; iloop < 6; iloop++){
>  document.write([ form elements, iloop value can be used to create dx variables ]);
>  ...
>}
>< /script >
>
I couldn't get the code to render the value of the variable. Document.write() would only write the var, not evaluate it. If a user selects Memphis Police Department in the dropdown, I want the MPD's address to populate the street number, street name and city fields for the associated row. I have each row's field names built dynamically. I guess I could prebuild the form with an array and handle it that way, but I was hoping there was some way to make the code a little tighter.

Thanks,

John
John Harvey
Shelbynet.com

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

Click here to load this message in the networking platform