Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro substitution in javascript
Message
 
To
15/03/2002 14:12:19
General information
Forum:
Internet
Category:
Javascript
Miscellaneous
Thread ID:
00633553
Message ID:
00633727
Views:
18
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform