![]() |
CodeIgniter+javascript+IE - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: CodeIgniter+javascript+IE (/showthread.php?tid=1716) |
CodeIgniter+javascript+IE - El Forum - 06-21-2007 [eluser]Unknown[/eluser] Hello! I have a application with a menubar anda a secundary left menu that is called by a simple innerHTML javascript. the code is the extract of view file: <div id="menu"> <ul id="menubarra"> <li><a onclick="montamenu('ensino')">ensino</a></li> <li><a onclick="montamenu('pesquisa')">pesquisa</a></li> <li><a onclick="montamenu('extensao')">extensão</a></li> </ul> </div> </div> <div id="menuesquerda"> // the div to put the secundary menu. </div> the javascript code: function montamenu(menu) { if (menu=='ensino') { var leftmenu = "<ul><li><a href="+base_url+"ensino/habilitacoes>habilitações</a></li>"+ "<li><a href="+base_url+"ensino/disciplinas>disciplinas</a></li>"+ "<li><a href="+base_url+"ensino/docentes>docentes</a></li>"+ "<li><a href="+base_url+"ensino/vestibular>Informações ao vestibulando</a></li></ul>" } else if (menu=='pesquisa') { var leftmenu = "<ul><li><a href="+base_url+"pesquisa/projetos>Projetos em Andamento</a></li>"+ "<li><a href="+base_url+"pesquisa/publicacoes'>Publicações</a></li>"+ "<li><a href="+base_url+"pesquisa/tcc>TCC´S dos Alunos</a></li></ul>" } else { var leftmenu = "<ul><li><a href="+base_url+"extensao/projetos>Projetos em Andamento</a></li>" } document.getElementById("menuesquerda").innerHTML=leftmenu } the question is: In the firefox browser everething is ok but they don´t work in IE. Someone could help? Thanks! CodeIgniter+javascript+IE - El Forum - 06-22-2007 [eluser]Bulk[/eluser] Any javascript errors in IE? CodeIgniter+javascript+IE - El Forum - 06-22-2007 [eluser]giaodn[/eluser] This is JavaScript problem, there no relation to CI + JS. I try to debug and the code below is the code that run correctly in both IE and FI, hope it useful for you: Crying, try to post the html code for you but i can't because of the post function cannot handle HTML code correctly ![]() CodeIgniter+javascript+IE - El Forum - 06-22-2007 [eluser]Unknown[/eluser] [quote author="giaodn" date="1182526962"]This is JavaScript problem, there no relation to CI + JS. I try to debug and the code below is the code that run correctly in both IE and FI, hope it useful for you: Crying, try to post the html code for you but i can't because of the post function cannot handle HTML code correctly ![]() It´s possible send me the HTML code by mail in rsr.bgt at ig.com.br ? Or, where I can find some documentation of IE Javascript padronization? Thanks CodeIgniter+javascript+IE - El Forum - 06-28-2007 [eluser]Unknown[/eluser] Dear Rael, I think it does work, but it was postback because you don't put return false on event onclick in anchor There are 2 alternatif for calling javascript function in anchor: 1. <a onclick="montamenu(’ensino’);return false;">ensino</a> 2. <a herf="[removed]montamenu(’ensino’)">ensino</a> Hope this will help you. |