Показать сообщение отдельно

  #983  
Старый 03.12.2008, 17:08
botc
Новичок
Регистрация: 03.12.2008
Сообщений: 3
Провел на форуме:
7152

Репутация: 0
По умолчанию

Есть вопрос Как поменять код скрипта чтобы при обновлении этой странички браузером нажимая на следующая(функция next()) мы попадали на след. странички(ифреймы), а не начинали просмотр сначала?
Код:
<html>
<head>
<title>WOweb.ru - Scripts - JavaScript - Каталог фотографий</title>
<META http-equiv="Content-Type" content="text/html; charset=windows-1251">
 
 
<!-- HEAD START HERE -->
 
<LINK href="style.css" rel=STYLESHEET type=text/css>
 
<SCRIPT language=JavaScript type=text/javascript>
var i=1
var s='<iframe id="innerframe" src="external.htm" width="250px" height="250px" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" style="position: absolute; overflow: visible; left: 300px; top: 300px;"></iframe>'
var j='<iframe id="innerfram" src="external2.htm" width="150px" height="150px" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" style="position: absolute; overflow: visible; left: 500px; top: 500px; display:"></iframe>'
 
 
 
document.write(s)
 
 
document.write(j)
 
function next(){
i++
if (i==9) i=8
s="f"+i+".htm"
j="h"+i+".htm"
document.all.innerframe.src=s
document.all.innerfram.src=j
}
function prev(){
i--
if (i==0) i=1
s="f"+i+".htm"
j="h"+i+".htm"
document.all.innerframe.src=s
document.all.innerfram.src=j
}
function GotoNomber(nomber){
i=nomber
s="f"+nomber+".htm"
j="h"+nomber+".htm"
document.all.innerframe.src=s
document.all.innerfram.src=j
}
function nombersShow(){
document.all.raw.style.display="" 
document.all.raw.style.visibility="visible" 
document.all.nombers.href="javascript:nombersHide()"
}
 
function nombersHide(){
document.all.raw.style.display="none" 
document.all.raw.style.visibility="hidden" 
document.all.nombers.href="javascript:nombersShow()"
}
</SCRIPT>
 
<!-- HEAD END HERE -->
 
 
 
 
</head>
<body bgcolor="#EDEDED" text="#000000" link="#000000" topmargin="0" leftmargin="0">
<center>
 
<!-- BODY START HERE -->
 
<TABLE align=center border=1 borderColor=#000000 cellPadding=0 cellSpacing=0 height=400 width="88%">
 
<TR><TD class=headcolor height=20>&nbsp;&nbsp;&nbsp;&nbsp;Каталог фотографий</TD>
    <TD align=middle class=headcolor width=260>&nbsp;&nbsp; 
    <A href="javascript:prev()">&lt;&lt;Предыдущая</A>&nbsp;&nbsp;
    <A href="javascript:nombersShow()" id=nombers title="Переход по номеру"><B>&lt;№&gt;</B></A>&nbsp;&nbsp;
    <A href="javascript:next()">Следующая&gt;&gt;</A>&nbsp;&nbsp;
</TD></TR>
 
<TR id=raw style="DISPLAY: none; VISIBILITY: hidden"><TD align=right class=headcolor colSpan=2 height=1>
<A href="javascript:GotoNomber(1)">1</A>
<A href="javascript:GotoNomber(2)">2</A> 
<A href="javascript:GotoNomber(3)">3</A>
<A href="javascript:GotoNomber(4)">4</A>
<A href="javascript:GotoNomber(5)">5</A>
<A href="javascript:GotoNomber(6)">6</A>
<A href="javascript:GotoNomber(7)">7</A>
<A href="javascript:GotoNomber(8)">8</A>
 
&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR>
<div id=s></div>
<TR><TD align=middle class=bodycolor colSpan=2>
</TD></TR></TBODY></TABLE>
 
 
 
<!-- BODY END HERE -->
 
 
</center>
</body>
</html>
Наглядно: http://katcya.narod.ru/iframe/index.html
 
Ответить с цитированием