Thanks Brian,
I made the changes as per your instructions but couldnot see any change. I installed ajax helper as well.
Javascript doesnot seem to work in the mentioned tcl and adp files.
somewhere I have gone wrong.
Below are my files,
new.adp:
<master>
@type_js;noquote@
<formtemplate id="@form_id@"></formtemplate>
new.tcl:
set type_options [list {type1 1} {type2 2} {type3 3}]
set html_list [list onClick type_func() ]
set container_name "field2"
set after_html "<div id=\"$container_name\" ></div>"
set form_id "showhide"
ad_form \
-name $form_id \
-form {
{type:text(select)
{label "Type"}
{options $type_options}
{html $html_list}
{after_html $after_html}
}
}
set ajax_js [ah::ajaxupdate \
-container "$container_name" \
-url "new2" \
-pars "'type='+\$F('type')"]
set type_js "<script language=\"javascript\"> type_func = function() { $ajax_js } </script>"
created new2.tcl file its not being called on request.
correct me