how is submit button appearance changed?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Richard B.

    how is submit button appearance changed?

    Hi,

    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.

    Richard


  • Marko

    #2
    Re: how is submit button appearance changed?

    Richard B. wrote:
    [color=blue]
    > Hi,
    >
    > 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.
    >
    > Richard
    >
    >[/color]

    Hi Richard,

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

    <a href="javascrip t:document.subm it()" style="text-decoration:none ">
    My link
    </a>

    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";

    Comment

    • Geoff Berrow

      #3
      Re: how is submit button appearance changed?

      I noticed that Message-ID: <kcvPc.75921$SO 5.14241@twister .socal.rr.com>
      from Richard B. contained the following:
      [color=blue]
      >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.[/color]

      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 http://www.ckdog.co.uk/rfdmaker/

      Comment

      Working...