Open the appropriate selector page - New UI

Posted by IramK on 14-Oct-2015 06:24

Hello,

This question has already been asked before with an accepted answer, however the onclick events have changed in the New UI. Any ideas how I could achieve the same in the New UI? Kindly let me know.

Cheers.

Posted by IramK on 16-Oct-2015 06:16

I have been able to achieve this myself using the code below:

<script>
  function onClick(e){
  console.log("event :: click (" + $(e.event.target).closest(".k-button").attr("title") + ")");

  var ifrSrc = $("#dialogId > iframe").attr('src');
  console.log(ifrSrc);

  var srcArr = ifrSrc.split("pageId=");
  var srcArrRest = srcArr[1].split('&')[1];

  var newSrc = srcArr[0] + 'pageId=12345&' + srcArrRest;
  console.log(newSrc);

  $("#dialogId > iframe").attr('src' , newSrc);
}

$(document).ready(function(){

  var myButton= $($('section[name="sectionName"]').find('a')[0]); // apply the correct position of the button
  
  myButton.kendoButton({
    click: onClick
  });
});
</script>

All Replies

Posted by IramK on 16-Oct-2015 06:05

Any ideas on how I can achieve this?

Posted by IramK on 16-Oct-2015 06:16

I have been able to achieve this myself using the code below:

<script>
  function onClick(e){
  console.log("event :: click (" + $(e.event.target).closest(".k-button").attr("title") + ")");

  var ifrSrc = $("#dialogId > iframe").attr('src');
  console.log(ifrSrc);

  var srcArr = ifrSrc.split("pageId=");
  var srcArrRest = srcArr[1].split('&')[1];

  var newSrc = srcArr[0] + 'pageId=12345&' + srcArrRest;
  console.log(newSrc);

  $("#dialogId > iframe").attr('src' , newSrc);
}

$(document).ready(function(){

  var myButton= $($('section[name="sectionName"]').find('a')[0]); // apply the correct position of the button
  
  myButton.kendoButton({
    click: onClick
  });
});
</script>
This thread is closed