Probleme javascript

Fermé
actaris51 - 7 juin 2008 à 00:55
 actaris51 - 7 juin 2008 à 00:59
Bonjour,
Je vous explique mon probleme, j'ai utiliser un script pour faire un moteur de recherche sur mon site. Seulement, le probleme, c'est que ce site n'est pas destiné à etre uploadé mais à etre gravé sur un CDrom. Or lorsque le site est sur mon disque dur ou bien sur un CD, et bien le clic sur le resultat de la rcherche n'a aucun effet. La page recherchée ne s'ouvre pas. Comment resoudre ce problème ?
merci
Voici le code :
<!-- saved from url=(0022)http://internet.e-mail -->
<HTML><HEAD><TITLE>Moteur de recherche</TITLE>


<SCRIPT language=javascript>


// Script développé par Olivier Hondermarck
// D'autres scripts sur https://www.toutjavascript.com/main/index.php3
// Utilisation gratuite à condition de laisser ces commentaires

// Création de la base de données
var tjs_base=new TJS_InitBase("_self");
//TJS_InitBase(target) : target="_blank" pour ouvrir dans une nouvelle page
tjs_base.Add("Colloquiums\English\Aiangl.html","Ai Yu and Patrick Humphreys : Intellectual Capital and Support for Collaborative Decision Making in Small and Medium Enterprises ","Ai Yu and Patrick Humphreys,Intellectual Capital and Support for Collaborative Decision Making in Small and Medium Enterprises");
tjs_base.Add("Colloquiums\English\DALINDAangl.html","Voina : The development of a control system for urbain and environmentalert in the city of SFAX","DALINDA,Voina, The development of a control system for urbain and environmentalert in the city of SFAX");
tjs_base.Add("Colloquiums\English\DALYangl.html","Mary Daly : The Impact of information systems on decision making ","DALY,The Impact of information systems on decision making ");
tjs_base.Add("Colloquiums\English\DICKENSangl.html","Luke Dickens : Solving Multi-agent Stochastic Processes to evaluate Learning Techniques","DICKENS,Solving Multi-agent Stochastic Processes to evaluate Learning Techniques");
tjs_base.Add("Colloquiums\English\FuzzyApproachangl.html","Nallabelly : RANKING PRODUCTS AND ATTRIBUTES – A FUZZY APPROACH","RANKING PRODUCTS AND ATTRIBUTES – A FUZZY APPROACH, nallabelly");
tjs_base.Add("Colloquiums\English\KONATEangl.html","Konate : On Collaborative Approach to Requirements Elicitation","Konate, On Collaborative Approach to Requirements Elicitation");
tjs_base.Add("Colloquiums\English\LEBERKNIGHTangl.html","Leberknight : Designing a Decision Support System for Physical Security: Investigating the Determinants of Perceived Threat","Designing a Decision Support System for Physical Security: Investigating the Determinants of Perceived Threat, Leberknight");
tjs_base.Add("Colloquiums\English\pcrlangl.html","Paulo César R. Lima JÚNIOR : Integration of GIS, Meta-Heuristics And Multi-Criteria Analysis for Territories Alignment","Integration of GIS, Meta-Heuristics And Multi-Criteria Analysis for Territories Alignment,Paulo César R. Lima JÚNIOR, Jorge Freire de SOUSA and José Barros BASTO");
tjs_base.Add("Colloquiums\English\SARABANDOangl.html","Sarabando : Group Decision with incomplete information","Sarabando, Group Decision with incomplete information");
tjs_base.Add("Colloquiums\English\SUJANTOangl.html","Sujanto Fonny : Process-based Ontology for Decision Support in a Complex Problem Domain: a Case of Medical Emergency Coordination","Process-based Ontology for Decision Support in a Complex Problem Domain: a Case of Medical Emergency Coordination, Sujanto Fonny");
tjs_base.Add("Posters\English\AKRAMangl.html","Akram : Importance of Knowledge Transfer in Decision Making Process","Akram, Importance of Knowledge Transfer in Decision Making Process");
tjs_base.Add("Posters\English\BONNETangl.html","Bonnet : Collaborative Satellites Within A Constellation","Bonnet, Collaborative Satellites Within A Constellation");
tjs_base.Add("Posters\English\BRANDERangl.html","Brander : High Level Collaboration Using Knowledge Structures","Brander, High Level Collaboration Using Knowledge Structures");
tjs_base.Add("Posters\English\CHAWHTOONangl.html","Htoon Ei Chaw : XML Data Filtering Mechanism based on Ontology and Twig Pattern with Prefix-Path Streaming","Htoon Ei Chaw : XML Data Filtering Mechanism based on Ontology and Twig Pattern with Prefix-Path Streaming");
tjs_base.Add("Posters\English\COELHOangl.html","Coelho : Using SSM for Structuring Decision Support in Urban Energy Planning","Coelho, Using SSM for Structuring Decision Support in Urban Energy Planning");
tjs_base.Add("Posters\English\DEVIangl.html","Devi : Decision Support Systems for E-Purchasing using Case-Based Reasoning and Rating Based Collaborative Filtering","Devi, Decision Support Systems for E-Purchasing using Case-Based Reasoning and Rating Based Collaborative Filtering");
tjs_base.Add("Posters\English\HERNANDEZangl.html","Hernandez : A collaborative decision making model to support the reverse logistic process in the supply chain. An application of the GRAI methodology to the automobile sector","Hernandez : A collaborative decision making model to support the reverse logistic process in the supply chain. An application of the GRAI methodology to the automobile sector ");
tjs_base.Add("Posters\English\LIAQUATangl.html","Hossain Liaquat : Modeling Emergency Response Coordination through Social Networks","Hossain Liaquat, Modeling Emergency Response Coordination through Social Networks");
tjs_base.Add("Posters\English\MAHMOODangl.html","Rhida Mahmood Bedir : Heuristic Methods As A Tool to Support Decision Making in Production Planning","Rhida Mahmood Bedir : Heuristic Methods As A Tool to Support Decision Making in Production Planning");
tjs_base.Add("Posters\English\MIGLIARESEangl.html","Migliarese : Knowledge Management, Relational Knowledge and Competitiveness: Preliminary Results from a Research Study on Sme enterprises in the South of Italy ","Migliarese : Knowledge Management, Relational Knowledge and Competitiveness: Preliminary Results from a Research Study on Sme enterprises in the South of Italy ");
tjs_base.Add("Posters\English\MIKHALEVICHangl.html","Mikhalevich : Model-Driven Collaborative DSS for Multiregional Water Consumption Problems ","Mikhalevich Model-Driven Collaborative DSS for Multiregional Water Consumption Problems");
tjs_base.Add("Posters\English\MORERNOangl.html","Moreno : Collaborative Decision Making in e-cognocracy. Collaborative Decision Making in e-cognocracy. Maximizing the outer compatibility","Moreno, Collaborative Decision Making in e-cognocracy. Collaborative Decision Making in e-cognocracy. Maximizing the outer compatibility");
tjs_base.Add("Posters\English\ROBERTangl.html","Robert : Un système d’annotation dans les recherches des informations pour la prise de décision","Robert, Un système d’annotation dans les recherches des informations pour la prise de décision");
tjs_base.Add("Posters\English\TCHEMISOVAangl.html","Tchemisova : On Continuous Optimization Methods in Data Mining--Cluster Analysis, Classification and Regression--Provided for Decision Support and Other Applications ","Tchemisova : On Continuous Optimization Methods in Data Mining--Cluster Analysis, Classification and Regression--Provided for Decision Support and Other Applications");





