Re: [PHP] Get variable from PHP before submit

2003-03-01 Thread Chris Hayes
I am putting my gamma-epsilon-psycho telepathy beamer to the maximum but 
there are too many coders inbetween us, i cannot receive you.

Please give a little hint on what these functions are and what value comes 
from where and goes where.

At 04:00 1-3-2003, you wrote:
I'm trying to implement the following functionality into the file test.php:

When I scroll down the page and then hit a button, the page should remember
the scrolled position, refresh the page and then scroll down to the
remembered position. I've almost managed to make this work, but only almost.
The first time I click one of the buttons, the page won't scroll, but after
that it works fine. I think the reason for this is that the function
hentKoordinat() gets called before $teller is set. hentKoordinat() uses
$teller.
Anyone know a way to make this work?

Thanks alot!

Lars

File test.php:

http://www.w3.org/TR/html4/loose.dtd";>

Ykoordinat: " . $yKoord . "

"; echo "Teller: " . $teller; for($i=0; $i<150; $i++) { echo '
'; } for($teller=0; $teller<2; $teller++) { ?>  

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


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


RE: [PHP] Get variable from PHP before submit

2003-03-01 Thread Rich Gray
> I'm trying to implement the following functionality into the file 
> test.php:
> 
> When I scroll down the page and then hit a button, the page 
> should remember
> the scrolled position, refresh the page and then scroll down to the
> remembered position. I've almost managed to make this work, but 
> only almost.
> 
> The first time I click one of the buttons, the page won't scroll, 
> but after
> that it works fine. I think the reason for this is that the function
> hentKoordinat() gets called before $teller is set. hentKoordinat() uses
> $teller.
> 
> Anyone know a way to make this work?
> 
> Thanks alot!
> 
> Lars

I've probably misunderstood but can you not use an HTML anchor...?
Rich


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



Re: [PHP] Get variable from PHP before submit

2003-03-02 Thread Lars Espelid
I could use anchor's like shown underneath, but then the user will have to
click the link "Last position" each time a button is submitted. I would like
the page to scroll down automatically. Is that possible, to have the link
executed without clicking help from the user?


 Ykoordinat: " . $yKoord . "";
echo "Teller: " . $teller;
?>
 Last position 

';
}
for($teller=0; $teller<2; $teller++) {
?>
 

 
  
  
  
 
 




"Rich Gray" <[EMAIL PROTECTED]> skrev i melding
news:[EMAIL PROTECTED]
> > I'm trying to implement the following functionality into the file
> > test.php:
> >
> > When I scroll down the page and then hit a button, the page
> > should remember
> > the scrolled position, refresh the page and then scroll down to the
> > remembered position. I've almost managed to make this work, but
> > only almost.
> >
> > The first time I click one of the buttons, the page won't scroll,
> > but after
> > that it works fine. I think the reason for this is that the function
> > hentKoordinat() gets called before $teller is set. hentKoordinat() uses
> > $teller.
> >
> > Anyone know a way to make this work?
> >
> > Thanks alot!
> >
> > Lars
>
> I've probably misunderstood but can you not use an HTML anchor...?
> Rich
>



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



Re: [PHP] Get variable from PHP before submit

2003-03-02 Thread Lars Espelid
Hope this will help your gamma-epsilon-psycho telepathy beamer :-)

 When someone hits a button in one of the form-schemas the following
happens:
1) hentKoordinat() is executed. The form-schemas hidden field named yKoord
gets the value: the amunt of pixels scrolled in y-direction.
2)the page is refreshed and $teller is set to a number whisch says which
form is submitted and $yKoord is set to "the amunt of pixels scrolled in
y-direction".
3)onload in body calls the function mScroll which scrolls the page to where
it was when someone clicked the button.

Tried to explain the code:

http://www.w3.org/TR/html4/loose.dtd";>


Untitled Document






 Ykoordinat: " . $yKoord . "";
echo "Teller: " . $teller;

for($i=0; $i<150; $i++) {
//prints 150 line breaks so that the page gets scrollable (the content does
not fit the monitor-area)
 echo '';
}
for($teller=0; $teller<2; $teller++) {
//prints two form-schemas. Later on I will print a varying amount of
form-schemas (depends on the amunt of
//data in a MySQL-table)
//The form name includes $teller so that each form-schema gets a unike name
and I know which
//$yKoord to update in hentKoordinat(). $teller and $yKoord is passed on as
variables when the page refreshes,
//so that I know which form's button1 is submitted and how many pixels there
are to scroll when onload="mScroll()"
// in body is called (uses $yKoord).
?>
 
  
  
  
 
 





"Chris Hayes" <[EMAIL PROTECTED]> skrev i melding
news:[EMAIL PROTECTED]
> I am putting my gamma-epsilon-psycho telepathy beamer to the maximum but
> there are too many coders inbetween us, i cannot receive you.
>
> Please give a little hint on what these functions are and what value comes
> from where and goes where.
>
> At 04:00 1-3-2003, you wrote:
> >I'm trying to implement the following functionality into the file
test.php:
> >
> >When I scroll down the page and then hit a button, the page should
remember
> >the scrolled position, refresh the page and then scroll down to the
> >remembered position. I've almost managed to make this work, but only
almost.
> >
> >The first time I click one of the buttons, the page won't scroll, but
after
> >that it works fine. I think the reason for this is that the function
> >hentKoordinat() gets called before $teller is set. hentKoordinat() uses
> >$teller.
> >
> >Anyone know a way to make this work?
> >
> >Thanks alot!
> >
> >Lars
> >
> >
> >File test.php:
> >
> > >"http://www.w3.org/TR/html4/loose.dtd";>
> > >
> >Ykoordinat: " . $yKoord . "
> >
> >"; echo "Teller: " . $teller; for($i=0; $i<150; $i++) { echo '
> >'; } for($teller=0; $teller<2; $teller++) { ?> 
 >//for($teller=0; $i<2; $i++) { ?>
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>



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