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?

<body onLoad="mScroll()">
<?php echo "<p> Ykoordinat: " . $yKoord . "<p>";
echo "Teller: " . $teller;
?>
<a href="#form<?php echo $teller; ?>" target="_self"> Last position </a>
<!-- *****New line**** -->
<?php
for($i=0; $i<150; $i++) {
 echo '<br>';
}
for($teller=0; $teller<2; $teller++) {
?>
 <a name="form<?php echo $teller; ?>"></a>
<!-- *****New line**** -->
 <form action="test3.php" name="form<?php echo $teller; ?>" onsubmit="return
hentKoordinat()">
  <input type="hidden" name="teller" value="<?php echo $teller; ?>">
  <input type="hidden" name="yKoord">
  <input name="button1" type="submit" value="Send input">
 </form>
 <?php $teller++; ?>
<?php
} //for($teller=0; $i<2; $i++) {
?>
</body>


"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

Reply via email to