Форум: Форум PHPФорум ApacheФорум Регулярные ВыраженияФорум MySQLHTML+CSS+JavaScriptФорум FlashРазное
Новые темы: 0000000
Социальная инженерия и социальные хакеры. Авторы: Кузнецов М.В., Симдянов И.В. PHP Puzzles. Авторы: Кузнецов М.В., Симдянов И.В. PHP на примерах (2 издание). Авторы: Кузнецов М.В., Симдянов И.В. MySQL 5. В подлиннике. Авторы: Кузнецов М.В., Симдянов И.В. MySQL на примерах. Авторы: Кузнецов М.В., Симдянов И.В.
ВСЕ НАШИ КНИГИ
Консультационный центр SoftTime

HTML+CSS+JavaScript

Выбрать другой форум

 

Здравствуйте, Посетитель!

вид форума:
Линейный форум Структурный форум

тема: Как позиционировать объекты в центре страницы?
 
 автор: schalom   (04.09.2006 в 06:09)   письмо автору
 
 

Нужна помощь! Здесь html страничка с индикатором загрузки. Как Toolbar с текстом в центре показать?
Заранее благодарен.
<html>
<head>
<title>Preloader </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#92C4ED" text="#000000">
<script language=JavaScript1.2>

<!-- begin hiding
startingColor = new Array()
endingColor = new Array()
var yourImages = new Array(
"index-Dateien/image001.gif")
var locationAfterPreload = "index.html"

var preloadbarWidth = 377

var preloadbarHeight = 13

var backgroundOfGradient = "#000000"
startingColor[0] = "F"

startingColor[1] = "F"

startingColor[2] = "F"

endingColor[0] = "0"

endingColor[1] = "0"

endingColor[2] = "0"


var gap = 7

if (!document.all) location.replace(locationAfterPreload)

var a = 10, b = 11, c = 12, d = 13, e = 14, f=15, i, j, ones = new Array(), sixteens = new Array(), diff = new Array();

var convert = new Array("0","1","2","3","4","5","6",
"7","8","9","a","b","c","d","e","f"), imgLen = yourImages.length;

var loaded = new Array(), preImages = new Array(), currCount = 0, pending = 0, h = 0, hilite = new Array(), cover = new Array();

var num = Math.floor(preloadbarWidth/gap);

for (i = 0; i < 3; i++) {

startingColor[i] = startingColor[i].toLowerCase();

endingColor[i] = endingColor[i].toLowerCase();

startingColor[i] = eval(startingColor[i]);

endingColor[i] = eval(endingColor[i]);

diff[i] = (endingColor[i]-startingColor[i])/num;

ones[i] = Math.floor(diff[i]);

sixteens[i] = Math.round((diff[i] - ones[i])*15);

}

endingColor[0] = 0;

endingColor[1] = 0;

endingColor[2] = 0;

i = 0, j = 0;

while (i <= num) {

hilite[i] = "#";

while (j < 3) {

hilite[i] += convert[startingColor[j]];

hilite[i] += convert[endingColor[j]];

startingColor[j] += ones[j];

endingColor[j] += sixteens[j];

if (endingColor[j] > 15) {

endingColor[j] -= 15;

startingColor[j]++;

}

j++;

}

j = 0;

i++;

}

function loadImages() {

for (i = 0; i < imgLen; i++) {

preImages[i] = new Image();

preImages[i].src = yourImages[i];

loaded[i] = 0;

cover[i] = Math.floor(num/imgLen)*(i+1)

}

cover[cover.length-1] += num%imgLen

checkLoad();

}

function checkLoad() {

if (pending) { changeto(); return }

if (currCount == imgLen) { location.replace(locationAfterPreload); return }

for (i = 0; i < imgLen; i++) {

if (!loaded[i] && preImages[i].complete) {

loaded[i] = 1; pending++; currCount++;

checkLoad();

return;

}

}

setTimeout("checkLoad()",10);

}

function changeto() {

if (h+1 > cover[currCount-1]) {

var percent = Math.round(100/imgLen)*currCount;

if (percent > 100) while (percent != 100) percent--;

if (currCount == imgLen && percent < 100) percent = 100;

defaultStatus = "Loaded " + currCount + " out of " + imgLen + " images [" + percent + "%].";

pending--;

checkLoad();

return;

}

eval("document.all.cell" + (h+1) + ".style.backgroundColor = hilite[h]");;

h++;

setTimeout("changeto()",1);

}

defaultStatus = "Loaded 0 out of " + imgLen + " images [0%]."

// end hiding -->

</script>

<b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Страничка загружается,пожалуйста подождите...
</font></b>

<script language=JavaScript1.2>

<!-- beging hiding

document.write ('<table border="0" cellpadding="0" cellspacing="0" width="' + preloadbarWidth + '"><tr height="' + preloadbarHeight + '" bgcolor="' + backgroundOfGradient + '">');

for (i = 0; i < num; i++) {

document.write ('<td width="' + gap + '" id="cell' + (i+1) + '"></td>');

}

document.write('</tr></table>');

document.write ('<font><p><small><a href="javascript:location.replace(locationAfterPreload)">Пропустить</a></small></p></font>')

loadImages();

// end hiding -->

</script>
</body>
</html>

   
 
 автор: AlexSol   (04.09.2006 в 10:11)   письмо автору
 
   для: schalom   (04.09.2006 в 06:09)
 

возможно поможет http://softtime.ru/forum/read.php?id_forum=4&id_theme=15090&page=1

совет: используйте тег [cоde][/cоde], а большие файлы кладите в аттач.

   
 
 автор: schalom   (04.09.2006 в 17:48)   письмо автору
 
   для: AlexSol   (04.09.2006 в 10:11)
 

Спасибо за совет, но как сделать, что бы ToolBar с надписями были в центре страницы по гориз. и верт.
В этом коде нужно добавить что то...


<b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Страничка загружается,пожалуйста подождите...
</font></b>

<br>
<script language=JavaScript1.2>

<!-- beging hiding

document.write ('<table border="0" cellpadding="0" cellspacing="0" width="' + preloadbarWidth + '"><tr height="' + preloadbarHeight + '" bgcolor="' + backgroundOfGradient + '">');

for (i = 0; i < num; i++) {

document.write ('<td width="' + gap + '" id="cell' + (i+1) + '"></td>');

}

document.write('</tr></table>');

document.write ('<font><p><small><a href="javascript:location.replace(locationAfterPreload)">Пропустить</a></small></p></font>')


loadImages();
// end hiding -->
</script>

   
Rambler's Top100
вверх

Rambler's Top100 Яндекс.Метрика Яндекс цитирования