Re: [PHP] scrolling data from db

2002-11-20 Thread Support @ Fourthrealm.com
Eddie,
I use the attached on a site of mine... works with JavaScript and DIV tags.

There are 2 parts to the file - the javascript, and then the HTML code to 
make it happen.  Tweak according to your needs.

Peter


At 11:00 AM 11/20/2002 -0500, you wrote:
I have a large amount of data to present to the user.  Currently, I am just
putting it in a table and displaying it on the page, if it is more than a
page of course the page just scrolls.  Is there a way o, without using
frames, to put all the data from the db in the middle of the page with a
scroll bar on the side that just scrolls the data, I mean the header and
footer of the php page do not move?  I am sure I will need javascript for
this...right?

Thanks,
Eddie


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -

!-- TWO STEPS TO INSTALL LAYER SCROLLER:

  1.  Insert the first code in a new file, save as popup.html
  2.  Add the opening code to the BODY of your main HTML document  --

!-- STEP ONE: Insert the first code in a new file, save as popup.html  --

HTML
HEAD

SCRIPT LANGUAGE=JavaScript
!-- Begin

//verScroll('up','1','true')

function verScroll(dir, spd, loop) {
loop = true;
direction = up;
speed = 10;
scrolltimer = null;
if (document.layers) {
var page = eval(document.contentLayer);
}
else {
if (document.getElementById) {
var page= eval(document.getElementById('contentLayer').style);
}
else {
if (document.all) {
var page = eval(document.all.contentLayer.style);
  }
   }
}
direction = dir;
speed = parseInt(spd);
var y_pos = parseInt(page.top);
if (loop == true) {
if (direction == dn) {
page.top = (y_pos - (speed));
} else {
if (direction == up  y_pos  10) {
page.top = (y_pos + (speed));
} else {
if (direction == top) {
page.top = 10;
  }
   }
}
scrolltimer = setTimeout(verScroll(direction,speed), 1);
   }
}
function stopScroll() {
loop = false;
clearTimeout(scrolltimer);
}
//  End --
/script
/head
body
div id=contentLayer style=position:absolute; width:300px; z-index:1; left: 39px; 
top: 51px 


insert your text here !!



/div
div id=scrollmenu style=position:absolute;width:200px;height:30px;z-index:1; 
left:400px; top: 40px
table border=1trtd
table
tr
td align=leftUp/td
td /td
td align=rightDown/td
/tr
tr
td colspan=3
a href=# onMouseOver=verScroll('up','25','true') 
onMouseOut=stopScroll()/a 
a href=# onMouseOver=verScroll('up','5','true') onMouseOut=stopScroll()/a 
a href=# onMouseOver=verScroll('up','1','true') onMouseOut=stopScroll()/a |
a href=# onMouseOver=verScroll('dn','1','true') onMouseOut=stopScroll()/a 
a href=# onMouseOver=verScroll('dn','5','true') onMouseOut=stopScroll()/a 
a href=# onMouseOver=verScroll('dn','25','true') onMouseOut=stopScroll()/a
/td
/tr
/table
/td/tr/table
/div
/body
/html







!-- STEP TWO: Add the opening code to the BODY of your main HTML document  --

BODY

center
form name=scrollwindow
input type=button value=Open Scroll Window 
onClick=window.open('popup.html','scrollwindow','top=100,left=100,width=575,height=400');
/form
/center

pcenter
font face=arial, helvetica SIZE=-2Free JavaScripts providedbr
by a href=http://javascriptsource.com;The JavaScript Source/a/font
/centerp

!-- Script Size:  7.99 KB --

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] scrolling data from db

2002-11-20 Thread @ Edwin
Hello,

Edward Peloke [EMAIL PROTECTED] wrote:

 I have a large amount of data to present to the user.  Currently, I am
just
 putting it in a table and displaying it on the page, if it is more than a
 page of course the page just scrolls.  Is there a way o, without using
 frames, to put all the data from the db in the middle of the page with a
 scroll bar on the side that just scrolls the data, I mean the header and
 footer of the php page do not move?  I am sure I will need javascript for
 this...right?

Not really...

Of course, you can use javascript. (I think somebody just posted--er, kindly
posted--a sample code...)

You can also use CSS to make the header, etc. be fixed on different
location of your browser window. However, this approach works only on
browsers that support that css. (e.g. Mozilla-based browsers like N7, etc.
or Opera 6...)

How about another approach using iframes? (Personally, I don't like frames
or iframes...) It might work for you.

But then again, the best way IMHO, is to divide your table into different
sections or pages. Do you really need to keep them in one page?

Just some ideas...

- E

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] scrolling data from db

