Link to home
Start Free TrialLog in
Avatar of ojohnson
ojohnson

asked on

Trying to mix JavaScript and coldfusion unsuccesfully

i am trying to create a simple form where people choose their templates. this is within a larger page as a cfdiv element. on click, i want to navigate over to the template.

I need to get the "[document.getElementById('TemplateType').value]" or something like that too actually work.

thank you in advance.
this works if i hardcode a file template name (areatemplate1, areatemplate2, etc)


<cfform name="TemplateChange">
 
    <cfoutput>
 
       
        <cfinput name="AID" value="#AID#" type="hidden">
         
            <select name="TemplateType">
                  <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
            </select>
               
       
       
            <br />
            <cfinput type="submit" id="saveID" value="save" name="save" onClick="ColdFusion.navigate('/cms/arealist/areatemplates/areatemplates/areatemplate[document.getElementById('TemplateType').value]', 'templateDiv');"  >
            <cfinput type="submit" id="close" value="close" name="close">
     </cfoutput>
</cfform>
ASKER CERTIFIED SOLUTION
Avatar of azadisaryev
azadisaryev
Flag of Hong Kong image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ojohnson
ojohnson

ASKER

Ok thank you. I do need to the form to submit as well. Thank you for your quick response