problème avec main.js

problème avec main.js - HTML/CSS - Programmation

Marsh Posté le 21-07-2010 à 20:13:36    

Bonjour,
 
J'ai créé avec dreamwiever un site qui fonctionne bien sous Firefox mais sous IE il m'affiche toujours la même erreur que je ne comprend pas.
Merci de m'aider à résoudre ce problème SVP.
voici l'erreur :
Erreur de syntaxe        
www.aidesem.org/            Ligne: 1
Code: 0                    Caractère: 1
URI: http://www.aidesem.org/
 
Impossible d'effectuer l'opération à cause de l'erreur suivante 80020201.
main.js                           Ligne 13
 
Je ne comprend pas ce qui se passe, merci de m'aider.

Reply

Marsh Posté le 21-07-2010 à 20:13:36   

Reply

Marsh Posté le 22-07-2010 à 11:39:54    

Si tu postait ton fichier js, nous pourrions mieux t'aider.

Reply

Marsh Posté le 23-07-2010 à 19:56:07    

ok, je fais un copier coller.
 
$(document).ready(function(){
 hideContent = function(contentString){
  $("div.dynamicContent" ).slideUp(800,function() {
     showContent(contentString);playSound(0);
     });
 };
 showContent = function (contentString) {
  $.ajax({
      type: "GET",
      url: contentString,
      dataType:"html",
      success: function(data){
               $("div.dynamicContent" ).html(data);
      $("div.dynamicContent" ).slideDown(800);
      },
      error: function () {
        alert("Page "+contentString+" not found" );
       }
   });  
 };
 
  if($(document).getUrlParam("page" )!=null) {    
    hideContent($(document).getUrlParam("page" ));  
  } else {
    showContent("_home.htm" );  
 }
});
 
function sendToASUnselectButton(button_id) {
  thisMovie(button_id).sendToASUnselectButton("tutu" );
     }
     
function thisMovie(movieName) {
     if (navigator.appName.indexOf("Microsoft" ) != -1) {
         return window[movieName];
     } else {
         return document[movieName];
     }
 }
 
var requiredMajorVersion = 9;
var requiredMinorVersion = 9;  
var requiredRevision = 0;
var selected_button ="";
var isIE  = (navigator.appVersion.indexOf("MSIE" ) != -1) ? true : false;
var online = ( ((window.location+'').substring(0,4)).toLowerCase()=='http' ) ? true : false;
 
function myButton (buttonText,buttonLink) {  
 if (!online && !isIE) {
  document.write(' <DIV ID="flashMovie'+(anim_ids+1)+'" STYLE="width: 200; height: 31; z-index: 100;" onClick="showPage(\''+buttonLink+'\','+anim_ids+1+')">');                          
 }
 AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0','width','200','height','30','src','flash/button','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','flash/button','flashvars','custom_xml_url=button.xml&item_text='+buttonText+'&item_url='+buttonLink+'&button_id='+(anim_ids+1)+'&isIE='+isIE,'scale','noScale','wmode','transparent');
 if (!online && !isIE) {
 document.write('</DIV>');
 }
}
 
function myHeader () {  
 AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0','width','540','height','150','src','flash/header','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','flash/header','flashvars','custom_xml_url=custom.xml', 'bgcolor','#FFFFFF','scale','noScale'); //end AC code        
}
 
function showPage(pageURL,button_id) {
 hideContent(pageURL);
 if (selected_button!="" && button_id!=selected_button) {
   sendToASUnselectButton('anim_'+selected_button);  
 }
 selected_button = button_id;  
}
 
 
 
 
 
/* Copyright (c) 2006-2007 Mathias Bank (http://www.mathias-bank.de)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)  
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *  
 * Version 2.1
 *  
 * Thanks to  
 * Hinnerk Ruemenapf - http://hinnerk.ruemenapf.de/ for bug reporting and fixing.
 * Tom Leonard for some improvements
 *  
 */
