Expand|Select|Wrap|Line Numbers
- var head = document.getElementsByTagName("head")[0];
- var script = document.createElement("script");
- script.type="text/javascript";
- script.appendChild(document.createTextNode(str[x]));
- head.appendChild(script);
Any ideas why i can access the object after an alert but not without it? I'm very confused..
Thanks!
Works:
Expand|Select|Wrap|Line Numbers
- function Person(lists){
- this.list=lists.split(",");
- get_list(lists);
- alert('ok');//<----- works with this here
- listobj[this.list[0]].renderList('target1');
- listobj[this.list[1]].renderList('target2');
- }
Expand|Select|Wrap|Line Numbers
- function Person(lists){
- this.list=lists.split(",");
- get_list(lists);
- listobj[this.list[0]].renderList('target1');
- listobj[this.list[1]].renderList('target2');
- }