2002-11-20 Thread Support @ Fourthrealm.com
Hi Eddie,
iFrames do offer a really nice solution, but they are an IE only 
tag.  Although I can't vouch for the latest Netscape, I know that the older 
versions simply ignore the iFRAME... tag, and leave a blank spot in its 
place.

If you know that your client base will ever only use IE, then go for 
it.  Otherwise, you'll have to avoid the iframe.


Peter

At 03:17 PM 11/20/2002 -0500, Edward Peloke wrote:
Thanks Peter!

I will take a look.  As I am new to javascript, why would someone use
javascript when iframes are easier?  Will I be able to use the javascript on
more browsers?  Are the iframes limited?

Thanks,
Eddie

-Original Message-
From: Support @ Fourthrealm.com [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 20, 2002 11:23 AM
To: Edward Peloke; [EMAIL PROTECTED]
Subject: Re: [PHP] scrolling data from db


Eddie,
I use the attached on a site of mine... works with JavaScript and DIV
tags.

There are 2 parts to the file - the javascript, and then the HTML code to
make it happen.  Tweak according to your needs.

Peter


At 11:00 AM 11/20/2002 -0500, you wrote:
I have a large amount of data to present to the user.  Currently, I am just
putting it in a table and displaying it on the page, if it is more than a
page of course the page just scrolls.  Is there a way o, without using
frames, to put all the data from the db in the middle of the page with a
scroll bar on the side that just scrolls the data, I mean the header and
footer of the php page do not move?  I am sure I will need javascript for
this...right?

Thanks,
Eddie


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -


- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] scrolling data from db

2002-11-20 Thread Justin French
Hi,

on 21/11/02 3:00 AM, Edward Peloke ([EMAIL PROTECTED]) wrote:

 I have a large amount of data to present to the user.  Currently, I am just
 putting it in a table and displaying it on the page, if it is more than a
 page of course the page just scrolls.  Is there a way o, without using
 frames, to put all the data from the db in the middle of the page with a
 scroll bar on the side that just scrolls the data, I mean the header and
 footer of the php page do not move?  I am sure I will need javascript for
 this...right?

This is certainly not PHP... a combination of javascript + css + a whole lot
of testing on browsers + an understanding that it will break some browsers
might do it.  iframes will do it, frames will too.


Justin French

http://Indent.com.au
Web Developent  
Graphic Design



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] scrolling data from db

2002-11-20 Thread Justin French
on 21/11/02 7:56 AM, Support @ Fourthrealm.com ([EMAIL PROTECTED])
wrote:

 Hi Eddie,
 iFrames do offer a really nice solution, but they are an IE only
 tag.  

they are part of the HTML spec... so, conforming browsers (NN6, NN7, Opera I
think, etc) all have iframe support.  The real problem is NN  6 (of which
there are still plenty out there) and the lesser know and non-visual
browsers.

 Although I can't vouch for the latest Netscape, I know that the older
 versions simply ignore the iFRAME... tag, and leave a blank spot in its
 place.
 
 If you know that your client base will ever only use IE, then go for
 it.  Otherwise, you'll have to avoid the iframe.

That sounds a little harsh!

You can put a message in place of the iframe, for those who don't support
it.

iframe src= blah blah
Sorry, your browser does not support iframes, to view the content of this
frame, a href=click here/a.
/iframe

Or better still, you can actually PUT SOME CONTENT IN THERE.

I have an iframe which lists multiple tour dates for a band, sorted in date
order... if the iframe can be used, the user gets ALL upcomming gigs ina
scroller, otherwise they just get the next 3 (using approximately the same
amount of space), with a link to view all gigs.


iframes CAN work in many cases, if you think about it.


Justin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] scrolling data from db

2002-11-20 Thread Support @ Fourthrealm.com
Justin,
Creative thinking to a smart solution.  I will keep that in mind for future 
sites.

Peter

At 10:35 AM 11/21/2002 +1100, Justin French wrote:
 If you know that your client base will ever only use IE, then go for
 it.  Otherwise, you'll have to avoid the iframe.

That sounds a little harsh!

You can put a message in place of the iframe, for those who don't support
it.

iframe src= blah blah
Sorry, your browser does not support iframes, to view the content of this
frame, a href=click here/a.
/iframe

Or better still, you can actually PUT SOME CONTENT IN THERE.

I have an iframe which lists multiple tour dates for a band, sorted in date
order... if the iframe can be used, the user gets ALL upcomming gigs ina
scroller, otherwise they just get the next 3 (using approximately the same
amount of space), with a link to view all gigs.


iframes CAN work in many cases, if you think about it.


- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php