jQuery.fn.extend({
/**
* Returns get parameters.
*
* If the desired param does not exist, null will be returned
*
* To get the document params:
* @example value = $(document).getUrlParam("paramName" );
*  
* To get the params of a html-attribut (uses src attribute)
* @example value = $('#imgLink').getUrlParam("paramName" );
*/  
 getUrlParam: function(strParamName){
   strParamName = escape(unescape(strParamName));
   
   var returnVal = new Array();
   var qString = null;
   
   if ($(this).attr("nodeName" )=="#document" ) {
    //document-handler
   
  if (window.location.search.search(strParamName) > -1 ){
   
   qString = window.location.search.substr(1,window.location.search.length).split("&" );
  }
   
   } else if ($(this).attr("src" )!="undefined" ) {
     
    var strHref = $(this).attr("src" )
    if ( strHref.indexOf("?" ) > -1 ){
      var strQueryString = strHref.substr(strHref.indexOf("?" )+1);
     qString = strQueryString.split("&" );
    }
   } else if ($(this).attr("href" )!="undefined" ) {
     
    var strHref = $(this).attr("href" )
    if ( strHref.indexOf("?" ) > -1 ){
      var strQueryString = strHref.substr(strHref.indexOf("?" )+1);
     qString = strQueryString.split("&" );
    }
   } else {
    return null;
   }
     
   
   if (qString==null) return null;
   
   
   for (var i=0;i<qString.length; i++){
   if (escape(unescape(qString[i].split("=" )[0])) == strParamName){
    returnVal.push(qString[i].split("=" )[1]);
   }
   
   }
   
   
   if (returnVal.length==0) return null;
   else if (returnVal.length==1) return returnVal[0];
   else return returnVal;
 }
});
 
Pour moi c'est un peu du charrabia, je suis novice pour cela.
Merci de votre aide
 
 
 

Reply

Marsh Posté le 23-07-2010 à 23:42:37    

Heu franchement, tu aurais mis ton code entre les balises <code>, j'aurais eu le numéro des lignes.
Là je ne vais pas compter !  

Reply

Marsh Posté le 24-07-2010 à 09:11:32    

David Boring a écrit :

Heu franchement, tu aurais mis ton code entre les balises <code>, j'aurais eu le numéro des lignes.
Là je ne vais pas compter !  


 
 