function TJS_InitBase(target) {
this.nb_item=0;
this.target=target;
this.Add=AddItem;
this.Search=SearchItem;
}
function AddItem(page,desc,cle) {
var nb = this.nb_item;
var item = new Object;
item.page=page;
item.desc=desc;
item.cle=cle;
this[nb]=item;
this.nb_item++;
}


function SearchItem(txt) {
// txt contient le texte de la recherche
txt = unescape(txt);
txt = txt.replace(/\+/g," ");
var n=tjs_base.nb_item;
var indice=-1;
if (txt=="Enter a keyword") {alert("PLEASE ENTER A KEYWORD"); }
else{
document.forms["tjs_search"].elements["mot"].value=txt;
var Z=""; var nb=0;
for (var i=0; i<n; i++) {
if (tjs_base[i].cle.toUpperCase().indexOf(txt.toUpperCase(),0)!="-1") {
Z+="<A target='"+tjs_base.target+"' href='"+tjs_base[i].page+"'>"+tjs_base[i].desc+"</A> <SMALL>("+tjs_base[i].page+")</SMALL><BR>"
nb++;
}
}
if (nb>0) {
if (nb==1) {Z="One result found [<B>"+txt+"</B>] : <BR>"+Z;}
else {Z=nb+" Results found [<B>"+txt+"</B>] : <BR>"+Z;}
}else{Z="No results found with [<B>"+txt+"</B>]<BR>Please try another keyword";}
document.write(Z);
}
}

function TJS_Search(f) {
if (f.mot.value!=""){f.submit();}
}

function TJS_PrintResult() {
var url=document.location.href;
if (url.indexOf("?mot=",0) > 0) {
var mot=url.substring(url.indexOf("?mot=",0)+5);
SearchItem(mot);
}
}

</SCRIPT>
</HEAD>

<BODY text="navy" bgcolor="#FFFFFF" alink="#FF8C00" link="#FF8C00" vlink="#FF8C00">

<FONT FACE="Arial" SIZE='-1' COLOR="navy">
<CENTER>
<b>CDM 08 </b>
</CENTER>
<BR><BR>
<TABLE><TR><TD><FONT SIZE="-1" COLOR="#000099"><BR>
<BR>
<FORM name=tjs_search METHOD=get action="search2.html">
<INPUT NAME="mot" SIZE=20 MAXLENGTH=35 value="Enter a keyword" onFocus="if (this.value=='Saisir un mot clé') {this.value=''}" onBlur="if (this.value==''){this.value='Saisir un mot clé'}">
<INPUT TYPE="button" name="bouton" VALUE="Search" onClick="TJS_Search(this.form)">
</FORM>
<SCRIPT language=javascript>
// Affichage des résultats éventuels.
TJS_PrintResult();
</SCRIPT>

<BR><BR>
<HR style="height:0px">
<BR>

<BR><BR><BR><BR><BR>
<CENTER><A href=""></A>
</CENTER>
</FONT></TD></TR></TABLE>
</BODY></HTML>
<!-- Script développé par Olivier Hondermarck -->
<!-- D'autres scripts et des conseils sur https://www.toutjavascript.com/main/index.php3 -->

1 réponse

C'est bon, en fait, j'ai trouvé mon erreur...
Désolé du dérangement
0