Thanks for the tips :) Learning is always good ;)
I will try "text/javascript" and let you know the results ...

On Jul 9, 6:20 pm, Ricardo <ricardob...@gmail.com> wrote:
> I was wondering how noone had noticed it. I know that application/
> javascript, which should be the current standard, does not work in IE.
> application/x-javascript probably doesn't as well.
>
> On a side note, you're wasting function calls, as you're already using
> native element creation set the .id attribute directly:
>
> $(document).ready(function(){
>      var nome = post = "";
>      var html = document.createElement("div");
>      html.id = "submenu";
>         .....
>
> });
>
> or do it all with jQuery: $('<div id="submenu" />'); then you have the
> benefit of short code instead :)
>
> On Jul 9, 5:50 pm, Peter Edwards <p...@bjorsq.net> wrote:
>
> > Why is the type attribute of the script tag set to
>
> > "application/x-javascript"
>
> > rather than
>
> > "text/javascript"
>
> > ?
>
> > on 09/07/2009 21:40 Paulodemoc said::
>
> > > the address to js is correct, it opens just fine.
> > > I created a new document:
>
> > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
> > >www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> > > <html xmlns="http://www.w3.org/1999/xhtml";>
> > > <head>
> > > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
> > > <title>Astral</title>
> > > <link href="<?php echo base_url();?>css/style.css" rel="stylesheet"
> > > type="text/css" />
> > > <script language="javascript" src="<?php echo base_url();?>js/
> > > jquery.js" type="application/x-javascript" ></script>
> > > <script>
> > > alert($);
> > > </script>
> > > </head>
>
> > > <body>
> > > </body>
> > > </html>
>
> > > and it also showed the error message saying that $ is not defined.
> > > but on firefox, it showed:
>
> > > function (selector, context) {
> > >     return new (jQuery.fn.init)(selector, context);
> > > }
>
> > > u_U (man, i hate IE)
>
> > > On Jul 9, 5:30 pm, Matt Kruse <m...@thekrusefamily.com> wrote:
>
> > >> So now enter this in IE's address bar:
>
> > >>http://servidor/astral/web/js/jquery.js
>
> > >> Does it load?
>
> > >> If yes, then create this document:
>
> > >> <html><head>
> > >> <script language="javascript" src="http://servidor/astral/web/js/
> > >> jquery.js" type="application/x-javascript" ></script>
> > >> <script>
> > >> alert($);
> > >> </script>
> > >> </head></html>
>
> > >> What does it alert?
>
> > >> Make sure IE's settings are such that errors will be shown.
>
> > >> Matt Kruse
>
> > >> On Jul 9, 3:27 pm, Paulodemoc <paulode...@gmail.com> wrote:
>
> > >>> The generated code is
> > >>> <script language="javascript" src="http://servidor/astral/web/js/
> > >>> jquery.js" type="application/x-javascript" ></script>
> > >>> I tryied to add the
> > >>> alert('jQuery not loaded');
> > >>> but no alert was shown....
> > >>> But still, the error persists...
> > >>> I will paste here the full code, so you guys can see:
>
> > >>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/
> > >>> TR/xhtml11/DTD/xhtml11.dtd">
> > >>> <html xmlns="http://www.w3.org/1999/xhtml";>
> > >>> <head>
> > >>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> > >>> <title>Astral</title>
> > >>> <link rel="stylesheet" href="<?php echo base_url(); ?>css/
> > >>> thickbox.css" type="text/css" />
> > >>> <link href="<?php echo base_url();?>css/style.css" rel="stylesheet"
> > >>> type="text/css" />
> > >>> <script language="javascript" src="<?php echo base_url();?>js/
> > >>> jquery.js" type="application/x-javascript" ></script>
> > >>> <script language="javascript" src="<?php echo base_url();?>js/
> > >>> thickbox.js" type="application/x-javascript" ></script>
> > >>> <script>
> > >>>  function showSubProdutos() {
> > >>>         $("#submenu").fadeIn("slow");
> > >>>  };
> > >>>  function hideSubProdutos() {
> > >>>         $("#submenu").fadeOut("fast");
> > >>>  };
> > >>>  function showProjetos() {
> > >>>         $("#submenu2").fadeIn("slow");
> > >>>  };
> > >>>  function hideProjetos() {
> > >>>         $("#submenu2").fadeOut("fast");
> > >>>  };
> > >>>  function hideAll() {
> > >>>          $("#submenu").fadeOut("fast");
> > >>>          $("#submenu2").fadeOut("fast");
> > >>>  };
> > >>>  function changeSubject() {
> > >>>         if($("#assunto").find('option').filter(':selected').text() ==
> > >>> "Receita") {
> > >>>                 //$("#msg-cont").toggle(2000, function(){ 
> > >>> $("#recipe-cont").toggle
> > >>> (2000); });
> > >>>                 $("#msg-cont").slideUp("slow", function(){
> > >>>                         $(this).hide();
> > >>>                         $("#recipe-cont").slideDown(2000);
> > >>>                 });
> > >>>         }
> > >>>         else {
> > >>>                 $("#recipe-cont").slideUp("slow", function(){
> > >>>                         $("#msg-cont").slideDown("slow");
> > >>>                 });
> > >>>         }
> > >>>  };
>
> > >>> $(document).ready(function(){
> > >>>                                                          var nome = "";
> > >>>                                                          var pos = "";
> > >>>                                                          var html = 
> > >>> document.createElement("div");
> > >>>                                                          
> > >>> $(html).attr("id", "submenu");
> > >>>                                                          
> > >>> $(html).css("z-index", 30);
> > >>>                                                          
> > >>> $(html).css("position", "relative");
> > >>>                                                          
> > >>> $(html).css("background-color", "#FFFFD7");
> > >>>                                                          
> > >>> $(html).css("float", "left");
> > >>>                                                          
> > >>> $(html).css("width", "140px");
> > >>>                                                          
> > >>> $(html).css("top", "125px");
> > >>>                                                          
> > >>> $(html).css("left", "320px");
> > >>>                                                          $(html).hide();
> > >>>                                                          
> > >>> $(window.document.body).prepend(html);
> > >>>                                                          
> > >>> $(html).append("<center><a href='<?php echo base_url
> > >>> ().'index.php/home/produtos';?>' style='font-family:Tahoma, Arial,
> > >>> Helvetica, sans-serif;color:#972021;font-size:11px;line-height:
> > >>> 25px;font-weight:bold;'>Linha Dom&eacute;stica</a><br /><a href='<?php
> > >>> echo base_url().'index.php/home/produtos_institucionais';?>'
> > >>> style='font-family:Tahoma, Arial, Helvetica, sans-
> > >>> serif;color:#972021;font-size:11px;line-height:25px;font-
> > >>> weight:bold;'>Linha Institucional</a></center>");
> > >>>                                                     html = 
> > >>> document.createElement("div");
> > >>>                                                         
> > >>> $(html).attr("id", "submenu2");
> > >>>                                                          
> > >>> $(html).css("z-index", 30);
> > >>>                                                          
> > >>> $(html).css("position", "relative");
> > >>>                                                          
> > >>> $(html).css("background-color", "#FFFFD7");
> > >>>                                                          
> > >>> $(html).css("float", "left");
> > >>>                                                          
> > >>> $(html).css("width", "130px");
> > >>>                                                          
> > >>> $(html).css("top", "125px");
> > >>>                                                          
> > >>> $(html).css("left", "480px");
> > >>>                                                          $(html).hide();
> > >>>                                                          
> > >>> $(window.document.body).prepend(html);
> > >>>                                                          
> > >>> $(html).append("<center><a href='<?php echo base_url
> > >>> ().'index.php/home/astralnaescola/';?>' style='font-family:Tahoma,
> > >>> Arial, Helvetica, sans-serif;color:#972021;font-size:11px;line-height:
> > >>> 25px;font-weight:bold;'>Astral na Escola</a></center>");
> > >>>                                                          <?php 
> > >>> if(isset($projetos)) : ?>
> > >>>                                                          <?php 
> > >>> foreach($projetos as $projeto) : ?>
> > >>>                                                          
> > >>> $(html).append("<center><a href='<?php echo base_url
> > >>> ().'index.php/home/projeto/'.$projeto->idProjeto;?>' style='font-
> > >>> family:Tahoma, Arial, Helvetica, sans-serif;color:#972021;font-size:
> > >>> 11px;line-height:25px;font-weight:bold;'><?php echo 
> > >>> $projeto->titulo;?></a></center>");
>
> > >>>                                                          <?php 
> > >>> endforeach; ?>
> > >>>                                                          <?php endif; ?>
> > >>>                                                         
> > >>> $("#linha-produtos").hover(showSubProdutos);
> > >>>                                                         
> > >>> $("#projetos").hover(showProjetos);
> > >>>  
>
> ...
>
> read more »

Reply via email to