leegold2 wrote:
Like so many questions this involves MYSQL and the PHP (or Perl) layer.
I'm going to have html in text fields and there's going to be what
normally would be an internal link to another place in the same
document. But in this case,
Code:
<a href="#futherdown">next title</a>
is not in the html document. When a user clicks this link I want to
query the DB and append/render the queried record on the I guess
existing (refreshed) page. What's a strategy to make a hyperlink query
via PHP?
I'm trying to make internal links work "normally" on dynamic page if you
get my drift,
You cannot make internal #furtherdown type links on an HTML page do anything
other than move up and down a page which has already been rendered in the
browser.
You need to make a link back to the server, in your case back to the same
page, passing parameters which will get that information into the page eg
foo.php?show=3#section3 - the use of the #section3 bit here is to then jump
the browser down to the appropriate section once the page has loaded.
Another way to do this is a combination of Javascript and CSS (ie DHTML).
You have have all the required content in your page but hidden, and when
they click a link it makes the section you want appear. Of course this
won't work if they have Javascript disabled, or a using a browser that does
not support JS.
An example of this in action is at
http://www.woosh.com/UserInterface/W...erSupport.aspx
Click the little down arrow links to the left of the questions and the
answer appears underneath. Click it again and it disappears.
If the above link is broken in your newsreader use this tinyurl instead
http://tinyurl.com/3qxgt
--
Chris Hope - The Electric Toolbox -
http://www.electrictoolbox.com/