April 28th, 2003, 01:54 AM
I tried to generate that code with php but I get an error like so:
document.product_form.pdt_image_path.value="products/" + $selected_dir + "/";
Here is the code I generated in php:
$selected_dir is the dynamically generated variable which holds a folder name. document.product_form.pdt_image_path is a form field which exists on the page. Any idea whats wrong in my code ?
echo 'document.product_form.pdt_image_path.value="products/" + $selected_dir + "/";';
April 28th, 2003, 02:22 AM
Vb messes up the escapes - here it is without tags
echo( 'document.product_form.pdt_image_path.value="products/\'+' . $selected_dir . '+\'/";' . "\n" );
echo( '</script>' . "\n" );
Also - 'document.product_form.pdt_image_path' is null or not an object is a jscript error and not php error...
Last edited by jpenn; April 28th, 2003 at 02:25 AM.
~ Joe Penn