|
|
|
Junior Member
      
участник
Last Login: 23.06.2006 10:46
Сообщ.: 24,
Visits: 227
|
|
От фреймов отказываюсь сразу
Но данные должны подгружаться с помощью аякса. и вскоре их становится больше чем может вместить страница без прокрутки. а кроме данных пользователь должен ещё всё время видеть меню сбоку и форму (лучше внизу окна).
поэтому останавилась на конструкции :
<table width="100%" height="100%">
<tr>
<td valign="top">
<div style="height: 100%; overflow: auto;">
<span name="data"></span>
<span name="bottom"></span>
</div>
</td>
<td rowspan="2">
<?php echo $menu//тут меню ?>
</td>
</tr>
<tr><td height="50">
<?php echo $forma//тут форма ?>
</td>
</tr>
</table>
т.е. у меня для вывода этих нарастающих данных абзац фиксированной высоты с автоматическим скроллером
далее когда я получаю от сервера данные, то в жаваскрипте пишу:
var txt = http_request.responseText;
var data = document.getElementById("data");
data.innerHTML += txt;
var bottom = document.getElementById("bottom");
bottom.scrollIntoView(true);
всё это срабатывает в IE но в опере мой абзац не двигается с места...
подскажите, как договориться с оперой???
|
|
|
|
|
Supreme Being
      
участник
Last Login: 30.12.2008 19:59
Сообщ.: 270,
Visits: 2 383
|
|
<html> <head> <title> </title> <script> var myInt; function myScrollUp(){ document.getElementById('mdiv').scrollTop+=3 } function myScrollDown(){ document.getElementById('mdiv').scrollTop-=3 } </script> </head> <body> <div id="mdiv" style="overflow: scroll;width:170;height:80;"> To set up a web application, you must configure your system, define a Dreamweaver site, and connect to a database. This section provides checklists for each task. The procedures are described in the rest of the chapter. Configure your system: Make sure you have a web server. Install the Microsoft .NET Framework. Create a root folder. Define a Dreamweaver site: Copy the sample files to a folder on your hard disk. Define the folder as a Dreamweaver local folder. Define a web server folder as a Dreamweaver remote folder. Specify a folder to process dynamic pages. Upload the sample files to the web server. Connect to the database (local configuration): Create the connection in Dreamweaver. Connect to the database (remote server configuration): Copy the database to the remote computer and create the connection in Dreamweaver. </div> <table><tr><td style="cursor:hand;" onmouseover="myInt=setInterval('myScrollUp()',100);" onmouseout="clearInterval(myInt)">down</td><td style="cursor:hand;" onmouseover="myInt=setInterval('myScrollDown()',100);" onmouseout="clearInterval(myInt)">up</td></tr></table> </body> </html> Вот тебе пример див со скроллингом. Тебе остаёться его изменить под свои нужды.
----------------------------------
Я безработный...
Возьмите меня на работу. =)
|
|
|
|
|
Junior Member
      
участник
Last Login: 23.06.2006 10:46
Сообщ.: 24,
Visits: 227
|
|
Vizlim, большое человеческое ПАСИБ.
в моём случае всё решилось просто:
data.innerHTML += txt;// когда добавлены данные
getElementById('mdiv').crollTop+=999;// это что бы наверняка до самого низа докрутился абзац.
и опера и IE послушно выполняют.
|
|
|
|