Salta al contenuto
  • CATEGORIES
  • La Community Connect.gt
  • Presentati alla Community
  • News Ufficiali da Connect.gt
  • Internet News
  • A Scuola Di
  • Digital Marketing
  • Intelligenza Artificiale
  • SEO & GEO
  • Web Marketing e Content
  • Google Analytics e Web Analytics
  • Google Ads & Advertising
  • YouTube
  • TikTok, Instagram e altri Social
  • Google Adsense, Affiliazioni e Guadagno
  • E-Commerce
  • Coding e Sistemistica
  • Help Center: consigli per il tuo progetto
  • Hosting e Cloud
  • Coding
  • CMS & Piattaforme Self-Hosted
  • Annunci e Collaborazioni
  • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
  • Collaborazioni WEB e Lavoro: offro e cerco
  • Impresa, Fisco e Leggi
  • Consulenza Legale e Professioni Web
  • Consulenza Fiscale, Imprese, Startup e P.Iva
  • Gli Off Topic
  • PC, Smartphone e altri Hardware
  • Tutti i Software
  • GT Fetish Cafè
  • Discussioni
  • 0 Non letti 0
  • Recenti
  • Hashtag
  • Popolare
  • Utenti
  • Privacy
  • Termini e condizioni
  • © 2026 Search On Media Group S.r.l.
Collassa
Connect.gt
Il network Search On
Connect.gt WMF AI Festival Accademia Advanced SEO Tool AgentCy Social Media Strategies Search Tech
Registrati Accedi
Connect.gt
Stream Interest Categorie Hashtag
G

giangi56

@giangi56
Non seguire Segui
Informazioni
Post
1
Discussioni
1
Condivisioni
0
Gruppi
0
Da chi è seguito
0
Chi segue
0

Post

