You are viewing limited content. For full access, please sign in.

Question

Question

Trying to update iframe link depending upon variable of dropdown selection

asked on May 6, 2016 Show version history

Working on what should be the simple employee acknowledgment form. Trying to populate iframe with URL link dependent upon variable assigned to dropdown selection. Just want to change target page of link with variable value. Any help would be great.

0 0

Replies

replied on May 15, 2016 Show version history

You can use similar customize JavaScript as following:

 

$(document).ready(function () {
  
$('.selectcss').on('change',function(){
  var policy=$(".selector option:selected").text();
  switch(policy){
    case "policy 1":
      $(".imagecss iframe").attr("src","http://v-sh-2k8r2-4/forms/img/document/policy1.jpg");
      break;
    case "policy 2":
      $(".imagecss iframe").attr("src","http://v-sh-2k8r2-4/forms/img/document/policy2.jpg");
      break;
    case "policy 3":
      $(".imagecss iframe").attr("src","http://v-sh-2k8r2-4/forms/img/document/policy3.jpg");
      break;
  }
  });
});

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.