Problema script logo change on refresh
Forum gratuit: forum de suport al utilizatorilor :: Forum de suport :: Probleme legate de un script (cod) :: Arhiva scripturi/coduri
Pagina 1 din 2 • Distribuiţi
Pagina 1 din 2 • 1, 2
Problema script logo change on refresh
Deci , am reusit sa fac un script pentru ca , atunci cand dai refresh la pagina logo-ul sa se schimbe , dar nu stiu cum se poate pune .
Script-ul :
Script-ul :
- Cod:
<SCRIPT LANGUAGE="JavaScript">
var theImages = new Array()
theImages[0] = 'http://img824.imageshack.us/img824/2517/logo1dw.jpg'
theImages[1] = 'http://img706.imageshack.us/img706/3752/logo2fv.jpg'
theImages[2] = 'http://img818.imageshack.us/img818/8099/logo3eu.jpg'
theImages[3] = 'http://img854.imageshack.us/img854/7679/logo4q.jpg'
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}
// End -->
</script>
Ultima editare efectuata de catre domi in Joi Iul 07, 2011 12:03 pm, editata de 2 ori
Re: Problema script logo change on refresh
Ce versiune folosesti?
Qouk- Membru Forumgratuit
- Mesaje : 314
Varsta : 30
Localizare : ForumGratuit
Data înscrierii : 03/07/2011
Mulțumiri : 0
Re: Problema script logo change on refresh
Folosesc phpBB2
Ultima editare efectuata de catre domi in Joi Iul 07, 2011 12:54 am, editata de 1 ori
Re: Problema script logo change on refresh
- Spoiler:
- Nu mai scri cu bold, citeste regulamentul...
P.A. => Afisare => Template-uri => General => overall_header.
Inlocuiesti:
- Cod:
<!-- END switch_logo_left -->
<td align="center" width="100%" valign="middle">
<!-- BEGIN switch_logo_center -->
<a href="{U_INDEX}"><img src="{LOGO}" id="i_logo" border="0" alt="{L_INDEX}" vspace="1" /></a>
<br />
<!-- END switch_logo_center -->
<div class="maintitle">{MAIN_SITENAME}</div>
<br />
<span class="gen">{SITE_DESCRIPTION}<br /> </span>
</td>
<!-- BEGIN switch_logo_right -->
<td><a href="{U_INDEX}"><img src="{LOGO}" id="i_logo" border="0" alt="{L_INDEX}" vspace="1" /></a></td>
<!-- END switch_logo_right -->
cu:
- Cod:
<SCRIPT LANGUAGE="JavaScript">
var theImages = new Array()
theImages[0] = 'http://img824.imageshack.us/img824/2517/logo1dw.jpg'
theImages[1] = 'http://img706.imageshack.us/img706/3752/logo2fv.jpg'
theImages[2] = 'http://img818.imageshack.us/img818/8099/logo3eu.jpg'
theImages[3] = 'http://img854.imageshack.us/img854/7679/logo4q.jpg'
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}
// End -->
</script>
P.S. Nu sunt sigur ca va functiona
Qouk- Membru Forumgratuit
- Mesaje : 314
Varsta : 30
Localizare : ForumGratuit
Data înscrierii : 03/07/2011
Mulțumiri : 0
Re: Problema script logo change on refresh
Am inlocuit
si cand apas butonul "inregistrare" primesc eroarea :
Si nu se schimba nimic =/
EDIT :
Am pus script-ul putin mai sus la begin switch logo left si am reusit sa evit acea eroare , dar acum logo-ul a disparut si primul lucru pe pagina este navigation bar-ul .
- Cod:
<!-- END switch_logo_left -->
<td align="center" width="100%" valign="middle">
<!-- BEGIN switch_logo_center -->
<a href="{U_INDEX}"><img src="{LOGO}" id="i_logo" border="0" alt="{L_INDEX}" vspace="1" /></a>
<!-- END switch_logo_center -->
<div class="maintitle">{MAIN_SITENAME}</div>
<span class="gen">{SITE_DESCRIPTION}
</span>
</td>
<!-- BEGIN switch_logo_right -->
<td><a href="{U_INDEX}"><img src="{LOGO}" id="i_logo" border="0" alt="{L_INDEX}" vspace="1" /></a></td>
<!-- END switch_logo_right -->
- Cod:
<SCRIPT LANGUAGE="JavaScript">
var theImages = new Array()
theImages[0] = 'http://img824.imageshack.us/img824/2517/logo1dw.jpg'
theImages[1] = 'http://img706.imageshack.us/img706/3752/logo2fv.jpg'
theImages[2] = 'http://img818.imageshack.us/img818/8099/logo3eu.jpg'
theImages[3] = 'http://img854.imageshack.us/img854/7679/logo4q.jpg'
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}
// End -->
</script>
si cand apas butonul "inregistrare" primesc eroarea :
- Cod:
"Baliza a fost inchisa inainte de a fi deschisa sau baliza nu a fost deschisa."
Si nu se schimba nimic =/
EDIT :
Am pus script-ul putin mai sus la begin switch logo left si am reusit sa evit acea eroare , dar acum logo-ul a disparut si primul lucru pe pagina este navigation bar-ul .
Re: Problema script logo change on refresh
Stiu eu care e problema cred ca ai pus codul dupa </html> -> ceea ce e inchiderea codului.
Incearca sa l pozitionezi mai sus.
Incearca sa l pozitionezi mai sus.
Re: Problema script logo change on refresh
Nu , am pus codul mai sus de /html ...
Ar trebuii sa postez tot codul din overall_header ? Asta ar ajuta ?
Ar trebuii sa postez tot codul din overall_header ? Asta ar ajuta ?
Re: Problema script logo change on refresh
Qouk a scris:
- Spoiler:
Nu mai scri cu bold, citeste regulamentul...
P.A. => Afisare => Template-uri => General => overall_header.
Inlocuiesti:
- Cod:
<!-- END switch_logo_left -->
<td align="center" width="100%" valign="middle">
<!-- BEGIN switch_logo_center -->
<a href="{U_INDEX}"><img src="{LOGO}" id="i_logo" border="0" alt="{L_INDEX}" vspace="1" /></a>
<!-- END switch_logo_center -->
<div class="maintitle">{MAIN_SITENAME}</div>
<span class="gen">{SITE_DESCRIPTION}
</span>
</td>
<!-- BEGIN switch_logo_right -->
<td><a href="{U_INDEX}"><img src="{LOGO}" id="i_logo" border="0" alt="{L_INDEX}" vspace="1" /></a></td>
<!-- END switch_logo_right -->
cu:
- Cod:
<SCRIPT LANGUAGE="JavaScript">
var theImages = new Array()
theImages[0] = 'http://img824.imageshack.us/img824/2517/logo1dw.jpg'
theImages[1] = 'http://img706.imageshack.us/img706/3752/logo2fv.jpg'
theImages[2] = 'http://img818.imageshack.us/img818/8099/logo3eu.jpg'
theImages[3] = 'http://img854.imageshack.us/img854/7679/logo4q.jpg'
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}
// End -->
</script>
P.S. Nu sunt sigur ca va functiona
Daca te ai gandit la ce am spus eu si face ce a zis el va merge.
Te rog fi atent la detalii.
Re: Problema script logo change on refresh
Am testat pe un forum de teste, nu functioneaza.
E din cauza script-ului...
E din cauza script-ului...
Qouk- Membru Forumgratuit
- Mesaje : 314
Varsta : 30
Localizare : ForumGratuit
Data înscrierii : 03/07/2011
Mulțumiri : 0
Re: Problema script logo change on refresh
Am incercat si eu si am observat ca e gresit asa ca l-am corectat
Doar ca nu reusesc sa-l fac sa apara in locul logo-ului .
- Cod:
<SCRIPT LANGUAGE="JavaScript">
var theImages = new Array()
//Random-loading images
theImages[0] = 'http://img824.imageshack.us/img824/2517/logo1dw.jpg'
theImages[1] = 'http://img706.imageshack.us/img706/3752/logo2fv.jpg'
theImages[2] = 'http://img818.imageshack.us/img818/8099/logo3eu.jpg'
theImages[3] = 'http://img854.imageshack.us/img854/7679/logo4q.jpg'
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
if(whichImage==0){
document.write('<a href ="link.html"><img src="'+theImages[whichImage]+'" border=0 width=452 height=181></a>');
}
else if(whichImage==1){
document.write('<a href ="link.html"><img src="'+theImages[whichImage]+'" border=0 width=823 height=306></a>');
}
else if(whichImage==2){
document.write('<a href ="link.html"><img src="'+theImages[whichImage]+'" border=0 width=823 height=306></a>');
}
else if(whichImage==3){
document.write('<a href ="link.html"><img src="'+theImages[whichImage]+'" border=0 width=823 height=306></a>');
}
else if(whichImage==4){
document.write('<a href ="link.html"><img src="'+theImages[whichImage]+'" border=0 width=823 height=306></a>');
}
}
</script>
<script>showImage();</script>
Doar ca nu reusesc sa-l fac sa apara in locul logo-ului .
Re: Problema script logo change on refresh
domi a scris:Deci , am reusit sa fac un script pentru ca , atunci cand dai refresh la pagina logo-ul sa se schimbe , dar nu stiu cum se poate pune .
Script-ul :
- Cod:
<SCRIPT LANGUAGE="JavaScript">
var theImages = new Array()
theImages[0] = 'http://img824.imageshack.us/img824/2517/logo1dw.jpg'
theImages[1] = 'http://img706.imageshack.us/img706/3752/logo2fv.jpg'
theImages[2] = 'http://img818.imageshack.us/img818/8099/logo3eu.jpg'
theImages[3] = 'http://img854.imageshack.us/img854/7679/logo4q.jpg'
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}
// End -->
</script>
Probabil ai creat scriptul gresit.
Re: Problema script logo change on refresh
Greu , greu....
Cauta :
Cauta :
- Cod:
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<!-- BEGIN switch_logo_left -->
<td><a href="{U_INDEX}"><img src="{LOGO}" id="i_logo" border="0" alt="{L_INDEX}" vspace="1" /></a></td>
<!-- END switch_logo_left -->
<td align="center" width="100%" valign="middle">
<!-- BEGIN switch_logo_center -->
<a href="{U_INDEX}"><img src="{LOGO}" id="i_logo" border="0" alt="{L_INDEX}" vspace="1" /></a>
<br />
<!-- END switch_logo_center -->
<div class="maintitle">{MAIN_SITENAME}</div>
<br />
<span class="gen">{SITE_DESCRIPTION}<br /> </span>
</td>
<!-- BEGIN switch_logo_right -->
<td><a href="{U_INDEX}"><img src="{LOGO}" id="i_logo" border="0" alt="{L_INDEX}" vspace="1" /></a></td>
<!-- END switch_logo_right -->
</tr>
</table>
- Cod:
<script language="JavaScript">
images = new Array(4);
images[0] = "<a href = 'LINK:1'><img src='http://img824.imageshack.us/img824/2517/logo1dw.jpg'></a>";
images[1] = "<a href = 'LINK:2'><img src='http://img706.imageshack.us/img706/3752/logo2fv.jpg'></a>";
images[2] = "<a href = 'LINK:3'><img src='http://img818.imageshack.us/img818/8099/logo3eu.jpg'></a>";
images[3] = "<a href = 'LINK:4'><img src='http://img854.imageshack.us/img854/7679/logo4q.jpg'></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
</script>
Pagina 1 din 2 • 1, 2
Subiecte similare
» Script buton pentru refresh,sus si acasa
» Cerere script pentru Logo
» cerere script sustinere logo !!
» Problema logo.
» Problema logo
» Cerere script pentru Logo
» cerere script sustinere logo !!
» Problema logo.
» Problema logo
Forum gratuit: forum de suport al utilizatorilor :: Forum de suport :: Probleme legate de un script (cod) :: Arhiva scripturi/coduri
Pagina 1 din 2
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum