| 
	
 | 
 Posted by Good Man on 06/17/84 11:41 
"J.O. Aho" <user@example.net> wrote in 
news:46r7pkFchn19U1@individual.net:  
 
 
> I don't really see the point in using javascript at all in this case, 
> you get a more difficulty to figure out bugs. 
>  
> if you use 
>  
> <input type="text" id="firstName" value="<?= $first_name ?>" /> 
> <input type="text" id="secondtName" value="<?= $second_name ?>" /> 
> <input type="text" id="lastName" value="<?= $last_name ?>" /> 
>  
> You either have a value set of the variables $first_name, 
> $second_name, $last_name and so on (I know, I added the two last 
> ones).  
>  
> If a value isn't set, then the box will be empty and it's just to add 
> the values manually. 
 
The only point would be saving me programming time.  On a page with 50+  
form-fields, I can save lot of time by writing a PHP loop that writes an  
HTML call to a javscript function instead of going to each form field and  
entering the value="<?= $first_name ?>" stuff...
 
  
Navigation:
[Reply to this message] 
 |