Question: I am using a way to insert some javascript code in the page which works with all browsers but not with IE. Here is a sample:
<http://boxfly.free.fr/tmp/innerjs.html>

The line which does not work properly with IE is:

```
ele.text = document.getElementById('DIV_js').innerHTML ;

```

If I change this line to:

```
ele.text = 'alert("Hello")' ;

```

It works. But I need to be able to insert code which is on a lot of lines, not only one line for displaying an alert, that's why I am using a DIV to contain the Javascript code... ;)

Does anyone know how to make this script work with IE:

```
<body>

<div id="DIV_js" style="display:none;">
var i = 'here' ;
function hello() {
  alert('toto says '  + i) ;
}
</div>
<script>

var ele = document.createElement("script") ;
ele.type = 'text/javascript' ;
ele.text = document.getElementById('DIV_js').innerHTML ;

document.body.insertBefore(ele, (document.getElementsByTagName("div"))[0]);

</script>

<span onClick="hello();">Click to display alert</span>

</body>

```

Answer: 
The problem was that the example constructor needs this line at the top

```
parent::__construct 

```

That should fix the issues you were having. So your constructor should look like:

```
public function __construct()
{
    parent::__construct();
    $this->load->library('session');
}

```

There is no need to store CodeIgniter in a private variable. Just use the constructor as outline in the CodeIgniter documentation. 

I have updated the GIT repo to fix this issue.
I had a very similar problem, you have to configure it as an object, in your \_construct as follow : 

```
class Example extends CI_Controller
{
  private $CI;
  public function __construct()
{
 parent::__construct();

$this->CI =& get_instance();
$this->CI->load->library('session');

$oauth = array();
$oauth['oauth_token_secret']='';
$oauth['oauth_token']='';

}

```

see here for a very similar subject: 

[YouTube API Request : How could I get the Right token ( about Jim S.' code )](https://stackoverflow.com/questions/8399738/youtube-api-request-how-could-i-get-the-right-token-about-jim-s-code/8399975#8399975)

and 

[Google Oauth for YouTube : Why do I get "Undefined index: oauth\_token" ( Jim S.' code )](https://stackoverflow.com/questions/8428547/google-oauth-for-youtube-why-do-i-get-undefined-index-oauth-token-jim-s/8429071#8429071)

let me know if that solved your pb