Code :
  1. $(document).ready(function(){
  2. hideContent = function(contentString){
  3.   $("div.dynamicContent" ).slideUp(800,function() {
  4.      showContent(contentString);playSound(0);
  5.      });
  6. };
  7. showContent = function (contentString) {
  8.   $.ajax({
  9.       type: "GET",
  10.       url: contentString,
  11.       dataType:"html",
  12.       success: function(data){
  13.                $("div.dynamicContent" ).html(data);
  14.       $("div.dynamicContent" ).slideDown(800);
  15.       },
  16.       error: function () {
  17.         alert("Page "+contentString+" not found" );
  18.        }
  19.    }); 
  20. };
  21.   if($(document).getUrlParam("page" )!=null) {   
  22.     hideContent($(document).getUrlParam("page" )); 
  23.   } else {
  24.     showContent("_home.htm" ); 
  25. }
  26. });
  27. function sendToASUnselectButton(button_id) {
  28.   thisMovie(button_id).sendToASUnselectButton("tutu" );
  29.      }
  30.    
  31. function thisMovie(movieName) {
  32.      if (navigator.appName.indexOf("Microsoft" ) != -1) {
  33.          return window[movieName];
  34.      } else {
  35.          return document[movieName];
  36.      }
  37. }
  38. var requiredMajorVersion = 9;
  39. var requiredMinorVersion = 9; 
  40. var requiredRevision = 0;
  41. var selected_button ="";
  42. var isIE  = (navigator.appVersion.indexOf("MSIE" ) != -1) ? true : false;
  43. var online = ( ((window.location+'').substring(0,4)).toLowerCase()=='http' ) ? true : false;
  44. function myButton (buttonText,buttonLink) { 
  45. if (!online && !isIE) {
  46.   document.write(' <DIV ID="flashMovie'+(anim_ids+1)+'" STYLE="width: 200; height: 31; z-index: 100;" onClick="showPage(\''+buttonLink+'\','+anim_ids+1+')">');                         
  47. }
  48. AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0','width','200','height','30','src','flash/button','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','flash/button','flashvars','custom_xml_url=button.xml&item_text='+buttonText+'&item_url='+buttonLink+'&button_id='+(anim_ids+1)+'&isIE='+isIE,'scale','noScale','wmode','transparent');
  49. if (!online && !isIE) {
  50. document.write('</DIV>');
  51. }
  52. }
  53. function myHeader () { 
  54. AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0','width','540','height','150','src','flash/header','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','flash/header','flashvars','custom_xml_url=custom.xml', 'bgcolor','#FFFFFF','scale','noScale'); //end AC code         
  55. }
  56. function showPage(pageURL,button_id) {
  57. hideContent(pageURL);
  58. if (selected_button!="" && button_id!=selected_button) {
  59.    sendToASUnselectButton('anim_'+selected_button); 
  60. }
  61. selected_button = button_id; 
  62. }
  63. /* Copyright (c) 2006-2007 Mathias Bank (http://www.mathias-bank.de)
  64. * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)   
  65. * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
  66. *   
  67. * Version 2.1
  68. *   
  69. * Thanks to   
  70. * Hinnerk Ruemenapf - http://hinnerk.ruemenapf.de/ for bug reporting and fixing.
  71. * Tom Leonard for some improvements
  72. *   
  73. */
  74. jQuery.fn.extend({
  75. /**
  76. * Returns get parameters.
  77. *
  78. * If the desired param does not exist, null will be returned
  79. *
  80. * To get the document params:
  81. * @example value = $(document).getUrlParam("paramName" );
  82. *   
  83. * To get the params of a html-attribut (uses src attribute)
  84. * @example value = $('#imgLink').getUrlParam("paramName" );
  85. */ 
  86. getUrlParam: function(strParamName){
  87.    strParamName = escape(unescape(strParamName));
  88.  
  89.    var returnVal = new Array();
  90.    var qString = null;
  91.  
  92.    if ($(this).attr("nodeName" )=="#document" ) {
  93.     //document-handler
  94.  
  95.   if (window.location.search.search(strParamName) > -1 ){
  96.  
  97.    qString = window.location.search.substr(1,window.location.search.length).split("&" );
  98.   }
  99.  
  100.    } else if ($(this).attr("src" )!="undefined" ) {
  101.    
  102.     var strHref = $(this).attr("src" )
  103.     if ( strHref.indexOf("?" ) > -1 ){
  104.       var strQueryString = strHref.substr(strHref.indexOf("?" )+1);
  105.      qString = strQueryString.split("&" );
  106.     }
  107.    } else if ($(this).attr("href" )!="undefined" ) {
  108.    
  109.     var strHref = $(this).attr("href" )
  110.     if ( strHref.indexOf("?" ) > -1 ){
  111.       var strQueryString = strHref.substr(strHref.indexOf("?" )+1);
  112.      qString = strQueryString.split("&" );
  113.     }
  114.    } else {
  115.     return null;
  116.    }
  117.    
  118.  
  119.    if (qString==null) return null;
  120.  
  121.  
  122.    for (var i=0;i<qString.length; i++){
  123.    if (escape(unescape(qString[i].split("=" )[0])) == strParamName){
  124.     returnVal.push(qString[i].split("=" )[1]);
  125.    }
  126.  
  127.    }
  128.  
  129.  
  130.    if (returnVal.length==0) return null;
  131.    else if (returnVal.length==1) return returnVal[0];
  132.    else return returnVal;
  133. }
  134. });


 
Excusez moi, mais je suis un peu "juste" pour ces manips peu habituelles pour moi.
j'espère que cela pourra vous aider.
le site fonctionne très bien sous firefox, c'est sous IE que des problèmes d'affichage et des erreurs sont signalées, alors que dreamwiever ne me donne rien d'anormal quand je fais une vérif de pages ??
 
Merci d'essayer de comprendre
 
 

Reply

Marsh Posté le 27-07-2010 à 01:04:19    

dreamweaver == shit pour le rendu
dreamweaver == outil à ne pas utiliser en mode wysiwyg


---------------
Blablaté par Harko
Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed