Hi,
I have a php web page which lets users to select choices from combo
box and submit the page to update the item description. However, when
I have many items on the same page, the row position reset to the
beginning of the page. So this makes trouble to the users that he has
to find again the product item row position to see the item
desctiption.
Could anyone tell me how to automatically roll the web page to the
vertical positon which is same as previous page?
Thanks! 6 2348
"terry" <le*******@yahoo.com> wrote in message
news:99*************************@posting.google.co m... Hi,
I have a php web page which lets users to select choices from combo box and submit the page to update the item description. However, when I have many items on the same page, the row position reset to the beginning of the page. So this makes trouble to the users that he has to find again the product item row position to see the item desctiption.
Could anyone tell me how to automatically roll the web page to the vertical positon which is same as previous page?
Thanks!
Use anchors (i.e. "<a name='item14'></a>"). This has nothing to do with PHP,
since PHP is server-side.
kingofkolt wrote: "terry" <le*******@yahoo.com> wrote in message news:99*************************@posting.google.co m...
Hi,
I have a php web page which lets users to select choices from combo box and submit the page to update the item description. However, when I have many items on the same page, the row position reset to the beginning of the page. So this makes trouble to the users that he has to find again the product item row position to see the item desctiption.
Could anyone tell me how to automatically roll the web page to the vertical positon which is same as previous page?
Thanks!
Use anchors (i.e. "<a name='item14'></a>"). This has nothing to do with PHP, since PHP is server-side.
Dont use A tags. Use IDs. Its better and you can use them not only on A
tags. For instance, use DIVs (much better for design if you use CSS):
<div id="entry12">
<a href="index.php?mode=edit_entry&entry=12">Edit entry</a>
</div>
And you go as www.mysite.com/index.php?mode=view#entry12
> <div id="entry12"> <a href="index.php?mode=edit_entry&entry=12">Edit entry</a> </div>
And you go as www.mysite.com/index.php?mode=view#entry12
Your method is OK.
But if the link is clicked by a form button,
for example, I have tried the following
:
:
print("<form action=\"".$_SERVER["PHP_SELF"]."#'".str_replace("
","_",$name)."'\" method=get>");
:
:
but cannot succeed.
Could u teach me more?
"terry" <le*******@yahoo.com> wrote in message
news:99*************************@posting.google.co m... <div id="entry12"> <a href="index.php?mode=edit_entry&entry=12">Edit entry</a> </div>
And you go as www.mysite.com/index.php?mode=view#entry12
Your method is OK.
But if the link is clicked by a form button,
for example, I have tried the following
: : print("<form action=\"".$_SERVER["PHP_SELF"]."#'".str_replace(" ","_",$name)."'\" method=get>"); : :
but cannot succeed.
Could u teach me more?
You cannot use anchors when posting from the client to the server. They are
only effective on the client when included in URLs. It is possible to
generate a URL from the server (i.e. from within PHP) which will set the
cursor at a particular point when the HTML document is rendered. I know
because I have done it.
--
Tony Marston http://www.tonymarston.net
terry wrote: Could anyone tell me how to automatically roll the web page to the vertical positon which is same as previous page?
Impossible: there's no way to tell what position the
previous page was in.
By naming elements you can tell which form was submitted,
and which submit button if any was used -- if in fact your
form was used. You can then issue a redirection that
includes a fragment identifier which points to a particular
place.
--
Jock
Ilija Studen wrote: kingofkolt wrote:
Use anchors (i.e. "<a name='item14'></a>").
Dont use A tags. Use IDs. Its better
In theory, Yes; in practice, maybe not yet. At least not if
you want to support '[s]ome older user agents [which] don't
support anchors created with the id attribute' (HTML4.01
sec. 12.2.3). That's probably not too significant now, but
still worth bearing in mind.
and you can use them not only on A tags.
A good point, and one of the reasons why id is more logical
than name for destination anchors.
[ ... ]
--
Jock This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: tradmusic.com |
last post by:
Hi,
I'm new to CSS and, following some advice, created my page like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>...
|
by: pamelafluente |
last post by:
Hi ,
I have a DIV element in a page with a lot of other stuff (the page can
scroll several times) absolutely positioned:
<div id="MyDIV" <br<brFooter </div>
Just after the page load, I...
|
by: Brian Sabolik |
last post by:
I am trying to set the width of the content page in a master - content site.
If I set it to pixels it works fine, if I set it to a percentage, the
content page automatically grows much larger than...
|
by: Greg |
last post by:
Most suggestions on this topic recommend to use a page footer and make
it visible only on the last page. My problem is that the footer is half
of the height of a page which means the detail would...
|
by: Markus Ernst |
last post by:
Hello
This is a test example:
http://www.markusernst.ch/anthracite/
http://www.markusernst.ch/anthracite/living_divani.html
After googling and experimenting for several hours, I ended up...
|
by: DJG79 |
last post by:
Hi all,
I am using an open source menu that i found and it works great, except
for one thing that when the web page is not scrolled to the very top
the drop down links will not stay visible. Has...
|
by: slartybartfast |
last post by:
I'm new(ish) to css, comfortable using tables, but trying real hard to move away.
Please see http://84.9.125.31/developer/css_test/test5.html
NB This issue is with IE & Opera - I've tried IE...
|
by: rsteph |
last post by:
I've got some product information pages, with images and text, all setup within a table. I'm trying to add a small image in the upper right hand corner of the content div (where all the important...
|
by: maya |
last post by:
hi,
how do I get text to vertical-align inside a div?
http://www.mayacove.com/misc/home.html
vertical-align should work, according to this:...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |