how is submit button appearance changed?

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

Threaded View

Currently designing/building my first class/template driven site.

Inside a PHP form a list of article titles are displayed along with the
first two lines of the article. When the user clicks on the article title
the form with the list of article titles is replaced with the full text of
the article selected.

Since the article ID for the article title selected determines which article
will be displayed it would seems that if each title displayed (on the
article title list page) was actually a submit button. Of course I don't
want a list of gray submit boxes with titles lumbering down the page.

What I'd like to know is:

First, is it possible to assign a variable to a submit button. It seems like
it would be, but if someone has found a reason for not doing so I'd
appreciate hearing it.

Second, how do I change the image of the submit button so it appears as a
link (without the underline, of course). I've found a couple of tutorials in
regards to this issue, but they all had major typos and so far have not
gotten any of them to work. Any suggestions in this area will be of an
immense help.

Any suggestions or advice is greatly appreciated.


Re: how is submit button appearance changed?

Richard B. wrote:

Quoted text here. Click to load it

Hi Richard,

To have a link act like a submit button do the following:

<a href="javascript:document.submit()" style="text-decoration:none">
    My link

Buttons also have a variable associated with them and that is their name:

<input type="submit" name="myButton" value="Submit!">
<input type="submit" name="myButton" value="Skip">

So, in the file where you are processing the form you can use it as a
regular POST (or GET) variable:

if ($_POST["myButton"] == "Submit!")
    print "hello";
else if ($_POST["myButton"] == "Skip")
    print "skipping";

Re: how is submit button appearance changed?

from Richard B. contained the following:

Quoted text here. Click to load it

Why not make it a link, to the same page if needs be, and pass a
variable(or variables) in the URL?  You can then style it with CSS how
you want.
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs /

Site Timeline