cool submit button switching when pressed

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Greg Bryant

    cool submit button switching when pressed

    I saw it somewhere the other day, and just saw it again on the pear.php.net
    search page. When you click the "submit" button, it switches to a grayed
    out "processing " button. I glanced at the source, but I don't see anything
    special. Anyone know how this is done?

    Thanks,
    -G
  • Andy Hassall

    #2
    Re: cool submit button switching when pressed

    On Mon, 01 Dec 2003 00:39:19 GMT, Greg Bryant <bryantgHELLO@y ahoo.com> wrote:
    [color=blue]
    >I saw it somewhere the other day, and just saw it again on the pear.php.net
    >search page. When you click the "submit" button, it switches to a grayed
    >out "processing " button. I glanced at the source, but I don't see anything
    >special. Anyone know how this is done?[/color]

    JavaScript.

    --
    Andy Hassall (andy@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
    Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

    Comment

    • Alvaro G Vicario

      #3
      Re: cool submit button switching when pressed

      *** Greg Bryant wrote/escribió (Mon, 01 Dec 2003 00:39:19 GMT):[color=blue]
      > I saw it somewhere the other day, and just saw it again on the pear.php.net
      > search page. When you click the "submit" button, it switches to a grayed
      > out "processing " button. I glanced at the source, but I don't see anything
      > special. Anyone know how this is done?[/color]

      It's probably using some good old JavaScript to change the "disabled"
      attribute of the button. Check source code again and you'll find it.


      --
      --
      -- Álvaro G. Vicario - Burgos, Spain
      --

      Comment

      • Ingo

        #4
        Re: cool submit button switching when pressed


        "Greg Bryant" <bryantgHELLO@y ahoo.com> schrieb im Newsbeitrag
        news:Xns9443BDC 362B57bryantgHE LLOyahoocom@199 .45.49.11...[color=blue]
        > I saw it somewhere the other day, and just saw it again on the[/color]
        pear.php.net[color=blue]
        > search page. When you click the "submit" button, it switches to a grayed
        > out "processing " button. I glanced at the source, but I don't see[/color]
        anything[color=blue]
        > special. Anyone know how this is done?
        >
        > Thanks,
        > -G[/color]

        Try this:

        <input type="Submit" name="submit" value="Jetzt anmelden"
        OnClick="this.d isabled=true; this.form.submi t();">

        to change text add "this.value='pr ocessing';"


        Ingo (Germany)


        Comment

        • Greg Bryant

          #5
          Re: cool submit button switching when pressed

          "Ingo" <HoschiIngo@gmx .de> wrote in
          news:bqg9t0$k4r $06$1@news.t-online.com:
          [color=blue]
          >
          > "Greg Bryant" <bryantgHELLO@y ahoo.com> schrieb im Newsbeitrag
          > news:Xns9443BDC 362B57bryantgHE LLOyahoocom@199 .45.49.11...[color=green]
          >> I saw it somewhere the other day, and just saw it again on the[/color]
          > pear.php.net[color=green]
          >> search page. When you click the "submit" button, it switches to a
          >> grayed out "processing " button. I glanced at the source, but I don't
          >> see[/color]
          > anything[color=green]
          >> special. Anyone know how this is done?
          >>
          >> Thanks,
          >> -G[/color]
          >
          > Try this:
          >
          > <input type="Submit" name="submit" value="Jetzt anmelden"
          > OnClick="this.d isabled=true; this.form.submi t();">
          >
          > to change text add "this.value='pr ocessing';"
          >
          >
          > Ingo (Germany)
          >
          >
          >[/color]

          Thanks, I figured it had to be something like that, but the source for
          the page (found at http://pear.php.net/package-search.php ) only has
          <input type="submit" name="submitBut ton" value="Search" />

          Enjoy,
          -G

          Comment

          • Andy Hassall

            #6
            Re: cool submit button switching when pressed

            On Mon, 01 Dec 2003 23:27:36 GMT, Greg Bryant <bryantgHELLO@y ahoo.com> wrote:
            [color=blue]
            >Thanks, I figured it had to be something like that, but the source for
            >the page (found at http://pear.php.net/package-search.php ) only has
            ><input type="submit" name="submitBut ton" value="Search" />[/color]

            Look at the <form> element.

            --
            Andy Hassall (andy@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
            Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

            Comment

            • Greg Bryant

              #7
              Re: cool submit button switching when pressed

              Andy Hassall <andy@andyh.co. uk> wrote in
              news:tujnsv4m55 nj8g5hh61gasv4l cutteeced@4ax.c om:
              [color=blue]
              > On Mon, 01 Dec 2003 23:27:36 GMT, Greg Bryant <bryantgHELLO@y ahoo.com>
              > wrote:
              >[color=green]
              >>Thanks, I figured it had to be something like that, but the source for
              >>the page (found at http://pear.php.net/package-search.php ) only has
              >><input type="submit" name="submitBut ton" value="Search" />[/color]
              >
              > Look at the <form> element.
              >[/color]

              Ah - that's it. Learning all the time - good stuff. Thanks!

              -Greg

              Comment

              • FLEB

                #8
                Re: cool submit button switching when pressed

                Regarding this well-known quote, often attributed to Ingo's famous "Mon, 1
                Dec 2003 21:55:57 +0100" speech:
                [color=blue]
                > "Greg Bryant" <bryantgHELLO@y ahoo.com> schrieb im Newsbeitrag
                > news:Xns9443BDC 362B57bryantgHE LLOyahoocom@199 .45.49.11...[color=green]
                >> I saw it somewhere the other day, and just saw it again on the[/color]
                > pear.php.net[color=green]
                >> search page. When you click the "submit" button, it switches to a grayed
                >> out "processing " button. I glanced at the source, but I don't see[/color]
                > anything[color=green]
                >> special. Anyone know how this is done?
                >>
                >> Thanks,
                >> -G[/color]
                >
                > Try this:
                >
                > <input type="Submit" name="submit" value="Jetzt anmelden"
                > OnClick="this.d isabled=true; this.form.submi t();">
                >
                > to change text add "this.value='pr ocessing';"
                >
                >
                > Ingo (Germany)[/color]

                Is the "disabled" property standards-compliant? I thought you had to use
                CSS/DHTML JavaScript to do that (which is, BTW, a more versatile way,
                although somewhat more difficult.)

                --
                -- Rudy Fleminger
                -- sp@mmers.and.ev il.ones.will.bo w-down-to.us
                (put "Hey!" in the Subject line for priority processing!)
                -- http://www.pixelsaredead.com

                Comment

                • Alvaro G Vicario

                  #9
                  Re: cool submit button switching when pressed

                  *** FLEB wrote/escribió (Wed, 3 Dec 2003 02:51:21 -0500):[color=blue][color=green]
                  >> OnClick="this.d isabled=true; this.form.submi t();">[/color][/color]
                  [color=blue]
                  > Is the "disabled" property standards-compliant? I thought you had to use
                  > CSS/DHTML JavaScript to do that[/color]

                  I thought DHTML was using JavaScript to change HTML... :-?


                  --
                  --
                  -- Álvaro G. Vicario - Burgos, Spain
                  --

                  Comment

                  • FLEB

                    #10
                    Re: cool submit button switching when pressed

                    Regarding this well-known quote, often attributed to Alvaro G Vicario's
                    famous "Wed, 3 Dec 2003 11:02:08 +0100" speech:
                    [color=blue]
                    > *** FLEB wrote/escribió (Wed, 3 Dec 2003 02:51:21 -0500):[color=green][color=darkred]
                    >>> OnClick="this.d isabled=true; this.form.submi t();">[/color][/color]
                    >[color=green]
                    >> Is the "disabled" property standards-compliant? I thought you had to use
                    >> CSS/DHTML JavaScript to do that[/color]
                    >
                    > I thought DHTML was using JavaScript to change HTML... :-?
                    >
                    >
                    > --[/color]

                    Yes, it is, but I explicitly mentioned JavaScript for clarity.

                    --
                    -- Rudy Fleminger
                    -- sp@mmers.and.ev il.ones.will.bo w-down-to.us
                    (put "Hey!" in the Subject line for priority processing!)
                    -- http://www.pixelsaredead.com

                    Comment

                    • Tim Tyler

                      #11
                      Re: cool submit button switching when pressed

                      Greg Bryant <bryantgHELLO@y ahoo.com> wrote or quoted:[color=blue]
                      > "Ingo" <HoschiIngo@gmx .de> wrote in[/color]
                      [color=blue][color=green]
                      >> Try this:
                      >>
                      >> <input type="Submit" name="submit" value="Jetzt anmelden"
                      >> OnClick="this.d isabled=true; this.form.submi t();">
                      >>
                      >> to change text add "this.value='pr ocessing';"[/color]
                      >
                      > Thanks, I figured it had to be something like that, but the source for
                      > the page (found at http://pear.php.net/package-search.php ) only has
                      > <input type="submit" name="submitBut ton" value="Search" />[/color]

                      No - there are two forms on that page - and the other one reads:

                      <form action="/package-search.php" method="get" name="search_fo rm"
                      onsubmit="valid ate_form()">

                      The greying is done in the validate_form() method.
                      --
                      __________
                      |im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.

                      Comment

                      • Tim Tyler

                        #12
                        Re: cool submit button switching when pressed

                        FLEB <soon.the.sp@mm ers.and.evil.on es.will.bow-down-to.us> wrote or quoted:[color=blue]
                        > Regarding this well-known quote, often attributed to Alvaro G Vicario's
                        > famous "Wed, 3 Dec 2003 11:02:08 +0100" speech:[color=green]
                        >> *** FLEB wrote/escribió (Wed, 3 Dec 2003 02:51:21 -0500):[/color][/color]
                        [color=blue][color=green][color=darkred]
                        >>> Is the "disabled" property standards-compliant? I thought you had to use
                        >>> CSS/DHTML JavaScript to do that[/color]
                        >>
                        >> I thought DHTML was using JavaScript to change HTML... :-?[/color]
                        >
                        > Yes, it is, but I explicitly mentioned JavaScript for clarity.[/color]

                        You are asking whether there are DHTML/CSS/JavaScript standards,
                        and if they support the "disabled" flag?

                        I think the answer it "yes".

                        Certainly, the page in question works in IE, Mozilla and Opera.
                        --
                        __________
                        |im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.

                        Comment

                        Working...