Dynamic textbox generation and making the Javascript work associated with it

liunx

Guest
Hi there,<br />
<br />
Here is the exact scenario.<br />
<br />
I have a list box on the screen which contains all the product categories from the database.<br />
<br />
The product category has a type associated with it, like ONE TYPE, TWO TYPE, THREE TYPE, FOUR TYPE..<br />
<br />
Based on the product category(type) selected in the list box I should be able to display the price fields associated with the product type. If product type is ONE TYPE I should display one text box for dollar field and one text box for cents field. If product type is TWO TYPE I should be able to display 2 text boxes for dollar fields and 2 text boxes for cents fields and like that for the rest of product types.<br />
<br />
<br />
At the same time there is Javascript associated with those dollar fields and cents fields.<br />
<br />
Is there a way where I can generate the HTML fields dynamically and make the Javascript work as per the HTML fields generation?<br />
<br />
Any help would be greatly appreciated.<br />
<br />
Thanks,<br />
Naveen<!--content-->You can generate your form fields automatically using a server side script like PHP and incorporate your javascript into the html output to perform the required functions.<!--content-->see client side forum if interested in answering this question.<!--content-->
 
Back
Top