Loading...
 
Skip to main content

History: Dynamic tracker example template

Source of version: 9 (current)

Copy to clipboard
            Content type: {$f_121}
{DIV(type="div",id="fileprompt")}
File: {$f_122}
{DIV}
{DIV(type="div",id="urlprompt")}
URL: {$f_123}
{DIV}
Did you ensure this does not breach policy? {$f_124} 

{JQ()}
$("#fileprompt").hide();
$("#urlprompt").hide();
$("input[name='ins_121']").change(function(){
   if ($(this).filter(":checked").val() === 'File') {
      $("#urlprompt").hide();
      $("#fileprompt").fadeIn();
   } else {
      $("#fileprompt").hide();
      $("#urlprompt").fadeIn();
   } 
});
$("select[name='ins_124']").change(function(){
   if ($(this).find("option:checked").attr("value") === 'No') {
     alert("Then go do your homework.");
   } 
});
/* $(".input_submit_container").parent().submit(function(){
   if ($("input:radio[name='ins_121']:checked").val() === 'File') {
     if ($("[name='ins_122']").val() === '') {
       alert("File is required.");
       return false;
     }
   } else {
     if ($("[name='ins_123']").val() === '') {
       alert("URL is required.");
       return false;
     }
  }
});*/
{JQ}