making use POST method?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Is there a way to get <a> links not to pass their args in the url? In
other words, get them to behave like method=post?  

I would like to have the ability to change the link color that comes
"for free" with :hover, but still not have a messy url with arguments
hanging off the back.  I could kludge it using an image map and
javascript, but I'm trying hard to avoid using any javascript since
many people don't like it and leave it turned off.  

TIA for any help.

Puzzled wrote:

Quoted text here. Click to load it

Not in HTML. There are inherently unreliable methods for achieving such
a confusion using client-side scripting.

Quoted text here. Click to load it

You misspelled "may come".

Quoted text here. Click to load it

Then don't use a link but a form. It would be a simple form, with just a
single submit button and some number of hidden fields inside it.

Some people might suggest styling the button so that it looks like a
link, and sometimes this might even be reasonable, if the submission is,
in fact, a pure query implemented that way just for technical reasons.
However, it's probably not possible to make it look like a link in all
respects, due to the idiosyncrasies of form field rendering that cannot
be affected using CSS on current browsers. The following gets you
relatively close, though, especially if you replace the background value
and the font-family value by values matching the parent element's
properties. (IE does not support the value inherit.)

For <input type="submit" class="submit" value="foobar"> you might use
CSS code like

.submit { border: none;
           cursor: pointer;
           padding: 0;
           margin: 0;
           height: 1.3em;
           font-size: 100%;
           font-family: inherit;
           color: #00c;
           background: white;
           text-decoration: underline; }
.submit:hover { color: red;
                 background: white; }

(That's just a raw idea; c.i.w.a.stylesheets might give you much better

 > I could kludge it using an image map and
Quoted text here. Click to load it

JavaScript is fine when you don't need to rely on it and some nice
extras can be achieved using it. Here, as so often, neither premise
would be fulfilled.

Quoted text here. Click to load it

If you are going to have args, you have to pass them somewhere.  If
you don't want to pass them in the url, you'll need to store them on
the server.  If you store them on the server you need to pass the
server a clue as to which set of args apply to the request.  That
means you need to pass at least one arg in the url; if you absolutely
cannot pass it in the url, you can encode it in the name of the file
being fetched from the server.  That means you either write a temp
file containing the args and link to that temp file, or use a virtual
file with a file-not-found exit that can fetch up the args.

Quoted text here. Click to load it

I haven't used :hover so can't help you with this one.  Minimizing the
number and messiness of url arguments is search-engine friendly at
this point in the game, later in the evolution of search-engines it
may not matter at all or it may become hyper-critical, there's no way
to know for sure without being deep into search engine development.
However, regardless of search engines, the more your communication
protocol (what args you use, what they mean, etc) is kept entirely on
the server, the fewer cracks the hacker has with which to pry into

Quoted text here. Click to load it

I absolutely refuse to use any client-side scripting or cookies,
because people can (and do) turn them off.  I don't like other people
running their code and storing their data on my machine, and I don't
like my server being dependent on their settings for its proper

Principle always has an associated cost.  Providing decent
functionality without relying on client-side scripting or client-side
data storage is significantly more difficult than slopping in some
javascript.  There is also a processor cost on the server side.  Some
think it is worth the work (developer and processor) but most take the
easy route.  Many who choose the easy route later find that they
haven't.  Javascript is widely believed to be system-independent, but
in the past I have worked in corporate environments where different
javascript tweaking was needed based on where the code turned out to
be running; perhaps more recent js releases are closer to
system-independent, I have not bothered to stay current on languages
that I prefer to avoid anyway.

Quoted text here. Click to load it

I don't want to give you the wrong impression.  There are things that
can be done server-side that will make your website(s) stronger and
more reliable, but they are not without a cost.  I have chosen that
route, I have learned many of the costs.  If you get deep enough into
doing things server-side, you could eventually end up like me parsing
html code and twiddling links and suchlike on the fly before it's
delivered to the browser.  There are benefits and costs.  You could be
well advised to choose the easy path.  There be dragons here.

Although your question is an html-authoring question, the answer is
pushing strongly into the off-topic area.  You might try one of the
PHP or other programming-language newsgroups if you feel the need to
stay on-topic.  See below.


Site Timeline