Re: :target which is not jumped to



In article <hbf.20090224hd0d@xxxxxxxxxxxxx>,
Hallvard B Furuseth <h.b.furuseth@xxxxxxxxxxx> wrote:

dorayme <doraymeRidThis@xxxxxxxxxxxxxxx> writes:
Hallvard B Furuseth <h.b.furuseth@xxxxxxxxxxx> wrote:
I've just discovered the :target trick to make a javascript-less
collapsable list, but I don't want the browser window to move when
the user clicks on a list item.

<style type=text/css> div:not(:target) > .hide { display:none } </style>
<div id=foo><a href=#foo>foo</a> <span class=hide>bla bla</span></div>
<div id=bar><a href=#bar>bar</a> <span class=hide>bla bla</span></div>
...

How about this sort of thing:

<http://dorayme.netweaver.com.au/one_two_three/one.php>

Multiple pages don't scale well. Lots of almost-equal pages with
just a few lines of difference (the item being "unhidden").

Oh well, I guess a little JavaScript isn't the end of the world..

Perhaps you are not noticing - because I have been badly remiss in not
explaining - that these pages are being delivered with server side
scripting. This means in this case that all the pages are in fact "the
same", "template-like". Except for one small identifying feature (which
can be dispensed with, ask at a PHP ng).

All the pages above are the same and read:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd";>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Title</title>
<style type="text/css">
span {display:none;}
div#currentpage span {display: inline; visibility: visible;}
div#currentpage a {display: none;}
</style>
</head>
<body>
<div<?php if ($thisPage=="one")
echo " id=\"currentpage\""; ?>><a href="one.php">one</a><span>
blah blah blah</span></div>
<div<?php if ($thisPage=="two")
echo " id=\"currentpage\""; ?>><a href="two.php">two</a><span>
blah blah blah</span></div>
<div<?php if ($thisPage=="three")
echo " id=\"currentpage\""; ?>><a href="three.php">three</a><span>
blah blah blah</span></div>
</body>
</html>

except with like

<?php $thisPage="one"; ?>

thrown in above the doctype.

So, I am giving you a way to do it without JS, with server side script.

--
dorayme
.



Relevant Pages

  • Re: [Full-disclosure] phishing sites examples "source code"
    ... On 2/19/07, Juergen Fiedler wrote: ... code for the form action because it is done in some sort of server ... side scripting that can't readily be ... Can't readily be viewed BUT that part is sort of not-the-problem. ...
    (Full-Disclosure)
  • Re: suggestion for Microsoft
    ... all forms require some sort of scripting engine to be ... "installed" on the hosting web server. ...
    (microsoft.public.frontpage.client)
  • Re: Is this PHP or server?
    ... > scripting will do ALL of the data manipulation, ... regardless of what server is running the script. ... Add a sort to your listing function, this way you will keep the order the same ... you have the sortthat would fix the arrays order. ...
    (alt.php)
  • Re: Windows/Macro Language Info?
    ... Java scriptlets and servlets can also carry malware. ... other part of the HTTP server. ... PHP can deliver malware and coordinate attacks to precisely the ... server-side scripting languages are not. ...
    (comp.lang.cobol)
  • Re: asrock, problem with nic after windows-boot - Exact Opposite issue the OP is having
    ... the "power switch" on the front panel, and the O/S would cleanly terminate ... before turning off the power. ... For shell scripting, start with the Bash-Prog-Intro-HOWTO ... X really doesn't belong on a server, ...
    (comp.os.linux.networking)