0

I have an outlook calendar shown in an Iframe, an i would like to change the view from month to day. To do this i need to press ctrl+shift+alt+1 but how do i make this happen on the iframe?

As you can see, i have tried to du this in my fiddle

document.getElementById('frame').onload = function() {
var e = jQuery.Event("keydown");
e.which = 1; // # 1 code value
e.altKey = true; // Alt key pressed
e.shiftkey = true;
e.ctrlkey = true;
$("frame").trigger(e);
};

Can someone please tell me what to do?

kodeaben
  • 1,829
  • 3
  • 24
  • 33
  • In the fiddle it works perfectly for me. It is switching from month to day. First you click inside your iframe then press: ctrl+shift+alt+1. I am using google chrome – Rick Bronger Oct 12 '16 at 08:45
  • My mistake. I need this to happen automatically as the calendar will run on a monitor where this cannot be done manually. – kodeaben Oct 12 '16 at 08:47
  • [Look at this answer](http://stackoverflow.com/questions/3368578/trigger-a-keypress-keydown-keyup-event-in-js-jquery) This OP also wants to auto fire a keypress. – Rick Bronger Oct 12 '16 at 09:08
  • Thanks for the response. I do however feel that is what I am trying already in my fiddle : https://jsfiddle.net/methgaard/jtzd577f/. Im not sure if the issue is with the keypress of with the focus or lifecycle of the Iframe – kodeaben Oct 12 '16 at 18:18

0 Answers0