Recenti Migliore Controverso

  • conflitto script
    G giangi56
    Coding

    2 script in stessa pagina
    salve a tutti premetto che sono un autodidatta che si diletta a scoprire piano piano tutti i segreti per la costruzione di pagine web
    adesso però sono da un po di tempo ( 2 mesi) di fronte ad un problema che faccio fatica a risolvere ( nonostante abbia acquistato anche un paio di manuali)
    vorrei inserire nella stessa pagina due script js che ho trovato sul sito dhteumeuleu però non funzionano, o meglio se ne inserisco solo uno tutto ok altrimenti con tutti e due ne funziona solo uno.
    avrei proprio bisogno di una dritta sul come eliminare questo conflitto grazie anticipato
    giovanni

    entrambi gli script sono nella cartella js e li richiamo cosi
    <script src="js/provarose.js"></script>
    <script src="js/provamenu.js"></script>

    questo è lo script che uso per il menu chiamato provamenu

     var object = new Array();
     
    function Slide(N,oCont){
    this.N = N;
    this.S = 1.1;
    this.object = new Array();
     
    this.CObj = function (parent,N){
     
    this.parent = parent;
    this.N = N;
    this.obj = parent.frm[N];
    this.tit = this.obj.firstChild;
    this.div = this.obj.getElementsByTagName("div")[1];
    this.div.style.visibility = "hidden";
    this.y0 = N * 18;
    this.Y1 = this.y0;
    this.obj.style.top = Math.round(this.y0) + 'px';
    this.obj.style.height = Math.round(parent.H - (parent.NF-1) * 18 - 3) + 'px';
    this.obj.style.visibility = "visible";
    this.obj.parent = this;
    this.run = false;
     
    this.move = function(){
    with(this){
    dy = (y1-y0)/parent.S;
    if(Math.abs(dy)>.1){
    y0+=dy;
    obj.style.top = Math.round(y0) + 'px';;
    setTimeout("object["+parent.N+"].object["+N+"].move();", 16);
    } else {
    run = false;
    if(dy>0)div.style.visibility="hidden";
    else if(N>0)parent.object[N-1].div.style.visibility="hidden";
    }
    }
    }
     
    this.obj.onmouseover = function(){
    with(this.parent){
    if(!run){
    run = true;
    div.style.visibility="visible";
    for(i=0;i<parent.NF;i++)parent.object[i].tit.className = "title";
    tit.className = "title_o";
    for(i=0;i<=N;i++){
    parent.object[i].y1 = i*18;
    parent.object[i].move();
    }
    for(i=N+1;i<parent.NF;i++){
    parent.object[i].y1 = parent.H-(parent.NF-i)*18;
    parent.object[i].move();
    }
    }
    }
    }
    }
     
    this.frm = document.getElementById(oCont);
    this.H = this.frm.offsetHeight;
    this.frm = this.frm.getElementsByTagName("span");
    this.NF = this.frm.length;
    for(i=0; i < this.NF; i++) this.object[i] = new this.CObj(this, i);
    this.object[0].obj.onmouseover();
    this.S = 10;
    }
     
    onload = function() {
    object[0] = new Slide(0, "frames");
    }
    

    questo invece per il richiamo ad alcune altre pagine chiamato provarose

    document.onselectstart = new Function("return false");
    O = new Array();
    box = 0;
    img = 0;
    txt = 0;
    tit = 0;
    W = 0;
    H = 0;
    nI = 0;
    sel = 0;
    si = 0;
    ZOOM = 0;
    rImg = 0;
    //////////////////
    speed = .04; // animation speed
    delay = .5; // 1 = no delay
    //////////////////
     
    function dText(){
    txt.style.textAlign = tit.style.textAlign = (sel<nI/2)?"left":"right";
    txt.innerHTML = O[sel].tx;
    tit.innerHTML = O[sel].ti;
    }
     
    function CObj(n, s, x, tx, ti){
    this.n = n;
    this.dim = s;
    this.tx = tx;
    this.ti = ti;
    this.is = img[n];
    this.vz = 0;
    this.sx = 0;
    this.x0 = x;
    this.x1 = 0;
    this.zo = 0;
    this.over = function() {
    with(this){
    if(n!=sel){
    O[sel].dim = 100;
    O[n].dim = ZOOM * 100;
    sel = n;
    l = 0;
    for(k=0; k<nI; k++){
    O[k].x0 = l;
    l += O[k].dim;
    }
    txt.innerHTML = tit.innerHTML = "";
    setTimeout("dText()", 32);
    }
    }
    }
    this.anim = function () {
    with(this){
    vz = speed*(vz+(x1-sx)*delay);
    x1 -= vz;
    sx = (n==0)?0:O[n-1].x0+O[n-1].dim;
    zo -= (zo-dim)*speed;
    l = (x1*si)+6*(n+1);
    w = zo*si;
    is.style.left = Math.round(l)+'px';
    is.style.top = Math.round((H-w*rImg)*.5)+'px';
    is.style.width = Math.round(w)+'px';
    is.style.height = Math.round(w*rImg)+'px';
    if(sel == n){
    if(sel<nI*.5) {
    tit.style.left = txt.style.left = Math.round(l+w+6)+'px';
    } else {
    tit.style.left = txt.style.left = Math.round(l-(nx*.25)-6)+'px';
    }
    txt.style.top = Math.round(-(w*rImg)*.25)+'px';
    tit.style.top = Math.round((w*rImg)*.33)+'px';
    }
    }
    }
    }
     
    function run(){
    for(j in O)O[j].anim();
    setTimeout("run()", 16);
    }
     
    function doResize(){
    tit.style.width = Math.round(nx*.25)+'px';
    txt.style.width = Math.round(nx*.25)+'px';
    tit.style.fontSize = (nx/30)+'px';
    txt.style.fontSize = (nx/70)+'px';
    with(box.style){
    width = Math.round(W)+'px';
    height = Math.round(H)+'px';
    left = Math.round(nx/2-W/2)+'px';
    top = Math.round(ny/2-H/2)+'px';
    }
    }
     
    function resize(){
    nx = scr.offsetWidth;
    ny = scr.offsetHeight;
    W = nx*90/100;
    si = (W-((nI+1)*6))/((ZOOM*100)+((nI-1)*100));
    H = (100*si*rImg)+14;
    doResize();
    }
    onresize = resize;
     
    onload = new function(){
    scr = document.getElementById("screen");
    box = document.getElementById("box");
    tit = document.getElementById("tit");
    txt = document.getElementById("txt");
    img = box.getElementsByTagName("img");
    Lnk = document.getElementById("lnk").getElementsByTagName("a");
    nI = img.length;
    ZOOM = nI;
    rImg = img[0].height/img[0].width;
    resize();
    s = ZOOM * 100;
    x = 0;
    tit.innerHTML = img[0].title;
    txt.innerHTML = img[0].alt;
    for(i=0; i<nI; i++) {
    var t = img[i].alt;
    if(Lnk[i].href!="") t+='<br><a href="'+Lnk[i].href+'">'+Lnk[i].innerHTML+'</a>';
    O[i] = new CObj(i, s, x, t, img[i].title);
    img[i].alt = "";
    img[i].title = "";
    img[i].onmousedown = new Function("return false;");
    img[i].onmouseover = new Function('O['+i+'].over();');
    if(Lnk[i].href!=""){
    /* ==== hyperlink ==== */
    img[i].onclick = new Function('window.open("'+Lnk[i].href+'","_blank");');
    }
    x += s;
    s = 100;
    }
    box.style.visibility = "visible";
    run();
    }
    
  • Accedi

  • Non hai un account? Registrati

  • Accedi o registrati per effettuare la ricerca.
  • Primo post
    Ultimo post
Home Accedi Registrati
Menu
  • CATEGORIES
  • La Community Connect.gt
  • Presentati alla Community
  • News Ufficiali da Connect.gt
  • Internet News
  • A Scuola Di
  • Digital Marketing
  • Intelligenza Artificiale
  • SEO & GEO
  • Web Marketing e Content
  • Google Analytics e Web Analytics
  • Google Ads & Advertising
  • YouTube
  • TikTok, Instagram e altri Social
  • Google Adsense, Affiliazioni e Guadagno
  • E-Commerce
  • Coding e Sistemistica
  • Help Center: consigli per il tuo progetto
  • Hosting e Cloud
  • Coding
  • CMS & Piattaforme Self-Hosted
  • Annunci e Collaborazioni
  • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
  • Collaborazioni WEB e Lavoro: offro e cerco
  • Impresa, Fisco e Leggi
  • Consulenza Legale e Professioni Web
  • Consulenza Fiscale, Imprese, Startup e P.Iva
  • Gli Off Topic
  • PC, Smartphone e altri Hardware
  • Tutti i Software
  • GT Fetish Cafè
  • Discussioni
  • Non letti 0
  • Recenti
  • Hashtag
  • Popolare
  • Utenti
  • Privacy
  • Termini e condizioni
  • © 2026 Search On Media Group S.r.l.