Networking | Hardware | Software | Multimedia | System | Unix&Linux | MBA

Home>>Hardware>>Create text boxes on the fly

Create text boxes on the fly

on_looker
10-12-2005, 07:39 AM
Hi all

Im doing a website in php and require some javascript. I found my way here looking for examples and am hoping someone can offer suggestions.

I have a page displaying products from a php query. Each product has a description with the option to order.

I have a quantity text field and a size text field, i need the java script to read what value is entered in the quantity field straight away. If someone puts in 2 then i need to display two size boxes (or more) rather then the default one depending on the value entered in the quantity field.

Is this possible??

Thanks

nikkiH
10-12-2005, 02:34 PM
Sure it is.
Look at the onChange event, and the createElement and appendChild methods.

on_looker
10-12-2005, 03:00 PM
Thanks for the advice, if anyone else wants some suggestions, Mike put a great example here:

http://www.webdeveloper.com/forum/showthread.php?p=447072#post447072

Give credit where credit is due :) Please keep this reference.


 

TOP

For more info

setting a minimum size
Auto Preview of Image 
Refresh with a query s
JS Validation obsolete
Javascript Pop up func
Slide show transitions
I'm a newbie...please!
how to write coding in
Advanced Debug Info 
.js file doesn't work 

News Archive

Adding Graphic To Text
re-direct form after s
pop up window controls
Clock on homepage - He
passing a param from a
Password Procection wi
document.title in same
focus onload 
Counting Wrong from Ri
Help needed on how to 

Related stories:

onclick
Moz, onkeyup and readOnly problem
Input text filed

Copyright@2004-2005 www.zzcoke.com All Right Reserved

advanced web statistics